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

Fix version union constraint not properly generated #79

Conversation

tomzx
Copy link
Contributor

@tomzx tomzx commented Sep 6, 2020

Migrated from python-poetry/poetry#1767.

When we have a union of constraints, those were not properly generated.
For example, ^1.2.3,!=1.3.5 would be converted to ^1.2.3,!=1.3.5 (same
string) under PEP508, which is not valid. This PR will instead produce
>1.2.3,<2.0.0,!=1.3.5.

The approach may not be the best/cleanest, so I'm open to hear suggestions of improvements.

Thanks!

Note: Should fix python-poetry/poetry#1522.

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

When we have a union of constraints, those were not properly generated.
For example, ^1.2.3,!=1.3.5 would be converted to ^1.2.3,!=1.3.5 (same
string) under PEP508, which is not valid.
Copy link
Member

@finswimmer finswimmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍

Thanks a lot.

@finswimmer finswimmer merged commit b647193 into python-poetry:master Sep 7, 2020
@sdispater sdispater mentioned this pull request Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intersection requirement in pyproject.toml rendered incorrectly in setup.py
2 participants