diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2d3e2192..a77a744e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,11 +14,11 @@ jobs: fail-fast: false matrix: toxenv: [lint, docs-lint, pycodestyle] - python-version: [ "3.10" ] + python-version: [ "3.12" ] include: # for actions that want git env, not tox env - toxenv: null - python-version: "3.10" + python-version: "3.12" steps: - uses: actions/checkout@v5 - name: Using Python ${{ matrix.python-version }} @@ -42,6 +42,7 @@ jobs: run: | # this will update docs/source/settings.rst - but will not create html output (cd docs && sphinx-build -b "dummy" -d _build/doctrees source "_build/dummy") + git update-index --assume-unchanged docs/source/settings.rst if unclean=$(git status --untracked-files=no --porcelain) && [ -z "$unclean" ]; then echo "no uncommitted changes in working tree (as it should be)" else diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 287b4762..5e8a764d 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -21,29 +21,17 @@ jobs: - macos-13 # Not testing Windows, because tests need Unix-only fcntl, grp, pwd, etc. python-version: - # CPython <= 3.7 is EoL since 2023-06-27 - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" + # Supporting only N (3.13) and N-1 (3.12) - "3.12" - # PyPy <= 3.8 is EoL since 2023-06-16 - - "pypy-3.9" - - "pypy-3.10" + - "3.13" include: - # Note: potentially "universal2" release - # https://github.com/actions/runner-images/issues/9741 + # Test on macos-latest (arm64) with both versions - os: macos-latest python-version: "3.12" unsupported: false - # will run these without showing red CI results should they fail - os: macos-latest python-version: "3.13" - unsupported: true - - os: ubuntu-latest - python-version: "3.13" - unsupported: true + unsupported: false steps: - uses: actions/checkout@v5 - name: Using Python ${{ matrix.python-version }} diff --git a/.pylintrc b/.pylintrc index bc2046c0..6b106db0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -15,6 +15,7 @@ disable= bad-mcs-classmethod-argument, bare-except, broad-except, + cyclic-import, duplicate-bases, duplicate-code, eval-used, @@ -30,6 +31,7 @@ disable= no-self-argument, no-staticmethod-decorator, not-callable, + possibly-used-before-assignment, protected-access, raise-missing-from, redefined-outer-name, @@ -40,8 +42,10 @@ disable= too-many-lines, too-many-locals, too-many-nested-blocks, + too-many-positional-arguments, too-many-public-methods, too-many-statements, + used-before-assignment, wrong-import-position, wrong-import-order, ungrouped-imports, diff --git a/SECURITY.md b/SECURITY.md index c94e953e..9da6d094 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -25,6 +25,6 @@ Please target reports against :white_check_mark: or current master. Please under ## Python Versions -Gunicorn runs on Python 3.7+, we *highly recommend* the latest release of a -[supported series](https://devguide.python.org/versions/) and will not prioritize issues exclusively -affecting in EoL environments. +Gunicorn runs on Python 3.12+, supporting only the latest (N) and previous (N-1) Python versions. +We *highly recommend* the latest release of a [supported series](https://devguide.python.org/versions/) +and will not prioritize issues affecting EoL environments. diff --git a/appveyor.yml b/appveyor.yml index 3cf11f0e..1a301741 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,11 +2,11 @@ version: '{branch}.{build}' environment: matrix: - TOXENV: lint - PYTHON: "C:\\Python38-x64" + PYTHON: "C:\\Python312-x64" - TOXENV: docs-lint - PYTHON: "C:\\Python38-x64" + PYTHON: "C:\\Python312-x64" - TOXENV: pycodestyle - PYTHON: "C:\\Python38-x64" + PYTHON: "C:\\Python312-x64" # Windows cannot even import the module when they unconditionally import, see below. #- TOXENV: run-module # PYTHON: "C:\\Python38-x64" @@ -32,11 +32,7 @@ environment: # PYTHON: "C:\\Python312-x64" matrix: allow_failures: - - TOXENV: py35 - - TOXENV: py36 - - TOXENV: py37 - - TOXENV: py38 - - TOXENV: py39 + # No failures expected for py312 and py313 init: - SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" install: diff --git a/docs/source/install.rst b/docs/source/install.rst index 2367086d..a5f618a3 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -4,7 +4,7 @@ Installation .. highlight:: bash -:Requirements: **Python 3.x >= 3.7** +:Requirements: **Python 3.x >= 3.12** To install the latest released version of Gunicorn:: diff --git a/docs/source/settings.rst b/docs/source/settings.rst index e1e91fa7..04677061 100644 --- a/docs/source/settings.rst +++ b/docs/source/settings.rst @@ -347,7 +347,7 @@ Format: https://docs.python.org/3/library/logging.config.html#logging.config.jso **Command line:** ``--log-syslog-to SYSLOG_ADDR`` -**Default:** ``'udp://localhost:514'`` +**Default:** ``'unix:///var/run/syslog'`` Address to send syslog messages. @@ -1148,7 +1148,7 @@ change the worker process user. Switch worker process to run as this group. A valid group id (as an integer) or the name of a user that can be -retrieved with a call to ``pwd.getgrnam(value)`` or ``None`` to not +retrieved with a call to ``grp.getgrnam(value)`` or ``None`` to not change the worker processes group. .. _umask: @@ -1767,7 +1767,7 @@ single request. **Default:** ``30`` -Timeout for graceful workers restart. +Timeout for graceful workers restart in seconds. After receiving a restart signal, workers have this much time to finish serving requests. Workers still alive after the timeout (starting from diff --git a/pyproject.toml b/pyproject.toml index eaca1eac..b0ec4c38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,12 +18,8 @@ classifiers = [ "Operating System :: POSIX", "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 :: 3.13", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", @@ -35,9 +31,8 @@ classifiers = [ "Topic :: Internet :: WWW/HTTP :: WSGI :: Server", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ] -requires-python = ">=3.7" +requires-python = ">=3.12" dependencies = [ - 'importlib_metadata; python_version<"3.8"', "packaging", ] dynamic = ["version"] diff --git a/tox.ini b/tox.ini index 9bf99e1b..359cb90b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{37,38,39,310,311,312,py3}, + py{312,313}, lint, docs-lint, pycodestyle, @@ -44,7 +44,7 @@ commands = tests/test_util.py \ tests/test_valid_requests.py deps = - pylint==2.17.4 + pylint==3.3.2 [testenv:docs-lint] no_package = true