Skip to content

Commit 3bbc810

Browse files
Merge branch 'release/5.0.1'
2 parents f54eadd + 1e61f7e commit 3bbc810

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+313
-87
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
2020
steps:
2121
- uses: "actions/checkout@v4"
22-
- uses: "actions/setup-python@v4"
22+
- uses: "actions/setup-python@v5"
2323
with:
2424
python-version: "${{ matrix.python-version }}"
2525
- name: "Update package details"
@@ -29,7 +29,7 @@ jobs:
2929
- name: "Build mod_wsgi packages"
3030
run: ./package.sh && ls -las dist
3131
- name: "Store built packages"
32-
uses: actions/upload-artifact@v3
32+
uses: "actions/upload-artifact@v4"
3333
with:
3434
name: dist ${{ matrix.python-version }}
3535
path: dist/*
@@ -42,14 +42,14 @@ jobs:
4242
strategy:
4343
fail-fast: false
4444
matrix:
45-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
45+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]
4646
steps:
4747
- uses: "actions/checkout@v4"
48-
- uses: "actions/setup-python@v4"
48+
- uses: "actions/setup-python@v5"
4949
with:
5050
python-version: "${{ matrix.python-version }}"
5151
- name: "Download built packages"
52-
uses: actions/download-artifact@v3
52+
uses: "actions/download-artifact@v4"
5353
with:
5454
name: dist ${{ matrix.python-version }}
5555
path: dist
@@ -66,7 +66,7 @@ jobs:
6666
- name: "Uninstall mod_wsgi"
6767
run: pip uninstall --yes mod_wsgi
6868
- name: "Install mod_wsgi-standalone"
69-
run: python -m pip install --verbose dist/mod_wsgi-standalone-[0-9].*.tar.gz
69+
run: python -m pip install --verbose dist/mod_wsgi[-_]standalone-[0-9].*.tar.gz
7070
- name: "Run mod_wsgi-express test #2"
7171
run: scripts/run-single-test.sh
7272
- name: "Uninstall mod_wsgi-standalone"

README-standalone.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ installed, with it using the version of Apache installed by the
2222
This method of installation is only suitable for where you want to use
2323
``mod_wsgi-express``. It cannot be used to build mod_wsgi for use with
2424
your system Apache installation. This installation method will not
25-
work on Windows, and also currently fails on macOS because the Apache
26-
Runtime (APR) library, has not been updated to latest macOS versions.
25+
work on Windows.
2726

2827
When installing mod_wsgi using this method, except that you will install
2928
the ``mod_wsgi-standalone`` package instead of the ``mod_wsgi`` package,

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl vim: set sw=4 expandtab :
22
dnl
3-
dnl Copyright 2007-2023 GRAHAM DUMPLETON
3+
dnl Copyright 2007-2024 GRAHAM DUMPLETON
44
dnl
55
dnl Licensed under the Apache License, Version 2.0 (the "License");
66
dnl you may not use this file except in compliance with the License.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# General information about the project.
4343
project = u'mod_wsgi'
44-
copyright = u'2007-2023, Graham Dumpleton'
44+
copyright = u'2007-2024, Graham Dumpleton'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the

docs/configuration-directives/WSGIDaemonProcess.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,12 @@ Options which can be supplied to the ``WSGIDaemonProcess`` directive are:
375375
to handle more requests, restarting of the process will be delayed
376376
if possible.
377377

378+
Note that when a process is restarted due to a request timeout, if the
379+
Apache ``LogLevel`` is set to ``info`` or higher, or ``wsgi:info`` applied
380+
for ``LogLevel```, messages will be logged to the Apache error log file for
381+
the request which gives the Python stack trace for any request handler
382+
threads so you can work out where the request is blocking.
383+
378384
.. _deadlock-timeout:
379385

380386
**deadlock-timeout=sss**
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
======================
2+
WSGIDestroyInterpreter
3+
======================
4+
5+
:Description: Enable/disable cleanup of Python interpreter.
6+
:Syntax: ``WSGIDestroyInterpreter On|Off``
7+
:Default: ``WSGIDestroyInterpreter On``
8+
:Context: server config
9+
10+
The ``WSGIDestroyInterpreter`` directive is used to control whether the Python
11+
interpreter is destroyed when processes are shutdown or restarted. By default
12+
the Python interpreter is destroyed when the process is shutdown or restarted.
13+
14+
This directive was added due to changes in Python 3.9 where the Python cleanup
15+
behaviour was changed such that it would wait on daemon threads to complete.
16+
This could cause cleanup of the Python interpreter to hang in the some cases
17+
where threads were created external to Python, as is the case where Python is
18+
embedded in a C program such as mod_wsgi with Apache.
19+
20+
This problem of hanging when cleanup of the Python interpreter was attempted
21+
was especially noticeable when using mod_wsgi to host Trac.
22+
23+
Note that it is not known whether versions of Python newer than 3.9 still have
24+
this problem or whether further changes were made in Python interpreter cleanup
25+
code.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
=================
2+
WSGIErrorOverride
3+
=================
4+
5+
:Description: Enable/disable use of Apache error documents.
6+
:Syntax: ``WSGIErrorOverride On|Off``
7+
:Default: ``WSGIErrorOverride Off``
8+
:Context: server config, virtual host, directory, .htaccess
9+
10+
The ``WSGIErrorOverride`` directive when set to ``On``, and the WSGI application
11+
is running in daemon mode, will result in Apache error documents being used
12+
rather than those passed back by the WSGI application. This allows error
13+
documents to match any web site that the WSGI application may be integrated as a
14+
part of. This feature is akin to the ``ProxyErrorOverride`` directive of Apache
15+
but for mod_wsgi only.
16+
17+
Note that this directive has no effect when the WSGI application is running in
18+
embedded mode.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
================
2+
WSGIMapHEADToGET
3+
================
4+
5+
:Description: Enable/disable mapping of HEAD request to GET.
6+
:Syntax: ``WSGIMapHEADToGET On|Off|Auto``
7+
:Default: ``WSGIMapHEADToGET Auto``
8+
:Context: server config, virtual host, directory, .htaccess
9+
10+
The ``WSGIMapHEADToGET`` directive controls the behaviour of automatically
11+
mapping any ``HEAD`` request to a ``GET`` request when an Apache output filter
12+
is registered that may want to see the complete response in order to generate
13+
correct response headers.
14+
15+
The directive can be set to be either ``Auto`` (the default), ``On`` which
16+
will always map a ``HEAD`` to ``GET`` even if no output filters detected and
17+
``Off`` to always preserve the original request method type.
18+
19+
The directive may be required where a WSGI application tries to optimize and
20+
avoid doing work for a ``HEAD`` request by not actually generating a response
21+
so that complete response headers can still be generated. By doing this the
22+
WSGI application can break Apache filters for caching, so the mapping of
23+
``HEAD`` to ``GET`` can be required to avoid problems.

docs/configuration.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ Configuration
1414
configuration-directives/WSGICaseSensitivity
1515
configuration-directives/WSGIChunkedRequest
1616
configuration-directives/WSGIDaemonProcess
17+
configuration-directives/WSGIDestroyInterpreter
18+
configuration-directives/WSGIErrorOverride
1719
configuration-directives/WSGIImportScript
1820
configuration-directives/WSGILazyInitialization
21+
configuration-directives/WSGIMapHEADToGET
1922
configuration-directives/WSGIPassAuthorization
2023
configuration-directives/WSGIProcessGroup
2124
configuration-directives/WSGIPythonEggs

docs/installation.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Installation
55
The mod_wsgi package can be installed from source code or may also be
66
available as a pre built binary package as part of your Linux distribution.
77

8-
Do be aware though that Linux distributions generally ship out of date
9-
versions of mod_wsgi and for long term support (LTS) versions of Linux can
10-
be anything up to about 5 years old. Those older versions are not supported
11-
in any way even though they are part of a so called LTS version of Linux.
8+
Do be aware though that Linux distributions can sometimes ship out of date
9+
versions of mod_wsgi, especially for long term support (LTS) versions of Linux.
10+
Those older versions are not supported in any way even though they are part of a
11+
so called LTS version of Linux.
1212

1313
If you want support and want to ensure you have the most up to date and
1414
bug free version of mod_wsgi, you should consider building and installing
@@ -20,6 +20,7 @@ operating systems such as Linux and MacOS X see:
2020
* :doc:`user-guides/quick-installation-guide`
2121
* :doc:`user-guides/installation-on-macosx`
2222

23-
If you are on Windows, you should instead use:
23+
For a simpler way of running a Python WSGI application using mod_wsgi, also
24+
checkout ``mod_wsgi-express``, details of which can currently be found at:
2425

25-
* https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst
26+
https://pypi.python.org/pypi/mod_wsgi

0 commit comments

Comments
 (0)