Skip to content

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
Member

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
Contributor

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 <[email protected]>
@gaborbernat gaborbernat merged commit aa671aa into tox-dev: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