Skip to content

Commit

Permalink
Drop support for Python 3.8 and update setuptools pin (#293)
Browse files Browse the repository at this point in the history
* - drop support for Python 3.8 and update setuptools pin

* - update documentation and tests

* - fix package version
  • Loading branch information
dataflake authored Jan 6, 2025
1 parent 07950f9 commit f4c1c1b
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 209 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
config:
# [Python version, tox env]
- ["3.11", "release-check"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
Expand Down
6 changes: 3 additions & 3 deletions .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 = "d3455844"
commit-id = "d1a00d25"

[python]
with-pypy = false
Expand Down Expand Up @@ -47,15 +47,15 @@ testenv-additional = [
" coverage combine",
" coverage html",
" coverage report -m --fail-under=100",
"depends = py38,py39,py310,py311,py311-datetime,py312,py313,coverage",
"depends = py39,py310,py311,py311-datetime,py312,py313,coverage",
]
coverage-command = "pytest --cov=src --cov=tests --cov-report= tests {posargs}"
coverage-setenv = [
"COVERAGE_FILE=.coverage",
]

[coverage]
fail-under = 97.9
fail-under = 97.3

[isort]
additional-sources = "{toxinidir}/tests"
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ repos:
- id: autopep8
args: [--in-place, --aggressive, --aggressive]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/isidentical/teyit
rev: 0.4.3
hooks:
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Changes
7.5 (unreleased)
----------------

- Drop support for Python 3.8.

- Update setuptools version pin.
(`#292 <https://github.com/zopefoundation/RestrictedPython/issues/292>`_)


7.4 (2024-10-09)
----------------
Expand Down
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
# built documents.
#
# The short X.Y version.
version = '7.4'
version = '7.5'
# The full version, including alpha/beta/rc tags.
release = '7.4'
release = '7.5'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -112,7 +112,6 @@
# Intersphinx Mapping for Links between different Documentations
intersphinx_mapping = {
'python3': ('https://docs.python.org/3', None),
'python38': ('https://docs.python.org/3.8', None),
'python39': ('https://docs.python.org/3.9', None),
'python310': ('https://docs.python.org/3.10', None),
'python311': ('https://docs.python.org/3.11', None),
Expand Down
175 changes: 0 additions & 175 deletions docs/contributing/ast/python3_7.ast

This file was deleted.

5 changes: 0 additions & 5 deletions docs/contributing/changes_from37to38.rst

This file was deleted.

16 changes: 5 additions & 11 deletions docs/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ A (modified style) Copy of all Abstract Grammar Definitions for the Python versi
.. toctree::
:maxdepth: 2

changes_from37to38
changes_from38to39
changes_from39to310
changes_from310to311
Expand Down Expand Up @@ -236,12 +235,11 @@ Technical Backgrounds - Links to External Documentation

* AST Grammar of Python (`Status of Python Versions`_)

* `Python 3.13 AST`_ (EOL 2029-10)
* `Python 3.12 AST`_ (EOL 2028-10)
* `Python 3.11 AST`_ (EOL 2027-10)
* `Python 3.10 AST`_ (EOL 2026-10)
* `Python 3.9 AST`_ (EOL 2025-10)
* `Python 3.8 AST`_ (EOL 2024-10)
* `Python 3.7 AST`_ (EOL 2023-06-27)

* `AST NodeVistiors Class`_
* `AST NodeTransformer Class`_
Expand All @@ -259,6 +257,8 @@ Todos
.. _`What's new in Python`: https://docs.python.org/3/whatsnew/

.. _`What's new in Python 3.13`: https://docs.python.org/3.13/whatsnew/3.13.html

.. _`What's new in Python 3.12`: https://docs.python.org/3.12/whatsnew/3.12.html

.. _`What's new in Python 3.11`: https://docs.python.org/3.11/whatsnew/3.11.html
Expand All @@ -267,10 +267,6 @@ Todos

.. _`What's new in Python 3.9`: https://docs.python.org/3.9/whatsnew/3.9.html

.. _`What's new in Python 3.8`: https://docs.python.org/3.8/whatsnew/3.8.html

.. _`What's new in Python 3.7`: https://docs.python.org/3.7/whatsnew/3.7.html

.. _`Status of Python Versions`: https://devguide.python.org/versions/

.. _`Concept of Immutable Types and Python Example`: https://en.wikipedia.org/wiki/Immutable_object#Python
Expand All @@ -285,6 +281,8 @@ Todos

.. _`Python 3 AST`: https://docs.python.org/3/library/ast.html#abstract-grammar

.. _`Python 3.13 AST`: https://docs.python.org/3.13/library/ast.html#abstract-grammar

.. _`Python 3.12 AST`: https://docs.python.org/3.12/library/ast.html#abstract-grammar

.. _`Python 3.11 AST`: https://docs.python.org/3.11/library/ast.html#abstract-grammar
Expand All @@ -293,10 +291,6 @@ Todos

.. _`Python 3.9 AST`: https://docs.python.org/3.9/library/ast.html#abstract-grammar

.. _`Python 3.8 AST`: https://docs.python.org/3.8/library/ast.html#abstract-grammar

.. _`Python 3.7 AST`: https://docs.python.org/3.7/library/ast.html#abstract-grammar

.. _`AST NodeVistiors Class`: https://docs.python.org/3/library/ast.html#ast.NodeVisitor

.. _`AST NodeTransformer Class`: https://docs.python.org/3/library/ast.html#ast.NodeTransformer
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RestrictedPython is not a sandbox system or a secured environment, but it helps
Supported Python versions
=========================

RestrictedPython supports CPython 3.7 up to 3.12.
RestrictedPython supports CPython 3.9 up to 3.13.
It does _not_ support PyPy or other alternative Python implementations.

Contents
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# https://github.com/zopefoundation/meta/tree/master/config/pure-python

[build-system]
requires = ["setuptools<74"]
requires = ["setuptools <= 75.6.0"]
build-backend = "setuptools.build_meta"

[tool.coverage.run]
branch = true
source = ["RestrictedPython"]

[tool.coverage.report]
fail_under = 97.9
fail_under = 97.3
precision = 2
ignore_errors = true
show_missing = true
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def read(*rnames):
'Programming Language :: Python',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand All @@ -60,7 +59,7 @@ def read(*rnames):
packages=find_packages('src'),
package_dir={'': 'src'},
install_requires=[],
python_requires=">=3.8, <3.14",
python_requires=">=3.9, <3.14",
extras_require={
'test': ['pytest', 'pytest-mock'],
'docs': ['Sphinx', 'furo'],
Expand Down
Loading

0 comments on commit f4c1c1b

Please sign in to comment.