Skip to content

Replace poetry.utils.appdirs with platformdirs#5527

Merged
abn merged 7 commits into
python-poetry:masterfrom
dimbleby:platformdirs
May 7, 2022
Merged

Replace poetry.utils.appdirs with platformdirs#5527
abn merged 7 commits into
python-poetry:masterfrom
dimbleby:platformdirs

Conversation

@dimbleby
Copy link
Copy Markdown
Contributor

@dimbleby dimbleby commented May 1, 2022

As noted in #5524 (comment), platformdirs is already in the poetry dependency tree (via virtualenv), so it's not clear why we have our own copy of an old version of it.

This first commit uses the github pipelines to verify that platformdirs is indeed compatible, at least with all the places where we run pipelines. If that passes I'll follow up to make the changes that actually remove poetry.utils.appdirs

@dimbleby dimbleby force-pushed the platformdirs branch 4 times, most recently from 62c86f4 to 09eaa32 Compare May 1, 2022 13:10
@dimbleby
Copy link
Copy Markdown
Contributor Author

dimbleby commented May 1, 2022

pipelines reveal that platformdirs moves the config directory on MacOS from /Users/runner/Library/Application Support/pypoetry to /Users/runner/Library/Preferences/pypoetry.

This seems to be a straight bug fix, but it is a change that will want highlighting in any changelog. See also discussion in platformdirs at tox-dev/platformdirs#47.

I'll follow up now with the commit that switches to using platformdirs (and actually also another commit that prefers to use Path over str).

Then y'all can decide whether you actually want to take this fix, or prefer to keep the old code and behaviour.

Comment thread tests/conftest.py Outdated
Comment thread src/poetry/locations.py
@dimbleby dimbleby force-pushed the platformdirs branch 2 times, most recently from c30a977 to f8eac5c Compare May 7, 2022 11:14
@abn abn merged commit 9331741 into python-poetry:master May 7, 2022
@dimbleby dimbleby deleted the platformdirs branch May 7, 2022 13:49
@kasteph kasteph mentioned this pull request May 30, 2022
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants