diff --git a/.dockerignore b/.dockerignore
index 6244185b0..2e68cb318 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -3,11 +3,12 @@
*
# Include source directories and files required for building.
+!.git
!karapace
!requirements/*.txt
-!setup.py
!version.py
!README.rst
+!pyproject.toml
!container/start.sh
!container/healthcheck.py
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
index de1af9b71..0ed6475e2 100644
--- a/.github/workflows/container.yml
+++ b/.github/workflows/container.yml
@@ -66,7 +66,7 @@ jobs:
labels: |
org.opencontainers.image.authors=opensource@aiven.io
org.opencontainers.image.url=https://karapace.io
- org.opencontainers.image.documentation=https://github.com/aiven/karapace/
+ org.opencontainers.image.documentation=https://github.com/Aiven-Open/karapace/
org.opencontainers.image.vendor=Aiven
org.opencontainers.image.licenses=Apache-2.0
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index d029ff9f2..de91d66be 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -45,6 +45,7 @@ jobs:
python-version: '3.12'
- name: Install libsnappy-dev
run: sudo apt install libsnappy-dev
- - run: pip install -r requirements/requirements.txt -r requirements/requirements-typing.txt
+ - name: Install requirements and typing requirements
+ run: pip install -r requirements/requirements.txt -r requirements/requirements-typing.txt
- run: make karapace/version.py
- run: mypy
diff --git a/.github/workflows/schema.yml b/.github/workflows/schema.yml
index 1ee9a8049..e58cf37f5 100644
--- a/.github/workflows/schema.yml
+++ b/.github/workflows/schema.yml
@@ -21,6 +21,7 @@ jobs:
requirements.txt
- name: Install libsnappy-dev
run: sudo apt install libsnappy-dev
+ - name: Install requirements
- run: pip install -r requirements/requirements.txt
# Compare with latest release when running on main.
- run: make schema against=$(git describe --abbrev=0 --tags)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8c2a42844..6b20a12e8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,15 +12,15 @@ Contributions are very welcome on Karapace. When contributing please keep this i
There is very little you need to get started coding for Karapace:
-- Use [one of the supported python versions](https://github.com/aiven/karapace/blob/master/setup.py)
- documented in the `setup.py` classifiers.
+- Use [one of the supported python versions](https://github.com/Aiven-Open/karapace/blob/master/pyproject.toml)
+ documented in the `project:requires-python`.
- Create [a virtual environment](https://docs.python.org/3/tutorial/venv.html) and install the dev dependencies in it:
```python
python -m venv
source /bin/activate
-pip install -r ./requirements/requirements-dev.txt
-pip install -e .
+pip install .
+pip install .[dev] .[typing]
```
## Website
@@ -75,7 +75,7 @@ The code is statically checked and formatted using [a few tools][requirements-de
To run these automatically on each commit please enable the [pre-commit](https://pre-commit.com)
hooks.
-[requirements-dev]: https://github.com/aiven/karapace/blob/master/requirements/requirements-dev.txt
+[requirements-dev]: https://github.com/Aiven-Open/karapace/blob/master/requirements/requirements-dev.txt
## Manual testing
@@ -90,7 +90,7 @@ karapace karapace.config.json
### Configuration
To see descriptions of configuration keys see our
-[README](https://github.com/aiven/karapace#configuration-keys).
+[README](https://github.com/Aiven-Open/karapace#configuration-keys).
Each configuration key can be overridden with an environment variable prefixed with `KARAPACE_`,
exception being configuration keys that actually start with the `karapace` string. For example, to
diff --git a/GNUmakefile b/GNUmakefile
index 9d5c53a06..09eb64aef 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -11,6 +11,14 @@ endif
PYTHON_VERSION ?= 3.8
+define PIN_VERSIONS_COMMAND
+pip install pip-tools && \
+ python -m piptools compile -o /karapace/requirements/requirements.txt /karapace/pyproject.toml && \
+ python -m piptools compile --extra dev -o /karapace/requirements/requirements-dev.txt /karapace/pyproject.toml && \
+ python -m piptools compile --extra typing -o /karapace/requirements/requirements-typing.txt /karapace/pyproject.toml
+endef
+
+
export PATH := $(VENV_DIR)/bin:$(PATH)
export PS4 := \e[0m\e[32m==> \e[0m
export LC_ALL := C
@@ -40,12 +48,10 @@ venv/.deps: requirements/requirements-dev.txt requirements/requirements.txt | ve
source ./bin/get-protoc
source ./bin/get-snappy
set -x
- $(PIP) install --use-pep517 -r '$(<)'
- $(PIP) install --use-pep517 .
+ $(PIP) install --use-pep517 . .[dev]
$(PIP) check
touch '$(@)'
-
karapace/version.py:
$(PYTHON) version.py
@@ -84,12 +90,14 @@ cleanest: cleaner
.PHONY: requirements
requirements: export CUSTOM_COMPILE_COMMAND='make requirements'
requirements:
- pip install --upgrade pip setuptools pip-tools
- cd requirements && pip-compile --upgrade --resolver=backtracking requirements.in -o requirements.txt
- cd requirements && pip-compile --upgrade --resolver=backtracking requirements-dev.in -o requirements-dev.txt
- cd requirements && pip-compile --upgrade --resolver=backtracking requirements-typing.in -o requirements-typing.txt
+ $(PIP) install --upgrade pip setuptools pip-tools
+ $(PIP) install . .[dev] .[typing]
.PHONY: schema
schema: against := origin/main
schema:
- python3 -m karapace.backup.backends.v3.schema_tool --against=$(against)
+ $(PYTHON) -m karapace.backup.backends.v3.schema_tool --against=$(against)
+
+.PHONY: pin-requirements
+pin-requirements:
+ docker run -it -v .:/karapace --security-opt label=disable python:$(PYTHON_VERSION)-bullseye /bin/bash -c "$(PIN_VERSIONS_COMMAND)"
diff --git a/MANIFEST.in b/MANIFEST.in
index fa15133f4..918daa954 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,9 +4,7 @@ include karapace.unit
include tests/*.py
include scripts/*
include README.rst
-include version.py
-include setup.py
-include setup.cfg
+include pyproject.toml
include LICENSE
include MANIFEST.in
diff --git a/README.rst b/README.rst
index b11b13595..12bd542a5 100644
--- a/README.rst
+++ b/README.rst
@@ -3,7 +3,7 @@ Karapace
``karapace``. Your Apache Kafka® essentials in one tool.
-An `open-source `_ implementation
+An `open-source `_ implementation
of `Kafka REST `_ and
`Schema Registry `_.
@@ -81,14 +81,14 @@ override the ``bootstrap_uri`` config value, one would use the environment varia
``KARAPACE_BOOTSTRAP_URI``. Here_ you can find an example configuration file to give you an idea
what you need to change.
-.. _`Here`: https://github.com/aiven/karapace/blob/master/karapace.config.json
+.. _`Here`: https://github.com/Aiven-Open/karapace/blob/master/karapace.config.json
Source install
--------------
Alternatively you can do a source install using::
- python setup.py install
+ pip install .
Quickstart
==========
@@ -657,7 +657,7 @@ If you don't need or want to have the Karapace images around you can now proceed
Installed from Sources
----------------------
-If you installed Karapace from the sources via ``python setup.py install``, it can be uninstalled with the following ``pip`` command::
+Karapace is installed ``pip install .``, it can be uninstalled with the following ``pip`` command::
pip uninstall karapace
@@ -701,11 +701,8 @@ targets that correctly clean the ``runtime`` directory without deleting it, but
keep this in mind whenever you are not using ``make`` (e.g. running tests from
your IDE).
-Note that the pre-commit checks are currently not working with the default
-Python version. This is because isort dropped Python 3.7 support. You have to
-use at least Python 3.8 for the pre-commit checks. Use ``pipx`` or ``brew`` or
-… to install pre-commit and use the global installation, there is also no
-dependency on it.
+Use ``pipx`` or ``brew`` or to install pre-commit and use the global installation,
+there is also no dependency on it.
License
=======
@@ -720,7 +717,7 @@ Contact
=======
Bug reports and patches are very welcome, please post them as GitHub issues
-and pull requests at https://github.com/aiven/karapace . Any possible
+and pull requests at https://github.com/Aiven-Open/karapace . Any possible
vulnerabilities or other serious issues should be reported directly to the
maintainers .
@@ -741,6 +738,6 @@ to them for pioneering the concept.
.. _`Aiven`: https://aiven.io/
Recent contributors are listed on the GitHub project page,
-https://github.com/aiven/karapace/graphs/contributors
+https://github.com/Aiven-OPen/karapace/graphs/contributors
Copyright ⓒ 2021 Aiven Ltd.
diff --git a/mypy.ini b/mypy.ini
index 15ab9042f..3ce08144a 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -85,3 +85,6 @@ ignore_missing_imports = True
[mypy-networkx.*]
ignore_missing_imports = True
+
+[mypy-systemd.*]
+ignore_missing_imports = True
diff --git a/pyproject.toml b/pyproject.toml
index 7244d92f5..fca6466b7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,112 @@
+[build-system]
+requires = ["setuptools > 64", "setuptools-scm"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "karapace"
+requires-python = ">= 3.8"
+dynamic = ["version"]
+readme = "README.rst"
+license = {file = "LICENSE"}
+dependencies = [
+ "accept-types < 1",
+ "aiohttp < 4",
+ "aiokafka == 0.10.0",
+ "cachetools == 5.3.3",
+ "confluent-kafka == 2.4.0",
+ "isodate < 1",
+ "jsonschema < 5",
+ "lz4",
+ "networkx < 4",
+ "protobuf < 4",
+ "pyjwt >= 2.4.0 , < 3",
+ "python-dateutil < 3",
+ "python-snappy",
+ "rich ~= 13.7.1",
+ "tenacity < 10",
+ "typing-extensions",
+ "ujson < 6",
+ "watchfiles < 1",
+ "xxhash ~= 3.3",
+ "zstandard",
+ "prometheus-client == 0.20.0",
+
+ # Patched dependencies
+ #
+ # Note: It is important to use commits to reference patched dependencies. This
+ # has two advantages:
+ # - Reproducible builds
+ # - The contents of the file change, which invalidates the existing docker
+ # images and forces a new image generation.
+ #
+ "avro @ https://github.com/aiven/avro/archive/5a82d57f2a650fd87c819a30e433f1abb2c76ca2.tar.gz#subdirectory=lang/py",
+]
+
+classifiers=[
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "Intended Audience :: Information Technology",
+ "Intended Audience :: System Administrators",
+ "License :: OSI Approved :: Apache Software License",
+ "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",
+ "Topic :: Database :: Database Engines/Servers",
+ "Topic :: Software Development :: Libraries",
+]
+
+[project.scripts]
+karapace = "karapace.karapace_all:main"
+karapace_schema_backup = "karapace.backup.cli:main"
+karapace_mkpasswd = "karapace.auth:main"
+
+[project.urls]
+Homepage = "https://karapace.io"
+Repository = "https://github.com/Aiven-Open/karapace/"
+Issues = "https://github.com/Aiven-Open/karapace/issues"
+
+[project.optional-dependencies]
+sentry-sdk = ["sentry-sdk>=1.6.0"]
+ujson = ["ujson"]
+systemd-logging = ["systemd-python==235"]
+dev = [
+ # Developer QoL
+ "pdbpp",
+
+ # testing
+ "filelock",
+ "hypothesis",
+ "psutil",
+ "pytest",
+ "pytest-cov",
+ "pytest-random-order",
+ "pytest-timeout",
+ "pytest-xdist[psutil]",
+ "requests",
+
+ # performance test
+ "locust",
+
+ # Sentry SDK
+ "sentry-sdk"
+]
+typing = [
+ "mypy",
+ "sentry-sdk",
+ "types-cachetools",
+ "types-jsonschema",
+ "types-protobuf < 4"
+]
+
+
+[tool.setuptools.packages.find]
+include = ["karapace"]
+
+[tool.setuptools_scm]
+version_file = "karapace/version.py"
+
[tool.black]
target-version = ["py38"]
line-length = 125
diff --git a/requirements/requirements-dev.in b/requirements/requirements-dev.in
deleted file mode 100644
index 73dfa6bad..000000000
--- a/requirements/requirements-dev.in
+++ /dev/null
@@ -1,22 +0,0 @@
-# runtime requirements
--r requirements.txt
-
-# Developer QoL
-pdbpp
-
-# testing
-filelock
-pytest
-pytest-cov
-pytest-xdist[psutil]
-pytest-timeout
-pytest-random-order
-psutil
-requests
-hypothesis
-
-# performance test
-locust
-
-# Sentry SDK
-sentry-sdk
diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt
index e86c81a58..0bce785cf 100644
--- a/requirements/requirements-dev.txt
+++ b/requirements/requirements-dev.txt
@@ -2,44 +2,40 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
-# 'make requirements'
+# pip-compile --extra=dev --output-file=/karapace/requirements/requirements-dev.txt /karapace/pyproject.toml
#
accept-types==0.4.1
- # via -r requirements.txt
-aiohttp==3.9.5
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
+aiohappyeyeballs==2.4.0
+ # via aiohttp
+aiohttp==3.10.5
+ # via karapace (/karapace/pyproject.toml)
aiokafka==0.10.0
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
aiosignal==1.3.1
- # via
- # -r requirements.txt
- # aiohttp
+ # via aiohttp
anyio==4.4.0
- # via
- # -r requirements.txt
- # watchfiles
+ # via watchfiles
async-timeout==4.0.3
# via
- # -r requirements.txt
# aiohttp
# aiokafka
-attrs==23.2.0
+attrs==24.2.0
# via
- # -r requirements.txt
# aiohttp
# hypothesis
# jsonschema
# referencing
# wmctrl
avro @ https://github.com/aiven/avro/archive/5a82d57f2a650fd87c819a30e433f1abb2c76ca2.tar.gz#subdirectory=lang/py
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
blinker==1.8.2
# via flask
brotli==1.1.0
# via geventhttpclient
cachetools==5.3.3
- # via -r requirements.txt
-certifi==2024.7.4
+ # via karapace (/karapace/pyproject.toml)
+certifi==2024.8.30
# via
# geventhttpclient
# requests
@@ -51,16 +47,13 @@ click==8.1.7
configargparse==1.7
# via locust
confluent-kafka==2.4.0
- # via -r requirements.txt
-coverage[toml]==7.5.3
+ # via karapace (/karapace/pyproject.toml)
+coverage[toml]==7.6.1
# via pytest-cov
cramjam==2.8.3
+ # via python-snappy
+exceptiongroup==1.2.2
# via
- # -r requirements.txt
- # python-snappy
-exceptiongroup==1.2.1
- # via
- # -r requirements.txt
# anyio
# hypothesis
# pytest
@@ -68,20 +61,19 @@ execnet==2.1.1
# via pytest-xdist
fancycompleter==0.9.1
# via pdbpp
-filelock==3.14.0
- # via -r requirements-dev.in
+filelock==3.16.0
+ # via karapace (/karapace/pyproject.toml)
flask==3.0.3
# via
# flask-cors
# flask-login
# locust
-flask-cors==4.0.1
+flask-cors==5.0.0
# via locust
flask-login==0.6.3
# via locust
frozenlist==1.4.1
# via
- # -r requirements.txt
# aiohttp
# aiosignal
gevent==24.2.1
@@ -90,190 +82,170 @@ gevent==24.2.1
# locust
geventhttpclient==2.0.12
# via locust
-greenlet==3.0.3
+greenlet==3.1.0
# via gevent
-hypothesis==6.103.1
- # via -r requirements-dev.in
-idna==3.7
+hypothesis==6.112.1
+ # via karapace (/karapace/pyproject.toml)
+idna==3.8
# via
- # -r requirements.txt
# anyio
# requests
# yarl
-importlib-metadata==7.1.0
+importlib-metadata==8.5.0
# via flask
-importlib-resources==6.4.0
+importlib-resources==6.4.5
# via
- # -r requirements.txt
# jsonschema
# jsonschema-specifications
iniconfig==2.0.0
# via pytest
isodate==0.6.1
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
itsdangerous==2.2.0
# via flask
jinja2==3.1.4
# via flask
-jsonschema==4.22.0
- # via -r requirements.txt
+jsonschema==4.23.0
+ # via karapace (/karapace/pyproject.toml)
jsonschema-specifications==2023.12.1
- # via
- # -r requirements.txt
- # jsonschema
+ # via jsonschema
locust==2.25.0
- # via -r requirements-dev.in
+ # via karapace (/karapace/pyproject.toml)
lz4==4.3.3
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
markdown-it-py==3.0.0
- # via
- # -r requirements.txt
- # rich
+ # via rich
markupsafe==2.1.5
# via
# jinja2
# werkzeug
mdurl==0.1.2
- # via
- # -r requirements.txt
- # markdown-it-py
-msgpack==1.0.8
+ # via markdown-it-py
+msgpack==1.1.0
# via locust
-multidict==6.0.5
+multidict==6.1.0
# via
- # -r requirements.txt
# aiohttp
# yarl
networkx==3.1
- # via -r requirements.txt
-packaging==24.0
+ # via karapace (/karapace/pyproject.toml)
+packaging==24.1
# via
- # -r requirements.txt
# aiokafka
# pytest
pdbpp==0.10.3
- # via -r requirements-dev.in
+ # via karapace (/karapace/pyproject.toml)
pkgutil-resolve-name==1.3.10
- # via
- # -r requirements.txt
- # jsonschema
+ # via jsonschema
pluggy==1.5.0
# via pytest
prometheus-client==0.20.0
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
protobuf==3.20.3
- # via -r requirements.txt
-psutil==5.9.8
+ # via karapace (/karapace/pyproject.toml)
+psutil==6.0.0
# via
- # -r requirements-dev.in
+ # karapace (/karapace/pyproject.toml)
# locust
# pytest-xdist
pygments==2.18.0
# via
- # -r requirements.txt
# pdbpp
# rich
-pyjwt==2.8.0
- # via -r requirements.txt
+pyjwt==2.9.0
+ # via karapace (/karapace/pyproject.toml)
pyrepl==0.9.0
# via fancycompleter
-pytest==8.2.2
+pytest==8.3.3
# via
- # -r requirements-dev.in
+ # karapace (/karapace/pyproject.toml)
# pytest-cov
# pytest-random-order
# pytest-timeout
# pytest-xdist
pytest-cov==5.0.0
- # via -r requirements-dev.in
+ # via karapace (/karapace/pyproject.toml)
pytest-random-order==1.1.1
- # via -r requirements-dev.in
+ # via karapace (/karapace/pyproject.toml)
pytest-timeout==2.3.1
- # via -r requirements-dev.in
+ # via karapace (/karapace/pyproject.toml)
pytest-xdist[psutil]==3.6.1
- # via -r requirements-dev.in
+ # via karapace (/karapace/pyproject.toml)
python-dateutil==2.9.0.post0
- # via -r requirements.txt
-python-snappy==0.7.1
- # via -r requirements.txt
-pyzmq==26.0.3
+ # via karapace (/karapace/pyproject.toml)
+python-snappy==0.7.3
+ # via karapace (/karapace/pyproject.toml)
+pyzmq==26.2.0
# via locust
referencing==0.35.1
# via
- # -r requirements.txt
# jsonschema
# jsonschema-specifications
requests==2.32.3
# via
- # -r requirements-dev.in
+ # karapace (/karapace/pyproject.toml)
# locust
rich==13.7.1
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
roundrobin==0.0.4
# via locust
-rpds-py==0.18.1
+rpds-py==0.20.0
# via
- # -r requirements.txt
# jsonschema
# referencing
-sentry-sdk==2.5.0
- # via -r requirements-dev.in
+sentry-sdk==2.14.0
+ # via karapace (/karapace/pyproject.toml)
six==1.16.0
# via
- # -r requirements.txt
# geventhttpclient
# isodate
# python-dateutil
sniffio==1.3.1
- # via
- # -r requirements.txt
- # anyio
+ # via anyio
sortedcontainers==2.4.0
# via hypothesis
tenacity==9.0.0
- # via -r requirements.txt
+ # via karapace (/karapace/pyproject.toml)
tomli==2.0.1
# via
# coverage
# locust
# pytest
-typing-extensions==4.12.1
+typing-extensions==4.12.2
# via
- # -r requirements.txt
# anyio
+ # karapace (/karapace/pyproject.toml)
+ # multidict
# rich
ujson==5.10.0
- # via -r requirements.txt
-urllib3==2.2.2
+ # via karapace (/karapace/pyproject.toml)
+urllib3==2.2.3
# via
# requests
# sentry-sdk
-watchfiles==0.22.0
- # via -r requirements.txt
-werkzeug==3.0.3
+watchfiles==0.24.0
+ # via karapace (/karapace/pyproject.toml)
+werkzeug==3.0.4
# via
# flask
# flask-login
# locust
wmctrl==0.5
# via pdbpp
-xxhash==3.4.1
- # via -r requirements.txt
-yarl==1.9.4
- # via
- # -r requirements.txt
- # aiohttp
-zipp==3.19.2
+xxhash==3.5.0
+ # via karapace (/karapace/pyproject.toml)
+yarl==1.11.1
+ # via aiohttp
+zipp==3.20.1
# via
- # -r requirements.txt
# importlib-metadata
# importlib-resources
zope-event==5.0
# via gevent
-zope-interface==6.4.post2
+zope-interface==7.0.3
# via gevent
-zstandard==0.22.0
- # via -r requirements.txt
+zstandard==0.23.0
+ # via karapace (/karapace/pyproject.toml)
# The following packages are considered to be unsafe in a requirements file:
# setuptools
diff --git a/requirements/requirements-typing.in b/requirements/requirements-typing.in
deleted file mode 100644
index b0179da71..000000000
--- a/requirements/requirements-typing.in
+++ /dev/null
@@ -1,8 +0,0 @@
--c requirements.txt
--c requirements-dev.txt
-
-mypy
-types-jsonschema
-sentry-sdk
-types-cachetools
-types-protobuf<4
diff --git a/requirements/requirements-typing.txt b/requirements/requirements-typing.txt
index 0e109ac7c..ca9116511 100644
--- a/requirements/requirements-typing.txt
+++ b/requirements/requirements-typing.txt
@@ -2,51 +2,138 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
-# 'make requirements'
+# pip-compile --extra=typing --output-file=/karapace/requirements/requirements-typing.txt /karapace/pyproject.toml
#
-attrs==23.2.0
+accept-types==0.4.1
+ # via karapace (/karapace/pyproject.toml)
+aiohappyeyeballs==2.4.0
+ # via aiohttp
+aiohttp==3.10.5
+ # via karapace (/karapace/pyproject.toml)
+aiokafka==0.10.0
+ # via karapace (/karapace/pyproject.toml)
+aiosignal==1.3.1
+ # via aiohttp
+anyio==4.4.0
+ # via watchfiles
+async-timeout==4.0.3
# via
- # -c requirements-dev.txt
- # -c requirements.txt
+ # aiohttp
+ # aiokafka
+attrs==24.2.0
+ # via
+ # aiohttp
+ # jsonschema
# referencing
-certifi==2024.7.4
+avro @ https://github.com/aiven/avro/archive/5a82d57f2a650fd87c819a30e433f1abb2c76ca2.tar.gz#subdirectory=lang/py
+ # via karapace (/karapace/pyproject.toml)
+cachetools==5.3.3
+ # via karapace (/karapace/pyproject.toml)
+certifi==2024.8.30
+ # via sentry-sdk
+confluent-kafka==2.4.0
+ # via karapace (/karapace/pyproject.toml)
+cramjam==2.8.3
+ # via python-snappy
+exceptiongroup==1.2.2
+ # via anyio
+frozenlist==1.4.1
+ # via
+ # aiohttp
+ # aiosignal
+idna==3.8
+ # via
+ # anyio
+ # yarl
+importlib-resources==6.4.5
+ # via
+ # jsonschema
+ # jsonschema-specifications
+isodate==0.6.1
+ # via karapace (/karapace/pyproject.toml)
+jsonschema==4.23.0
+ # via karapace (/karapace/pyproject.toml)
+jsonschema-specifications==2023.12.1
+ # via jsonschema
+lz4==4.3.3
+ # via karapace (/karapace/pyproject.toml)
+markdown-it-py==3.0.0
+ # via rich
+mdurl==0.1.2
+ # via markdown-it-py
+multidict==6.1.0
# via
- # -c requirements-dev.txt
- # sentry-sdk
-mypy==1.11.1
- # via -r requirements-typing.in
+ # aiohttp
+ # yarl
+mypy==1.11.2
+ # via karapace (/karapace/pyproject.toml)
mypy-extensions==1.0.0
# via mypy
+networkx==3.1
+ # via karapace (/karapace/pyproject.toml)
+packaging==24.1
+ # via aiokafka
+pkgutil-resolve-name==1.3.10
+ # via jsonschema
+prometheus-client==0.20.0
+ # via karapace (/karapace/pyproject.toml)
+protobuf==3.20.3
+ # via karapace (/karapace/pyproject.toml)
+pygments==2.18.0
+ # via rich
+pyjwt==2.9.0
+ # via karapace (/karapace/pyproject.toml)
+python-dateutil==2.9.0.post0
+ # via karapace (/karapace/pyproject.toml)
+python-snappy==0.7.3
+ # via karapace (/karapace/pyproject.toml)
referencing==0.35.1
# via
- # -c requirements-dev.txt
- # -c requirements.txt
+ # jsonschema
+ # jsonschema-specifications
# types-jsonschema
-rpds-py==0.18.1
+rich==13.7.1
+ # via karapace (/karapace/pyproject.toml)
+rpds-py==0.20.0
# via
- # -c requirements-dev.txt
- # -c requirements.txt
+ # jsonschema
# referencing
-sentry-sdk==2.5.0
+sentry-sdk==2.14.0
+ # via karapace (/karapace/pyproject.toml)
+six==1.16.0
# via
- # -c requirements-dev.txt
- # -r requirements-typing.in
+ # isodate
+ # python-dateutil
+sniffio==1.3.1
+ # via anyio
+tenacity==9.0.0
+ # via karapace (/karapace/pyproject.toml)
tomli==2.0.1
- # via
- # -c requirements-dev.txt
- # mypy
-types-cachetools==5.3.0.7
- # via -r requirements-typing.in
-types-jsonschema==4.23.0.20240712
- # via -r requirements-typing.in
+ # via mypy
+types-cachetools==5.5.0.20240820
+ # via karapace (/karapace/pyproject.toml)
+types-jsonschema==4.23.0.20240813
+ # via karapace (/karapace/pyproject.toml)
types-protobuf==3.20.4.6
- # via -r requirements-typing.in
-typing-extensions==4.12.1
+ # via karapace (/karapace/pyproject.toml)
+typing-extensions==4.12.2
# via
- # -c requirements-dev.txt
- # -c requirements.txt
+ # anyio
+ # karapace (/karapace/pyproject.toml)
+ # multidict
# mypy
-urllib3==2.2.2
- # via
- # -c requirements-dev.txt
- # sentry-sdk
+ # rich
+ujson==5.10.0
+ # via karapace (/karapace/pyproject.toml)
+urllib3==2.2.3
+ # via sentry-sdk
+watchfiles==0.24.0
+ # via karapace (/karapace/pyproject.toml)
+xxhash==3.5.0
+ # via karapace (/karapace/pyproject.toml)
+yarl==1.11.1
+ # via aiohttp
+zipp==3.20.1
+ # via importlib-resources
+zstandard==0.23.0
+ # via karapace (/karapace/pyproject.toml)
diff --git a/requirements/requirements.in b/requirements/requirements.in
deleted file mode 100644
index 2a38772b8..000000000
--- a/requirements/requirements.in
+++ /dev/null
@@ -1,33 +0,0 @@
-# PyPI dependencies
-accept-types<1
-aiohttp<4
-aiokafka==0.10.0
-cachetools==5.3.3
-confluent-kafka==2.4.0
-isodate<1
-jsonschema<5
-lz4
-networkx<4
-protobuf<4
-pyjwt>=2.4.0<3
-python-dateutil<3
-python-snappy
-rich~=13.7.1
-systemd-python[systemd-logging]
-tenacity<10
-typing-extensions
-ujson<6
-watchfiles<1
-xxhash~=3.3
-zstandard
-prometheus-client==0.20.0
-
-# Patched dependencies
-#
-# Note: It is important to use commits to reference patched dependencies. This
-# has two advantages:
-# - Reproducible builds
-# - The contents of the file change, which invalidates the existing docker
-# images and forces a new image generation.
-#
-https://github.com/aiven/avro/archive/5a82d57f2a650fd87c819a30e433f1abb2c76ca2.tar.gz#subdirectory=lang/py
diff --git a/requirements/requirements.txt b/requirements/requirements.txt
index 13837dffe..64acaaa4b 100644
--- a/requirements/requirements.txt
+++ b/requirements/requirements.txt
@@ -2,14 +2,16 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
-# 'make requirements'
+# pip-compile --output-file=/karapace/requirements/requirements.txt /karapace/pyproject.toml
#
accept-types==0.4.1
- # via -r requirements.in
-aiohttp==3.9.5
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
+aiohappyeyeballs==2.4.0
+ # via aiohttp
+aiohttp==3.10.5
+ # via karapace (/karapace/pyproject.toml)
aiokafka==0.10.0
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
aiosignal==1.3.1
# via aiohttp
anyio==4.4.0
@@ -18,74 +20,74 @@ async-timeout==4.0.3
# via
# aiohttp
# aiokafka
-attrs==23.2.0
+attrs==24.2.0
# via
# aiohttp
# jsonschema
# referencing
avro @ https://github.com/aiven/avro/archive/5a82d57f2a650fd87c819a30e433f1abb2c76ca2.tar.gz#subdirectory=lang/py
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
cachetools==5.3.3
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
confluent-kafka==2.4.0
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
cramjam==2.8.3
# via python-snappy
-exceptiongroup==1.2.1
+exceptiongroup==1.2.2
# via anyio
frozenlist==1.4.1
# via
# aiohttp
# aiosignal
-idna==3.7
+idna==3.8
# via
# anyio
# yarl
-importlib-resources==6.4.0
+importlib-resources==6.4.5
# via
# jsonschema
# jsonschema-specifications
isodate==0.6.1
- # via -r requirements.in
-jsonschema==4.22.0
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
+jsonschema==4.23.0
+ # via karapace (/karapace/pyproject.toml)
jsonschema-specifications==2023.12.1
# via jsonschema
lz4==4.3.3
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
-multidict==6.0.5
+multidict==6.1.0
# via
# aiohttp
# yarl
networkx==3.1
- # via -r requirements.in
-packaging==24.0
+ # via karapace (/karapace/pyproject.toml)
+packaging==24.1
# via aiokafka
pkgutil-resolve-name==1.3.10
# via jsonschema
prometheus-client==0.20.0
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
protobuf==3.20.3
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
pygments==2.18.0
# via rich
-pyjwt==2.8.0
- # via -r requirements.in
+pyjwt==2.9.0
+ # via karapace (/karapace/pyproject.toml)
python-dateutil==2.9.0.post0
- # via -r requirements.in
-python-snappy==0.7.1
- # via -r requirements.in
+ # via karapace (/karapace/pyproject.toml)
+python-snappy==0.7.3
+ # via karapace (/karapace/pyproject.toml)
referencing==0.35.1
# via
# jsonschema
# jsonschema-specifications
rich==13.7.1
- # via -r requirements.in
-rpds-py==0.18.1
+ # via karapace (/karapace/pyproject.toml)
+rpds-py==0.20.0
# via
# jsonschema
# referencing
@@ -95,24 +97,23 @@ six==1.16.0
# python-dateutil
sniffio==1.3.1
# via anyio
-systemd-python[systemd-logging]==235
- # via -r requirements.in
tenacity==9.0.0
- # via -r requirements.in
-typing-extensions==4.12.1
+ # via karapace (/karapace/pyproject.toml)
+typing-extensions==4.12.2
# via
- # -r requirements.in
# anyio
+ # karapace (/karapace/pyproject.toml)
+ # multidict
# rich
ujson==5.10.0
- # via -r requirements.in
-watchfiles==0.22.0
- # via -r requirements.in
-xxhash==3.4.1
- # via -r requirements.in
-yarl==1.9.4
+ # via karapace (/karapace/pyproject.toml)
+watchfiles==0.24.0
+ # via karapace (/karapace/pyproject.toml)
+xxhash==3.5.0
+ # via karapace (/karapace/pyproject.toml)
+yarl==1.11.1
# via aiohttp
-zipp==3.19.2
+zipp==3.20.1
# via importlib-resources
-zstandard==0.22.0
- # via -r requirements.in
+zstandard==0.23.0
+ # via karapace (/karapace/pyproject.toml)
diff --git a/setup.py b/setup.py
deleted file mode 100644
index 2f0f50beb..000000000
--- a/setup.py
+++ /dev/null
@@ -1,74 +0,0 @@
-"""
-karapace - setup
-
-Copyright (c) 2023 Aiven Ltd
-See LICENSE for details
-"""
-from setuptools import find_packages, setup
-
-import os
-import version
-
-readme_path = os.path.join(os.path.dirname(__file__), "README.rst")
-with open(readme_path, encoding="utf8") as fp:
- readme_text = fp.read()
-
-version_for_setup_py = version.get_project_version()
-version_for_setup_py = ".dev".join(version_for_setup_py.split("-", 2)[:2])
-
-setup(
- name="karapace",
- version=version_for_setup_py,
- zip_safe=False,
- packages=find_packages(exclude=["test"]),
- install_requires=[
- "accept-types",
- "aiohttp",
- "aiokafka",
- "avro",
- "jsonschema",
- "networkx",
- "protobuf",
- "pyjwt",
- "python-dateutil",
- # compression algorithms supported by confluent-kafka-python
- "lz4",
- "python-snappy",
- "zstandard",
- ],
- extras_require={
- "sentry-sdk": ["sentry-sdk>=1.6.0"],
- "ujson": ["ujson"],
- "systemd-logging": ["systemd-python==235"],
- },
- dependency_links=[],
- package_data={},
- entry_points={
- "console_scripts": [
- "karapace = karapace.karapace_all:main",
- "karapace_schema_backup = karapace.backup.cli:main",
- "karapace_mkpasswd = karapace.auth:main",
- ],
- },
- author="Hannu Valtonen",
- author_email="opensource@aiven.io",
- license="Apache 2.0",
- platforms=["POSIX", "MacOS"],
- description="Karapace",
- long_description=readme_text,
- url="https://github.com/aiven/karapace/",
- python_requires=">=3.8",
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "Intended Audience :: Information Technology",
- "Intended Audience :: System Administrators",
- "License :: OSI Approved :: Apache Software License",
- "Programming Language :: Python :: 3.8",
- "Programming Language :: Python :: 3.9",
- "Programming Language :: Python :: 3.10",
- "Programming Language :: Python :: 3.11",
- "Topic :: Database :: Database Engines/Servers",
- "Topic :: Software Development :: Libraries",
- ],
-)
diff --git a/version.py b/version.py
deleted file mode 100644
index 64a193286..000000000
--- a/version.py
+++ /dev/null
@@ -1,62 +0,0 @@
-"""
-karapace - version
-
-Copyright (c) 2023 Aiven Ltd
-See LICENSE for details
-"""
-from __future__ import annotations
-
-from typing import Final
-
-import os
-import pathlib
-import subprocess
-
-version_file: Final = pathlib.Path(__file__).parent.resolve() / "karapace/version.py"
-
-
-def save_version(new_ver, old_ver):
- if not new_ver:
- return False
- if not old_ver or new_ver != old_ver:
- version_file.write_text(f'"""{__doc__}"""\n__version__ = "{new_ver}"\n')
- return True
-
-
-def from_version_file() -> str | None:
- try:
- import karapace.version
- except ImportError:
- return None
- return karapace.version.__version__
-
-
-def get_project_version() -> str:
- file_ver = from_version_file()
-
- version = os.getenv("KARAPACE_VERSION")
- if version is None:
- os.chdir(os.path.dirname(__file__) or ".")
- try:
- git_out = subprocess.check_output(
- ["git", "describe", "--always", "--tags"], stderr=getattr(subprocess, "DEVNULL", None)
- )
- except (OSError, subprocess.CalledProcessError):
- pass
- else:
- git_ver = git_out.splitlines()[0].strip().decode("utf-8")
- if "." not in git_ver:
- git_ver = f"0.0.1-0-unknown-{git_ver}"
- version = git_ver
-
- if save_version(version, file_ver):
- return version
-
- if not file_ver:
- raise RuntimeError(f"version not available from git or from file {str(version_file)!r}")
-
- return file_ver
-
-
-if __name__ == "__main__":
- get_project_version()
diff --git a/website/source/_templates/hero-texts.html b/website/source/_templates/hero-texts.html
index b7cf04e34..383385932 100644
--- a/website/source/_templates/hero-texts.html
+++ b/website/source/_templates/hero-texts.html
@@ -11,7 +11,7 @@
{% include 'github-ribbon.html' %} Learn more about Karapace
diff --git a/website/source/_templates/page.html b/website/source/_templates/page.html
index add72485f..a9bcb465e 100644
--- a/website/source/_templates/page.html
+++ b/website/source/_templates/page.html
@@ -1,7 +1,7 @@
{% extends '!page.html' %} {% block body %} {{ super() }}
Fork me on GitHub!
diff --git a/website/source/install.rst b/website/source/install.rst
index 39ca4e15d..ac6d5459f 100644
--- a/website/source/install.rst
+++ b/website/source/install.rst
@@ -30,11 +30,11 @@ override the ``bootstrap_uri`` config value, one would use the environment varia
``KARAPACE_BOOTSTRAP_URI``. Here_ you can find an example configuration file to give you an idea
what you need to change.
-.. _`Here`: https://github.com/aiven/karapace/blob/main/karapace.config.json
+.. _`Here`: https://github.com/Aiven-Open/karapace/blob/main/karapace.config.json
Source install
--------------
Alternatively you can do a source install using::
- python setup.py install
+ pip install .