Skip to content

Commit

Permalink
Merge pull request #3131 from pajod/patch-py12-rebased
Browse files Browse the repository at this point in the history
CI: add CPython 3.12 and PyPy3.10, stop promising untested versions
  • Loading branch information
benoitc committed Jan 5, 2024
2 parents 660fd8d + deae2fc commit 88fc4a4
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 13 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/tox.yml
Expand Up @@ -8,12 +8,24 @@ env:
jobs:
tox:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc.
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.8" ]
python-version:
# CPython <= 3.7 is EoL since 2023-06-27
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
# PyPy <= 3.8 is EoL since 2023-06-16
- "pypy-3.9"
- "pypy-3.10"
steps:
- uses: actions/checkout@v4
- name: Using Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -32,7 +32,7 @@ The documentation is hosted at https://docs.gunicorn.org.
Installation
------------

Gunicorn requires **Python 3.x >= 3.5**.
Gunicorn requires **Python 3.x >= 3.7**.

Install from PyPI::

Expand Down
6 changes: 6 additions & 0 deletions appveyor.yml
Expand Up @@ -24,6 +24,12 @@ environment:
# PYTHON: "C:\\Python38-x64"
#- TOXENV: py39
# PYTHON: "C:\\Python39-x64"
#- TOXENV: py310
# PYTHON: "C:\\Python310-x64"
#- TOXENV: py311
# PYTHON: "C:\\Python311-x64"
#- TOXENV: py312
# PYTHON: "C:\\Python312-x64"
matrix:
allow_failures:
- TOXENV: py35
Expand Down
2 changes: 2 additions & 0 deletions docs/source/2023-news.rst
Expand Up @@ -10,9 +10,11 @@ Changelog - 2023
- on HTTP versions < 1.1 support for chunked transfer is refused (only used in exploits)
- requests conflicting configured or passed SCRIPT_NAME now produce a verbose error
- Trailer fields are no longer inspected for headers indicating secure scheme
- support Python 3.12

** Breaking changes **

- minimum version is Python 3.7
- the limitations on valid characters in the HTTP method have been bounded to Internet Standards
- requests specifying unsupported transfer coding (order) are refused by default (rare)
- HTTP methods are no longer casefolded by default (IANA method registry contains none affacted)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Expand Up @@ -23,7 +23,7 @@ Features
* Simple Python configuration
* Multiple worker configurations
* Various server hooks for extensibility
* Compatible with Python 3.x >= 3.5
* Compatible with Python 3.x >= 3.7


Contents
Expand Down
2 changes: 1 addition & 1 deletion docs/source/install.rst
Expand Up @@ -4,7 +4,7 @@ Installation

.. highlight:: bash

:Requirements: **Python 3.x >= 3.5**
:Requirements: **Python 3.x >= 3.7**

To install the latest released version of Gunicorn::

Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Expand Up @@ -3,6 +3,7 @@ requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
# see https://packaging.python.org/en/latest/specifications/pyproject-toml/
name = "gunicorn"
authors = [{name = "Benoit Chesneau", email = "benoitc@gunicorn.org"}]
license = {text = "MIT"}
Expand All @@ -17,13 +18,12 @@ classifiers = [
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"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 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand All @@ -35,7 +35,7 @@ classifiers = [
"Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
requires-python = ">=3.5"
requires-python = ">=3.7"
dependencies = [
'importlib_metadata; python_version<"3.8"',
"packaging",
Expand All @@ -47,6 +47,7 @@ Homepage = "https://gunicorn.org"
Documentation = "https://docs.gunicorn.org"
"Issue tracker" = "https://github.com/benoitc/gunicorn/issues"
"Source code" = "https://github.com/benoitc/gunicorn"
Changelog = "https://docs.gunicorn.org/en/stable/news.html"

[project.optional-dependencies]
gevent = ["gevent>=1.4.0"]
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
@@ -1,5 +1,5 @@
gevent
eventlet
coverage
pytest
pytest>=7.2.0
pytest-cov
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

10 changes: 10 additions & 0 deletions tests/workers/test_geventlet.py
Expand Up @@ -3,5 +3,15 @@
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.

import pytest
import sys

def test_import():

try:
import eventlet
except AttributeError:
if (3,13) > sys.version_info >= (3, 12):
pytest.skip("Ignoring eventlet failures on Python 3.12")
raise
__import__('gunicorn.workers.geventlet')
8 changes: 7 additions & 1 deletion tox.ini
@@ -1,5 +1,11 @@
[tox]
envlist = py{37,38,39,310,311,py3}, lint, docs-lint, pycodestyle, run-entrypoint, run-module
envlist =
py{37,38,39,310,311,312,py3},
lint,
docs-lint,
pycodestyle,
run-entrypoint,
run-module,
skipsdist = false
; Can't set skipsdist and use_develop in tox v4 to true due to https://github.com/tox-dev/tox/issues/2730

Expand Down

0 comments on commit 88fc4a4

Please sign in to comment.