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

Some dependencies not getting installed #20

Closed
monkeez opened this issue Mar 19, 2018 · 10 comments
Closed

Some dependencies not getting installed #20

monkeez opened this issue Mar 19, 2018 · 10 comments
Labels
area/installer Related to the dependency installer kind/bug Something isn't working as expected

Comments

@monkeez
Copy link
Contributor

monkeez commented Mar 19, 2018

Trying to add Sphinx to my dependencies, but none of Sphinx's dependencies get installed.

Here's what my pyproject.toml looks like after running poetry add sphinx:

[tool.poetry]
name = "poetry-demo"
version = "0.1.0"
authors = [ "My Name <[email protected]>",]
description = "Here's a package supplied by Poetry."

[tool.poetry.dependencies]
python = "^2.7"
sphinx = "^1.7"

[tool.poetry.dev-dependencies]
pytest = "^3.4"

And my pyproject.lock:

[[package]]
name = "attrs"
version = "17.4.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
python-versions = "*"
platform = "*"

[[package]]
name = "colorama"
version = "0.3.9"
description = "Cross-platform colored terminal text."
category = "dev"
optional = false
python-versions = "*"
platform = "*"

[package.requirements]
platform = "win32"
[[package]]
name = "funcsigs"
version = "1.0.2"
description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+"
category = "dev"
optional = false
python-versions = "*"
platform = "*"

[package.requirements]
python = "<3.0"
[[package]]
name = "pluggy"
version = "0.6.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false
python-versions = "*"
platform = "*"

[[package]]
name = "py"
version = "1.5.2"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
python-versions = "*"
platform = "*"

[[package]]
name = "pytest"
version = "3.4.2"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = "*"
platform = "*"

[package.dependencies]
colorama = ""
funcsigs = ""
pluggy = "<0.7,>=0.5"
attrs = ">=17.2.0"
setuptools = ""
six = ">=1.10.0"
py = ">=1.5.0"
[[package]]
name = "six"
version = "1.11.0"
description = "Python 2 and 3 compatibility utilities"
category = "dev"
optional = false
python-versions = "*"
platform = "*"

[[package]]
name = "sphinx"
version = "1.7.1"
description = "Python documentation generator"
category = "main"
optional = false
python-versions = "*"
platform = "*"

[metadata]
python-versions = "^2.7"
platform = "*"
content-hash = "520283d56df5911cac74bab7cd560271a1470283fac751f551c44e5eb6c466b0"

[metadata.hashes]
attrs = [ "a17a9573a6f475c99b551c0e0a812707ddda1ec9653bed04c13841404ed6f450", "1c7960ccfd6a005cd9f7ba884e6316b5e430a3f1a6c37c5f87d8b43f83b54ec9",]
colorama = [ "463f8483208e921368c9f306094eb6f725c6ca42b0f97e313cb5d5512459feda", "48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1",]
funcsigs = [ "330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca", "a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50",]
pluggy = [ "7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff",]
py = [ "8cca5c229d225f8c1e3085be4fcf306090b00850fefad892f9d96c7b6e2f310f", "ca18943e28235417756316bfada6cd96b23ce60dd532642690dcfdaba988a76d",]
pytest = [ "062027955bccbc04d2fcd5d79690947e018ba31abe4c90b2c6721abec734261b", "117bad36c1a787e1a8a659df35de53ba05f9f3398fb9e4ac17e80ad5903eb8c5",]
six = [ "832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb", "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",]
sphinx = [ "41ae26acc6130ccf6ed47e5cca73742b80d55a134f0ab897c479bba8d3640b8e", "da987de5fcca21a4acc7f67a86a363039e67ac3e8827161e61b91deb131c0ee8",]

This was also happening when I was trying to install pylint, its dependencies weren't installed.

@sdispater
Copy link
Member

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)

@monkeez
Copy link
Contributor Author

monkeez commented Mar 19, 2018

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)

@sdispater
Copy link
Member

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

@monkeez
Copy link
Contributor Author

monkeez commented Mar 19, 2018

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

@sdispater
Copy link
Member

OK. I see where the problem is coming from.

I will fix this and make a new bugfix release.

@sdispater sdispater added kind/bug Something isn't working as expected area/installer Related to the dependency installer labels Mar 19, 2018
@sdispater
Copy link
Member

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

@monkeez
Copy link
Contributor Author

monkeez commented Mar 20, 2018

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

@byronz
Copy link

byronz commented Nov 21, 2019

@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"

@sdispater
Copy link
Member

@byronz Could you try with the 1.0.0b6 release?

Copy link

github-actions bot commented Mar 3, 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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/installer Related to the dependency installer kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants