Code Monkey home page Code Monkey logo

Comments (10)

sdispater avatar sdispater commented on July 17, 2024

The thing is Poetry uses the PyPI JSON API to avoid having to download packages to retrieve dependency information.

So, if you look at https://pypi.org/pypi/Sphinx/json you can see that the info.requires_dist field is empty. This is likely due to the fact that the metadata was not passed, or not properly passed, as POST data when Sphinx was uploaded. This is not a bug on Poetry's side. Sphinx should upload its packages using twine (or Poetry :-)) for the metadata to be properly set.

As for pylint, this is strange since the requires_dist is not empty and it works on my side:

$ poetry debug:resolve pylint
Resolving dependencies...............

Resolution results:

  - lazy-object-proxy (1.3.1)
  - wrapt (1.10.11)
  - enum34 (1.1.6)
  - astroid (1.6.2)
  - six (1.11.0)
  - isort (4.3.4)
  - mccabe (0.6.1)
  - singledispatch (3.4.0.3)
  - configparser (3.5.0)
  - backports.functools-lru-cache (1.5)
  - colorama (0.3.9)
  - pylint (1.8.3)

from poetry.

monkeez avatar monkeez commented on July 17, 2024

Ah ok, that makes sense regarding Sphinx. I guess the workaround would be to manually install Sphinx with pip then?

Actually my pylint issue seems to be something else. If I have this pyproject.toml:

[tool.poetry]
name = "example"
version = "0.1.0"
authors = [ "Name <[email protected]>",]
description = "Example package"

[tool.poetry.dependencies]
python = "^2.7"
pylint = "^1.8"

[tool.poetry.dev-dependencies]

Then run poetry install

$ poetry install
Updating dependencies
Resolving dependencies...............


Package operations: 11 installs, 0 updates, 0 removals

Writing lock file

  - Installing lazy-object-proxy (1.3.1)
  - Installing wrapt (1.10.11)
  - Installing enum34 (1.1.6)
  - Installing astroid (1.6.2)
  - Installing six (1.11.0)
  - Installing isort (4.3.4)
  - Installing mccabe (0.6.1)
  - Installing singledispatch (3.4.0.3)
  - Installing backports.functools-lru-cache (1.5)
  - Installing colorama (0.3.9)
  - Installing pylint (1.8.3)

It's missing configparser. However, if I run poetry debug:resolve pylint it is listed:

$ poetry debug:resolve pylint
Resolving dependencies...............

Resolution results:

  - lazy-object-proxy (1.3.1)
  - wrapt (1.10.11)
  - enum34 (1.1.6)
  - astroid (1.6.2)
  - six (1.11.0)
  - isort (4.3.4)
  - mccabe (0.6.1)
  - singledispatch (3.4.0.3)
  - configparser (3.5.0)
  - backports.functools-lru-cache (1.5)
  - colorama (0.3.9)
  - pylint (1.8.3)

from poetry.

sdispater avatar sdispater commented on July 17, 2024

The installation of configparser is likely skipped if you are currently using a Python version != 2.7.

You can actually see this when installing by passing the -v/--verbose option.

$ poetry install -v

from poetry.

monkeez avatar monkeez commented on July 17, 2024

The virtualenv I'm using is Python 2.7 though:

$ poetry install -v

Using virtualenv: C:\Users\mitch\.virtualenvs\example-env
Updating dependencies
Resolving dependencies.......


Package operations: 11 installs, 0 updates, 0 removals, 1 skipped

Writing lock file

  - Installing lazy-object-proxy (1.3.1)
  - Installing wrapt (1.10.11)
  - Installing enum34 (1.1.6)
  - Installing astroid (1.6.2)
  - Installing six (1.11.0)
  - Installing isort (4.3.4)
  - Installing mccabe (0.6.1)
  - Installing singledispatch (3.4.0.3)
  - Skipping configparser (3.5.0) Not needed for the current python version
  - Installing backports.functools-lru-cache (1.5)
  - Installing colorama (0.3.9)
  - Installing pylint (1.8.3)

$ python --version
Python 2.7.14

from poetry.

sdispater avatar sdispater commented on July 17, 2024

OK. I see where the problem is coming from.

I will fix this and make a new bugfix release.

from poetry.

sdispater avatar sdispater commented on July 17, 2024

The issue with pylint should be fixed in the latest release (0.6.2)

from poetry.

monkeez avatar monkeez commented on July 17, 2024

I just tried this out on my end and I can confirm this is now fixed. Thank you!

from poetry.

byronz avatar byronz commented on July 17, 2024

@sdispater I think I had a similar issue with flake8

poetry debug:resolve  flake8
Resolving dependencies... (0.3s)

Resolution results:

  - configparser (4.0.2)
    - python: >=2.6
    - marker: python_version < "3.2"
  - enum34 (1.1.6)
    - marker: python_version < "3.4"
  - mccabe (0.6.1)
  - pycodestyle (2.3.1)
  - pyflakes (1.6.0)
  - flake8 (3.5.0)

while in the lock file, I have the entrypoints module resolved correctly, but not installed by poetry install. this causes an import thing for entrypoints.

[[package]]
category = "main"
description = "the modular source code checker: pep8, pyflakes and co"
marker = "python_version >= "3.5" and python_version < "4.0""
name = "flake8"
optional = true
python-versions = ">=2.7, !=3.0., !=3.1., !=3.2., !=3.3."
version = "3.7.9"

[package.dependencies]
entrypoints = ">=0.3.0,<0.4.0"
mccabe = ">=0.6.0,<0.7.0"
pycodestyle = ">=2.5.0,<2.6.0"
pyflakes = ">=2.1.0,<2.2.0"

from poetry.

sdispater avatar sdispater commented on July 17, 2024

@byronz Could you try with the 1.0.0b6 release?

from poetry.

github-actions avatar github-actions commented on July 17, 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.