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

Poetry do not install package version with a post suffix, even in exact requirements #3657

Closed
3 tasks done
7sDream opened this issue Feb 7, 2021 · 4 comments
Closed
3 tasks done
Labels
kind/bug Something isn't working as expected

Comments

@7sDream
Copy link

7sDream commented Feb 7, 2021

  • 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).

  • OS version and name: macOS 11.1

  • Poetry version: 1.1.4

  • Link of a Gist with the contents of your pyproject.toml file: N/A, a empty project is enough to reproduce this issue

Issue

Try use this command to install nonebot2 package, version 2.0.0a9.post1(comply with PEP440), which is exist in pypi:

poetry add nonebot2@2.0.0a9.post1 --allow-prereleases

but get version 2.0.0.a9 installed:

image

And pyproject.toml says version is 2.0.0a9.post1:

[tool.poetry]
name = "poetrytest"
version = "0.1.0"
description = ""
authors = ["7sDream <i@7sdre.am>"]

[tool.poetry.dependencies]
python = "^3.9"
nonebot2 = {version = "2.0.0a9.post1", allow-prereleases = true}

[tool.poetry.dev-dependencies]

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

I can use pip to install/upgrade it to target version, though:

image

image

Any ideas?

@7sDream 7sDream added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 7, 2021
@finswimmer
Copy link
Member

Hello @7sDream,

thanks for reporting. The problem here is not the .post release per-se. The problem is, that it is a post release of a prerelease, which poetry currently doesn't handle correct.

fin swimmer

@radoering
Copy link
Member

Should be fixed via python-poetry/poetry-core#327.

@dimbleby
Copy link
Contributor

confirmed that with latest master code from poetry and poetry-core indeed version 2.0.0a9.post1 is installed, this can be closed

Copy link

github-actions bot commented Mar 1, 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 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants