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.38% -1.27%
==========================================
Files 27 27
Lines 3554 3858 +304
==========================================
+ Hits 3435 3680 +245
- Misses 119 178 +59 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3a4595f to
d542b29
Compare
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.
Um, yes, not it wasn't. I went and destroyed my tox environment and rebuilt it and found a couple of dependencies missing.
There was a problem hiding this comment.
Thanks, is the change OK now? I don't see anything new but I might be missing something.
There was a problem hiding this comment.
yes, it's fine now. it (tox) creates a new environment and installs the necessary dependencies in there from docs/requirements.txt
| "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.
There was a problem hiding this comment.
Yes, typing. It was in options.extras_require in setup.cfg and included all deps linked to typing. My understanding was that an user could pip install kazoo[typing] to install it if they wanted to. Now, it does not seem possible anymore? Is it what we want?
There was a problem hiding this comment.
ah, ok. I hadn't realised that.
However, doing what is suggested in the literature doesn't work for python3.8 and mypy fails completely.
I've added a dependency group typing and for python3.9+ (well, the first pip that was released after python3.8 support was dropped) you can use pip install --group typing. Would that be a reasonable approach?
| ] | ||
| dependencies = ["typing-extensions"] | ||
|
|
||
| [project.urls] |
There was a problem hiding this comment.
May I ask for Homepage = "https://kazoo.readthedocs.io" to be added?
There was a problem hiding this comment.
The same url as the "Documentation" page? Or replace the documentation page?
I've assumed the first but let me know if you want it changed.
107a9f4 to
ce144f3
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.
ce144f3 to
883dbfc
Compare
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.MANIFEST.inas a lot of it has no effectDoes 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