Skip to content

Commit

Permalink
Update to support Sphinx 8 + Python 3.12. (#126)
Browse files Browse the repository at this point in the history
* Update to support Sphinx 8.

* Drop support for Python 3.7.

* Add support for Python 3.12.
  • Loading branch information
icemac authored Aug 5, 2024
1 parent ec200ff commit c0be2d4
Show file tree
Hide file tree
Showing 25 changed files with 549 additions and 551 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,31 @@ 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.9", "pypy3"]
- ["3.9", "docs"]
- ["3.9", "coverage"]
- ["3.12", "py312"]
- ["pypy-3.10", "pypy3"]
- ["3.11", "docs"]
- ["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') }}
Expand All @@ -52,7 +53,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: |
Expand Down
2 changes: 1 addition & 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/pure-python
[meta]
template = "pure-python"
commit-id = "b21fbbf2"
commit-id = "6e808865"

[python]
with-pypy = true
Expand Down
8 changes: 5 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
Changes
=========

7.0.2 (unreleased)
==================
7.1 (unreleased)
================

- Add support for Python 3.12.

- Nothing changed yet.
- Drop support for Python 3.7.


7.0.1 (2023-01-02)
Expand Down
47 changes: 21 additions & 26 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
# The short X.Y version.
version = '.'.join(release.split('.')[:2])


# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
Expand Down Expand Up @@ -96,7 +95,6 @@
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down Expand Up @@ -176,25 +174,24 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'zopeschemadoc'


# -- Options for LaTeX output --------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'zopeschema.tex', u'zope.schema Documentation',
u'Zope Foundation Contributors', 'manual'),
('index', 'zopeschema.tex', u'zope.schema Documentation',
u'Zope Foundation Contributors', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand All @@ -217,29 +214,25 @@
# If false, no module index is generated.
#latex_domain_indices = True


# -- Options for manual page output --------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'zopeschema', u'zope.schema Documentation',
[u'Zope Foundation Contributors'], 1)
]
man_pages = [('index', 'zopeschema', u'zope.schema Documentation',
[u'Zope Foundation Contributors'], 1)]

# If true, show URL addresses after external links.
#man_show_urls = False


# -- Options for Texinfo output ------------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'zopeschema', u'zope.schema Documentation',
u'Zope Foundation Contributors', 'zopeschema', 'One line description of project.',
'Miscellaneous'),
('index', 'zopeschema', u'zope.schema Documentation',
u'Zope Foundation Contributors', 'zopeschema',
'One line description of project.', 'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
Expand All @@ -252,14 +245,16 @@
#texinfo_show_urls = 'footnote'

intersphinx_mapping = {
'https://docs.python.org/': None,
'https://zopecomponent.readthedocs.io/en/latest': None,
'python': ('https://docs.python.org/', None),
'zopecomponent': ('https://zopecomponent.readthedocs.io/en/latest', None),
}

extlinks = {'issue': ('https://github.com/zopefoundation/zope.schema/issues/%s',
'issue #'),
'pr': ('https://github.com/zopefoundation/zope.schema/pull/%s',
'pull request #')}
extlinks = {
'issue':
('https://github.com/zopefoundation/zope.schema/issues/%s', 'issue #'),
'pr':
('https://github.com/zopefoundation/zope.schema/pull/%s', 'pull request #')
}

autodoc_default_flags = ['members', 'show-inheritance']
autoclass_content = 'both'
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[bdist_wheel]
universal = 0

[flake8]
doctests = 1
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ def read(*rnames):
"Operating System :: OS Independent",
"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",
"Framework :: Zope :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
],
python_requires='>=3.7',
python_requires='>=3.8',
include_package_data=True,
zip_safe=False,
extras_require={
Expand Down
Loading

0 comments on commit c0be2d4

Please sign in to comment.