Skip to content

Commit fc3d6dd

Browse files
Merge branch 'release/4.6.3'
2 parents f0186d7 + 126e60a commit fc3d6dd

File tree

6 files changed

+48
-6
lines changed

6 files changed

+48
-6
lines changed

docs/release-notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Release Notes
55
.. toctree::
66
:maxdepth: 2
77

8+
release-notes/version-4.6.3
89
release-notes/version-4.6.2
910
release-notes/version-4.6.1
1011
release-notes/version-4.6.0
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
=============
2+
Version 4.6.3
3+
=============
4+
5+
Version 4.6.3 of mod_wsgi can be obtained from:
6+
7+
https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.6.3
8+
9+
Bugs Fixed
10+
----------
11+
12+
* When compiled for Python 2.6, when run mod_wsgi would fail to load into
13+
Apache due to misisng symbol ``PyFrame_GetLineNumber``. This was only
14+
introduced in Python 2.7. Use alternate way to get line number which
15+
still yields correct answer. This issue was introduced in mod_wsgi
16+
version 4.6.0 in fix to have correct line numbers generated for stack
17+
traces on shutdown due to request timeout.
18+
19+
* Installing mod_wsgi on Windows would fail as hadn't exclude mod_wsgi
20+
daemon mode specific code from Windows build. This would result in compile
21+
time error about ``wsgi_daemon_process`` being undefined. This problem
22+
was introduced to Windows in version 4.6.0.
23+
24+
* When using ``runmodwsgi`` management command integration for Django, the
25+
file containing the WSGI application entry point was specified via a full
26+
filesystem path, rather than by module import path. This meant that relative
27+
imports from that file would fail. The file is now imported as a module
28+
path based on what ``WSGI_APPLICATION`` is set to in the Django settings
29+
module. This means the file is imported as part of package for the project
30+
and relative imports will work.

src/server/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,7 @@ def check_percentage(option, opt_str, value, parser):
21282128
metavar='SECONDS', help='Maximum number of seconds allowed '
21292129
'for a request to be accepted by a worker process to be '
21302130
'handled, taken from the time when the Apache child process '
2131-
'originally accepted the request. Defaults to 30 seconds.'),
2131+
'originally accepted the request. Defaults to 45 seconds.'),
21322132

21332133
optparse.make_option('--header-timeout', type='int', default=15,
21342134
metavar='SECONDS', help='The number of seconds allowed for '

src/server/management/commands/runmodwsgi.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ def handle(self, *args, **options):
7575

7676
__import__(module_name)
7777

78-
script_file = inspect.getsourcefile(sys.modules[module_name])
78+
# script_file = inspect.getsourcefile(sys.modules[module_name])
79+
# args = [script_file]
7980

80-
args = [script_file]
81+
options['application_type'] = 'module'
8182
options['callable_object'] = callable_object
8283

84+
args = [module_name]
85+
8386
# If there is no BASE_DIR in Django settings, assume that the
8487
# current working directory is the parent directory of the
8588
# directory the settings module is in. Either way, allow the

src/server/mod_wsgi.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4414,8 +4414,10 @@ static void wsgi_python_child_init(apr_pool_t *p)
44144414

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

4417+
#if defined(MOD_WSGI_WITH_DAEMONS)
44174418
if (wsgi_daemon_process && wsgi_daemon_process->group->threads == 0)
44184419
ignore_system_exit = 1;
4420+
#endif
44194421

44204422
if (wsgi_import_list) {
44214423
apr_array_header_t *scripts = NULL;
@@ -9438,7 +9440,13 @@ static void wsgi_log_stack_traces(void)
94389440
char *filename = NULL;
94399441
char *name = NULL;
94409442

9441-
lineno = PyFrame_GetLineNumber(current);
9443+
if (current->f_trace) {
9444+
lineno = current->f_lineno;
9445+
}
9446+
else {
9447+
lineno = PyCode_Addr2Line(current->f_code,
9448+
current->f_lasti);
9449+
}
94429450

94439451
#if PY_MAJOR_VERSION >= 3
94449452
filename = PyUnicode_AsUTF8(current->f_code->co_filename);

src/server/wsgi_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
#define MOD_WSGI_MAJORVERSION_NUMBER 4
2727
#define MOD_WSGI_MINORVERSION_NUMBER 6
28-
#define MOD_WSGI_MICROVERSION_NUMBER 2
29-
#define MOD_WSGI_VERSION_STRING "4.6.2"
28+
#define MOD_WSGI_MICROVERSION_NUMBER 3
29+
#define MOD_WSGI_VERSION_STRING "4.6.3"
3030

3131
/* ------------------------------------------------------------------------- */
3232

0 commit comments

Comments
 (0)