Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 1 addition & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ formats: []
# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
- requirements: docs/requirements.txt

Copy link
Copy Markdown
Member

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 the typing-extensions

Copy link
Copy Markdown
Contributor Author

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.

51 changes: 0 additions & 51 deletions Makefile

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reference should be removed from MANIFEST.in too

@ThosRTanner ThosRTanner Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops. Done.

Actually, I gave MANIFEST.in a good going over and reduced it to minimum size and checked the before and after contents matched.

This file was deleted.

19 changes: 0 additions & 19 deletions constraints.txt

This file was deleted.

2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Sphinx>=1.2.2
sphinx-autodoc-typehints>=1
91 changes: 90 additions & 1 deletion pyproject.toml
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"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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 >=4.5 because of deprecated but not 100% sure

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May I ask for Homepage = "https://kazoo.readthedocs.io" to be added?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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 = [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

May I ask why it was not added as a project.optional-dependencies too ([typing])?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it be better to put it in the [project] section instead? https://packaging.python.org/en/latest/specifications/pyproject-toml/#license-files

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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
Expand Down
104 changes: 0 additions & 104 deletions setup.cfg
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
34 changes: 17 additions & 17 deletions tox.ini
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 =
Expand All @@ -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
Expand All @@ -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}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like we had 2 times the same arg here? weird

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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
Loading