Skip to content

Commit

Permalink
- add support for Python 3.12 and use latest zope meta configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jan 3, 2024
1 parent 3ef0529 commit 89a77ed
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +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", "py312"]
- ["3.9", "docs"]
- ["3.9", "coverage"]

Expand Down
3 changes: 2 additions & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "e5c611fb"
commit-id = "acd8d239"

[python]
with-windows = false
Expand All @@ -17,6 +17,7 @@ use-flake8 = true

[manifest]
additional-rules = [
"include *.yaml",
"recursive-include src *.dtml",
"recursive-include src *.zcml",
]
Expand Down
30 changes: 30 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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: .
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ To see earlier changes please see HISTORY.txt.

5.1 (unreleased)
----------------
- add support for Python 3.12,


5.0 (2023-02-02)
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ recursive-include docs *.txt
recursive-include docs Makefile

recursive-include src *.py
include *.yaml
recursive-include src *.dtml
recursive-include src *.zcml
4 changes: 1 addition & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
sphinx>5
pkginfo
repoze.sphinx.autointerface
Products.PluggableAuthService
.[docs]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def read(name):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP :: Site Management",
"Topic :: Software Development",
"Topic :: System :: Systems Administration ::"
Expand Down
30 changes: 24 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
[tox]
minversion = 3.18
envlist =
release-check
lint
py37
py38
py39
py310
py311
py312
docs
coverage

Expand All @@ -17,10 +19,29 @@ skip_install = true
deps =
zc.buildout >= 3.0.1
wheel > 0.37
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
Expand All @@ -31,11 +52,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:
Expand Down Expand Up @@ -64,13 +81,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=40

Expand Down

0 comments on commit 89a77ed

Please sign in to comment.