Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix ImportError that could occurs on older Python 3.5.x #100

Merged
merged 2 commits into from
Sep 15, 2021

Conversation

Ousret
Copy link
Member

@Ousret Ousret commented Sep 15, 2021

First discovered by ros-infrastructure/ros_buildfarm#905 Not all Python 3.5.x are concerned. Latest minor is OK (3.5.10).

Was very unexpected. This PR should fix that promptly.

First discovered by ros-infrastructure/ros_buildfarm#905 Not all Python 3.5.x are concerned. Latest minor is OK.
@Ousret Ousret added the bug Something isn't working label Sep 15, 2021
@Ousret
Copy link
Member Author

Ousret commented Sep 15, 2021

In a attempt to "backport" os.PathLike on Python 3.5 and later on comply with flake8, I accidentally triggered a miscellaneous eval on the os package.

try:
    from os import PathLike
except ImportError:  # pragma: no cover
    import os  # was added to comply with flake8 and triggered the expr eval in Union[str, "os.PathLike[str]"].
    PathLike = Union[str, "os.PathLike[str]"]  # type: ignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

1 participant