Skip to content

Strange skipping of dependencies when python requirement is specified ("Not needed for the current environment") #2187

@adithyabsk

Description

@adithyabsk
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Poetry Debug Info

Poetry
Version: 1.0.5
Python:  3.6.8

Virtualenv
Python:         3.6.8
Implementation: CPython
Path:           /Users/adithyabalaji/.pyenv/versions/3.6.8/envs/test368
Valid:          True

System
Platform: darwin
OS:       posix
Python:   /Users/adithyabalaji/.pyenv/versions/3.6.8

MVP Erroring pyproject.toml

[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Adithya"]

[tool.poetry.dependencies]
python = "^3.6.1"

[tool.poetry.dev-dependencies]
seed-isort-config = { version = "^2.1.0", python = "^3.6.1"}

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Issue

When I run poetry install I expect all packages to be installed when running python 3.6.8, that doesn't seem to happen and I get the following output. It does work if I remove the python requirement on the dependency.

While this configuration doesn't make much sense in this case, consider the case where multiple python versions need to be supported (ie in my case I'm making the last release for python 2.7 for a package and thus, need to support multiple python versions at least for one more release.

I also know that this bug isn't isolated to seed-isort-config, I tried a few other packages just to be safe and found it produces the same result for flake8, etc... So it seems to be a poetry issue.

$ poetry install -vvv
Using virtualenv: /Users/adithyabalaji/.pyenv/versions/3.6.8/envs/test368
Installing dependencies from lock file

No dependencies to install or update

  - Skipping cached-property (1.5.1) Not needed for the current environment
  - Skipping aspy.refactor-imports (2.1.0) Not needed for the current environment
  - Skipping seed-isort-config (2.1.0) Not needed for the current environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions