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

Revert platformdirs on MacOS and Windows #1297

Merged
merged 15 commits into from
Mar 29, 2024
Merged

Conversation

Gitznik
Copy link
Contributor

@Gitznik Gitznik commented Mar 22, 2024

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Summary of changes

On MacOS and Windows, we now use the old paths again, while using the post 1.2.0 paths as fallback.
On Linux - nothing changed.

Resolves #1257

Test plan

Tested by running

Existing test suite

dukecat0
dukecat0 previously approved these changes Mar 25, 2024
src/pipx/constants.py Outdated Show resolved Hide resolved
changelog.d/1257.feature.md Outdated Show resolved Hide resolved
docs/installation.md Outdated Show resolved Hide resolved
@chrysle
Copy link
Contributor

chrysle commented Mar 25, 2024

By the way, should we have pipx automatically remove the old location if the new one exists and is populated?

@jaraco
Copy link
Member

jaraco commented Mar 25, 2024

IMHO - if platformdirs isn't providing any value on Windows or Mac, it should probably be removed and pipx should fallback to a consistent behavior across platforms.

@Gitznik
Copy link
Contributor Author

Gitznik commented Mar 25, 2024

IMHO - if platformdirs isn't providing any value on Windows or Mac, it should probably be removed and pipx should fallback to a consistent behavior across platforms.

The benefit is specifically on linux, adhering to the xdg spec. IMO that's a good reason to keep it. we need to keep the package anyways to be backwards compatible with anyone that used the default location since 1.2

By the way, should we have pipx automatically remove the old location if the new one exists and is populated?

I don't think I'm fond of automatically removing it, but maybe we can print a hint that it can safely be deleted by the user?

@gaborbernat gaborbernat marked this pull request as draft March 25, 2024 17:39
@chrysle
Copy link
Contributor

chrysle commented Mar 25, 2024

The benefit is specifically on linux, adhering to the xdg spec. IMO that's a good reason to keep it.

As especially downstream packagers are really pleased if it is being followed (see e.g. Debian).

I don't think I'm fond of automatically removing it, but maybe we can print a hint that it can safely be deleted by the user?

Let's do this at info level.

src/pipx/paths.py Outdated Show resolved Hide resolved
src/pipx/paths.py Outdated Show resolved Hide resolved
src/pipx/paths.py Outdated Show resolved Hide resolved
src/pipx/paths.py Outdated Show resolved Hide resolved
@Gitznik Gitznik marked this pull request as ready for review March 26, 2024 20:18
@Gitznik Gitznik merged commit 9679124 into pypa:main Mar 29, 2024
14 checks passed
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.

revert using platformdirs by default for windows and macos
5 participants