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

Wrong version installed when using PEP 440 version epochs #892

Closed
3 tasks done
jacebrowning opened this issue Feb 13, 2019 · 4 comments · Fixed by python-poetry/poetry-core#264
Closed
3 tasks done
Labels
area/core Related to the poetry-core library kind/bug Something isn't working as expected

Comments

@jacebrowning
Copy link
Contributor

jacebrowning commented Feb 13, 2019

  • 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 10.14.3
  • Poetry version: 0.12.11
  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

1!2019.2.12 is requested but 1!2015.2.1 is installed:

$ poetry new demo
$ cd demo
$ poetry add "foursquare==1\!2019.2.12"
Creating virtualenv demo-py3.7 in /private/tmp/demo/.venv

Updating dependencies
Resolving dependencies... (0.2s)
Package operations: 13 installs, 0 updates, 0 removals

Writing lock file

  - Installing certifi (2018.11.29)
  ...
  - Installing foursquare (1!2015.2.1)
  ...

I see code that seems to support this, but no tests: https://github.com/sdispater/poetry/search?q=epoch&unscoped_q=epoch

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@jacebrowning
Copy link
Contributor Author

I believe this issue is still valid and should be treated as a bug.

@stale stale bot removed the stale label Nov 13, 2019
@sdispater sdispater added the kind/bug Something isn't working as expected label Nov 13, 2019
@JBKahn
Copy link
Contributor

JBKahn commented Dec 8, 2019

The semver.Version doesn't support it, but the version.Version parser does. It seems a bit strange to have two different parsers, I think if the semver Parser only parsed the constraint out but not the versions that could work? @sdispater how do you think this should be structured?

Separating it into:

# constraint_parser being a regex that has ((named constraint 1)?|(named constraint 2)?...)?(+rest_of_string)
constraint_parser = m.parse(constraint)
version_string = m.groups('rest_of_string')

Then pass the version to version.Version?

I don't really know what semver versions are used for as opposed to version versions.

Copy link

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

Successfully merging a pull request may close this issue.

4 participants