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

Use platformdirs over appdirs #2375

Merged
merged 1 commit into from
Jul 16, 2021
Merged

Use platformdirs over appdirs #2375

merged 1 commit into from
Jul 16, 2021

Conversation

gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Jul 16, 2021

As the appdirs repositories, maintainership has dried up (ActiveState/appdirs#79) we've forked the repository under platformdirs (https://github.com/platformdirs/platformdirs) name.

We've merged some existing open PRs and adding Android support (tox-dev/platformdirs#15) is currently in the works. We encourage black to switch to it.

@cooperlees cooperlees self-requested a review July 16, 2021 14:12
Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a smart move to me. Thanks @gaborbernat !

  • Can we please just make a note in CHANGES.md about the switch just to inform people

@ofek
Copy link
Contributor

ofek commented Jul 16, 2021

CLI will be faster too (every bit helps):

Capture

Copy link
Collaborator

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good!

@ofek just curious, what changed in the fork to make import time faster?

@ofek
Copy link
Contributor

ofek commented Jul 16, 2021

@JelleZijlstra Number 1. of tox-dev/platformdirs#1 + lazy computation of things

CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
Signed-off-by: Bernát Gábor <[email protected]>
Signed-off-by: Bernát Gábor <[email protected]>
Signed-off-by: Bernát Gábor <[email protected]>
Copy link
Collaborator

@ichard26 ichard26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice, one less unmaintained dependency, and that import time reduction! 🎉 I hope the pipenv locking wasn't too painful :)

Thank you for the PR!


By the way, if time allows it would be great if you could add any comments on your contributing experience here: #2238. I understand that you're probably busy though. P.S. thanks for maintaining virtualenv 😃

@ichard26 ichard26 merged commit 4dd100b into psf:main Jul 16, 2021
ichard26 pushed a commit that referenced this pull request Sep 1, 2021
Add new platformdirs dependencies as hidden imports when creating
PyInstaller-based binaries.

platformdirs imports the module for each platform dynamically, which
PyInstaller is unable to correctly detect for packing. By adding the
modules as hidden imports, we are telling PyInstaller to include the
modules in the packaged binary.

This issue seems to have been introduce when switching to platformdirs
in #2375. fixes #2464

Commit history before merge:

* Add hidden import to PyInstaller build

Add new platformdirs dependency as a hidden import when creating
PyInstaller based binaries.

* Only include the platformdirs for the relevant os
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.

5 participants