Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,38 @@ name: Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
python-version: |
3.12
${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pipx
pipx install nox
python3.12 -m pip install --upgrade pipx
python3.12 -m pipx install nox
python3.12 -m pipx install coverage
- name: Test with pytest
run: nox -p ${{ matrix.python-version }}
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
parallel: true
debug: true
format: python
flag-name: run-${{ join(matrix.*, '-') }}

finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ a5523d230263f607894f8bce309250169e8bb0a3 0.2.3
a2c2ad038e5d2c71805cce67d9849c08c09afa84 0.2.4
acb8b4cb791ed36cf914e363738b0e84587ea26c 0.3.0
1df20376705426111441214cf007d8f1725fd9c9 0.4.0

9d4e04742801b8a860d1f2691e8b24d187be6510 0.4.3
64c4d1cdaeec2aa2d7de369165679cbade0f4b86 0.4.4
9d4e04742801b8a860d1f2691e8b24d187be6510 0.4.3
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file describes user-visible changes between the extension versions.

Version 0.4.4 (2025-12-25)
==========================
* Support Sphinx up to 9.0.4 (tested) and Python up to 3.14.
* Resolves issue #17 (Sphinx 9 support) but with `autodoc_use_legacy_class_based = True`
* Still supports back to 3.7 (but 3.7 CI tests fail due to installation issues).

Version 0.4.3 (2024-01-17)
==========================
* Support Sphinx up to 7.2.6 (tested) and Python up to 3.12.
Expand Down
6 changes: 3 additions & 3 deletions Maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ read [`README.md`](README.md).
## TL;DR

```bash
# Use your system to install python3.7 through python3.11 and pipx
# Use your system to install python3.7 through python3.14 and pipx
pipx install nox
pipx install pdm

Expand All @@ -62,7 +62,7 @@ make doc-server

# Open a shell for development
make shell
PYTHON=python3.10 make shell
PYTHON=python3.13 make shell
```

## Testing
Expand Down Expand Up @@ -119,7 +119,7 @@ that these are available for [nox][] to use.
<https://pdm.fming.dev/latest/usage/project/#configure-the-repository-secrets-for-upload>

Fix any issues as needed.
8. Tag the sources with `hg tag -m X.Y`.
8. Tag the sources with `hg tag X.Y`.
9. Push the tag `hg push -r X.Y`, and merge into the main branch or complete the merge
request. If pushing, you need to explicitly push the tag or else the corresponding
git tag will not get pushed.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PYTHON ?= python3.11
PYTHON ?= python3.12

shell: .venv
bash --init-file .init-file.bash
Expand Down
23 changes: 21 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,35 @@ def _has_venv(session):
return not isinstance(session.virtualenv, nox.virtualenv.PassthroughEnv)


python_versions = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
sphinx_versions = {_p: ["4.5.0", "5.3.0", "6.1.3", "7.2.6"] for _p in python_versions}
python_versions = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
sphinx_versions = {_p: ["4.5.0", "5.3.0", "6.1.3", "7.2.6", "8.2.3", "9.0.4"]
for _p in python_versions}

# These are in the full matrix, but excluded by the constraints in pyproject.toml. Not
# sure how to exclude these programmatically yet with pdm.
# https://github.com/pdm-project/pdm/issues/259#issuecomment-1407595572
excluded_versions = {
("3.7", "6.1.3"),
("3.7", "7.2.6"),
("3.7", "8.2.3"),
("3.7", "9.0.4"),
("3.8", "7.2.6"),
("3.8", "8.2.3"),
("3.8", "9.0.4"),
("3.9", "4.5.0"),
("3.9", "8.2.3"),
("3.9", "9.0.4"),
("3.10", "4.5.0"), # Fails on CI, but works on my Mac.
("3.10", "8.2.3"),
("3.10", "9.0.4"),
("3.11", "4.5.0"), # Fails on CI, but works on my Mac.
("3.12", "4.5.0"), # Fails on CI, but works on my Mac.
("3.13", "4.5.0"),
("3.13", "5.3.0"),
("3.13", "6.1.3"),
("3.14", "4.5.0"),
("3.14", "5.3.0"),
("3.14", "6.1.3"),
}

python_sphinx = [
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ classifiers = [
"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 :: 3.14",
"License :: OSI Approved :: BSD License",
"Development Status :: 4 - Beta",
"Framework :: Sphinx :: Extension",
Expand All @@ -57,6 +60,7 @@ Changelog = "https://zopeext.readthedocs.io/en/latest/#changelog"
[project.optional-dependencies]
test = [
'importlib-metadata>=4.8.3; python_version < "3.8"',
'typing_extensions<4.8.0; python_version < "3.8"',
'pip>=22.2.1',
'pytest-cov>=4.0.0',
"sphinx-testing>=1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/sphinxcontrib/zopeext/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.3"
__version__ = "0.4.4"
10 changes: 8 additions & 2 deletions src/sphinxcontrib/zopeext/autointerface.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
setup

"""

import logging
from typing import Any, Dict, Tuple, List, Union

import sphinx.ext.autodoc
Expand All @@ -55,9 +57,10 @@
from sphinx.ext.autodoc import (
ClassDocumenter,
ObjectMember,
logger,
)

logger = logging.getLogger("zopeext.autointerface")

# This has been removed from sphinx since version 7.2.0.
ObjectMembers = Union[List[ObjectMember], List[Tuple[str, Any]]]

Expand Down Expand Up @@ -141,7 +144,6 @@ def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]:
logger.warning(
__("missing attribute %s in interface %s")
% (name, self.fullname),
type="autointerface",
)
return False, selected
elif self.options.inherited_members:
Expand Down Expand Up @@ -263,6 +265,10 @@ def get_index_text(self, modname, name_cls):

def setup(app: Sphinx) -> Dict[str, Any]:
app.setup_extension("sphinx.ext.autodoc")

# We currently need to use the legacy classes.
app.config.autodoc_use_legacy_class_based = True

app.add_autodoc_attrgetter(
zope.interface.interface.InterfaceClass, interface_getattr
)
Expand Down
Loading
Loading