-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
PEP621: Migrate setup.py config into pyproject.toml #770
Conversation
3721133
to
198e6cb
Compare
44eb1de
to
081c1ea
Compare
Codecov Report
@@ Coverage Diff @@
## master #770 +/- ##
========================================
Coverage 77.81% 77.81%
========================================
Files 330 330
Lines 10093 10093
Branches 1194 555 -639
========================================
Hits 7854 7854
Misses 2086 2086
Partials 153 153
Flags with carried forward coverage won't be shown. Click here to find out more.
|
457ab74
to
6f675b7
Compare
for more information, see https://pre-commit.ci
We really need |
"pytest-cov>=2.7.1", | ||
"python-jose>=3", | ||
"python3-saml>=1.5" | ||
] |
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.
This all duplicates requirements-*.txt content. Can the dependencies be specified just once?
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.
Yes, but can we push that to a separate PR? This one already touches a lot of files and tox.ini
and GitHub Action caching will need to be modified when dropping requirements files.
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 can generate the requirements files from the pyproject.toml
one:
python3 -m piptools compile --output-file=requirements.txt pyproject.toml
python3 -m piptools compile --extra=dev --output-file=requirements-dev.txt pyproject.toml
etc
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers
why we should accept this pull request. If it fixes a bug or resolves a feature
request, be sure to link to that issue.
PEP621 encourages the Python community to migrate away from complex
setup.cfg
+setup.py
files by putting config data inpyproject.toml
.Migrate
setup.py
tosetup.cfg
using setuptools-py2cfg plus manual modifications.Then migrate
setup.cfg
topyproject.toml
using ini2toml to do the file conversion and running validate-pyproject in pre-commit to validate the results.The change in
tox.ini
frompip install --no-binary lxml
-->pip install --no-cache-dir lxml
is going to be mandated by the next major release ofpip
and decreases our tox test runtimes from 3 or 4 minutes down to 1 or 2 minutes.Building Python projects in this way requires dropping support for Python 3.6.
If this pull request is merged then required must be removed from
test (3.6)
and added totest (3.11)
.Also, maybe remove required from
flake8
and add it topre-commit.ci
?Types of changes
Please check the type of change your PR introduces:
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask. We're here to
help! This is simply a reminder of what we are going to look for before merging
your code.
Other information
Any other information that is important to this PR such as screenshots of how
the component looks before and after the change.