python-poetry / python-poetry/poetry

Migrating to the new installer may cause keyring failures for existing keyring items on MacOS

Open
#7,243 9 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/docs status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

Migrating to the new installer may cause keyring failures for existing keyring items on MacOS.

I recently migrated from 1.1.x to 1.3.1. Per the docs I migrated to the new installer. I had an existing keyring item for a private PyPI repo (poetry-repository-foo). Now, after the migration to the new installer, updating the token for that PyPI repo with poetry config http-basic.foo <username> <token> failed with following rather uninformative error:

Unable to store the password for poetry-repository-foo in the key ring: Can't store password on keychain: (-25244, 'Unknown Error')

It turns out error code -25244 means "Invalid attempt to change the owner of this item.". And this makes sense, the bundled python now is installed is in a different location, and MacOS' keychain only recognizes the old location. The solution is to grant the bundled python executable at /Users/<username>/Library/Application Support/pypoetry/venv/bin/python access to the keyring item.

I do not think there is much Poetry can actively do to fix this. After all, poetry can't grant itself access. But maybe this can be better documented in the migration guide?

My environment

Python: 3.9.7
Poetry version: 1.3.1
OS: MacOS Monterey

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked new standalone installer announcement and the migration documentation, then review the reported poetry config http-basic.foo command and bundled Python path. Done means the migration guidance explains why existing macOS keyring items can fail after migration and documents granting the new bundled Python access to the item.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.