question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect installation of extras packages for multiple conditions

See original GitHub issue
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: macOS 10.15

  • Poetry version: 1.1.4

Issue

[tool.poetry.dependencies]
python = "^3.8"
requests = [
    { version = "==2.24.0", python = "~3.8", optional = true },
    { version = "==2.25.0", python = "~3.9", optional = true }
]

[tool.poetry.extras]
req = ["requests"]

[tool.poetry.dev-dependencies]

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

When I install my package geneated by poetry build with the above pyproject.toml file, I don’t think it behaves correctly under some conditions.

Specifically, when I run pip install my_package-0.1.0-py3-none-any.whl,

  • in python 3.9
    • expected: not install
    • actual: requests==2.25.0 is installed. <- Incorrect!
  • in python 3.8
    • expected: not install
    • actual: not install

I think there is a problem with the files generated by poetry build, as it works correctly with poetry install.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dimblebycommented, Oct 29, 2022

metadata today says:

Requires-Dist: requests (==2.24.0); (python_version >= "3.8" and python_version < "3.9") and (extra == "req")
Requires-Dist: requests (==2.25.0); (python_version >= "3.9" and python_version < "3.10") and (extra == "req")

which is correct, this can be closed

1reaction
logileifscommented, Jan 19, 2021

Same thing happening for me. Does nobody have a workaround or know if this works in an older version?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I install the ubuntu-restricted-extras package?
Select yes, and you'll have ubuntu-restricted-extras installed and working. ... Or go to software centre and install Ubuntu-restricted-extras.
Read more >
Use the OR criteria to query on alternate or multiple conditions
To see information when either two or more alternate criteria are satisfied, use the or criteria rows in the Access query design grid....
Read more >
Nested IF in Excel – formula with multiple conditions - Ablebits
Excel nested IF statement - multiple conditions in a single formula ... Excel doesn't care about extra spacing in a formula, so you...
Read more >
Legal - Repair Terms and Conditions - Apple
Apple may install system software updates as part of service that will prevent ... neglect, misuse (including faulty installation, repair, or maintenance by ......
Read more >
conda install
This command accepts a list of package specifications (e.g, bitarray=0.8) and installs a set of packages consistent with those specifications and compatible ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found