diff options
author | delphij <delphij@FreeBSD.org> | 2010-07-16 06:29:46 +0800 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2010-07-16 06:29:46 +0800 |
commit | 8f5e4c12f10f9e1a13ab8f2788149ce3a13ac085 (patch) | |
tree | 5b80502c02fc8f5cf0b159989fcc143d51ef024a /www/mod_wsgi3 | |
parent | 67a6c3a22f113c08b2b7f570395551ffccc4b764 (diff) | |
download | freebsd-ports-gnome-8f5e4c12f10f9e1a13ab8f2788149ce3a13ac085.tar.gz freebsd-ports-gnome-8f5e4c12f10f9e1a13ab8f2788149ce3a13ac085.tar.zst freebsd-ports-gnome-8f5e4c12f10f9e1a13ab8f2788149ce3a13ac085.zip |
Apply a vendor fix to mod_wsgi ticket 197.
With newer Python version, mod_wsgi gives error messages like this:
[error] Exception KeyError: KeyError(139934492751712,) in <module
'threading' from '/usr/local/lib/python2.6/threading.pyc'> ignored
This is a backport for svn revision 1605.
PR: ports/148651
Approved by: maintainer
Diffstat (limited to 'www/mod_wsgi3')
-rw-r--r-- | www/mod_wsgi3/Makefile | 1 | ||||
-rw-r--r-- | www/mod_wsgi3/files/patch-mod_wsgi.c | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/www/mod_wsgi3/Makefile b/www/mod_wsgi3/Makefile index abbeba0ee505..c51409659392 100644 --- a/www/mod_wsgi3/Makefile +++ b/www/mod_wsgi3/Makefile @@ -7,6 +7,7 @@ PORTNAME= mod_wsgi PORTVERSION= 3.2 +PORTREVISION= 1 CATEGORIES= www python MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \ http://apt.douglasthrift.net/files/${PORTNAME}/ \ diff --git a/www/mod_wsgi3/files/patch-mod_wsgi.c b/www/mod_wsgi3/files/patch-mod_wsgi.c new file mode 100644 index 000000000000..d9c9992bbe99 --- /dev/null +++ b/www/mod_wsgi3/files/patch-mod_wsgi.c @@ -0,0 +1,29 @@ +--- ./mod_wsgi.c.orig 2010-03-09 01:48:50.000000000 -0800 ++++ ./mod_wsgi.c 2010-07-15 12:31:01.189153878 -0700 +@@ -5648,6 +5648,26 @@ + module = PyImport_ImportModule("atexit"); + Py_XDECREF(module); + ++ /* ++ * In Python 2.6.5 and Python 3.1.2 the shutdown of ++ * threading was moved back into Py_Finalize() for the main ++ * Python interpreter. Because we shutting down threading ++ * ourselves, the second call results in errors being logged ++ * when Py_Finalize() is called and the shutdown function ++ * called a second time. The errors don't indicate any real ++ * problem and the threading module ignores them anyway. ++ * Whether we are using Python with this changed behaviour ++ * can only be checked by looking at run time version. ++ * Rather than try and add a dynamic check, create a fake ++ * 'dummy_threading' module as the presence of that shuts up ++ * the messages. It doesn't matter that the rest of the ++ * shutdown function still runs as everything is already ++ * stopped so doesn't do anything. ++ */ ++ ++ if (!PyImport_AddModule("dummy_threading")) ++ PyErr_Clear(); ++ + Py_Finalize(); + + wsgi_python_initialized = 0; |