You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2006/05/01 13:49:04 UTC

svn commit: r398578 - in /httpd/mod_python/trunk: lib/python/mod_python/__init__.py lib/python/mod_python/apache.py lib/python/mod_python/importer.py src/include/mpversion.h

Author: grahamd
Date: Mon May  1 04:49:03 2006
New Revision: 398578

URL: http://svn.apache.org/viewcvs?rev=398578&view=rev
Log:
Ensure that when using the new importer, that imports from SSI code look in
same directory as the file being expanded or location that request matches
as appropriate. (MODPYTHON-156)

Modified:
    httpd/mod_python/trunk/lib/python/mod_python/__init__.py
    httpd/mod_python/trunk/lib/python/mod_python/apache.py
    httpd/mod_python/trunk/lib/python/mod_python/importer.py
    httpd/mod_python/trunk/src/include/mpversion.h

Modified: httpd/mod_python/trunk/lib/python/mod_python/__init__.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/__init__.py?rev=398578&r1=398577&r2=398578&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/__init__.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/__init__.py Mon May  1 04:49:03 2006
@@ -20,5 +20,5 @@
 __all__ = ["apache", "cgihandler", "psp",
            "publisher", "util", "python22"]
 
-version = "3.3.0-dev-20060430"
+version = "3.3.0-dev-20060501"
 

Modified: httpd/mod_python/trunk/lib/python/mod_python/apache.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/apache.py?rev=398578&r1=398577&r2=398578&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/apache.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/apache.py Mon May  1 04:49:03 2006
@@ -439,6 +439,8 @@
 
             filter.req.ssi_globals["filter"] = filter
 
+            filter.req.ssi_globals["__file__"] = filter.req.filename
+
             code = code.rstrip()
 
             if tag == 'eval':

Modified: httpd/mod_python/trunk/lib/python/mod_python/importer.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/importer.py?rev=398578&r1=398577&r2=398578&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/importer.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/importer.py Mon May  1 04:49:03 2006
@@ -1365,6 +1365,19 @@
 
             filter.req.ssi_globals["filter"] = filter
 
+            class _InstanceInfo:
+
+                def __init__(self, label, file, cache):
+                    self.label = label
+                    self.file = file
+                    self.cache = cache
+                    self.children = {}
+                    self.path = []
+
+            filter.req.ssi_globals["__file__"] = filter.req.filename
+            filter.req.ssi_globals["__info__"] = _InstanceInfo(
+                    None, filter.req.filename, None)
+
             code = code.rstrip()
 
             if tag == 'eval':

Modified: httpd/mod_python/trunk/src/include/mpversion.h
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/include/mpversion.h?rev=398578&r1=398577&r2=398578&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/include/mpversion.h (original)
+++ httpd/mod_python/trunk/src/include/mpversion.h Mon May  1 04:49:03 2006
@@ -1,5 +1,5 @@
 #define MPV_MAJOR 3
 #define MPV_MINOR 3
 #define MPV_PATCH 0
-#define MPV_BUILD 20060430
-#define MPV_STRING "3.3.0-dev-20060430"
+#define MPV_BUILD 20060501
+#define MPV_STRING "3.3.0-dev-20060501"