Skip to content

Commit

Permalink
Merge branch 'release/4.6.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Mar 25, 2018
2 parents f0186d7 + 126e60a commit fc3d6dd
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 2

release-notes/version-4.6.3
release-notes/version-4.6.2
release-notes/version-4.6.1
release-notes/version-4.6.0
Expand Down
30 changes: 30 additions & 0 deletions docs/release-notes/version-4.6.3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=============
Version 4.6.3
=============

Version 4.6.3 of mod_wsgi can be obtained from:

https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.6.3

Bugs Fixed
----------

* When compiled for Python 2.6, when run mod_wsgi would fail to load into
Apache due to misisng symbol ``PyFrame_GetLineNumber``. This was only
introduced in Python 2.7. Use alternate way to get line number which
still yields correct answer. This issue was introduced in mod_wsgi
version 4.6.0 in fix to have correct line numbers generated for stack
traces on shutdown due to request timeout.

* Installing mod_wsgi on Windows would fail as hadn't exclude mod_wsgi
daemon mode specific code from Windows build. This would result in compile
time error about ``wsgi_daemon_process`` being undefined. This problem
was introduced to Windows in version 4.6.0.

* When using ``runmodwsgi`` management command integration for Django, the
file containing the WSGI application entry point was specified via a full
filesystem path, rather than by module import path. This meant that relative
imports from that file would fail. The file is now imported as a module
path based on what ``WSGI_APPLICATION`` is set to in the Django settings
module. This means the file is imported as part of package for the project
and relative imports will work.
2 changes: 1 addition & 1 deletion src/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,7 @@ def check_percentage(option, opt_str, value, parser):
metavar='SECONDS', help='Maximum number of seconds allowed '
'for a request to be accepted by a worker process to be '
'handled, taken from the time when the Apache child process '
'originally accepted the request. Defaults to 30 seconds.'),
'originally accepted the request. Defaults to 45 seconds.'),

optparse.make_option('--header-timeout', type='int', default=15,
metavar='SECONDS', help='The number of seconds allowed for '
Expand Down
7 changes: 5 additions & 2 deletions src/server/management/commands/runmodwsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,14 @@ def handle(self, *args, **options):

__import__(module_name)

script_file = inspect.getsourcefile(sys.modules[module_name])
# script_file = inspect.getsourcefile(sys.modules[module_name])
# args = [script_file]

args = [script_file]
options['application_type'] = 'module'
options['callable_object'] = callable_object

args = [module_name]

# If there is no BASE_DIR in Django settings, assume that the
# current working directory is the parent directory of the
# directory the settings module is in. Either way, allow the
Expand Down
10 changes: 9 additions & 1 deletion src/server/mod_wsgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4414,8 +4414,10 @@ static void wsgi_python_child_init(apr_pool_t *p)

/* Loop through import scripts for this process and load them. */

#if defined(MOD_WSGI_WITH_DAEMONS)
if (wsgi_daemon_process && wsgi_daemon_process->group->threads == 0)
ignore_system_exit = 1;
#endif

if (wsgi_import_list) {
apr_array_header_t *scripts = NULL;
Expand Down Expand Up @@ -9438,7 +9440,13 @@ static void wsgi_log_stack_traces(void)
char *filename = NULL;
char *name = NULL;

lineno = PyFrame_GetLineNumber(current);
if (current->f_trace) {
lineno = current->f_lineno;
}
else {
lineno = PyCode_Addr2Line(current->f_code,
current->f_lasti);
}

#if PY_MAJOR_VERSION >= 3
filename = PyUnicode_AsUTF8(current->f_code->co_filename);
Expand Down
4 changes: 2 additions & 2 deletions src/server/wsgi_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 6
#define MOD_WSGI_MICROVERSION_NUMBER 2
#define MOD_WSGI_VERSION_STRING "4.6.2"
#define MOD_WSGI_MICROVERSION_NUMBER 3
#define MOD_WSGI_VERSION_STRING "4.6.3"

/* ------------------------------------------------------------------------- */

Expand Down

0 comments on commit fc3d6dd

Please sign in to comment.