From 5f9fefba451f408a5566ece186bf33475bb63556 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Wed, 13 Apr 2016 10:06:11 +1000 Subject: [PATCH 1/5] Increment version to 4.5.2. --- docs/release-notes.rst | 1 + docs/release-notes/version-4.5.2.rst | 7 +++++++ src/server/wsgi_version.h | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 docs/release-notes/version-4.5.2.rst diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 8d23ce53..9088bd8e 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -5,6 +5,7 @@ Release Notes .. toctree:: :maxdepth: 2 + release-notes/version-4.5.2 release-notes/version-4.5.1 release-notes/version-4.5.0 diff --git a/docs/release-notes/version-4.5.2.rst b/docs/release-notes/version-4.5.2.rst new file mode 100644 index 00000000..d9e96846 --- /dev/null +++ b/docs/release-notes/version-4.5.2.rst @@ -0,0 +1,7 @@ +============= +Version 4.5.2 +============= + +Version 4.5.2 of mod_wsgi can be obtained from: + + https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.5.2 diff --git a/src/server/wsgi_version.h b/src/server/wsgi_version.h index c3cbf38c..8404417b 100644 --- a/src/server/wsgi_version.h +++ b/src/server/wsgi_version.h @@ -25,8 +25,8 @@ #define MOD_WSGI_MAJORVERSION_NUMBER 4 #define MOD_WSGI_MINORVERSION_NUMBER 5 -#define MOD_WSGI_MICROVERSION_NUMBER 1 -#define MOD_WSGI_VERSION_STRING "4.5.1" +#define MOD_WSGI_MICROVERSION_NUMBER 2 +#define MOD_WSGI_VERSION_STRING "4.5.2" /* ------------------------------------------------------------------------- */ From 6c5f3c18b082eee711a5982a41cf6581b3493d2e Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Wed, 13 Apr 2016 10:09:12 +1000 Subject: [PATCH 2/5] Python path not set correctly when using --debug-mode option with mod_wsgi-express. #70 --- docs/release-notes/version-4.5.2.rst | 7 +++++++ src/server/__init__.py | 1 + 2 files changed, 8 insertions(+) diff --git a/docs/release-notes/version-4.5.2.rst b/docs/release-notes/version-4.5.2.rst index d9e96846..a6e77d6e 100644 --- a/docs/release-notes/version-4.5.2.rst +++ b/docs/release-notes/version-4.5.2.rst @@ -5,3 +5,10 @@ Version 4.5.2 Version 4.5.2 of mod_wsgi can be obtained from: https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.5.2 + +Bugs Fixed +---------- + +1. When using ``--debug-mode`` with ``mod_wsgi-express`` any additional + directories to search for Python modules which were supplied by the + ``--python-path`` option were not being add to ``sys.path``. diff --git a/src/server/__init__.py b/src/server/__init__.py index f977b0e8..f561e0e6 100644 --- a/src/server/__init__.py +++ b/src/server/__init__.py @@ -345,6 +345,7 @@ def find_mimetypes(): WSGIRestrictStdin Off +WSGIPythonPath '%(python_path)s' From 70180e5e403fd2f5230a7ba4d106250687b523c0 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Wed, 13 Apr 2016 14:28:37 +1000 Subject: [PATCH 3/5] Need conditional check to deal with when no additional path defined, else Apache chokes on directive definition. #70 --- src/server/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/__init__.py b/src/server/__init__.py index f561e0e6..93031902 100644 --- a/src/server/__init__.py +++ b/src/server/__init__.py @@ -345,8 +345,10 @@ def find_mimetypes(): WSGIRestrictStdin Off + WSGIPythonPath '%(python_path)s' + ExtendedStatus On @@ -3024,6 +3026,8 @@ def _cmd_setup_server(command, args, options): options['httpd_arguments_list'].append('-DMOD_WSGI_WITH_PROXY_HEADERS') if options['trusted_proxies']: options['httpd_arguments_list'].append('-DMOD_WSGI_WITH_TRUSTED_PROXIES') + if options['python_path']: + options['httpd_arguments_list'].append('-DMOD_WSGI_WITH_PYTHON_PATH') if options['with_cgi']: if os.path.exists(os.path.join(options['modules_directory'], From c6095961b73953ba911c8990822d3b32945d37df Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Thu, 14 Apr 2016 12:06:54 +1000 Subject: [PATCH 4/5] Fix wording of release notes. --- docs/release-notes/version-4.5.2.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/version-4.5.2.rst b/docs/release-notes/version-4.5.2.rst index a6e77d6e..6aaaa890 100644 --- a/docs/release-notes/version-4.5.2.rst +++ b/docs/release-notes/version-4.5.2.rst @@ -10,5 +10,5 @@ Bugs Fixed ---------- 1. When using ``--debug-mode`` with ``mod_wsgi-express`` any additional - directories to search for Python modules which were supplied by the - ``--python-path`` option were not being add to ``sys.path``. + directories to search for Python modules, which were supplied by the + ``--python-path`` option, were not being added to ``sys.path``. From 7499a553eebca8234ca0e00b3ce8bdea07949635 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Thu, 14 Apr 2016 12:12:35 +1000 Subject: [PATCH 5/5] Add hidden --verbose-debugging flag to mod_wsgi-express. --- src/server/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/__init__.py b/src/server/__init__.py index 93031902..39aef08d 100644 --- a/src/server/__init__.py +++ b/src/server/__init__.py @@ -282,6 +282,8 @@ def find_mimetypes(): WSGIPythonHome '%(python_home)s' +WSGIVerboseDebugging '%(verbose_debugging_flag)s' + WSGIRestrictEmbedded On WSGISocketPrefix %(server_root)s/wsgi @@ -2243,6 +2245,9 @@ def check_percentage(option, opt_str, value, parser): help='Flag indicating whether the web server startup log should ' 'be enabled. Defaults to being disabled.'), + optparse.make_option('--verbose-debugging', action='store_true', + dest='verbose_debugging', help=optparse.SUPPRESS_HELP), + optparse.make_option('--log-to-terminal', action='store_true', default=False, help='Flag indicating whether logs should ' 'be directed back to the terminal. Defaults to being disabled. ' @@ -2879,6 +2884,11 @@ def _cmd_setup_server(command, args, options): options['httpd_arguments_list'].append('-E') options['httpd_arguments_list'].append(options['startup_log_file']) + if options['verbose_debugging']: + options['verbose_debugging_flag'] = 'On' + else: + options['verbose_debugging_flag'] = 'Off' + if options['server_name']: host = options['server_name'] else: