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

Switch to platformdirs #3769

Merged
merged 6 commits into from
Jan 14, 2023
Merged

Switch to platformdirs #3769

merged 6 commits into from
Jan 14, 2023

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jan 13, 2023

I learned recently that appdirs is abandoned and platformdirs supersedes it, so go through the motions to replace it.

Pull Request Checklist

@jaraco
Copy link
Member Author

jaraco commented Jan 13, 2023

I'm not sure what to do with this. The tests are failing without any meaningful output in CI, but they pass for me locally. Maybe it's an issue on older Pythons, but it's hard to tell because Github doesn't allow me to start up a job on more modern Pythons, and I can't run all Pythons as a matter of course because that uses too many resources. I'm going to punt on this effort for now.

@jaraco
Copy link
Member Author

jaraco commented Jan 13, 2023

Aah. I think I see what the issue is. It tries to import typing_extensions on Python < 3.8, but typing_extensions isn't installed with the vendored dependencies.

@abravalheri
Copy link
Contributor

I think you wrap typing_extensions in a if TYPE_CHECKING clause. Typecheckers consider it as part of stdlib and already include it by default. This way you don't have to add an extra dependency...

@jaraco
Copy link
Member Author

jaraco commented Jan 14, 2023

I think you wrap typing_extensions in a if TYPE_CHECKING clause. Typecheckers consider it as part of stdlib and already include it by default. This way you don't have to add an extra dependency...

I thought about this approach, but unfortunately, Literal is expected to be in the namespace. My preference is to honor a project's declared dependencies instead of patching around them, so I'll proceed with including the dependency for now.

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.

None yet

2 participants