-
Notifications
You must be signed in to change notification settings - Fork 394
chore: merge constraints.txt and setup.cfg into pyproject.toml to simplify setup #798
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reference should be removed from
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops. Done. Actually, I gave |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Sphinx>=1.2.2 | ||
| sphinx-autodoc-typehints>=1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,98 @@ | ||
| [build-system] | ||
| build-backend = 'setuptools.build_meta' | ||
| requires = [ | ||
| 'setuptools >= 46.4.0', | ||
| 'setuptools >= 61.0.0', | ||
| ] | ||
|
|
||
| [project] | ||
| name = "kazoo" | ||
| dynamic = ["version", "readme"] | ||
| description = "Higher Level Zookeeper Client" | ||
| requires-python = ">=3.8" | ||
| license = {text = "Apache 2.0"} | ||
| authors = [ | ||
| {name = "Kazoo team", email = "python-zk@googlegroups.com"}, | ||
| ] | ||
| keywords = ["zookeeper", "lock", "leader", "configuration"] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| "Intended Audience :: Developers", | ||
| "Operating System :: OS Independent", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.8", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Programming Language :: Python :: 3.14", | ||
| "Programming Language :: Python :: Implementation :: CPython", | ||
| "Programming Language :: Python :: Implementation :: PyPy", | ||
| "Topic :: Communications", | ||
| "Topic :: System :: Distributed Computing", | ||
| "Topic :: System :: Networking", | ||
| ] | ||
| dependencies = ["typing-extensions"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mentionned it here #797 (comment), I think it needs to be pinned, probably
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, looks like I have 4.13.2. I'll pin it to at least that. |
||
|
|
||
| [project.urls] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May I ask for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| Documentation = "https://kazoo.readthedocs.io" | ||
| Changelog = "https://github.com/python-zk/kazoo/releases" | ||
| Source = "https://github.com/python-zk/kazoo" | ||
| "Bug Tracker" = "https://github.com/python-zk/kazoo/issues" | ||
|
|
||
| [project.optional-dependencies] | ||
| eventlet = ["eventlet>=0.17.1; implementation_name != 'pypy'"] | ||
| gevent = ["gevent>=1.2; implementation_name != 'pypy'"] | ||
| sasl = ["pure_sasl>=0.5.1"] | ||
|
|
||
| [dependency-groups] | ||
| black = ["black==22.10.0"] | ||
| pep8 = ["flake8==5.0.2"] | ||
| test-extras = [ | ||
| "objgraph==3.5.0", | ||
| "pyOpenSSL<26.2.0", | ||
| "pyjks", | ||
| "unittest-parametrize", | ||
| ] | ||
| pytest = [ | ||
| "pytest==7.4.4; python_version == '3.8'", | ||
| "pytest==8.4.2; python_version > '3.8'", | ||
| ] | ||
| test = [ | ||
| "coverage==6.3.2; python_version == '3.8'", | ||
| "coverage==7.10.7; python_version > '3.8'", | ||
| {include-group = "pytest"}, | ||
| "pytest-cov==3.0.0; python_version == '3.8'", | ||
| "pytest-cov==7.0.0; python_version > '3.8'", | ||
| "pytest-timeout==2.2.0; python_version == '3.8'", | ||
| "pytest-timeout==2.4.0; python_version > '3.8'", | ||
| {include-group = "test-extras"}, | ||
| ] | ||
| mypy = [ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May I ask why it was not added as a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| "mypy==1.14.1", | ||
| {include-group = "test-extras"}, | ||
| {include-group = "pytest"}, | ||
| "types-gevent", | ||
| "types-mock", | ||
| "types-objgraph", | ||
| "types-pyjks", | ||
| ] | ||
|
|
||
| [tool.setuptools] | ||
| zip-safe = false | ||
| include-package-data = true | ||
| packages = {find = {}} | ||
| license-files = ["LICENSE"] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be better to put it in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not supported for python 3.8 sadly. |
||
|
|
||
| [tool.setuptools.package-data] | ||
| kazoo = ["py.typed"] | ||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = {attr = "kazoo.version.__version__"} | ||
| readme = {file = ["README.md", "CHANGES.md"], content-type = "text/markdown"} | ||
|
|
||
| [tool.black] | ||
| line-length = 79 | ||
| # We need a later version of black for 312-314 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,106 +1,2 @@ | ||
| [metadata] | ||
| name = kazoo | ||
| version = attr: kazoo.version.__version__ | ||
| author = Kazoo team | ||
| author_email = python-zk@googlegroups.com | ||
| url = https://kazoo.readthedocs.io | ||
| description = "Higher Level Zookeeper Client" | ||
| long_description = file: README.md, CHANGES.md | ||
| long_description_content_type = text/markdown | ||
| license = Apache 2.0 | ||
| license_files = | ||
| LICENSE | ||
| platform = any | ||
| keywords = zookeeper, lock, leader, configuration | ||
| classifiers = | ||
| Development Status :: 5 - Production/Stable | ||
| License :: OSI Approved :: Apache Software License | ||
| Intended Audience :: Developers | ||
| Operating System :: OS Independent | ||
| Programming Language :: Python | ||
| Programming Language :: Python :: 3 | ||
| Programming Language :: Python :: 3.8 | ||
| Programming Language :: Python :: 3.9 | ||
| Programming Language :: Python :: 3.10 | ||
| Programming Language :: Python :: 3.11 | ||
| Programming Language :: Python :: 3.12 | ||
| Programming Language :: Python :: 3.13 | ||
| Programming Language :: Python :: 3.14 | ||
| Programming Language :: Python :: Implementation :: CPython | ||
| Programming Language :: Python :: Implementation :: PyPy | ||
| Topic :: Communications | ||
| Topic :: System :: Distributed Computing | ||
| Topic :: System :: Networking | ||
| project_urls = | ||
| Documentation = https://kazoo.readthedocs.io | ||
| Changelog = https://github.com/python-zk/kazoo/releases | ||
| Source = https://github.com/python-zk/kazoo | ||
| Bug Tracker = https://github.com/python-zk/kazoo/issues | ||
|
|
||
|
|
||
| [options] | ||
| zip_safe = false | ||
| include_package_data = true | ||
| packages = find: | ||
| install_requires = | ||
| typing-extensions | ||
|
|
||
| [options.package_data] | ||
| kazoo = py.typed | ||
|
|
||
| [aliases] | ||
| release = sdist bdist_wheel | ||
|
|
||
| [egg_info] | ||
| tag_build = dev | ||
|
|
||
| [options.extras_require] | ||
| dev = | ||
| black | ||
| flake8 | ||
|
|
||
| # I have to pin this HERE because I can't persuade vscode to | ||
| # look in constraints.txt | ||
| other = | ||
| pyOpenSSL<26.2.0 | ||
| typing-extensions | ||
|
|
||
| test = | ||
| objgraph | ||
| pytest | ||
| pytest-cov | ||
| pytest-timeout | ||
| gevent>=1.2 ; implementation_name!='pypy' | ||
| eventlet>=0.17.1 ; implementation_name!='pypy' | ||
| pyjks | ||
| unittest-parametrize | ||
| %(other)s | ||
|
|
||
| eventlet = | ||
| eventlet>=0.17.1 | ||
|
|
||
| gevent = | ||
| gevent>=1.2 | ||
|
|
||
| sasl = | ||
| pure_sasl>=0.5.1 | ||
|
|
||
| docs = | ||
| Sphinx>=1.2.2 | ||
| sphinx-autodoc-typehints>=1 | ||
|
|
||
| typing = | ||
| mypy==1.14.1 | ||
| types-gevent | ||
| types-mock | ||
| types-objgraph | ||
| types-pyjks | ||
|
|
||
| alldeps = | ||
| %(dev)s | ||
| %(eventlet)s | ||
| %(gevent)s | ||
| %(sasl)s | ||
| %(docs)s | ||
| %(other)s | ||
| %(typing)s |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| [tox] | ||
| minversion = 4.3.4 | ||
| requires= | ||
| tox>=4.22 | ||
| virtualenv>=20.7.2 | ||
| skip_missing_interpreters=True | ||
| envlist = | ||
|
|
@@ -13,17 +13,17 @@ isolated_build = true | |
| [testenv] | ||
| wheel = True | ||
| wheel_build_env = build | ||
| install_command = pip install -c{toxinidir}/constraints.txt {opts} {packages} | ||
| install_command = pip install {opts} {packages} | ||
| passenv = | ||
| CI | ||
| TOX_* | ||
| CI_* | ||
| ZOOKEEPER_* | ||
| setenv = | ||
| pypy3: PYPY=1 | ||
| extras = | ||
| dependency_groups = | ||
| test | ||
| docs: docs | ||
| extras = | ||
| gevent: gevent | ||
| eventlet: eventlet | ||
| sasl: sasl | ||
|
|
@@ -41,27 +41,27 @@ commands = | |
|
|
||
| [testenv:build] | ||
|
|
||
| [testenv:pep8] | ||
| extras = alldeps | ||
| [testenv:docs] | ||
| dependency_groups = | ||
| deps = | ||
| flake8 | ||
| -r{toxinidir}/docs/requirements.txt | ||
| commands = sphinx-build -b html docs {toxworkdir}/docs/html | ||
|
|
||
| [testenv:pep8] | ||
| dependency_groups = pep8 | ||
| usedevelop = True | ||
| commands = flake8 {posargs} {toxinidir}/kazoo | ||
|
|
||
| [testenv:black] | ||
| extras = | ||
| deps = | ||
| black | ||
| dependency_groups = black | ||
| usedevelop = True | ||
| commands = black --check {posargs: {toxinidir}/kazoo {toxinidir}/kazoo} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like we had 2 times the same arg here? weird
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, that is definitely weird. I removed the 2nd. |
||
|
|
||
| [testenv:mypy] | ||
| extras = alldeps | ||
| deps = | ||
| mypy | ||
| types-mock | ||
| pyopenssl | ||
| pytest | ||
| unittest-parametrize | ||
| dependency_groups = mypy | ||
| extras = | ||
| eventlet | ||
| gevent | ||
| sasl | ||
| usedevelop = True | ||
| commands = mypy --config-file {toxinidir}/pyproject.toml {toxinidir}/kazoo | ||
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.
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 thetyping-extensionsThere 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.
Um, yes, not it wasn't. I went and destroyed my tox environment and rebuilt it and found a couple of dependencies missing.