From 47e27d03e105c8be3f4234a68121e2b2169451fd Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Mon, 17 Nov 2025 07:14:56 +0100 Subject: [PATCH] - Drop Python 3.9, add 3.14, move metadata to ``pyproject.toml`` --- .editorconfig | 2 +- .github/workflows/pre-commit.yml | 4 +- .github/workflows/tests.yml | 136 ++++++++++++++++++------------- .manylinux-install.sh | 13 +-- .meta.toml | 2 +- .pre-commit-config.yaml | 6 +- CHANGES.rst | 108 ++++++++++++++---------- docs/conf.py | 2 +- docs/requirements.txt | 3 +- pyproject.toml | 50 ++++++++++++ setup.py | 76 +---------------- tox.ini | 8 +- 12 files changed, 219 insertions(+), 191 deletions(-) diff --git a/.editorconfig b/.editorconfig index 9d3c4f2..5094013 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/c-code # # EditorConfig Configuration file, for more details see: -# http://EditorConfig.org +# https://EditorConfig.org # EditorConfig is a convention description, that could be interpreted # by multiple editors to enforce common coding conventions for specific # file types diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7d2c235..8f2ad3c 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -22,9 +22,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: - python-version: 3.x + python-version: '3.13' - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd #v3.0.1 with: extra_args: --all-files --show-diff-on-failure diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c2b9de..ac1bf68 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -93,12 +93,12 @@ jobs: matrix: python-version: - "pypy-3.11" - - "3.9" - "3.10" - "3.11" - "3.12" - "3.13" - "3.14" + - "3.15" os: [ubuntu-latest, macos-latest, windows-latest] exclude: - os: macos-latest @@ -110,7 +110,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -150,16 +150,16 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - - name: Install Build Dependencies (3.14) - if: matrix.python-version == '3.14' + - name: Install Build Dependencies (3.15) + if: matrix.python-version == '3.15' run: | pip install -U pip - pip install -U "setuptools == 78.1.1" wheel twine + pip install -U "setuptools >= 78.1.1,< 81" wheel twine - name: Install Build Dependencies - if: matrix.python-version != '3.14' + if: matrix.python-version != '3.15' run: | pip install -U pip - pip install -U "setuptools == 78.1.1" wheel twine + pip install -U "setuptools >= 78.1.1,< 81" wheel twine - name: Build zope.proxy (macOS x86_64) if: > @@ -197,18 +197,18 @@ jobs: python setup.py build_ext -i python setup.py bdist_wheel - - name: Install zope.proxy and dependencies (3.14) - if: matrix.python-version == '3.14' + - name: Install zope.proxy and dependencies (3.15) + if: matrix.python-version == '3.15' run: | # Install to collect dependencies into the (pip) cache. # Use "--pre" here because dependencies with support for this future # Python release may only be available as pre-releases pip install --pre .[test] - name: Install zope.proxy and dependencies - if: matrix.python-version != '3.14' + if: matrix.python-version != '3.15' run: | # Install to collect dependencies into the (pip) cache. - pip install -U pip "setuptools == 78.1.1" + pip install -U pip "setuptools >= 78.1.1,< 81" pip install .[test] - name: Check zope.proxy build @@ -240,20 +240,6 @@ jobs: with: name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/*whl - - name: Publish package to PyPI (Non-Linux) - # We cannot use pypa/gh-action-pypi-publish because that - # is a container action, and those don't run on macOS - # or Windows GHA runners. - if: > - github.event_name == 'push' - && startsWith(github.ref, 'refs/tags') - && !startsWith(runner.os, 'Linux') - && !startsWith(matrix.python-version, 'pypy') - && !startsWith(matrix.python-version, '3.14') - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - run: | - twine upload --skip-existing dist/* test: needs: build-package @@ -263,12 +249,12 @@ jobs: matrix: python-version: - "pypy-3.11" - - "3.9" - "3.10" - "3.11" - "3.12" - "3.13" - "3.14" + - "3.15" os: [ubuntu-latest, macos-latest, windows-latest] exclude: - os: macos-latest @@ -280,7 +266,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -326,9 +312,9 @@ jobs: name: zope.proxy-${{ runner.os }}-${{ matrix.python-version }}.whl path: dist/ - name: Install zope.proxy ${{ matrix.python-version }} - if: matrix.python-version == '3.14' + if: matrix.python-version == '3.15' run: | - pip install -U wheel "setuptools == 78.1.1" + pip install -U wheel "setuptools >= 78.1.1,< 81" # coverage might have a wheel on PyPI for a future python version which is # not ABI compatible with the current one, so build it from sdist: pip install -U --no-binary :all: coverage[toml] @@ -341,9 +327,9 @@ jobs: # Python release may only be available as pre-releases pip install --pre -e .[test] - name: Install zope.proxy - if: matrix.python-version != '3.14' + if: matrix.python-version != '3.15' run: | - pip install -U wheel "setuptools == 78.1.1" + pip install -U wheel "setuptools >= 78.1.1,< 81" pip install -U coverage[toml] pip install -U 'cffi; platform_python_implementation == "CPython"' # Unzip into src/ so that testrunner can find the .so files @@ -387,7 +373,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.11"] + python-version: ["3.13"] os: [ubuntu-latest] steps: @@ -396,7 +382,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -458,7 +444,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: ["3.11"] + python-version: ["3.13"] os: [ubuntu-latest] steps: @@ -467,7 +453,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -524,21 +510,28 @@ jobs: tox -e release-check manylinux: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - # We use a regular Python matrix entry to share as much code as possible. + # We use a matrix to share as much code as possible. strategy: matrix: - python-version: ["3.11"] - image: [manylinux2014_x86_64, manylinux2014_i686, manylinux2014_aarch64] - + include: + - os: ubuntu-latest + image: manylinux2014_x86_64 + python-version: "3.13" + - os: ubuntu-latest + image: manylinux2014_i686 + python-version: "3.13" + - os: ubuntu-24.04-arm + image: manylinux2014_aarch64 + python-version: "3.13" steps: - name: checkout uses: actions/checkout@v5 with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -580,8 +573,9 @@ jobs: - name: Update pip run: pip install -U pip - - name: Build zope.proxy (x86_64) - if: matrix.image == 'manylinux2014_x86_64' + + - name: Build zope.proxy + if: matrix.image != 'manylinux2014_i686' # An alternate way to do this is to run the container directly with a uses: # and then the script runs inside it. That may work better with caching. # See https://github.com/pyca/bcrypt/blob/f6b5ee2eda76d077c531362ac65e16f045cf1f29/.github/workflows/wheel-builder.yml @@ -596,31 +590,59 @@ jobs: PRE_CMD: linux32 run: | bash .manylinux.sh - - name: Build zope.proxy (aarch64) - if: matrix.image == 'manylinux2014_aarch64' - env: - DOCKER_IMAGE: quay.io/pypa/${{ matrix.image }} - run: | - # First we must enable emulation - docker run --rm --privileged hypriot/qemu-register - bash .manylinux.sh - name: Upload zope.proxy wheels uses: actions/upload-artifact@v4 with: path: wheelhouse/*whl name: manylinux_${{ matrix.image }}_wheels.zip + - name: Restore pip cache permissions run: sudo chown -R $(whoami) ${{ steps.pip-cache-default.outputs.dir }} + - name: Prevent publishing wheels for unreleased Python versions - run: VER=$(echo '3.14' | tr -d .) && ls -al wheelhouse && sudo rm -f wheelhouse/*-cp${VER}*.whl && ls -al wheelhouse - - name: Publish package to PyPI + run: VER=$(echo '3.15' | tr -d .) && ls -al wheelhouse && sudo rm -f wheelhouse/*-cp${VER}*.whl && ls -al wheelhouse + + publish: + name: Publish to PyPI + runs-on: ubuntu-latest + # Only publish on tag pushes + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + # Wait for both build jobs to complete + needs: [build-package, manylinux] + permissions: + contents: read + + steps: + - name: Download all wheel artifacts + uses: actions/download-artifact@v4 + with: + path: dist/ + pattern: '*' + merge-multiple: true + + - name: Display structure of downloaded files + run: | + ls -lR dist/ + echo "Total wheel files:" + find dist/ -name "*.whl" | wc -l + + - name: Remove undesired wheels (if any were downloaded) + run: | + # PyPy wheels shouldn't be uploaded, remove them if present + find dist/ -name "*pypy*" -type f -delete || true + find dist/ -name "*none-any*" -type f -delete || true + # Wheels for the no-yet-supported future Python version need to go + find dist/ -name "*3.15*" -type f -delete || true + find dist/ -name "*cp315*" -type f -delete || true + # For Linux, we only want the manylinux wheels + find dist/ -name "*linux_x86_64*" -type f -delete || true + + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - if: > - github.event_name == 'push' - && startsWith(github.ref, 'refs/tags') with: user: __token__ password: ${{ secrets.TWINE_PASSWORD }} skip-existing: true - packages-dir: wheelhouse/ + packages-dir: dist/ + verbose: true diff --git a/.manylinux-install.sh b/.manylinux-install.sh index 163ad76..db8da43 100755 --- a/.manylinux-install.sh +++ b/.manylinux-install.sh @@ -28,12 +28,12 @@ yum -y install libffi-devel tox_env_map() { case $1 in - *"cp39"*) echo 'py39';; *"cp310"*) echo 'py310';; *"cp311"*) echo 'py311';; *"cp312"*) echo 'py312';; *"cp313"*) echo 'py313';; *"cp314"*) echo 'py314';; + *"cp315"*) echo 'py315';; *) echo 'py';; esac } @@ -41,13 +41,13 @@ tox_env_map() { # Compile wheels for PYBIN in /opt/python/*/bin; do if \ - [[ "${PYBIN}" == *"cp39/"* ]] || \ [[ "${PYBIN}" == *"cp310/"* ]] || \ [[ "${PYBIN}" == *"cp311/"* ]] || \ [[ "${PYBIN}" == *"cp312/"* ]] || \ [[ "${PYBIN}" == *"cp313/"* ]] || \ - [[ "${PYBIN}" == *"cp314/"* ]] ; then - if [[ "${PYBIN}" == *"cp314/"* ]] ; then + [[ "${PYBIN}" == *"cp314/"* ]] || \ + [[ "${PYBIN}" == *"cp315/"* ]] ; then + if [[ "${PYBIN}" == *"cp315/"* ]] ; then "${PYBIN}/pip" install --pre -e /io/ "${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/ else @@ -65,7 +65,10 @@ for PYBIN in /opt/python/*/bin; do fi done +# Show what wheels we have +echo "Fixing up the following wheels:" +ls -l wheelhouse/zope?proxy*.whl # Bundle external shared libraries into the wheels -for whl in wheelhouse/zope_proxy*.whl; do +for whl in wheelhouse/zope?proxy*.whl; do auditwheel repair "$whl" -w /io/wheelhouse/ done diff --git a/.meta.toml b/.meta.toml index 89d414a..cf02809 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/c-code [meta] template = "c-code" -commit-id = "064de370" +commit-id = "9fcd3d67" [python] with-windows = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f1ffed7..5c30476 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ minimum_pre_commit_version: '3.6' repos: - repo: https://github.com/pycqa/isort - rev: "6.0.1" + rev: "7.0.0" hooks: - id: isort - repo: https://github.com/hhatto/autopep8 @@ -12,10 +12,10 @@ repos: - id: autopep8 args: [--in-place, --aggressive, --aggressive] - repo: https://github.com/asottile/pyupgrade - rev: v3.20.0 + rev: v3.21.0 hooks: - id: pyupgrade - args: [--py39-plus] + args: [--py310-plus] exclude: ^src/zope/proxy/__init__\.py$ - repo: https://github.com/isidentical/teyit rev: 0.4.3 diff --git a/CHANGES.rst b/CHANGES.rst index f7807f5..b0ae0be 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,15 +1,20 @@ -========= - Changes -========= +Change log +========== 7.1 (unreleased) -================ +---------------- + +- Move all supported package metadata into ``pyproject.toml``. + +- Drop support for Python 3.9. + +- Add support for Python 3.14. - Remove no longer necessary ``setuptools`` runtime dependency. 7.0 (2025-09-12) -================ +---------------- - Replace ``pkg_resources`` namespace with PEP 420 native namespace. @@ -21,13 +26,13 @@ 6.1 (2024-10-02) -================ +---------------- - Respect ``PURE_PYTHON`` environment variable set to ``0``. 6.0 (2024-09-17) -================ +---------------- - Declare full support for Python 3.13. @@ -35,7 +40,7 @@ 5.3 (2024-08-07) -================ +---------------- - Build Windows wheels on GHA. @@ -44,19 +49,19 @@ 5.2 (2024-02-09) -================ +---------------- - Add preliminary support for Python 3.13 as of 3.13a3. 5.1 (2023-10-05) -================ +---------------- - Add support for Python 3.12. 5.0.0 (2023-01-18) -================== +------------------ - Drop support for Python 2.7, 3.5, 3.6. @@ -66,32 +71,32 @@ 4.6.1 (2022-11-16) -================== +------------------ - Add support for building arm64 wheels on macOS. 4.6.0 (2022-11-03) -================== +------------------ - Add support for Python 3.11. 4.5.1 (2022-09-15) -================== +------------------ - Disable unsafe math optimizations in C code. See `pull request 53 `_. 4.5.0 (2021-11-17) -================== +------------------ - Add support for Python 3.10. 4.4.0 (2021-07-22) -================== +------------------ - Add support for Python 3.9. @@ -99,7 +104,7 @@ 4.3.5 (2020-03-16) -================== +------------------ - Stop installing C header files on PyPy (which is what zope.proxy before 4.3.4 used to do), fixes `issue 39 @@ -107,7 +112,7 @@ 4.3.4 (2020-03-13) -================== +------------------ - Fix a compilation warning on Python 3.8. The slot ``tp_print`` changed to ``tp_vectorcall_offset`` in 3.8 and must not be set. @@ -120,7 +125,7 @@ 4.3.3 (2019-11-11) -================== +------------------ - Add support for Python 3.8. @@ -128,7 +133,7 @@ 4.3.2 (2019-07-12) -================== +------------------ - Fix error handling in ``ProxyBase.__setattr__``: any the exception raised by ``PyString_AsString``/``PyUnicode_AsUTF8`` would be silently swallowed up @@ -137,7 +142,7 @@ 4.3.1 (2018-08-09) -================== +------------------ - Simplify the internal C handling of attribute names in ``__getattribute__`` and ``__setattr__``. @@ -151,8 +156,9 @@ - Add support for Python 3.7. + 4.3.0 (2017-09-13) -================== +------------------ - Fix a potential rare crash when deallocating proxies. See `issue 20 `_. @@ -170,16 +176,18 @@ 2, a custom ``__getslice__`` was ignored. See `issue 21 `_. + 4.2.1 (2017-04-23) -================== +------------------ - Make the pure-Python implementation of ``sameProxiedObjects`` handle ``zope.security`` proxies. See `issue 15 `_. - Add support for Python 3.6. + 4.2.0 (2016-05-05) -================== +------------------ - Correctly strip ``zope.security`` proxies in ``removeAllProxies``. See `issue 13 `_. @@ -191,8 +199,9 @@ - Add support for Python 3.5. + 4.1.6 (2015-06-02) -================== +------------------ - Make subclasses of ProxyBase properly delegate ``__module__`` to the wrapped object. This fixes some ``zope.interface`` lookups under @@ -202,8 +211,9 @@ ``zope.interface`` interfaces implemented by builtin types like ``list``. This fixes some ``zope.interface`` lookups under PyPy. + 4.1.5 (2015-05-19) -================== +------------------ - Make the C implementation proxy ``__unicode__`` correctly. @@ -214,23 +224,26 @@ subclasses like the C version. See https://github.com/zopefoundation/zope.proxy/issues/5. + 4.1.4 (2014-03-19) -================== +------------------ - Add support for Python 3.4. - Update ``bootstrap.py`` to version 2.2. + 4.1.3 (2013-03-12) -================== +------------------ - Fix interface object introspection in PyPy. For some reason PyPy makes attributes available despite the restrictive ``__slots__`` declaration. - Add a bunch of tests surrounding interface lookup and adaptation. + 4.1.2 (2013-03-11) -================== +------------------ - Make ``PyProxyBase.__iter__()`` return the result of ``PyProxyBase._wrapped.__iter__`` if available, otherwise falling back to @@ -240,13 +253,15 @@ proxy itself. This is needed to properly allow proxy extensions as was evidenced int he ``zope.security.decorator`` module. + 4.1.1 (2012-12-31) -================== +------------------ - Fleshed out PyPI Trove classifiers. + 4.1.0 (2012-12-19) -================== +------------------ - Enable compilation of dependent modules under Py3k. @@ -257,13 +272,15 @@ extensions built under Python 2.7 against 4.0.x versions of ``zope.proxy`` must be rebuilt. + 4.0.1 (2012-11-21) -================== +------------------ - Add support for Python 3.3. + 4.0.0 (2012-06-06) -================== +------------------ - Add support for PyPy. @@ -296,32 +313,37 @@ - Add Python 3.2 support. + 3.6.1 (2010-07-06) -================== +------------------ - Make tests compatible with Python 2.7. + 3.6.0 (2010-04-30) -================== +------------------ - Remove test extra and the remaining dependency on zope.testing. - Remove use of 'zope.testing.doctestunit' in favor of stdlib's 'doctest. + 3.5.0 (2009/01/31) -================== +------------------ - Add support to bootstrap on Jython. - Use ``zope.container`` instead of ``zope.app.container``. + 3.4.2 (2008/07/27) -================== +------------------ - Make C code compatible with Python 2.5 on 64bit architectures. + 3.4.1 (2008/06/24) -================== +------------------ - Bug: Update ``setup.py`` script to conform to common layout. Also updated some of the fields. @@ -330,28 +352,30 @@ and ``__setslice__()`` methods. See http://docs.python.org/ref/sequence-methods.html. + 3.4.0 (2007/07/12) -================== +------------------ - Feature: Add a ``decorator`` module that supports declaring interfaces on proxies that get blended with the interfaces of the things they proxy. + 3.3.0 (2006/12/20) -================== +------------------ - Corresponds to the verison of the ``zope.proxy`` package shipped as part of the Zope 3.3.0 release. 3.2.0 (2006/01/05) -================== +------------------ - Corresponds to the verison of the ``zope.proxy`` package shipped as part of the Zope 3.2.0 release. 3.0.0 (2004/11/07) -================== +------------------ - Corresponds to the verison of the ``zope.proxy`` package shipped as part of the Zope X3.0.0 release. diff --git a/docs/conf.py b/docs/conf.py index d54a661..3ce56be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,5 +30,5 @@ # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'sphinx_rtd_theme' +html_theme = 'furo' html_static_path = ['_static'] diff --git a/docs/requirements.txt b/docs/requirements.txt index 62b6df6..d25c685 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,3 @@ Sphinx repoze.sphinx.autointerface -sphinx_rtd_theme>1 -docutils<0.19 +furo diff --git a/pyproject.toml b/pyproject.toml index b8f8aae..9901bfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,56 @@ requires = [ ] build-backend = "setuptools.build_meta" +[project] +name = "zope.proxy" +version = "7.1.dev0" +description = "Generic Transparent Proxies" +keywords = ["zope", "proxy", "generic", "transparent"] +readme = "README.rst" +requires-python = ">=3.10" +license = "ZPL-2.1" +authors = [ + { name = "Zope Foundation and contributors", email = "zope-dev@zope.dev" }, +] +maintainers = [ + { name = "Plone Foundation and contributors", email = "zope-dev@zope.dev" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: Zope :: 3", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "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", +] +dependencies = ["zope.interface"] + +[project.optional-dependencies] +docs = [ + "Sphinx", + "repoze.sphinx.autointerface", + "furo", +] +# We have a circular dependency with zope.security for testing +test = [ + "zope.security >= 7.3", + "zope.testrunner >= 6.4", +] + +[project.urls] +Documentation = "https://zopeproxy.readthedocs.io" +Issues = "https://github.com/zopefoundation/zope.proxy/issues" +Source = "https://github.com/zopefoundation/zope.proxy" +Changelog = "https://github.com/zopefoundation/zope.proxy/blob/master/CHANGES.rst" + [tool.coverage.run] branch = true source = ["zope.proxy"] diff --git a/setup.py b/setup.py index 148e038..ca58266 100644 --- a/setup.py +++ b/setup.py @@ -30,9 +30,6 @@ from setuptools.command.build_ext import build_ext -version = '7.1.dev0' - - class optional_build_ext(build_ext): """This class subclasses build_ext and allows the building of C extensions to fail. @@ -60,11 +57,6 @@ def _unavailable(self, e): print('*' * 80) -def read(*rnames): - with open(os.path.join(os.path.dirname(__file__), *rnames)) as f: - return f.read() - - codeoptimization = [ Extension( "zope.proxy._zope_proxy_proxy", @@ -73,75 +65,13 @@ def read(*rnames): ] # PyPy won't build the extension. -is_pypy = platform.python_implementation() == 'PyPy' -if is_pypy: +if platform.python_implementation() == 'PyPy': ext_modules = [] headers = [] else: ext_modules = codeoptimization headers = [os.path.join('src', 'zope', 'proxy', 'proxy.h')] -setup(name='zope.proxy', - version=version, - author='Zope Foundation and Contributors', - author_email='zope-dev@zope.dev', - description='Generic Transparent Proxies', - long_description=( - read('README.rst') - + '\n\n' + - read('CHANGES.rst') - ), - url='http://github.com/zopefoundation/zope.proxy', - project_urls={ - 'Documentation': 'https://zopeproxy.readthedocs.io', - 'Issue Tracker': 'https://github.com/zopefoundation/' - 'zope.proxy/issues', - 'Sources': 'https://github.com/zopefoundation/zope.proxy', - }, - license='ZPL-2.1', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Zope Public License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - '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 :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', - 'Framework :: Zope :: 3', - 'Natural Language :: English', - 'Operating System :: OS Independent', - ], - keywords='proxy generic transparent', - # we need the following two parameters because we compile C code, - # otherwise only the shared library is installed: - package_dir={'': 'src'}, - packages=['zope.proxy'], - cmdclass={ - 'build_ext': optional_build_ext, - }, +setup(cmdclass={'build_ext': optional_build_ext}, headers=headers, - ext_modules=ext_modules, - python_requires='>=3.9', - install_requires=[ - 'zope.interface', - ], - include_package_data=True, - zip_safe=False, - extras_require={ - 'test': [ - # We have a circular dependency with zope.security for testing - 'zope.security >= 7.3', - 'zope.testrunner >= 6.4', - ], - 'docs': [ - 'Sphinx', - 'repoze.sphinx.autointerface', - 'sphinx_rtd_theme', - ], - }, - ) + ext_modules=ext_modules) diff --git a/tox.ini b/tox.ini index 9a99dc9..7b89533 100644 --- a/tox.ini +++ b/tox.ini @@ -5,20 +5,20 @@ minversion = 4.0 envlist = release-check lint - py39,py39-pure py310,py310-pure py311,py311-pure py312,py312-pure py313,py313-pure py314,py314-pure + py315,py315-pure pypy3 docs coverage [testenv] -pip_pre = py314: true +pip_pre = py315: true deps = - setuptools == 78.1.1 + setuptools >= 78.1.1,< 81 Sphinx setenv = pure: PURE_PYTHON=1 @@ -64,7 +64,7 @@ deps = commands_pre = commands = check-manifest - check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml + check-python-versions --only pyproject.toml,setup.py,tox.ini,.github/workflows/tests.yml python -m build --sdist --no-isolation twine check dist/*