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

#122: Add typing-extensions as dependency when python_version < 3.8 #123

Merged
merged 4 commits into from Dec 28, 2022
Merged

#122: Add typing-extensions as dependency when python_version < 3.8 #123

merged 4 commits into from Dec 28, 2022

Conversation

amacf
Copy link
Contributor

@amacf amacf commented Dec 28, 2022

Fixes #122: When importing platformdirs on Python < 3.8, typing_extensions might not be installed. Which would cause an import error.

This adds typing-extensions as a dependency when using < python3.8

@gaborbernat
Copy link
Contributor

Let's keep it as is, but add typing extension as a dependency for older python versions.

@amacf amacf changed the title #122: Check if TYPE_CHECKING is enabled before importing typing_extensions #122: Add typing-extensions as dependency when python_version < 3.8 Dec 28, 2022
@Julian
Copy link
Member

Julian commented Dec 28, 2022

CI passed on the release (including on 3.7), so someone should look at why that is as well probably.

@amacf
Copy link
Contributor Author

amacf commented Dec 28, 2022

typing-extensions is a dependency of the package importlib-metadata, which is a dependency of pytest. So the unit tests pass because typing-extensions happens to be installed by the testing library.

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
@gaborbernat gaborbernat merged commit aa671aa into platformdirs:main Dec 28, 2022
@amacf amacf deleted the 122-fix-python37-import branch December 28, 2022 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release 2.6.1 fails on import on Python < 3.8 w/o typing extensions
3 participants