Code Monkey home page Code Monkey logo

Comments (5)

sdispater avatar sdispater commented on August 16, 2024 1

This a known issue but is not caused by poetry directly.

Basically, poetry uses the PyPI JSON API to get packages information to avoid having to download every packages to inspect dependencies.

Here is the JSON payload for boto3: https://pypi.org/pypi/boto3/json. As you can see in info.requires_dist, which represents the dependencies, it's empty. So, naturally, poetry can't pick up the boto3 dependencies.

This is an issue of boto3 when they upload their packages without passing all the necessary metadata. They should use twine to upload the package (or even poetry ;-)) to avoid that.

For the time being, you might consider adding botocore to your dependencies to workaround the issue.

from poetry.

radix avatar radix commented on August 16, 2024

This makes me really sad :( Clearly the python ecosystem is not ready for people to actually use the metadata API on PyPI. (I'm surprised it requires the uploading tool to specify it, instead of PyPI just analyzing the contents of the uploaded file...) I noticed there are other cases of this in my dependency tree as well.

Is there any possibility of allowing a slow-mode that does download packages in order to access their metadata?

from poetry.

sdispater avatar sdispater commented on August 16, 2024

I know and that's why tools like poetry will help make everything consistent. You can report the issue upstream (on the boto3 repository) to help improve things.

It's possible to activate a slow-mode, even though I consider it a hack since it's not the intended use case.

You can set a new repository in your pyproject.toml file which points to PyPI:

[[tool.poetry.source]]
name = 'pypi-legacy'
url = 'https://pypi.org/simple'

Note, however, that due to the way the dependency resolver works and the important number of releases for botocore it will be extremely slow the first time (on my machine it took 30 minutes to resolve dependencies). It will be much faster after that since everything will be cached. But if you use a CI system and you do not cache the poetry's cache directory it will be slow each time.

That's why it is not the recommended approach and poetry tries to use the JSON API as much as possible.

from poetry.

radix avatar radix commented on August 16, 2024

hi sdispater!

I recently tried again with the latest release of poetry and botocore was installed successfully, so I'm closing this.

Thank you very much for your hard work! I am very excited about poetry making working with Python projects much better.

from poetry.

github-actions avatar github-actions commented on August 16, 2024

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.

from poetry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.