diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f2d9629..0474d6a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,29 +17,30 @@ jobs: fail-fast: false matrix: os: - - ["ubuntu", "ubuntu-20.04"] + - ["ubuntu", "ubuntu-latest"] config: # [Python version, tox env] - - ["3.9", "lint"] - - ["3.7", "py37"] + - ["3.11", "release-check"] + - ["3.11", "lint"] - ["3.8", "py38"] - ["3.9", "py39"] - ["3.10", "py310"] - ["3.11", "py311"] - - ["pypy-3.7", "pypy3"] - - ["3.9", "coverage"] + - ["3.12", "py312"] + - ["pypy-3.10", "pypy3"] + - ["3.11", "coverage"] runs-on: ${{ matrix.os[1] }} if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ${{ matrix.config[1] }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.config[0] }} - name: Pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} @@ -51,7 +52,11 @@ jobs: python -m pip install --upgrade pip pip install tox - name: Test + if: ${{ !startsWith(runner.os, 'Mac') }} run: tox -e ${{ matrix.config[1] }} + - name: Test (macOS) + if: ${{ startsWith(runner.os, 'Mac') }} + run: tox -e ${{ matrix.config[1] }}-universal2 - name: Coverage if: matrix.config[1] == 'coverage' run: | diff --git a/.meta.toml b/.meta.toml index a0f6771..8f773f7 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/pure-python [meta] template = "pure-python" -commit-id = "4f0f7596" +commit-id = "2247fc22" [python] with-pypy = true @@ -10,6 +10,7 @@ with-sphinx-doctests = false with-windows = false with-future-python = false with-macos = false +with-docs = false [tox] use-flake8 = true diff --git a/CHANGES.rst b/CHANGES.rst index 7c4b825..1b0db3d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,9 +5,9 @@ 2.0 (unreleased) ================ -- Drop support for Python 2.7, 3.5, 3.6. +- Drop support for Python 2.7, 3.5, 3.6, 3.7. -- Add support for Python 3.9, 3.10, 3.11. +- Add support for Python 3.9, 3.10, 3.11, 3.12. 1.2.0 (2020-03-06) diff --git a/setup.cfg b/setup.cfg index df3c3d1..064a6fe 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,5 @@ # Generated from: # https://github.com/zopefoundation/meta/tree/master/config/pure-python -[bdist_wheel] -universal = 0 [flake8] doctests = 1 @@ -15,7 +13,7 @@ ignore = force_single_line = True combine_as_imports = True sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER -known_third_party = six, docutils, pkg_resources +known_third_party = docutils, pkg_resources, pytz known_zope = known_first_party = default_section = ZOPE diff --git a/setup.py b/setup.py index 6b52c89..d82c64a 100644 --- a/setup.py +++ b/setup.py @@ -61,23 +61,13 @@ def read(*rnames): author='Zope Corporation and Contributors', author_email='zope-dev@zope.org', description='Efficient File Implementation for Zope Applications', - long_description=( - read('README.rst') - + '\n\n' + - '.. contents::' - + '\n\n' + - read('src', 'zope', 'file', 'README.rst') - + '\n\n' + - read('src', 'zope', 'file', 'download.rst') - + '\n\n' + - read('src', 'zope', 'file', 'upload.rst') - + '\n\n' + - read('src', 'zope', 'file', 'contenttype.rst') - + '\n\n' + - read('src', 'zope', 'file', 'browser.rst') - + '\n\n' + - read('CHANGES.rst') - ), + long_description=(read('README.rst') + '\n\n' + '.. contents::' + '\n\n' + + read('src', 'zope', 'file', 'README.rst') + '\n\n' + + read('src', 'zope', 'file', 'download.rst') + '\n\n' + + read('src', 'zope', 'file', 'upload.rst') + '\n\n' + + read('src', 'zope', 'file', 'contenttype.rst') + '\n\n' + + read('src', 'zope', 'file', 'browser.rst') + '\n\n' + + read('CHANGES.rst')), keywords="zope3 web html ui file pattern", classifiers=[ 'Development Status :: 5 - Production/Stable', @@ -86,11 +76,11 @@ def read(*rnames): 'License :: OSI Approved :: Zope Public License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', @@ -103,7 +93,7 @@ def read(*rnames): packages=find_packages('src'), package_dir={'': 'src'}, namespace_packages=['zope'], - python_requires='>=3.7', + python_requires='>=3.8', extras_require={ 'test': TESTS_REQUIRE, 'browser': BROWSER_REQUIRES, @@ -123,7 +113,7 @@ def read(*rnames): 'zope.location', 'zope.mimetype >= 2.3.0', 'zope.schema', - 'zope.security >= 4.1.0', + 'zope.security >= 7.1', 'zope.size', ], include_package_data=True, diff --git a/tox.ini b/tox.ini index ba8a579..088a02a 100644 --- a/tox.ini +++ b/tox.ini @@ -3,19 +3,26 @@ [tox] minversion = 3.18 envlist = + release-check lint - py37 py38 py39 py310 py311 + py312 pypy3 coverage minimal [testenv] usedevelop = true +package = wheel +wheel_build_env = .pkg deps = + setuptools < 69 +setenv = + py312: VIRTUALENV_PIP=23.1.2 + py312: PIP_REQUIRE_VIRTUALENV=0 commands = zope-testrunner --test-path=src {posargs:-vc} extras = @@ -26,21 +33,32 @@ extras = deps = zope.testrunner zope.testing +[testenv:release-check] +description = ensure that the distribution is ready to release +basepython = python3 +skip_install = true +deps = + twine + build + check-manifest + check-python-versions >= 0.20.0 + wheel +commands_pre = +commands = + check-manifest + check-python-versions --only setup.py,tox.ini,.github/workflows/tests.yml + python -m build --sdist --no-isolation + twine check dist/* [testenv:lint] basepython = python3 skip_install = true +deps = + isort + flake8 commands = isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py flake8 src setup.py - check-manifest - check-python-versions -deps = - check-manifest - check-python-versions >= 0.19.1 - wheel - flake8 - isort [testenv:isort-apply] basepython = python3 @@ -61,7 +79,7 @@ commands = mkdir -p {toxinidir}/parts/htmlcov coverage run -m zope.testrunner --test-path=src {posargs:-vc} coverage html --ignore-errors - coverage report --ignore-errors --show-missing --fail-under=95 + coverage report --show-missing --fail-under=95 [coverage:run] branch = True @@ -69,6 +87,7 @@ source = zope.file [coverage:report] precision = 2 +ignore_errors = True exclude_lines = pragma: no cover pragma: nocover