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

Broken default source repository in all projects #7192

Closed
3 of 4 tasks
amarion35 opened this issue Dec 13, 2022 · 2 comments
Closed
3 of 4 tasks

Broken default source repository in all projects #7192

amarion35 opened this issue Dec 13, 2022 · 2 comments
Labels
kind/question User questions (candidates for conversion to discussion)

Comments

@amarion35
Copy link

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I played with Azure Feed and with the help of the official microsoft quick start and this answer I've been able to make it work without too much trouble. I then commented the repository from the toml which give me this pyprojet.toml :

  [tool.poetry]
  name = "my_package"
  version = "0.1.0"
  
  [tool.poetry.dependencies]
  python = "^3.8"
  numpy = "^1.20.1"
  
  [tool.poetry.dev-dependencies]
  pytest = "^6.2.5"
  
  [build-system]
  requires = ["poetry-core>=1.0.0"]
  build-backend = "poetry.core.masonry.api"
  
  # [[tool.poetry.source]]
  # name = "feed_name"
  # url = "https://pkgs.dev.azure.com/.../pypi/simple/"
  # default = true
  # secondary = false

I was expecting to get back to the default PyPI repository but the poetry lock is on hold at this step in the logs:

  (my_package-py3.8) root@amarion35:~/Projects/my_package# poetry lock -vvv
  Loading configuration file /root/.config/pypoetry/config.toml
  Using virtualenv: /root/.cache/pypoetry/virtualenvs/my_package-fKOiEnkg-py3.8
  Project environment contains an empty path in sys_path, ignoring.
  Updating dependencies
  Resolving dependencies...
     1: fact: my_package is 0.1.0
     1: derived: my_package
     1: fact: my_package depends on numpy (^1.20.1)
     1: fact: my_package depends on pytest (^6.2.5)
     1: selecting my_package (0.1.0)
     1: derived: pytest (>=6.2.5,<7.0.0)
     1: derived: numpy (>=1.20.1,<2.0.0)
  [keyring.backend] Loading KWallet
  [keyring.backend] Loading SecretService
  [keyring.backend] Loading Windows
  [keyring.backend] Loading chainer
  [keyring.backend] Loading libsecret
  [keyring.backend] Loading macOS
  No suitable keyring backend found
  No suitable keyring backends were found
  Keyring is not available, credentials will be stored and retrieved from configuration files as plaintext.
  Creating new session for pypi.org
  [urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443
  [urllib3.connectionpool] https://pypi.org:443 "GET /simple/pytest/ HTTP/1.1" 200 25711

Poetry seems unable to connect to pypi.org but I don't receive any timeout either. I also tried poetry install -vvv with the former poetry.lock but it gets stuck at the same step in the logs. The issue is the same in all my environments. It works fine in my containers so it really looks like I messed up something in my local poetry configuration.

After some tests I find a solution with the command poetry source add --default pypi-public https://pypi.org/simple/ but it only makes the trick for the current project. It looks like PyPI has been removed from default source in all my projects.

@amarion35 amarion35 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 13, 2022
@neersighted
Copy link
Member

Your PyPI cache is corrupted, which is unrelated to the use of alternate sources. Please try poetry cache clear --all ., or upgrade to Poetry 1.3.1, which fixes this cache corruption. This was most like caused by interrupting Poetry in the middle of cache I/O, leaving stale lock files.

@neersighted neersighted added kind/question User questions (candidates for conversion to discussion) and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 13, 2022
Copy link

This issue 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
kind/question User questions (candidates for conversion to discussion)
Projects
None yet
Development

No branches or pull requests

2 participants