Skip to content

Read python version from pyproject.toml (fix #542) #669

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

Merged
merged 8 commits into from
Jun 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests for python version files
  • Loading branch information
dariocurr committed Jun 6, 2023
commit 3e4f08959a279d30b447fcfb8f4a142fd8a3b98e
28 changes: 28 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,31 @@ jobs:
run: python __tests__/verify-python.py 3.10
- name: Run python-path sample 3.10
run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version

- name: Run with setup-python ==3.8
uses: ./
with:
python-version: '==3.8'
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor Author

@dariocurr dariocurr Jun 23, 2023

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

Copy link
Contributor

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.

Copy link
Contributor Author

@dariocurr dariocurr Jun 23, 2023

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.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done with 39c1ae5

- name: Verify ==3.8
run: python __tests__/verify-python.py 3.8

- name: Run with setup-python <3.11
uses: ./
with:
python-version: '<3.11'
- name: Verify <3.11
run: python __tests__/verify-python.py 3.10

- name: Run with setup-python >3.8
uses: ./
with:
python-version: '>3.8'
- name: Verify >3.8
run: python __tests__/verify-python.py 3.11

- name: Run with setup-python >=3.8,<3.10
uses: ./
with:
python-version: '>=3.8,<3.10'
- name: Verify >=3.8,<3.10
run: python __tests__/verify-python.py 3.9
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy