From 826e8b411fc126ca58195f4dc76b4efc75029b66 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Wed, 17 Jun 2026 11:53:35 +0200 Subject: [PATCH 1/3] start new dev branch; add audit file --- .audit/oberstet_fix_1831.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .audit/oberstet_fix_1831.md diff --git a/.audit/oberstet_fix_1831.md b/.audit/oberstet_fix_1831.md new file mode 100644 index 000000000..04964a672 --- /dev/null +++ b/.audit/oberstet_fix_1831.md @@ -0,0 +1,8 @@ +- [ ] I did **not** use any AI-assistance tools to help create this pull request. +- [x] I **did** use AI-assistance tools to *help* create this pull request. +- [x] I have read, understood and followed the projects' [AI Policy](https://github.com/crossbario/autobahn-python/blob/main/AI_POLICY.md) when creating code, documentation etc. for this pull request. + +Submitted by: @oberstet +Date: 2026-06-17 +Related issue(s): #1831 +Branch: oberstet:fix_1831 From 1c9a2b422c425eae33744eb02ccea1b0cc7c0a9a Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Wed, 17 Jun 2026 12:01:38 +0200 Subject: [PATCH 2/3] Remove orphaned/attic files from the old CI/CD system (#1831) The project moved to a justfile + uv build system; these legacy files were no longer referenced by any workflow, the justfile, or pyproject.toml. Verified unreferenced before removal. Removed: - Makefile.orig, Dockerfile.wheels, test-docker-builds.sh, versions.sh, deploy.sh (legacy build/deploy scripts) - mypy.ini (the typing recipe passes --config-file pyproject-static-typing.toml explicitly, so mypy.ini was never read) - .prettierrc.json (prettier is not invoked by any recipe/workflow) - docs/DOCKER_BUILDS.md, docker/README.md (documented deleted files / non-existent workflows) - pyinstaller/ hooks and the unused "pyinstaller" dev dependency (PyInstaller is no longer explicitly supported) Behavior-preserving adjustments (not pure deletions): - .coveragerc was NOT redundant: it carried `omit = */test/*.py` and there was no [tool.coverage] in pyproject.toml, so dropping it would have started counting in-package test modules in coverage. The setting was migrated to [tool.coverage.run] in pyproject.toml (coverage.py auto-discovers it) and .coveragerc removed. - Dropped the now-stale "DOCKER_BUILDS.md" entry from the Sphinx exclude_patterns in docs/conf.py. Notes: - uv.lock is gitignored (.gitignore:66) and untracked, so the "regenerate uv.lock" action item produces no committed change; it was refreshed locally and cleanly drops pyinstaller and its transitive deps (altgraph, macholib, pefile, pyinstaller-hooks-contrib, setuptools). - The .coveragerc -> pyproject migration is a small config change beyond pure file removal; flagging for human review per AI_POLICY.md. Fixes #1831. Note: This work was completed with AI assistance (Claude Code). --- .coveragerc | 3 - .prettierrc.json | 12 - Dockerfile.wheels | 152 ------------ Makefile.orig | 458 ----------------------------------- deploy.sh | 67 ----- docker/README.md | 92 ------- docs/DOCKER_BUILDS.md | 165 ------------- docs/changelog.rst | 1 + docs/conf.py | 2 +- mypy.ini | 65 ----- pyinstaller/hook-autobahn.py | 29 --- pyinstaller/hook-twisted.py | 13 - pyproject.toml | 6 +- test-docker-builds.sh | 87 ------- versions.sh | 15 -- 15 files changed, 7 insertions(+), 1160 deletions(-) delete mode 100644 .coveragerc delete mode 100644 .prettierrc.json delete mode 100644 Dockerfile.wheels delete mode 100755 Makefile.orig delete mode 100755 deploy.sh delete mode 100644 docker/README.md delete mode 100644 docs/DOCKER_BUILDS.md delete mode 100644 mypy.ini delete mode 100644 pyinstaller/hook-autobahn.py delete mode 100644 pyinstaller/hook-twisted.py delete mode 100755 test-docker-builds.sh delete mode 100755 versions.sh diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index fe5714c3b..000000000 --- a/.coveragerc +++ /dev/null @@ -1,3 +0,0 @@ -[run] -omit = - */test/*.py diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 3ee8c8c00..000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "printWidth": 65, - "proseWrap": "always", - "overrides": [ - { - "files": "*.md", - "options": { - "printWidth": 65 - } - } - ] -} \ No newline at end of file diff --git a/Dockerfile.wheels b/Dockerfile.wheels deleted file mode 100644 index 37a368347..000000000 --- a/Dockerfile.wheels +++ /dev/null @@ -1,152 +0,0 @@ -# Multi-arch Python wheel builder for autobahn-python -# Supports: Debian 12, Rocky Linux 9, Ubuntu 24.04 on AMD64/ARM64 -# -# Usage: -# docker buildx build --platform linux/amd64,linux/arm64 \ -# --build-arg BASE_IMAGE=debian:12 \ -# --target wheel-builder \ -# -o dist/ . - -ARG BASE_IMAGE=debian:12 -FROM ${BASE_IMAGE} as base - -# Build arguments for metadata -ARG TARGETPLATFORM -ARG BUILDPLATFORM -ARG TARGETOS -ARG TARGETARCH - -# Environment setup -ENV LANG=C.UTF-8 -ENV DEBIAN_FRONTEND=noninteractive -ENV PYTHONUNBUFFERED=1 - -# Use bash as shell -SHELL ["/bin/bash", "-c"] - -# Install system dependencies based on base image -RUN if command -v apt-get >/dev/null 2>&1; then \ - # Debian/Ubuntu systems - apt-get update && \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - build-essential \ - pkg-config \ - libssl-dev \ - libffi-dev \ - zlib1g-dev \ - libbz2-dev \ - libreadline-dev \ - libsqlite3-dev \ - libncurses5-dev \ - libsnappy-dev \ - git \ - file \ - && rm -rf /var/lib/apt/lists/*; \ - elif command -v dnf >/dev/null 2>&1; then \ - # Rocky Linux/RHEL systems - dnf update -y && \ - dnf groupinstall -y "Development Tools" && \ - dnf install -y \ - ca-certificates \ - curl \ - pkgconfig \ - openssl-devel \ - libffi-devel \ - zlib-devel \ - bzip2-devel \ - readline-devel \ - sqlite-devel \ - ncurses-devel \ - snappy-devel \ - git \ - file \ - && dnf clean all; \ - fi - -# Install Python (use system Python as base, then manage versions with uv) -RUN if command -v apt-get >/dev/null 2>&1; then \ - apt-get update && \ - apt-get install -y --no-install-recommends python3 python3-pip python3-venv \ - && rm -rf /var/lib/apt/lists/*; \ - elif command -v dnf >/dev/null 2>&1; then \ - dnf install -y python3 python3-pip \ - && dnf clean all; \ - fi - -# Install Just (command runner) -RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin -RUN just --version - -# Install uv (Python package manager) -RUN curl -LsSf https://astral.sh/uv/install.sh | sh -ENV PATH="/root/.cargo/bin:$PATH" -RUN uv --version - -# Install Rust (for any Rust-based Python extensions) -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable -RUN source /root/.cargo/env && rustc --version - -# Verify toolchain -RUN echo "==> Build environment summary:" && \ - echo "Platform: $TARGETPLATFORM" && \ - echo "Architecture: $TARGETARCH" && \ - echo "Just: $(just --version)" && \ - echo "uv: $(uv --version)" && \ - echo "Rust: $(source /root/.cargo/env && rustc --version)" && \ - echo "Python: $(python3 --version)" && \ - echo "GCC: $(gcc --version | head -1)" && \ - echo "glibc: $(ldd --version | head -1)" - -# ============================================================================ -# Wheel building stage -# ============================================================================ -FROM base as wheel-builder - -# Copy source code -COPY . /workspace -WORKDIR /workspace - -# Set uv environment variables -ENV UV_CACHE_DIR=/workspace/.uv-cache -ENV UV_LINK_MODE=copy - -# Create output directory -RUN mkdir -p /output - -# Build wheels for all Python versions -RUN echo "==> Building wheels for all Python versions..." && \ - source /root/.cargo/env && \ - just build-all && \ - echo "==> Built wheels:" && \ - ls -la dist/ && \ - cp dist/*.whl dist/*.tar.gz /output/ 2>/dev/null || true - -# Create build info file -RUN echo "==> Creating build metadata..." && \ - cat > /output/build-info.txt << EOF -Build Platform: $BUILDPLATFORM -Target Platform: $TARGETPLATFORM -Target OS: $TARGETOS -Target Arch: $TARGETARCH -Base Image: ${BASE_IMAGE} -Build Date: $(date -u +"%Y-%m-%dT%H:%M:%SZ") -Python: $(python3 --version) -GCC: $(gcc --version | head -1) -glibc: $(ldd --version 2>/dev/null | head -1 || echo "N/A") -musl: $(if command -v musl-gcc >/dev/null 2>&1; then musl-gcc --version | head -1; else echo "N/A"; fi) -Wheels Built: $(ls -1 /output/*.whl 2>/dev/null | wc -l) -EOF - -# List final output -RUN echo "==> Final build output:" && \ - ls -la /output/ && \ - echo "==> Build info:" && \ - cat /output/build-info.txt - -# ============================================================================ -# Output stage - just the wheels -# ============================================================================ -FROM scratch as output -COPY --from=wheel-builder /output / \ No newline at end of file diff --git a/Makefile.orig b/Makefile.orig deleted file mode 100755 index 7f5971075..000000000 --- a/Makefile.orig +++ /dev/null @@ -1,458 +0,0 @@ -.PHONY: test docs pep8 build - -WHEELS=https://crossbarbuilder.s3.eu-central-1.amazonaws.com/wheels - -all: - @echo "" - @echo "Targets:" - @echo "" - @echo " install_system Local install: OS and OS level packages" - @echo " install_uv Local install: uv" - @echo " install_venvs Local install: Python virtualenvs" - @echo "" - @echo " clean_docs Cleanup: scratch local built docs" - @echo " clean Cleanup" - @echo " clean_venvs Cleanup: scratch all Python virtualenvs" - @echo "" - @echo " publish Clean build, register and publish to PyPi" - @echo " test Run unit tests" - @echo " flake8 Run flake8 code checking" - @echo "" - -install_system: - sudo apt update -y - sudo apt dist-upgrade -y - sudo apt autoremove - sudo apt install -y curl - sudo apt install -y libgirepository-2.0-0 - sudo apt install -y libgirepository-2.0-dev - -install_uv: - curl -LsSf https://astral.sh/uv/install.sh | sh - which uv - uv --version - uv python list - -# ############################################################################# - -# ============================================================================= -# CONFIGURATION -# Define all your Python environments and their interpreters. -# This is the single, explicit source of truth. -# =================================h============================================= -ENVS := cpy312 cpy311 cpy310 pypy310 pypy311 - -# Map environment names to the actual python executable names -PYTHON_INTERPRETER_cpy312 := python3.12 -PYTHON_INTERPRETER_cpy311 := python3.11 -PYTHON_INTERPRETER_cpy310 := python3.10 -PYTHON_INTERPRETER_pypy310 := pypy3.10 -PYTHON_INTERPRETER_pypy311 := pypy3.11 - -# ============================================================================= -# VIRTUAL ENVIRONMENT MANAGEMENT -# Declare all possible venv targets as phony to avoid conflicts with files. -# ============================================================================= -.PHONY: venv-all $(addprefix venv-,$(ENVS)) - -venv-all: $(addprefix venv-,$(ENVS)) - -# Example: `make venv-cpy312` -venv-%: - @echo "==> Creating virtual environment for '$*'..." - # Use an indirect variable to get the correct interpreter name - uv venv --python $(PYTHON_INTERPRETER_$(*)) .venv-$(*) - -# ============================================================================= -# VERSIONS -# ============================================================================= -.PHONY: version-all $(addprefix version-,$(ENVS)) - -version-all: $(addprefix version-,$(ENVS)) - -version-%: venv-% - ./.venv-$(*)/bin/python -V - -version-pypy311: - ./.venv-pypy311/bin/python -V - -# ============================================================================= -# LINTING -# Declare all possible lint targets as phony. -# ============================================================================= -.PHONY: lint-all $(addprefix lint-,$(ENVS)) - -lint-all: $(addprefix lint-,$(ENVS)) - -lint-%: venv-% - @echo "==> Linting with environment '$*'..." - ./.venv-$(*)/bin/uv pip install -r requirements-dev.txt - ./.venv-$(*)/bin/ruff check autobahn - -# ============================================================================= -# TESTING -# Declare all possible test targets as phony. -# ============================================================================= -.PHONY: test-all $(addprefix test-,$(ENVS)) - -test-all: $(addprefix test-,$(ENVS)) - -test-%: venv-% - @echo "==> Running tests with environment '$*'..." - ./.venv-$(*)/bin/uv pip install -e .[dev] - ./.venv-$(*)/bin/pytest - -# ============================================================================= -# CLEANUP -# ============================================================================= -.PHONY: clean -clean: - rm -rf .venv-* - -# ############################################################################# - -install_venvs: - uv venv --python 3.12 .venv-cpy312 - uv venv --python 3.11 .venv-cpy311 - uv venv --python 3.10 .venv-cpy310 - uv venv --python pypy-3.11 .venv-pypy311 - uv venv --python pypy-3.10 .venv-pypy310 - -activate_cpy312: - source ./.venv-cpy312/bin/activate - - - -# install locally -# https://github.com/pypy/pypy/issues/5248#issuecomment-3011857854 -install_old: - -pip uninstall -y pytest_asyncio # remove the broken shit - -pip uninstall -y pytest_cov # remove the broken shit - pip3 install git+https://gitlab.gnome.org/GNOME/pygobject - # enforce use of bundled libsodium - AUTOBAHN_USE_NVX=1 SODIUM_INSTALL=bundled pip install -e .[all] - -build: - -rm -f dist/* - # AUTOBAHN_USE_NVX=0 python -m build - AUTOBAHN_USE_NVX=1 python -m build - ls -la dist - -# upload to our internal deployment system -upload: clean - AUTOBAHN_USE_NVX=0 python -m build - aws s3 cp --acl public-read \ - dist/autobahn-*.whl \ - s3://fabric-deploy/autobahn/ - -# cleanup docs -clean_docs: - -rm -rf ./docs/_build - -rm -rf ./docs/autoapi/ - - -# cleanup everything but venvs -clean2: clean_docs - -rm -f ./*.so - -rm -rf ./docs/build - -rm -rf ./.cache - -rm -rf ./autobahn.egg-info - -rm -rf ./build - -rm -rf ./dist - -rm -rf ./temp - -rm -rf ./_trial_temp - -rm -rf ./.tox - -rm -rf ./.eggs - -rm -rf ./htmlcov - -rm -f ./twisted/plugins/dropin.cache - -find . -name "*dropin.cache.new" -type f -exec rm -f {} \; - -find . -name ".pytest_cache" -type d -exec rm -rf {} \; - -find . -name "*.tar.gz" -type f -exec rm -f {} \; - -find . -name "*.egg" -type f -exec rm -f {} \; - -find . -name "*.pyc" -type f -exec rm -f {} \; - - # Learn to love the shell! http://unix.stackexchange.com/a/115869/52500 - -find . \( -name "*__pycache__" -type d \) -prune -exec rm -rf {} + - -# cleanup venvs -clean_venvs: clean - rm -rf ./.venv* - -# publish to PyPI -publish: clean - AUTOBAHN_USE_NVX=0 python -m build - twine upload dist/* - -# autoformat with import sorting, including __all__ -# -autoformat_python: - ruff check --select I,RUF022 --fix . - ruff format . - -# Prettier: Markdown docs => opinionated, auto-formatting tool that "just works" -# https://prettier.io/ -# Config: ./.prettierrc.json -# Installation: npm install --save-dev --save-exact prettier -# -autoformat_markdown_docs: - npx prettier --write README.md - npx prettier --write OVERVIEW.md - npx prettier --write CONTRIBUTING.md - npx prettier --write RELEASING.md - npx prettier --write AI_AUDIT_PROCESS.md - npx prettier --write AI_POLICY.md - npx prettier --write CLAUDE.md - npx prettier --write .audit/README.md - npx prettier --write .github/pull_request_template.md - npx prettier --write .github/ISSUE_TEMPLATE/bug_report.md - npx prettier --write .github/ISSUE_TEMPLATE/feature_request.md - -# rstfmt: ReST docs => opinionated, auto-formatting tool that "just works" -# https://github.com/dzhu/rstfmt -# Config: ./pyproject.toml -# Installation: pip install rstfmt -# -autoformat_rest_docs: - rstfmt AI_POLICY.rst - -# copy AI Policy and GitHub template files; and adjust them; in one go -copy_project_templates: - @python3 copy_project_templates.py - -docs: - tox -e sphinx - -spelling: - cd docs && sphinx-build -b spelling . _spelling - -run_docs: - twistd --nodaemon web --port=tcp:8090 --path=./docs/_build/ - - -clean_wheels: - rm -rf ./.wheels - mkdir -p ./.wheels/ - -download_wheels: - mkdir -p ./.wheels/ - rm -f ./.wheels/*.whl - curl -o ./.wheels/txaio-latest-py2.py3-none-any.whl $(WHEELS)/txaio-latest-py2.py3-none-any.whl - curl -o ./.wheels/autobahn-latest-py2.py3-none-any.whl $(WHEELS)/autobahn-latest-py2.py3-none-any.whl - ls -la ./.wheels - -build_this_wheel: - mkdir -p ./.wheels/ - rm -f ./.wheels/autobahn*.whl - pip3 wheel --no-deps --wheel-dir=./.wheels . - mv .wheels/autobahn*.whl .wheels/autobahn-latest-py2.py3-none-any.whl - ls -la ./.wheels - -build_exe: - tox -e buildexe - -mypy: - mypy --install-types --non-interactive autobahn - -test_wamp_serializer: - -USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_serializer - -USE_ASYNCIO=1 pytest autobahn/wamp/test/test_wamp_serializer.py - -test_nvx: - python -m pytest -rsx autobahn/nvx/test - USE_TWISTED=1 trial autobahn.nvx.test.test_utf8validator - -test_styleguide: - flake8 --statistics -qq autobahn - -# direct test via pytest (only here because of setuptools test integration) -test_pytest: - USE_ASYNCIO=1 python -m pytest -c setup.cfg -rsvx autobahn/ - -test: - tox -e flake8,py37-twtrunk,py37-asyncio - -#test: flake8 test_twisted test_asyncio - -# test under Twisted -test_twisted: - USE_TWISTED=1 trial autobahn -# WAMP_ROUTER_URL="ws://127.0.0.1:8080/ws" USE_TWISTED=1 trial autobahn - -test_application_runner: - USE_TWISTED=1 trial autobahn.twisted.test.test_tx_application_runner - -test_util: - USE_TWISTED=1 trial autobahn.test.test_util - -test_rng: - USE_TWISTED=1 trial autobahn.test.test_rng - -test_serializer: - USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_serializer - -test_wamp_identifiers: - USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_identifiers - -test_tx_cryptobox: - USE_TWISTED=1 trial autobahn.wamp.test.test_cryptobox - -test_tx_choosereactor: - USE_TWISTED=1 trial autobahn.twisted.test.test_choosereactor - -test_cryptosign: -# USE_ASYNCIO=1 trial autobahn.wamp.test.test_wamp_cryptosign - USE_ASYNCIO=1 pytest -s -v -rfA --ignore=./autobahn/twisted autobahn/wamp/test/test_wamp_cryptosign.py - USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_cryptosign - -test_wamp_scram: - USE_ASYNCIO=1 trial autobahn.wamp.test.test_wamp_scram - USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_scram - -test_transport_details: - USE_ASYNCIO=1 trial autobahn.wamp.test.test_wamp_transport_details - USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_transport_details - -test_session_details: - USE_ASYNCIO=1 trial autobahn.wamp.test.test_wamp_session_details - USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_session_details - -test_tx_protocol: - USE_TWISTED=1 trial autobahn.twisted.test.test_tx_protocol - -test_asyncio: - USE_ASYNCIO=1 pytest -s -v -rfP --ignore=./autobahn/twisted autobahn -# USE_ASYNCIO=1 pytest -s -v -rA --ignore=./autobahn/twisted ./autobahn/asyncio/test/test_aio_websocket.py -# USE_ASYNCIO=1 pytest -s -v -rA --log-cli-level=info --ignore=./autobahn/twisted ./autobahn/asyncio/test/test_aio_websocket.py - -test_cs1: - USE_ASYNCIO=1 python -m pytest -s -v autobahn/wamp/test/test_cryptosign.py - -test1: - USE_TWISTED=1 trial autobahn.wamp.test.test_wamp_uri_pattern -# USE_TWISTED=1 trial autobahn.wamp.test.test_auth -# USE_TWISTED=1 python -m pytest -s -v autobahn/wamp/test/test_auth.py -# USE_TWISTED=1 python -m pytest -s -v autobahn/wamp/test/test_router.py -# USE_ASYNCIO=1 python -m pytest -s -v autobahn/wamp/test/test_router.py - -test2: -# USE_TWISTED=1 python -m pytest -s -v autobahn/wamp/test/test_router.py - USE_ASYNCIO=1 python -m pytest -s -v autobahn/wamp/test/test_router.py -# trial autobahn -# trial autobahn.websocket.test -# trial autobahn.wamp.test -# trial autobahn.wamp.test.test_component -# trial autobahn.wamp.test.test_message -# trial autobahn.wamp.test.test_protocol -# trial autobahn.wamp.test.test_protocol_peer -# trial autobahn.wamp.test.test_serializer -# trial autobahn.wamp.test.test_uri_pattern - -pyflakes: - pyflakes . - -# run PEP8 check and print statistics -pep8: - pep8 --statistics --ignore=E501 -qq autobahn - -# run PEP8 check and show source for offending code -pep8show: - pep8 --show-source --ignore=E501 autobahn - -# run autopep8 to automatically transform offending code -autopep8: - autopep8 -ri --aggressive autobahn - -# This will run pep8, pyflakes and can skip lines that end with # noqa -flake8: - tox -c tox.ini -e flake8 - -# run PyLint -pylint: - pylint -d line-too-long,invalid-name autobahn - -# on Unix, check for files with Windows line endings -find_windows_files: - find . -name "*" -exec file {} \; | grep "CRLF" - -# on Windows (Git Bash), check for files with Unix lines endings -find_unix_files: - find . -name "*" -exec dos2unix -tv {} \; 2>&1 | grep "Unix" - -# sudo apt install gource ffmpeg -gource: - gource \ - --path . \ - --seconds-per-day 0.15 \ - --title "autobahn-python" \ - -1280x720 \ - --file-idle-time 0 \ - --auto-skip-seconds 0.75 \ - --multi-sampling \ - --stop-at-end \ - --highlight-users \ - --hide filenames,mouse,progress \ - --max-files 0 \ - --background-colour 000000 \ - --disable-bloom \ - --font-size 24 \ - --output-ppm-stream - \ - --output-framerate 30 \ - -o - \ - | ffmpeg \ - -y \ - -r 60 \ - -f image2pipe \ - -vcodec ppm \ - -i - \ - -vcodec libx264 \ - -preset ultrafast \ - -pix_fmt yuv420p \ - -crf 1 \ - -threads 0 \ - -bf 0 \ - autobahn-python.mp4 - -# -# generate (a special set of) WAMP message classes from FlatBuffers schema -# - -# To build flatc from sourcces: -# -# git clone https://github.com/google/flatbuffers.git -# cd flatbuffers -# git checkout v22.12.06 -# cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -# make -# sudo cp ./flatc /usr/local/bin/flatc - -# input .fbs files for schema -FBSFILES=./autobahn/wamp/flatbuffers/*.fbs - -# flatc compiler to use -FLATC=flatc - -clean_fbs: - -rm -rf ./autobahn/wamp/gen/ - -build_fbs: - # generate schema binary type library (*.bfbs files) - $(FLATC) -o ./autobahn/wamp/gen/schema/ --binary --schema --bfbs-comments --bfbs-builtins $(FBSFILES) - @find ./autobahn/wamp/gen/schema/ -name "*.bfbs" | wc -l - - # generate schema Python bindings (*.py files) - $(FLATC) -o ./autobahn/wamp/gen/ --python $(FBSFILES) - @touch ./autobahn/wamp/gen/__init__.py - @find ./autobahn/wamp/gen/ -name "*.py" | wc -l - -build_fbs_cpp: - # generate schema C++ bindings (*.cpp/hpp files) - $(FLATC) -o /tmp/gen-cpp/ --cpp $(FBSFILES) - @find /tmp/gen-cpp/ - -build_fbs_rust: - # generate schema Rust bindings (*.rs files) - $(FLATC) -o /tmp/gen-rust/ --rust $(FBSFILES) - @find /tmp/gen-rust/ - -fix_copyright: - find . -type f -exec sed -i 's/Copyright (c) Crossbar.io Technologies GmbH/Copyright (c) typedef int GmbH/g' {} \; diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index f30cf4b07..000000000 --- a/deploy.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -set +o verbose -o errexit - -# AWS_DEFAULT_REGION : must be set in CI build context! -# AWS_S3_BUCKET_NAME : must be set in CI build context! -# AWS_ACCESS_KEY_ID : must be set in CI build context! -# AWS_SECRET_ACCESS_KEY : must be set in CI build context! -# WAMP_PRIVATE_KEY : must be set in CI build context! - -echo 'AWS env vars (should be 4):' -env | grep AWS_ | wc -l - -echo 'WAMP_PRIVATE_KEY env var (should be 1):' -env | grep WAMP_PRIVATE_KEY | wc -l - -# set up awscli package -echo 'installing aws tools ..' -pip install awscli -which aws -aws --version - -# build python source dist and wheels -echo 'building package ..' -pip install build -python -m build -ls -la ./dist - -# upload to S3: https://s3.eu-central-1.amazonaws.com/crossbarbuilder/wheels/ -echo 'uploading package ..' -# "aws s3 ls" will return -1 when no files are found! but we don't want our script to exit -aws s3 ls ${AWS_S3_BUCKET_NAME}/wheels/autobahn- || true - -# aws s3 cp --recursive ./dist s3://${AWS_S3_BUCKET_NAME}/wheels -aws s3 rm s3://${AWS_S3_BUCKET_NAME}/wheels/autobahn-${AUTOBAHN_VERSION}-${AUTOBAHN_BUILD_ID}-py2.py3-none-any.whl -aws s3 rm s3://${AWS_S3_BUCKET_NAME}/wheels/autobahn-${AUTOBAHN_VERSION}-py2.py3-none-any.whl -aws s3 rm s3://${AWS_S3_BUCKET_NAME}/wheels/autobahn-latest-py2.py3-none-any.whl - -aws s3 cp --acl public-read ./dist/autobahn-${AUTOBAHN_VERSION}-cp310-cp310-linux_x86_64.whl s3://${AWS_S3_BUCKET_NAME}/wheels/autobahn-${AUTOBAHN_VERSION}-${AUTOBAHN_BUILD_ID}-py2.py3-none-any.whl -aws s3 cp --acl public-read ./dist/autobahn-${AUTOBAHN_VERSION}-cp310-cp310-linux_x86_64.whl s3://${AWS_S3_BUCKET_NAME}/wheels/autobahn-${AUTOBAHN_VERSION}-py2.py3-none-any.whl -aws s3 cp --acl public-read ./dist/autobahn-${AUTOBAHN_VERSION}-cp310-cp310-linux_x86_64.whl s3://${AWS_S3_BUCKET_NAME}/wheels/autobahn-latest-py2.py3-none-any.whl -aws s3 cp --acl public-read ./dist/autobahn-${AUTOBAHN_VERSION}-cp310-cp310-linux_x86_64.whl s3://${AWS_S3_BUCKET_NAME}/wheels/autobahn-latest-cp310-cp310-linux_x86_64.whl - -#aws s3api copy-object --acl public-read \ -# --copy-source wheels/autobahn-${AUTOBAHN_VERSION}-py2.py3-none-any.whl --bucket ${AWS_S3_BUCKET_NAME} \ -# --key wheels/autobahn-latest-py2.py3-none-any.whl - -aws s3 ls ${AWS_S3_BUCKET_NAME}/wheels/autobahn- - -# tell crossbar-builder about this new wheel push -# get 'wamp' command, always with latest autobahn master -pip install -q -I https://github.com/crossbario/autobahn-python/archive/master.zip#egg=autobahn[twisted,serialization,encryption] - -# use 'wamp' to notify crossbar-builder -wamp --max-failures 3 \ - --authid wheel_pusher \ - --url ws://office2dmz.crossbario.com:8008/ \ - --realm webhook call builder.wheel_pushed \ - --keyword name autobahn \ - --keyword publish true - -echo '' -echo 'package uploaded to:' -echo '' -echo ' https://crossbarbuilder.s3.eu-central-1.amazonaws.com/wheels/autobahn-'${AUTOBAHN_VERSION}'-py2.py3-none-any.whl' -echo ' https://crossbarbuilder.s3.eu-central-1.amazonaws.com/wheels/autobahn-latest-py2.py3-none-any.whl' -echo '' diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index ca7472924..000000000 --- a/docker/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Docker Images - -## Using - -Use one of the following variants to select the desired image variant: - -``` -docker run -it --rm crossbario/autobahn-python:-- -``` - -with `PYTHON: cpy, pypy` and `ARCH: amd64, arm64v8`, eg - -1. `docker run -it --rm crossbario/autobahn-python:cpy-amd64` -1. `docker run -it --rm crossbario/autobahn-python:cpy-amd64-21.2.2.dev2` -1. `docker run -it --rm crossbario/autobahn-python:cpy-amd64-21.2.2.dev2-20210213-7a3dce63` - -To auto-select `ARCH` using Docker Manifest, eg - -1. `docker run -it --rm crossbario/autobahn-python:cpy` - -## Building - -Docker images are built automatically from the [docker workflow](../github/workflows/docker.yml), -which is triggered after a PR was merged to master. - -To manually build the Docker images, go to the root folder of this repository and set the build variables - -``` -source versions.sh -cd docker -make install_qemu -make copy_qemu -``` - -then change to the `docker` subfolder and install Qemu - -``` -cd docker -make install_qemu -make copy_qemu -``` - -To build from the wheels published to our S3 bucket - -``` -make clean_wheels -make download_wheels -``` - -To build the current library into a wheel and use that in the Docker image - -``` -make build_this_wheel -``` - -Then, to build and test a Docker image variant - -``` -make build_cpy_amd64 -make test_cpy_amd64 -``` - -``` -make build_this_wheel build_cpy_amd64 test_cpy_amd64 -``` - -You can mix `cpy` or `pypy` for the Python flavor, with `amd64` and `arm64` for the CPU architecture. - -To repeat a development cycle - -To build, test and then publish all image flavors - -``` -make build -make test -make publish -``` - - -## Checking built images - -To show the Docker image hashes and tags: - -``` -clear && make show list -``` - -To test the Docker images and print version infos: - -``` -clear && make test -``` diff --git a/docs/DOCKER_BUILDS.md b/docs/DOCKER_BUILDS.md deleted file mode 100644 index c49fbafb4..000000000 --- a/docs/DOCKER_BUILDS.md +++ /dev/null @@ -1,165 +0,0 @@ -# Docker-Based Multi-Architecture Wheel Building - -This document describes the Docker-based build system for creating Python wheels with precise ABI control across multiple Linux distributions and architectures. - -## Overview - -The Docker build system solves several critical issues: - -1. **ABI Compatibility**: Build wheels targeting specific glibc versions -2. **ARM64 Support**: Use QEMU emulation instead of waiting for GitHub ARM64 runners -3. **Customer Requirements**: Match exact OS environments (Rocky Linux 9) -4. **Reproducible Builds**: Identical environments across all builds - -## Supported Target Environments - -| Distribution | glibc Version | Architecture | Use Case | -|--------------|---------------|--------------|----------| -| **Debian 12** | 2.36 | AMD64, ARM64 | Modern Linux systems, containers | -| **Rocky Linux 9** | 2.34 | AMD64, ARM64 | Enterprise RHEL environments | -| **Ubuntu 24.04** | 2.39 | AMD64, ARM64 | Latest Ubuntu LTS | - -## Files - -- `Dockerfile.wheels` - Multi-stage Dockerfile for wheel building -- `docker-bake.hcl` - Docker Bake configuration for build orchestration -- `.github/workflows/wheels-docker.yml` - GitHub Actions workflow -- `test-docker-builds.sh` - Local testing script - -## Local Testing - -### Test a specific configuration: -```bash -./test-docker-builds.sh debian:12 linux/amd64 -./test-docker-builds.sh rockylinux:9 linux/arm64 -./test-docker-builds.sh ubuntu:24.04 linux/amd64 -``` - -### Build all architectures for one OS: -```bash -docker buildx bake \ - --set wheel-builder.args.BASE_IMAGE=debian:12 \ - --set wheel-builder.platform=linux/amd64,linux/arm64 \ - wheel-builder -``` - -### Development build (local Docker image): -```bash -docker buildx bake \ - --set wheel-builder-local.args.BASE_IMAGE=debian:12 \ - wheel-builder-local -``` - -## Build Process - -### 1. Multi-Stage Docker Build - -**Base Stage:** -- Install system dependencies (build tools, libraries) -- Install Just, uv, Rust toolchains -- Set up cross-compilation environment - -**Wheel Builder Stage:** -- Copy source code -- Run `just build-all` to build wheels for all Python versions -- Generate build metadata -- Output wheels to `/output` directory - -### 2. GitHub Actions Workflow - -**Matrix Strategy:** -```yaml -matrix: - target: - - { name: "debian12-amd64", base_image: "debian:12", platform: "linux/amd64" } - - { name: "debian12-arm64", base_image: "debian:12", platform: "linux/arm64" } - - { name: "rocky9-amd64", base_image: "rockylinux:9", platform: "linux/amd64" } - # ... etc -``` - -**Build Steps:** -1. Set up Docker Buildx with QEMU -2. Build wheels using Docker Bake -3. Upload artifacts by target environment -4. Publish to GitHub Releases (on master) -5. Publish to PyPI (on tags) - -## Wheel Naming and Compatibility - -### Platform Tags -- **linux_x86_64**: Built on AMD64, compatible with glibc 2.34+ systems -- **linux_aarch64**: Built on ARM64, compatible with glibc 2.34+ systems - -### ABI Compatibility -- **Debian 12 wheels**: Work on glibc 2.36+ (Debian 12+, Ubuntu 22.04+) -- **Rocky 9 wheels**: Work on glibc 2.34+ (RHEL 9+, CentOS Stream 9+) -- **Ubuntu 24.04 wheels**: Work on glibc 2.39+ (Ubuntu 24.04+) - -## Troubleshooting - -### Build Failures - -**Check system dependencies:** -```bash -docker buildx bake build-info --set build-info.args.BASE_IMAGE=debian:12 -docker run autobahn-build-info:debian:12 ldd --version -``` - -**Test toolchain installation:** -```bash -docker buildx build --platform linux/amd64 --target base \ - --build-arg BASE_IMAGE=debian:12 \ - -t test-base . -docker run test-base just --version -``` - -### QEMU Issues - -**Enable QEMU emulation:** -```bash -docker run --privileged --rm tonistiigi/binfmt --install all -``` - -**Check platform support:** -```bash -docker buildx ls -docker buildx inspect --bootstrap -``` - -### Wheel Installation Issues - -**Check glibc compatibility:** -```bash -ldd --version # Check your system glibc -python -c "import autobahn._extension" # Test extension loading -``` - -**Force specific wheel:** -```bash -pip install autobahn --only-binary=autobahn --force-reinstall -``` - -## Performance Notes - -- **Build time**: ~5-10 minutes per target environment -- **QEMU overhead**: ARM64 builds ~2-3x slower than native -- **Caching**: GitHub Actions caches Docker layers for faster rebuilds -- **Parallelization**: All target environments build concurrently - -## Migration from Native Builds - -The Docker builds replace the previous native GitHub Actions builds: - -| Old Approach | New Approach | -|--------------|--------------| -| `ubuntu-24.04` runner | Docker `ubuntu:24.04` image | -| `ubuntu-24.04-arm64` runner | Docker + QEMU emulation | -| GitHub runner dependency | Self-contained Docker builds | -| Variable runner availability | Consistent Docker environment | - -## Future Enhancements - -1. **musl Support**: Add Alpine Linux targets for static linking -2. **Windows Containers**: Docker-based Windows wheel building -3. **Build Optimization**: Multi-stage caching, parallel Python builds -4. **Custom Base Images**: Pre-built images with toolchain included \ No newline at end of file diff --git a/docs/changelog.rst b/docs/changelog.rst index d8d935e4b..51f7e155f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -37,6 +37,7 @@ Changelog * Cap ``cbor2 < 6`` on PyPy/Windows only (via environment markers), keeping ``cbor2`` 6.x everywhere else. ``cbor2`` 6.x is Rust/pyo3-only with no PyPy/Windows wheel and no pure-Python fallback, so it cannot be installed on PyPy/Windows; the 5.x line ships a pure-Python wheel (and runs at near-native speed on PyPy). This unblocks building and installing autobahn on PyPy/Windows (#1859) * Build and publish the missing CPython 3.12 and 3.14 ``manylinux_*_aarch64`` (ARM64) wheels. The per-version ARM64 build matrix (added in commit 3d856f5 to deduplicate wheels) only covered cp311 and cp313, so no cp312 aarch64 wheel was ever published (and cp314 was never added) - e.g. ``pip download autobahn --platform manylinux_2_34_aarch64`` for CPython 3.12 found no matching distribution. The strict release fileset manifest shared the same gap and so could not catch it; it now requires the cp312/cp314 aarch64 wheels (fail-closed). Thanks to @norrisjeremy for the report (#1848) * Make the release fileset symmetric across all four platforms: every supported interpreter (cp311, cp312, cp313, cp314, pypy311) is now required on macOS/arm64, Linux/x86_64, Linux/aarch64, and Windows/amd64. The macOS job already built all interpreters via ``just build-all``, but the manifest only required cp313/cp314/pypy311, so the cp311/cp312 macOS wheels were built and then dropped as "extra" rather than published; they are now kept and required (#1848) +* Remove orphaned/attic files left over from the pre-``justfile``/``uv`` CI/CD system: ``Makefile.orig``, ``Dockerfile.wheels``, ``mypy.ini``, ``test-docker-builds.sh``, ``versions.sh``, ``deploy.sh``, ``.prettierrc.json``, ``.coveragerc``, ``docs/DOCKER_BUILDS.md``, ``docker/README.md`` and the ``pyinstaller/`` PyInstaller hooks, plus the unused ``pyinstaller`` dev dependency. The ``.coveragerc`` ``omit = */test/*.py`` setting was preserved by migrating it to ``[tool.coverage.run]`` in ``pyproject.toml`` (so coverage still excludes in-package test modules), and the stale ``DOCKER_BUILDS.md`` entry was dropped from the Sphinx ``exclude_patterns``. ``mypy`` is unaffected: the typing recipe already passes ``--config-file pyproject-static-typing.toml`` explicitly (#1831) 25.12.2 ------- diff --git a/docs/conf.py b/docs/conf.py index 899625980..f3387b343 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -95,7 +95,7 @@ def use_aio(): language = "en" # Exclude patterns -exclude_patterns = ["_build", "work", "README.md", "DOCKER_BUILDS.md"] +exclude_patterns = ["_build", "work", "README.md"] # -- MyST Configuration ------------------------------------------------------ myst_enable_extensions = [ diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index b79dc1496..000000000 --- a/mypy.ini +++ /dev/null @@ -1,65 +0,0 @@ -[mypy] -python_version = 3.11 - -[mypy-autobahn.*] -ignore_missing_imports = True - -[mypy-txaio.*] -ignore_missing_imports = True - -[mypy-flatbuffers.*] -ignore_missing_imports = True - -[mypy-py_eth_sig_utils.*] -ignore_missing_imports = True - -[mypy-cbor2.*] -ignore_missing_imports = True - -[mypy-humanize.*] -ignore_missing_imports = True - -[mypy-yapf.*] -ignore_missing_imports = True - -[mypy-zope.interface.*] -ignore_missing_imports = True - -[mypy-pyqrcode.*] -ignore_missing_imports = True - -[mypy-pytrie.*] -ignore_missing_imports = True - -[mypy-passlib.*] -ignore_missing_imports = True - -[mypy-colorama.*] -ignore_missing_imports = True - -[mypy-eth_keys.*] -ignore_missing_imports = True - -[mypy-txtorcon.*] -ignore_missing_imports = True - -[mypy-ens.*] -ignore_missing_imports = True - -[mypy-jinja2.*] -ignore_missing_imports = True - -[mypy-multihash.*] -ignore_missing_imports = True - -[mypy-gi.*] -ignore_missing_imports = True - -[mypy-_hashlib.*] -ignore_missing_imports = True - -[mypy-_nvx_utf8validator.*] -ignore_missing_imports = True - -[mypy-wsaccel.*] -ignore_missing_imports = True diff --git a/pyinstaller/hook-autobahn.py b/pyinstaller/hook-autobahn.py deleted file mode 100644 index 00f039869..000000000 --- a/pyinstaller/hook-autobahn.py +++ /dev/null @@ -1,29 +0,0 @@ -from PyInstaller.utils.hooks import collect_data_files - -datas = collect_data_files("autobahn") - -# Most of the following are found automatically by PyInstaller - but some are not! -# To be on the safe side, we list _all_ modules here, which needs to be kept in -# sync manually -[ - "autobahn", - "autobahn.asyncio", - "autobahn.asyncio.test", - "autobahn.nvx", - "autobahn.nvx.test", - "autobahn.rawsocket", - "autobahn.rawsocket.test", - "autobahn.test", - "autobahn.twisted", - "autobahn.twisted.test", - "autobahn.twisted.testing", - "autobahn.wamp", - "autobahn.wamp.flatbuffers", - "autobahn.wamp.gen", - "autobahn.wamp.gen.schema", - "autobahn.wamp.gen.wamp", - "autobahn.wamp.gen.wamp.proto", - "autobahn.wamp.test", - "autobahn.websocket", - "autobahn.websocket.test", -] diff --git a/pyinstaller/hook-twisted.py b/pyinstaller/hook-twisted.py deleted file mode 100644 index f0e7981ab..000000000 --- a/pyinstaller/hook-twisted.py +++ /dev/null @@ -1,13 +0,0 @@ -# https://github.com/pyinstaller/pyinstaller/issues/3390 - -import sys - -# this creates module: sys.modules['twisted.internet.reactor'] -if sys.platform in ["win32"]: - from twisted.internet.iocpreactor import reactor as _iocpreactor - - _iocpreactor.install() -else: - from twisted.internet import default - - default.install() diff --git a/pyproject.toml b/pyproject.toml index 809d93aec..ae6b86412 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,7 +151,6 @@ dev = [ "passlib", "pep8-naming>=0.3.3", "pyflakes>=1.0.0", - "pyinstaller>=4.2", "pylint>=1.9.2", "pytest-aiohttp", "pytest-asyncio>=0.14.0", @@ -262,6 +261,11 @@ exclude = [ # rstfmt configuration: ReST (Sphinx) doc files width = 65 +[tool.coverage.run] +# Exclude in-package test modules from coverage measurement. +# Migrated from the (now removed) standalone .coveragerc (#1831). +omit = ["*/test/*.py"] + [tool.ruff] # Same as Black. line-length = 88 diff --git a/test-docker-builds.sh b/test-docker-builds.sh deleted file mode 100755 index 3aec7c655..000000000 --- a/test-docker-builds.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -# Test script for Docker-based wheel building -# Usage: ./test-docker-builds.sh [BASE_IMAGE] [PLATFORM] - -set -e - -BASE_IMAGE=${1:-"debian:12"} -PLATFORM=${2:-"linux/amd64"} -TEST_OUTPUT_DIR="./test-dist" - -echo "==========================================" -echo "Testing Docker wheel building" -echo "==========================================" -echo "Base Image: $BASE_IMAGE" -echo "Platform: $PLATFORM" -echo "Output: $TEST_OUTPUT_DIR" -echo "" - -# Clean previous test results -rm -rf "$TEST_OUTPUT_DIR" -mkdir -p "$TEST_OUTPUT_DIR" - -echo "==> Setting up Docker Buildx..." -docker buildx create --use --name autobahn-builder 2>/dev/null || docker buildx use autobahn-builder - -echo "" -echo "==> Building wheels with Docker..." -docker buildx bake \ - --set wheel-builder.platform="$PLATFORM" \ - --set wheel-builder.args.BASE_IMAGE="$BASE_IMAGE" \ - --set wheel-builder.output="type=local,dest=$TEST_OUTPUT_DIR" \ - wheel-builder - -echo "" -echo "==> Build Results:" -echo "==================" - -if [ -d "$TEST_OUTPUT_DIR" ]; then - echo "Files created:" - ls -la "$TEST_OUTPUT_DIR/" - - echo "" - echo "Build metadata:" - echo "===============" - if [ -f "$TEST_OUTPUT_DIR/build-info.txt" ]; then - cat "$TEST_OUTPUT_DIR/build-info.txt" - else - echo "No build-info.txt found" - fi - - echo "" - echo "Wheels summary:" - echo "===============" - wheel_count=$(find "$TEST_OUTPUT_DIR" -name "*.whl" 2>/dev/null | wc -l) - echo "Total wheels: $wheel_count" - - if [ "$wheel_count" -gt 0 ]; then - echo "Wheel files:" - find "$TEST_OUTPUT_DIR" -name "*.whl" -exec basename {} \; | sort - - echo "" - echo "Testing wheel installability:" - echo "=============================" - - # Test one wheel installation in a temporary container - if wheel_file=$(find "$TEST_OUTPUT_DIR" -name "*cp312*.whl" | head -1); then - echo "Testing installation of: $(basename "$wheel_file")" - - docker run --rm -v "$(pwd)/$wheel_file:/test.whl" python:3.12-slim bash -c " - pip install /test.whl && - python -c 'import autobahn; print(f\"autobahn version: {autobahn.__version__}\")' && - echo 'Wheel installation test: PASSED' - " || echo "Wheel installation test: FAILED" - fi - fi -else - echo "ERROR: No output directory created" - exit 1 -fi - -echo "" -echo "==> Test completed successfully!" -echo "" -echo "To test other configurations:" -echo " ./test-docker-builds.sh debian:12 linux/arm64" -echo " ./test-docker-builds.sh rockylinux:9 linux/amd64" -echo " ./test-docker-builds.sh ubuntu:24.04 linux/amd64" \ No newline at end of file diff --git a/versions.sh b/versions.sh deleted file mode 100755 index c1b3ab6ea..000000000 --- a/versions.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -export AUTOBAHN_BUILD_DATE=`date -u +"%Y-%m-%d"` -export AUTOBAHN_BUILD_ID=$(date --utc +%Y%m%d)-$(git rev-parse --short HEAD) -export AUTOBAHN_VCS_REF=`git rev-parse --short HEAD` -export AUTOBAHN_VERSION=$(grep -E '^(__version__)' ./autobahn/_version.py | cut -d ' ' -f3 | sed -e 's|[u"'\'']||g') - -echo "" -echo "Build environment configured:" -echo "" -echo " AUTOBAHN_BUILD_DATE = ${AUTOBAHN_BUILD_DATE}" -echo " AUTOBAHN_BUILD_ID = ${AUTOBAHN_BUILD_ID}" -echo " AUTOBAHN_VCS_REF = ${AUTOBAHN_VCS_REF}" -echo " AUTOBAHN_VERSION = ${AUTOBAHN_VERSION}" -echo "" From 914bd9b21c825e5980f47fba113d2d1f7cbb44a7 Mon Sep 17 00:00:00 2001 From: Tobias Oberstein Date: Wed, 17 Jun 2026 12:35:09 +0200 Subject: [PATCH 3/3] Add setuptools to dev extra: NVX cffi build needs it on Python >=3.12 (#1831) Removing the pyinstaller dev dependency also dropped setuptools, which was only present transitively (uv: "Removed setuptools v82.0.1"). On Python >= 3.12 the stdlib distutils is gone, so cffi's ffi.compile() requires setuptools to be installed. `just install-tools` does an editable install of .[dev] and then runs `build-nvx` in the venv, so the NVX CFFI build broke on cpy312/cpy314: Building _nvx_utf8validator... Exception: This CFFI feature requires setuptools on Python >= 3.12. error: recipe `build-nvx` failed with exit code 1 The wheel build path is unaffected (it uses `python -m build`, whose isolated build env already gets setuptools from [build-system].requires). Fix: add setuptools>=70.0.0 explicitly to the dev extra, with a comment so it is not mistaken for unused. Reproduced the failure on a cpy314 venv (setuptools absent) and confirmed `just build-nvx cpy314` succeeds once setuptools is installed. Note: This work was completed with AI assistance (Claude Code). --- docs/changelog.rst | 2 +- pyproject.toml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 51f7e155f..1f2590b37 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -37,7 +37,7 @@ Changelog * Cap ``cbor2 < 6`` on PyPy/Windows only (via environment markers), keeping ``cbor2`` 6.x everywhere else. ``cbor2`` 6.x is Rust/pyo3-only with no PyPy/Windows wheel and no pure-Python fallback, so it cannot be installed on PyPy/Windows; the 5.x line ships a pure-Python wheel (and runs at near-native speed on PyPy). This unblocks building and installing autobahn on PyPy/Windows (#1859) * Build and publish the missing CPython 3.12 and 3.14 ``manylinux_*_aarch64`` (ARM64) wheels. The per-version ARM64 build matrix (added in commit 3d856f5 to deduplicate wheels) only covered cp311 and cp313, so no cp312 aarch64 wheel was ever published (and cp314 was never added) - e.g. ``pip download autobahn --platform manylinux_2_34_aarch64`` for CPython 3.12 found no matching distribution. The strict release fileset manifest shared the same gap and so could not catch it; it now requires the cp312/cp314 aarch64 wheels (fail-closed). Thanks to @norrisjeremy for the report (#1848) * Make the release fileset symmetric across all four platforms: every supported interpreter (cp311, cp312, cp313, cp314, pypy311) is now required on macOS/arm64, Linux/x86_64, Linux/aarch64, and Windows/amd64. The macOS job already built all interpreters via ``just build-all``, but the manifest only required cp313/cp314/pypy311, so the cp311/cp312 macOS wheels were built and then dropped as "extra" rather than published; they are now kept and required (#1848) -* Remove orphaned/attic files left over from the pre-``justfile``/``uv`` CI/CD system: ``Makefile.orig``, ``Dockerfile.wheels``, ``mypy.ini``, ``test-docker-builds.sh``, ``versions.sh``, ``deploy.sh``, ``.prettierrc.json``, ``.coveragerc``, ``docs/DOCKER_BUILDS.md``, ``docker/README.md`` and the ``pyinstaller/`` PyInstaller hooks, plus the unused ``pyinstaller`` dev dependency. The ``.coveragerc`` ``omit = */test/*.py`` setting was preserved by migrating it to ``[tool.coverage.run]`` in ``pyproject.toml`` (so coverage still excludes in-package test modules), and the stale ``DOCKER_BUILDS.md`` entry was dropped from the Sphinx ``exclude_patterns``. ``mypy`` is unaffected: the typing recipe already passes ``--config-file pyproject-static-typing.toml`` explicitly (#1831) +* Remove orphaned/attic files left over from the pre-``justfile``/``uv`` CI/CD system: ``Makefile.orig``, ``Dockerfile.wheels``, ``mypy.ini``, ``test-docker-builds.sh``, ``versions.sh``, ``deploy.sh``, ``.prettierrc.json``, ``.coveragerc``, ``docs/DOCKER_BUILDS.md``, ``docker/README.md`` and the ``pyinstaller/`` PyInstaller hooks, plus the unused ``pyinstaller`` dev dependency. The ``.coveragerc`` ``omit = */test/*.py`` setting was preserved by migrating it to ``[tool.coverage.run]`` in ``pyproject.toml`` (so coverage still excludes in-package test modules), and the stale ``DOCKER_BUILDS.md`` entry was dropped from the Sphinx ``exclude_patterns``. ``mypy`` is unaffected: the typing recipe already passes ``--config-file pyproject-static-typing.toml`` explicitly. ``setuptools`` was added explicitly to the ``dev`` extra: it is required by ``cffi``'s ``ffi.compile()`` to build the NVX extensions in an editable install on Python >= 3.12 (stdlib ``distutils`` was removed in 3.12) and had been pulled in only transitively via the removed ``pyinstaller`` (#1831) 25.12.2 ------- diff --git a/pyproject.toml b/pyproject.toml index ae6b86412..cb83f2441 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -159,6 +159,12 @@ dev = [ "pyyaml>=4.2b4", "qualname>=0.1.0", "ruff>=0.12.1", + # Required by cffi's ffi.compile() to build the NVX extensions in an editable + # install on Python >= 3.12 (stdlib distutils was removed in 3.12, and cffi + # then needs setuptools). `just install-tools` runs `build-nvx` in the venv, + # so setuptools must be present here. Previously satisfied transitively via + # pyinstaller, which was removed in #1831. + "setuptools>=70.0.0", "twisted>=22.10.0", "txaio>=25.12.2", "watchdog>=0.8.3",