Skip to content

Commit

Permalink
- add support for Python 3.12 and use latest meta/config
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jan 3, 2024
1 parent a295eb4 commit 5b6d88a
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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: .
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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)
----------------
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ recursive-include docs *.txt
recursive-include docs Makefile

recursive-include src *.py
include *.yaml
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sphinx>5
pkginfo
.[docs]
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
Expand All @@ -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",
Expand Down
29 changes: 23 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[tox]
minversion = 3.18
envlist =
release-check
lint
py37
py38
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5b6d88a

Please sign in to comment.