chore: merge constraints.txt and setup.cfg into pyproject.toml to simplify setup - #798
chore: merge constraints.txt and setup.cfg into pyproject.toml to simplify setup#798ThosRTanner wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #798 +/- ##
==========================================
- Coverage 96.65% 95.41% -1.24%
==========================================
Files 27 27
Lines 3554 3858 +304
==========================================
+ Hits 3435 3681 +246
- Misses 119 177 +58 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3a4595f to
d542b29
Compare
15c17d4 to
21f0b93
Compare
Consolidates setup.cfg and constraints.txt into pyproject.toml, and additionally cleans up the list so that only the optional eventlet, gevent and sasl dependencies are visible, the various dev ones are not. Updated pytest to the latest supporting 3.8 or it can't cope with the .toml file... Removed Makefile which isn't used anywhere and references a bunch of requirements*.txt files which don't exist.
21f0b93 to
c24cafe
Compare
| path: . | ||
| extra_requirements: | ||
| - docs | ||
| - requirements: docs/requirements.txt |
There was a problem hiding this comment.
Will this be enough? Before it seems to do pip install . [docs], so kazoo + docs subgroup, now it seems to only install the docs libs, without kazoo? I think it might be missing the typing-extensions
There was a problem hiding this comment.
Reference should be removed from MANIFEST.in too
| "Topic :: System :: Distributed Computing", | ||
| "Topic :: System :: Networking", | ||
| ] | ||
| dependencies = ["typing-extensions"] |
There was a problem hiding this comment.
I mentionned it here #797 (comment), I think it needs to be pinned, probably >=4.5 because of deprecated but not 100% sure
There was a problem hiding this comment.
Ah, looks like I have 4.13.2. I'll pin it to at least that.
| "pytest-timeout==2.4.0; python_version > '3.8'", | ||
| {include-group = "test-extras"}, | ||
| ] | ||
| mypy = [ |
There was a problem hiding this comment.
May I ask why it was not added as a project.optional-dependencies too ([typing])?
There was a problem hiding this comment.
typing? or typing-extensions. You need typing-extensions because the some of the types defined in there are used in places where the interpreter can't skip over it, sadly. The whole of mypy is a dependency group so it's only installed if you're explicitly installing it - which is what tox does.
| zip-safe = false | ||
| include-package-data = true | ||
| packages = {find = {}} | ||
| license-files = ["LICENSE"] |
There was a problem hiding this comment.
Would it be better to put it in the [project] section instead? https://packaging.python.org/en/latest/specifications/pyproject-toml/#license-files
| ] | ||
| dependencies = ["typing-extensions"] | ||
|
|
||
| [project.urls] |
There was a problem hiding this comment.
May I ask for Homepage = "https://kazoo.readthedocs.io" to be added?
| black | ||
| dependency_groups = black | ||
| usedevelop = True | ||
| commands = black --check {posargs: {toxinidir}/kazoo {toxinidir}/kazoo} |
There was a problem hiding this comment.
Seems like we had 2 times the same arg here? weird
There was a problem hiding this comment.
yeah, that is definitely weird.
I removed the 2nd.
Fixes #786
Why is this needed?
Currently constraints are specified in 3 places which makes it hard to track what you need to change. I'm not an out and out lover of
pyproject.tomlbut having all module setup in one place makes it easier to control package version dependencies.All that is left in setup.cfg is the
tag_build = devto tag dev builds as such, as I've been unable to find an obvious equivalent inpyproject.tomlProposed Changes
constraints.txtandsetup.cfginfo intopyproject.toml. This also requires us to:tox.inito use new dependency groupsMakefilewhich has not been maintained and refers to non existent requirements filedocs/requirements.txttox -e docsactually generate the docs.Does this PR introduce any breaking change?
The internal dependencies are no longer leaked from
setup.cfg, and the top levelMakefilehas been removed. This shouldn't affect anyone, but one never knows...Codecov report
This appears to be because it's two commits out of date. This change hasn't affected what code is covered during tests