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 dropped leading characters c from constraints' packages #3250

Merged
merged 2 commits into from Mar 24, 2024

Conversation

jugmac00
Copy link
Member

lstrip takes a set, not a string, so .lstrip("-c ") did not work as intended.

Until we only support Python 3.9 or higher, we need to use a custom function to remove a prefix. With Python 3.9+ we can use the builtin .removeprefix.

This fixes #3247.

  • ran the linter to address style issues (tox -e fix)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

`lstrip` takes a set, not a string, so `.lstrip("-c ")` did not work as
intended.

Until we only support Python 3.9 or higher, we need to use a custom
function to remove a prefix. With Python 3.9+ we can use the builtin
`.removeprefix`.

This fixes tox-dev#3247.
@gaborbernat gaborbernat enabled auto-merge (squash) March 24, 2024 14:54
@gaborbernat gaborbernat merged commit 51ce2bc into tox-dev:main Mar 24, 2024
25 checks passed
@jugmac00 jugmac00 deleted the fix-3247 branch March 24, 2024 15:41
Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. I guess that was a day zero oversight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated constraints.txt eats the first c letter of packages
3 participants