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: add support for dev/alpha/beta/rc python versions #235

Merged

Conversation

MarcusArdelean
Copy link
Contributor

@MarcusArdelean MarcusArdelean commented Feb 23, 2024

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Adds support for development, alpha, beta and release candidate python versions.

Now we will support the following python versions:

  • Stable release versions: 3.9.2
  • Wildcard versions: 3.9.*
  • Development versions: 3.9.dev0
  • Alpha release versions: 3.9.a1
  • Beta release versions: 3.9.b2
  • Release candidate versions: 3.9.rc01

Some Context

Some clients are using Poetry in order to generate a requirements.txt file. By default, poetry uses development versions to restrict the instalation of some packages, and until now we were not handling those versions only stable releases and wildcard versions.

What are the relevant tickets?

Support ticket SUP-2503

@MarcusArdelean MarcusArdelean self-assigned this Feb 23, 2024
@MarcusArdelean MarcusArdelean requested a review from a team as a code owner February 23, 2024 09:05
Comment on lines +150 to +158
operator = {
">": gt,
"==": eq,
"<": lt,
"<=": le,
">=": ge,
'!=': ne,
}[parsed_operator]
}
operator_func = operator.get(parsed_operator)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the way the operator function was established. It's pretty confusing to create the dictionary and extract values from it in one go. I think that is even more confusing for someone that doesn't work with Python on a daily basis.

@MarcusArdelean MarcusArdelean merged commit 117ee7e into main Mar 12, 2024
22 checks passed
@MarcusArdelean MarcusArdelean deleted the fix/add-support-for-dev-alpha-beta-rc-python-versions branch March 12, 2024 07:10
@snyksec
Copy link

snyksec commented Mar 12, 2024

🎉 This PR is included in version 2.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants