Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview: point release v23.1.0 #3

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0a0ef9d
only create sockets in forked processes not in master
Feb 1, 2023
b0115b9
detach socket in child process
Feb 1, 2023
49618be
Close a temporary file acting as a fake socket
kurtmckee Jul 25, 2024
62530ef
Close open sockets when an exception is encountered
kurtmckee Jul 25, 2024
dc197ff
Close open files to prevent `ResourceWarning` in the test suite
kurtmckee Jul 25, 2024
7756175
Escalate warnings to errors during testing
kurtmckee Jul 25, 2024
a7efba4
assert: never reflect invalid input
pajod Aug 11, 2024
2096e42
config: reload-extra without reload
pajod Aug 13, 2024
f340432
style: argparse inheritance
pajod Aug 13, 2024
353927e
style: unused code
pajod Aug 13, 2024
56b3e42
style: re-verbosify HTTP commentary
pajod Aug 13, 2024
6d332ba
Add socket backlog metric
raags Aug 20, 2020
4d53263
Do not emit backlog metric if its unsupported
raags Jan 17, 2021
aa73f3c
Avoid calling get_backlog twice
raags Nov 15, 2023
13f54ed
docs: faq: block arbiter to slow down #2719
pajod Aug 14, 2024
1fcadcb
Revert "let's exception not bubble"
pajod Aug 14, 2024
8617c39
workaround: reintroduce gevent.Timeout handling
pajod Aug 14, 2024
ef94875
style: line break
pajod Aug 14, 2024
d5aa52e
Enable only on Linux platforms, and add config flag
raags Aug 7, 2024
7475a75
logs: blame WSL2 for unix socket bind fail
pajod Aug 16, 2024
5b33c01
arbiter: Handle SIGCHLD in normal/main process context
sylt Feb 2, 2024
d653ebc
arbiter: Remove PIPE and only use SIG_QUEUE instead
sylt Feb 2, 2024
052448a
arbiter: Use waitpid() facilities to handle worker exit status
sylt Feb 1, 2024
b3db5b9
arbiter: Reinstall SIGCHLD as required by some UNIXes
sylt Feb 3, 2024
64387d1
arbiter: clean up main loop
sylt Feb 4, 2024
7ecea2d
arbiter: Add Arbiter:wakeup() method
sylt Aug 18, 2024
497ad24
workers/gthread: Remove locks + one event queue + general cleanup
sylt Feb 17, 2024
e3dd042
fcntl(fd, FD_CLOEXEC) => os.set_inheritable(fd, False)
pajod May 12, 2024
0e9b39e
fcntl(fd, O_NONBLOCK) => os.set_blocking(fd, False)
pajod May 12, 2024
a362c2a
test: setup nginx proxy
pajod Aug 16, 2024
27be287
Partially revert "unconditionally log request error"
pajod Sep 5, 2024
601c8b5
CI: workaround OpenBSD / Python 3.10 / ed25510 x509
pajod Aug 23, 2024
16fc020
Py<=3.7: sum() takes no keyword arguments
pajod Aug 23, 2024
1e78b91
CI: nginx 1.18 compat
pajod Aug 23, 2024
0d03ef2
CI: test OpenBSD + FreeBSD + illumos in Linux VM
pajod Aug 23, 2024
0d941d8
not all children die equally
pajod Aug 17, 2024
8adb6ae
docs: typo + 23.1.0 header
pajod Aug 18, 2024
7268634
Merge remote-tracking branch 'benoitc/pr/2938' into integration-v23.1.0
pajod Sep 12, 2024
a21401d
help merge imports
pajod Sep 12, 2024
74f70bc
Merge remote-tracking branches 'benoitc/pr/2407', 'benoitc/pr/3157', …
pajod Sep 12, 2024
071a4c0
help merge test for modified logging
pajod Sep 12, 2024
b7b118b
prepare docs 23.1.0
pajod Sep 12, 2024
325c802
bump version 23.1.0
pajod Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: bsd
on:
push:
branches:
- master
paths:
- '*.py'
- 'tox.ini'
- '.github/workflows/bsd.yml'
pull_request:
branches:
- master
permissions:
# BOLD WARNING: do not add permissions, this workflow executes remote code
contents: read
env:
FORCE_COLOR: 1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
freebsd:
name: freebsd
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: vmactions/freebsd-vm@v1
with:
prepare: pkg install -y nginx python311 py311-pip py311-tox py311-sqlite3
usesh: true
copyback: false
# not a typo: "openssl --version" != "openssl version"
run: |
uname -a \
&& python3.11 --version \
&& python3.11 -m tox --version \
&& openssl version \
&& pkg info nginx \
&& python3.11 -m tox -e run-module \
&& python3.11 -m tox -e run-entrypoint \
&& python3.11 -m tox -e py

openbsd:
name: openbsd
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: vmactions/openbsd-vm@v1
with:
prepare: pkg_add python py3-pip py3-tox py3-sqlite3 nginx
usesh: true
copyback: false
run: |
uname -a \
&& python3 --version \
&& python3 -m tox --version \
&& openssl version \
&& pkg_info nginx \
&& python3 -m tox -e run-module \
&& python3 -m tox -e run-entrypoint \
&& python3 -m tox -e py
52 changes: 52 additions & 0 deletions .github/workflows/illumos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: illumos
on:
push:
branches:
- master
paths:
- '*.py'
- 'tox.ini'
- '.github/workflows/illumos.yml'
pull_request:
branches:
- master
permissions:
# BOLD WARNING: do not add permissions, this workflow executes remote code
contents: read
env:
FORCE_COLOR: 1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
omnios:
name: illumos
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: vmactions/omnios-vm@v1
with:
# need gcc: compile greenlet from source
# autoconf must pretend inotify unavail: libev FTBFS
# /tmp/.nginx must exist because nginx will not create configured tmp
prepare: |
pkg install pip-311 python-311 sqlite-3 nginx gcc13
usesh: true
copyback: false
run: |
cat /etc/release \
&& uname -a \
&& python3 --version \
&& openssl version \
&& pkg info nginx \
&& gcc -dM -E - </dev/null \
&& ac_cv_header_sys_inotify_h=no ac_cv_func_inotify_init=no python3 -m pip install gevent \
&& mkdir -p /tmp/.nginx \
&& python3 -m pip install tox \
&& python3 -m tox --version \
&& python3 -m tox -e run-module \
&& python3 -m tox -e run-entrypoint \
&& python3 -m tox -e py
15 changes: 13 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: tox
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read # to fetch code (actions/checkout)
env:
Expand All @@ -19,7 +25,7 @@ jobs:
- ubuntu-latest
# not defaulting to macos-latest: Python <= 3.9 was missing from macos-14 @ arm64
- macos-13
# Not testing Windows, because tests need Unix-only fcntl, grp, pwd, etc.
# Not testing Windows, because tests need Unix-only non-blocking pipes, grp, pwd, etc.
python-version:
# CPython <= 3.7 is EoL since 2023-06-27
- "3.7"
Expand Down Expand Up @@ -54,6 +60,11 @@ jobs:
cache-dependency-path: requirements_test.txt
check-latest: true
allow-prereleases: ${{ matrix.unsupported }}
- name: Add test utils
if: matrix.os == 'ubuntu-latest'
run: |
sudo systemctl mask nginx.service
sudo apt install nginx openssl
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ environment:
#- TOXENV: run-entrypoint
# PYTHON: "C:\\Python38-x64"
# Windows is not ready for testing!!!
# Python's fcntl, grp, pwd, os.geteuid(), and socket.AF_UNIX are all Unix-only.
# Python's non-blocking pipes, grp, pwd, os.geteuid(), and socket.AF_UNIX are all Unix-only.
#- TOXENV: py35
# PYTHON: "C:\\Python35-x64"
#- TOXENV: py36
Expand Down
11 changes: 8 additions & 3 deletions docs/source/2024-news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog - 2024
================

23.1.0 - 2TBDTBDTBD
===================

- source distribution (sdist) now includes tox.ini to simplify downstream packaging (:pr:`3269`)

23.0.0 - 2024-08-10
===================

Expand All @@ -24,10 +29,10 @@ Changelog - 2024

** Breaking changes **

- refuse requests where the uri field is empty (:pr:`3255`)
- refuse requests with invalid CR/LR/NUL in heade field values (:pr:`3253`)
- refuse invalid requests where the uri field is empty (:pr:`3255`)
- refuse invalid requests with CR/LR/NUL in header field values (:pr:`3253`)
- remove temporary ``--tolerate-dangerous-framing`` switch from 22.0 (:pr:`3260`)
- If any of the breaking changes affect you, be aware that now refused requests can post a security problem, especially so in setups involving request pipe-lining and/or proxies.
- If any of these affect you, be aware that now refused requests can pose a security problem, especially so in setups involving request pipe-lining and/or proxies.

22.0.0 - 2024-04-17
===================
Expand Down
9 changes: 9 additions & 0 deletions docs/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ threads. However `a work has been started
.. _worker_class: settings.html#worker-class
.. _`number of workers`: design.html#how-many-workers

Why are are responses delayed on startup/re-exec?
-------------------------------------------------

If workers are competing for resources during wsgi import, the result may be slower
than sequential startup. Either avoid duplicate work altogether
via :ref:`preload-app`. Or, if that is not an option, tune worker spawn sequence by
adding a delay in the :ref:`pre-fork` to sacrifice overall startup completion time
for reduced time for first request completion.

Why I don't see any logs in the console?
----------------------------------------

Expand Down
26 changes: 25 additions & 1 deletion docs/source/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ The default behavior is to attempt inotify with a fallback to file
system polling. Generally, inotify should be preferred if available
because it consumes less system resources.

.. note::
If the application fails to load while this option is used,
the (potentially sensitive!) traceback will be shared in
the response to subsequent HTTP requests.
.. note::
In order to use the inotify reloader, you must have the ``inotify``
package installed.
Expand Down Expand Up @@ -114,10 +118,13 @@ Valid engines are:

**Default:** ``[]``

Extends :ref:`reload` option to also watch and reload on additional files
Alternative or extension to :ref:`reload` option to (also) watch
and reload on additional files
(e.g., templates, configurations, specifications, etc.).

.. versionadded:: 19.8
.. versionchanged:: 23.FIXME
Option no longer silently ignored if used without :ref:`reload`.

.. _spew:

Expand Down Expand Up @@ -461,6 +468,19 @@ if not provided).

.. versionadded:: 19.2

.. _enable-backlog-metric:

``enable_backlog_metric``
~~~~~~~~~~~~~~~~~~~~~~~~~

**Command line:** ``--enable-backlog-metric``

**Default:** ``False``

Enable socket backlog metric (only supported on Linux).

.. versionadded:: 23.1

Process Naming
--------------

Expand Down Expand Up @@ -1100,6 +1120,10 @@ A filename to use for the PID file.

If not set, no PID file will be written.

.. note::
During master re-exec, a ``.2`` suffix is added to
this path to store the PID of the newly launched master.

.. _worker-tmp-dir:

``worker_tmp_dir``
Expand Down
2 changes: 1 addition & 1 deletion gunicorn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.

version_info = (23, 0, 0)
version_info = (23, 1, 0)
__version__ = ".".join([str(v) for v in version_info])
SERVER = "gunicorn"
SERVER_SOFTWARE = "%s/%s" % (SERVER, __version__)
Loading
Loading