-
Notifications
You must be signed in to change notification settings - Fork 549
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
Read python version from pyproject.toml (fix #542) #669
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0422415
Add TOML dependency
dariocurr c242fc9
Add examples for version ranges and pyproject.toml
dariocurr e1bb6df
Add tests for python version files
dariocurr 3e4f089
Add tests for python version files
dariocurr 5fe4cfd
Add utils to extract python version from files
dariocurr 6f8266d
Replace toml with @iarna/toml
dariocurr 556ac3e
Remove pyproject.toml from default values
dariocurr c4ab19b
Allow python version bounds just with TOMLs
dariocurr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please keep syntax specific for toml files for python-version-file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain better the expected behaviour you desire?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's quite difficult for me to keep up with this PR with feedbacks once a week
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously such type of syntax was not supported by setup-python. If I understood correctly it comes from the toml file log. I'd like to keep this logic in the scope of python-version-file input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You already supported it because you parse versions using semver. I did not change the parsing behavior.
You were already supporting it, but you were not testing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your response @dariocurr. It is right that '==3.8' is supported by SemVer but as I suppose that
>=3.8,<3.10
is not supported. If it is so could you please keep logic regarding to toml to python-version-file parsing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why I added this line to convert
>=3.8,<3.10
to>=3.8 <3.10
:https://github.com/dariocurr/setup-python/blob/6f8266d242a075e81d1967d6165cd0af7e56d049/src/setup-python.ts#L73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is right that we need to change it to SemVer syntax but I'd like to keep it this syntax for in scope of python-version-file input so when you get it from the toml file it get parsed but it should not be allowed to pass it through python-version input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with 39c1ae5