Skip to content

Commit

Permalink
Merge branch 'release/5.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Nov 19, 2023
2 parents ac1a8e6 + 26efe4a commit 3c417a5
Show file tree
Hide file tree
Showing 59 changed files with 233 additions and 173 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/main.yml
Expand Up @@ -2,7 +2,9 @@ on:
push:
branches:
- develop
- master
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
pull_request:
branches:
- develop
Expand All @@ -11,21 +13,25 @@ jobs:
build:
name: "Build mod_wsgi packages"
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
with:
python-version: "3.9"
python-version: "${{ matrix.python-version }}"
- name: "Update package details"
run: sudo apt --fix-missing update
- name: "Install Apache package"
run: sudo apt install -y apache2-dev
- name: "Build mod_wsgi packages"
run: ./package.sh && ls -las dist
- name: "Store built packages"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
name: dist ${{ matrix.python-version }}
path: dist/*

tests:
Expand All @@ -36,16 +42,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Download built packages"
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
name: dist ${{ matrix.python-version }}
path: dist
- name: "Update package details"
run: sudo apt --fix-missing update
Expand Down
22 changes: 22 additions & 0 deletions .readthedocs.yaml
@@ -0,0 +1,22 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
5 changes: 5 additions & 0 deletions README.rst
Expand Up @@ -5,6 +5,11 @@ The mod_wsgi package provides an Apache module that implements a WSGI
compliant interface for hosting Python based web applications on top of the
Apache web server.

*Note that the major version 5.0 was introduced not because of any new major
features but because from version 5.0 onwards compatability with Python 2.7 is
no longer guaranteed. A minimum Python version of 3.8 will be enforced by the
Python package installation configuration.*

Installation of mod_wsgi from source code can be performed in one of two
ways.

Expand Down
29 changes: 14 additions & 15 deletions configure
Expand Up @@ -2850,23 +2850,23 @@ fi
PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("VERSION"))'`
PYTHON_LDVERSION=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("LDVERSION") or "")'`
if test x"${PYTHON_LDVERSION}" = x""; then
PYTHON_LDVERSION=${PYTHON_VERSION}
fi
CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write("-I" + sysconfig.get_config_var("INCLUDEPY"))'`
CPPFLAGS2=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(" ".join(filter(lambda x: x.startswith("-D"), \
sysconfig.get_config_var("CFLAGS").split())))'`
Expand All @@ -2881,20 +2881,19 @@ CPPFLAGS="${CPPFLAGS} ${CPPFLAGS1} ${CPPFLAGS2} ${CPPFLAGS3}"
PYTHONLIBDIR=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("LIBDIR"))'`
PYTHONCFGDIR=`${PYTHON} -c 'from sys import stdout; \
import distutils.sysconfig; \
stdout.write(distutils.sysconfig.get_python_lib(plat_specific=1, \
standard_lib=1) +"/config")'`
import sysconfig; \
stdout.write(sysconfig.get_path("platstdlib") +"/config")'`
PYTHONFRAMEWORKDIR=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORKDIR"))'`
PYTHONFRAMEWORKPREFIX=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORKPREFIX"))'`
PYTHONFRAMEWORK=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'`
if test "${PYTHON_LDVERSION}" != "${PYTHON_VERSION}"; then
Expand All @@ -2920,24 +2919,24 @@ if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \
fi
LDLIBS2=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("LIBS"))'`
LDLIBS3=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("SYSLIBS"))'`
else
LDFLAGS1="-Wl,-F${PYTHONFRAMEWORKPREFIX} -framework ${PYTHONFRAMEWORK}"
VERSION="${PYTHON_VERSION}"
STRING="${PYTHONFRAMEWORKDIR}/Versions/${VERSION}/${PYTHONFRAMEWORK}"
LDFLAGS2=`${PYTHON} -c "from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var(
\"LINKFORSHARED\").replace(\"${STRING}\", ''))" | \
sed -e 's/-Wl,-stack_size,[0-9]*//'`
LDLIBS1=`${PYTHON} -c 'from sys import stdout; \
from distutils import sysconfig; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("LIBS"))'`
fi
Expand Down
7 changes: 3 additions & 4 deletions configure.ac
@@ -1,6 +1,6 @@
dnl vim: set sw=4 expandtab :
dnl
dnl Copyright 2007-2022 GRAHAM DUMPLETON
dnl Copyright 2007-2023 GRAHAM DUMPLETON
dnl
dnl Licensed under the Apache License, Version 2.0 (the "License");
dnl you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -141,9 +141,8 @@ PYTHONLIBDIR=`${PYTHON} -c 'from sys import stdout; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("LIBDIR"))'`
PYTHONCFGDIR=`${PYTHON} -c 'from sys import stdout; \
import distutils.sysconfig; \
stdout.write(distutils.sysconfig.get_python_lib(plat_specific=1, \
standard_lib=1) +"/config")'`
import sysconfig; \
stdout.write(sysconfig.get_path("platstdlib") +"/config")'`
PYTHONFRAMEWORKDIR=`${PYTHON} -c 'from sys import stdout; \
import sysconfig; \
stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORKDIR"))'`
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -41,7 +41,7 @@

# General information about the project.
project = u'mod_wsgi'
copyright = u'2007-2022, Graham Dumpleton'
copyright = u'2007-2023, Graham Dumpleton'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 2 additions & 0 deletions docs/release-notes.rst
Expand Up @@ -5,6 +5,8 @@ Release Notes
.. toctree::
:maxdepth: 2

release-notes/version-5.0.0

release-notes/version-4.9.4
release-notes/version-4.9.3
release-notes/version-4.9.2
Expand Down
6 changes: 3 additions & 3 deletions docs/release-notes/version-1.1.rst
Expand Up @@ -12,7 +12,7 @@ Bug Fixes
1. Fix bug which could result in processes crashing when multiple threads
attempt to write to sys.stderr or sys.stdout at the same time. See:

http://code.google.com/p/modwsgi/issues/detail?id=30
https://code.google.com/archive/p/modwsgi/issues/30

Chance of this occuring was small, as was contingent on code writing out
strings which contained an embedded newline but no terminating new line,
Expand Down Expand Up @@ -46,7 +46,7 @@ insert their own connection level input/output filters. This is needed as
running WSGI applications in daemon processes where requests were arriving
to Apache as HTTPS requests could cause daemon processes to crash. See:

http://code.google.com/p/modwsgi/issues/detail?id=33
https://code.google.com/archive/p/modwsgi/issues/33

This was only occuring for some HTTPS configurations, but not known what
exactly was different about those configurations to cause the problem.
Expand All @@ -57,4 +57,4 @@ mod_logio module when loaded and when handling request in daemon process.
This is needed to prevent core output filters calling this function and
triggering a crash due to configuration for mod_logio not being setup. See:

http://code.google.com/p/modwsgi/issues/detail?id=34
https://code.google.com/archive/p/modwsgi/issues/34
8 changes: 4 additions & 4 deletions docs/release-notes/version-1.2.rst
Expand Up @@ -25,15 +25,15 @@ the WSGI specification. In particular the specification says:
In mod_wsgi when an iterable was returned from the application, the headers
were being flushed even if the string was empty. See:

http://code.google.com/p/modwsgi/issues/detail?id=35
https://code.google.com/archive/p/modwsgi/issues/35

2. Calling start_response() a second time to supply exception information
and status to replace prior response headers and status, was resulting in
a process crash when there had actually been response content sent and the
existing response headers and status flushed and written back to the client.
See:

http://code.google.com/p/modwsgi/issues/detail?id=36
https://code.google.com/archive/p/modwsgi/issues/36

3. Added additional logging to highlight instance where WSGI script file was
removed in between the time that Apache matched request to it and the WSGI
Expand All @@ -52,7 +52,7 @@ name would be wrong where the URL had repeating slashes in it after the
leading portion of the URL which mapped to the mount point of the WSGI
application. See:

http://code.google.com/p/modwsgi/issues/detail?id=39
https://code.google.com/archive/p/modwsgi/issues/39

In particular, for a URL with the repeating slash the application group
name would have a trailing slash appended when it shouldn't. The
Expand All @@ -77,4 +77,4 @@ the default.
daemon processes were not being caught properly. This was because mod_wsgi
was wrongly blocking SIGCHLD signal. See:

http://code.google.com/p/modwsgi/issues/detail?id=38
https://code.google.com/archive/p/modwsgi/issues/38
2 changes: 1 addition & 1 deletion docs/release-notes/version-1.4.rst
Expand Up @@ -16,7 +16,7 @@ status was being returned instead of a 500 error.
2. Fix bug which was resulting in logging destined for !VirtualHost !ErrorLog
going missing or ending up in main Apache error log.

http://code.google.com/p/modwsgi/issues/detail?id=79
https://code.google.com/archive/p/modwsgi/issues/79

Features Added
--------------
Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes/version-1.5.rst
Expand Up @@ -14,6 +14,6 @@ being leaked in Apache parent process on a graceful restart. Also fixes
problem where UNIX listener socket was left in filesystem on both graceful
restart and graceful shutdown. For details see:

http://code.google.com/p/modwsgi/issues/detail?id=95
https://code.google.com/archive/p/modwsgi/issues/95

This is a backport of change from version 2.2 of mod_wsgi.
10 changes: 5 additions & 5 deletions docs/release-notes/version-2.0.rst
Expand Up @@ -73,7 +73,7 @@ just the script file will apply.

For more details see:

http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
https://code.google.com/archive/p/modwsgi/wikis/ReloadingSourceCode

2. When application is running in embedded mode, and WSGIApacheExtensions
directive is set to On, then a Python CObject reference is added to the
Expand All @@ -93,7 +93,7 @@ The 'ap_swig_py' package has not yet been released and is still in
development. The package can be obtained from the Subversion repository
at:

https://bitbucket.org/grahamdumpleton/apswigpy/wiki/Home
https://bitbucket.org/grahamdumpleton/apswigpy/wikis/Home

With the SWIG binding for the Apache API, the intention is that many of
the internal features of Apache would then be available. For example::
Expand Down Expand Up @@ -269,7 +269,7 @@ the auth provider::

For more details see:

http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms
https://code.google.com/archive/p/modwsgi/wikis/AccessControlMechanisms

4. When Apache 2.2 is being used, now possible to provide a script file
containing a callable which returns the groups that a user is a member of.
Expand Down Expand Up @@ -305,7 +305,7 @@ and 'groups_for_user()' function with a sample as shown below::

For more details see:

http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms
https://code.google.com/archive/p/modwsgi/wikis/AccessControlMechanisms

5. Implemented WSGIDispatchScript directive. This directive can be used
to designate a script file in which can be optionally defined any of the
Expand Down Expand Up @@ -444,7 +444,7 @@ file itself.

For more details see:

http://code.google.com/p/modwsgi/wiki/VirtualEnvironments
https://code.google.com/archive/p/modwsgi/wikis/VirtualEnvironments

11. Added WSGIPythonEggs directive and corresponding 'python-eggs' option
for WSGIDaemonProcess directive. These allow the location of the Python
Expand Down
4 changes: 2 additions & 2 deletions docs/release-notes/version-2.1.rst
Expand Up @@ -12,9 +12,9 @@ Bug Fixes
1. Fix bug which was resulting in logging destined for !VirtualHost !ErrorLog
going missing or ending up in main Apache error log.

http://code.google.com/p/modwsgi/issues/detail?id=79
https://code.google.com/archive/p/modwsgi/issues/79

2. Fix bug where WSGI application returning None rather than valid iterable
causes process to crash.

http://code.google.com/p/modwsgi/issues/detail?id=88
https://code.google.com/archive/p/modwsgi/issues/88
10 changes: 5 additions & 5 deletions docs/release-notes/version-2.2.rst
Expand Up @@ -15,7 +15,7 @@ Features Changed
1. Use official way of setting process names on FreeBSD, NetBSD and OpenBSD.
For details see:

http://code.google.com/p/modwsgi/issues/detail?id=90
https://code.google.com/archive/p/modwsgi/issues/90

This is a backport of change from version 3.0 of mod_wsgi.

Expand All @@ -26,23 +26,23 @@ Bug Fixes
WSGIImportScript directive can cause Apache child processes to crash.
For details see:

http://code.google.com/p/modwsgi/issues/detail?id=91
https://code.google.com/archive/p/modwsgi/issues/91

2. Fix bug where mod_wsgi daemon process startup could fail due to old stale
UNIX listener socket file as described in:

http://code.google.com/p/modwsgi/issues/detail?id=77
https://code.google.com/archive/p/modwsgi/issues/77

3. Fix bug where listener socket file descriptors for daemon processes were
being leaked in Apache parent process on a graceful restart. Also fixes
problem where UNIX listener socket was left in filesystem on both graceful
restart and graceful shutdown. For details see:

http://code.google.com/p/modwsgi/issues/detail?id=95
https://code.google.com/archive/p/modwsgi/issues/95

4. Fix bug where response was truncated when a null character appeared as
first character in block of data being returned from wsgi.file_wrapper. Only
occurred when code fell back to using iteration over supplied file like
object, rather than optimised method such as sendfile().

http://code.google.com/p/modwsgi/issues/detail?id=100
https://code.google.com/archive/p/modwsgi/issues/100
2 changes: 1 addition & 1 deletion docs/release-notes/version-2.3.rst
Expand Up @@ -34,4 +34,4 @@ process to crash as corresponding arguments wouldn't have ben provided.

For details see:

http://code.google.com/p/modwsgi/issues/detail?id=90
https://code.google.com/archive/p/modwsgi/issues/90

0 comments on commit 3c417a5

Please sign in to comment.