Merge pull request #3603 from benoitc/chore/drop-python-only-after-h1c-0.6.4

chore: require gunicorn_h1c >=0.6.4 and drop python_only markers
This commit is contained in:
Benoit Chesneau 2026-04-20 07:18:52 +02:00 committed by GitHub
commit 3af35da8c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 6 additions and 14 deletions

View File

@ -53,7 +53,7 @@ tornado = ["tornado>=6.5.0"]
gthread = []
setproctitle = ["setproctitle"]
http2 = ["h2>=4.1.0"]
fast = ["gunicorn_h1c>=0.6.3"]
fast = ["gunicorn_h1c>=0.6.4"]
testing = [
"gevent>=24.10.1",
"eventlet>=0.40.3",

View File

@ -3,4 +3,4 @@ coverage
pytest>=7.2.0
pytest-cov
pytest-asyncio
gunicorn_h1c>=0.6.2
gunicorn_h1c>=0.6.4

View File

@ -20,6 +20,10 @@ if tests_dir not in sys.path:
def http_parser(request):
"""Parametrize tests over http_parser implementations."""
if request.param == "fast":
# gunicorn_h1c ships as a CPython C extension; it is not reliable
# under PyPy (SIGSEGV observed in CI). Skip the fast parameter there.
if hasattr(sys, "pypy_version_info"):
pytest.skip("gunicorn_h1c not supported on PyPy")
gunicorn_h1c = pytest.importorskip("gunicorn_h1c", reason="gunicorn_h1c required")
# Require >= 0.6.2 for asgi_headers support
if not hasattr(gunicorn_h1c.H1CProtocol, 'asgi_headers'):

View File

@ -7,4 +7,3 @@
# appear, to prevent log/response injection and parser confusion.
from gunicorn.http.errors import InvalidHeader
request = InvalidHeader
python_only = True

View File

@ -6,4 +6,3 @@
# it must not appear in a field-value.
from gunicorn.http.errors import InvalidHeader
request = InvalidHeader
python_only = True

View File

@ -6,4 +6,3 @@
# smuggling vector; origin must reject.
from gunicorn.http.errors import InvalidHeaderName
request = InvalidHeaderName
python_only = True

View File

@ -7,5 +7,3 @@
# Content-Length, Transfer-Encoding). Accepting them enables smuggling.
from gunicorn.http.errors import InvalidHeaderName
request = InvalidHeaderName
# The C parser (gunicorn_h1c) does not yet enforce this rule.
python_only = True

View File

@ -6,4 +6,3 @@
# and must not be accepted.
from gunicorn.http.errors import InvalidHeaderName
request = InvalidHeaderName
python_only = True

View File

@ -7,5 +7,3 @@
# rejected as an ill-formed request-line.
from gunicorn.http.errors import InvalidRequestLine
request = InvalidRequestLine
# The C parser (gunicorn_h1c) does not yet enforce this rule.
python_only = True

View File

@ -6,5 +6,3 @@
# the CONNECT method. Any other method carrying it must be rejected.
from gunicorn.http.errors import InvalidRequestLine
request = InvalidRequestLine
# The C parser (gunicorn_h1c) does not yet enforce this rule.
python_only = True

View File

@ -7,5 +7,3 @@
# like "foo/bar" matches none of these and must be rejected.
from gunicorn.http.errors import InvalidRequestLine
request = InvalidRequestLine
# The C parser (gunicorn_h1c) does not yet enforce this rule.
python_only = True