From 5b6d88a16af98affafe95416c175ccb0af0f550a Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Wed, 3 Jan 2024 17:07:49 +0100 Subject: [PATCH] - add support for Python 3.12 and use latest meta/config --- .github/workflows/tests.yml | 3 ++- .meta.toml | 4 ++-- .readthedocs.yaml | 30 ++++++++++++++++++++++++++++++ CHANGES.rst | 4 +++- MANIFEST.in | 1 + docs/requirements.txt | 2 +- setup.cfg | 2 +- setup.py | 3 ++- tox.ini | 29 +++++++++++++++++++++++------ 9 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e208254..dfbf3c2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,13 +20,14 @@ jobs: - ["ubuntu", "ubuntu-20.04"] config: # [Python version, tox env] + - ["3.9", "release-check"] - ["3.9", "lint"] - ["3.7", "py37"] - ["3.8", "py38"] - ["3.9", "py39"] - ["3.10", "py310"] - ["3.11", "py311"] - - ["3.12.0-alpha.2", "py312"] + - ["3.12", "py312"] - ["3.9", "docs"] - ["3.9", "coverage"] diff --git a/.meta.toml b/.meta.toml index 6b40346..7021323 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,12 +2,12 @@ # https://github.com/zopefoundation/meta/tree/master/config/zope-product [meta] template = "zope-product" -commit-id = "e5c611fb" +commit-id = "acd8d239" [python] with-windows = false with-pypy = false -with-future-python = true +with-future-python = false with-docs = true with-sphinx-doctests = false with-macos = false diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..047163d --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,30 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/zope-product +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + apt_packages: + - ldap-utils + - slapd + - libldap2-dev + - libsasl2-dev + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt + - method: pip + path: . diff --git a/CHANGES.rst b/CHANGES.rst index 804a249..1c9538b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,9 +1,11 @@ Change log ========== -4.1 (unreleased) +4.1 (2024-01-03) ---------------- +- Add support for Python 3.12. + 4.0 (2023-02-03) ---------------- diff --git a/MANIFEST.in b/MANIFEST.in index 6ac097b..7484215 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,3 +12,4 @@ recursive-include docs *.txt recursive-include docs Makefile recursive-include src *.py +include *.yaml diff --git a/docs/requirements.txt b/docs/requirements.txt index 134c5c8..59ed542 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ sphinx>5 -pkginfo +.[docs] diff --git a/setup.cfg b/setup.cfg index 0233f00..26f5bc7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,7 +19,7 @@ ignore = force_single_line = True combine_as_imports = True sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER -known_third_party = six, docutils, pkg_resources, pytz +known_third_party = docutils, pkg_resources, pytz known_zope = known_first_party = default_section = ZOPE diff --git a/setup.py b/setup.py index e06960e..2c1e9d2 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def read(*rnames): setup(name='dataflake.fakeldap', - version='4.1.dev0', + version='4.1', description='Mocked-up LDAP connection library', long_description=read('README.rst'), classifiers=[ @@ -37,6 +37,7 @@ def read(*rnames): "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", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing", diff --git a/tox.ini b/tox.ini index 3914b12..f087422 100644 --- a/tox.ini +++ b/tox.ini @@ -3,6 +3,7 @@ [tox] minversion = 3.18 envlist = + release-check lint py37 py38 @@ -20,10 +21,29 @@ deps = wheel > 0.37 zope.testrunner volatildap +setenv = + py312: VIRTUALENV_PIP=23.1.2 + py312: PIP_REQUIRE_VIRTUALENV=0 commands_pre = {envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test commands = - {envdir}/bin/test {posargs:-cv} + {envbindir}/test {posargs:-cv} +[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 + python -m build --sdist --no-isolation + twine check dist/* [testenv:lint] basepython = python3 @@ -34,11 +54,7 @@ allowlist_externals = commands = isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py flake8 {toxinidir}/src {toxinidir}/setup.py - check-manifest - check-python-versions deps = - check-manifest - check-python-versions flake8 isort # Useful flake8 plugins that are Python and Plone specific: @@ -67,13 +83,14 @@ commands = basepython = python3 skip_install = true allowlist_externals = + {[testenv]allowlist_externals} mkdir deps = {[testenv]deps} coverage commands = mkdir -p {toxinidir}/parts/htmlcov - coverage run {envdir}/bin/test {posargs:-cv} + coverage run {envbindir}/test {posargs:-cv} coverage html coverage report -m --fail-under=94