Missing header and footer when running with WSGI

37 views
Skip to first unread message

Vijay Varadan

unread,
Feb 13, 2016, 12:08:49 PM2/13/16
to Trac Users
I did a fresh install of trac in the following environment:

Ubuntu 14.04.3
python 2.7.,6
PostgreSQL 9.3.11
psycopg2 2.6.1
Genshi 0.7-3
Babel 1.3
setuptools 3.3

Everything works fine when I use tracd as follows (user and group are set to be the same as Apache):
tracd --port 8000 -r --group=www-data --user=www-data /var/wiki/funambulus_trac

I proceeded to using the trac wiki with Apache 2.4.7  WSGI configured as follows:

         Alias /funambulus/chrome/common /var/wiki/funambulus_trac/www/htdocs/common
         
Alias /funambulus/chrome/site /var/wiki/funambulus_trac/www/htdocs/site
         
<Directory "/var/wiki/funambulus_trac/www/htdocs">
                 
# For Apache 2.4
                 
<IfModule mod_authz_core.c>
                         
Require all granted
                 
</IfModule>
         </
Directory>


         
WSGIScriptAlias /funambulus /var/wiki/funambulus_trac/www/cgi-bin/trac.wsgi
         
<Directory /var/wiki/funambulus_trac/www/cgi-bin>
                 
Options -Indexes -MultiViews -SymLinksIfOwnerMatch
                 
AllowOverride All
                 
WSGIApplicationGroup %{GLOBAL}
                 
# For Apache 2.4
                 
<IfModule mod_authz_core.c>
                         
Require all granted
                 
</IfModule>
         </
Directory>



And the trac.wsgi file is the standard one created via trac-admin ... deploy

import os


def application(environ, start_request):
   
if not 'trac.env_parent_dir' in environ:
        environ
.setdefault('trac.env_path', '/var/wiki/funambulus_trac')
   
if 'PYTHON_EGG_CACHE' in environ:
        os
.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
   
elif 'trac.env_path' in environ:
        os
.environ['PYTHON_EGG_CACHE'] = \
            os
.path.join(environ['trac.env_path'], '.egg-cache')
   
elif 'trac.env_parent_dir' in environ:
        os
.environ['PYTHON_EGG_CACHE'] = \
            os
.path.join(environ['trac.env_parent_dir'], '.egg-cache')
   
from trac.web.main import dispatch_request
   
return dispatch_request(environ, start_request)



When I access trac through WSGI, the header and footer are missing everywhere. The site seems to work fine otherwise.


I've added TRAC_ADMIN temporarily to anonymous role to help with debugging, in case someone wants to take a look.


Does anyone have pointers as to where to start looking to resolve this? I've not done much web development with Python / WSGI, but since everything seems to be working fine without WSGI - I could use some pointers.


Thanks,

Vijay Varadan



RjOllos

unread,
Feb 13, 2016, 1:43:36 PM2/13/16
to Trac Users
I'm unsure what the issue it, but I can reproduce by putting a file name theme.html in $env/templates, with the following content:

<!DOCTYPE html

    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"

      xmlns:xi="http://www.w3.org/2001/XInclude"

      xmlns:py="http://genshi.edgewall.org/"

      xmlns:i18n="http://genshi.edgewall.org/i18n"

      py:strip="">


</html>

Continuing to investigate ...

- Ryan 

Dick Martin Shorter

unread,
Feb 13, 2016, 2:12:11 PM2/13/16
to trac-...@googlegroups.com
I'm not certain that it's a problem, but your Alias directives have an extra space in the filesystem names, which could result in many things not being found...

         Alias /funambulus/chrome/common /var/wiki/funambulus_trac/www/ htdocs/common
------------------------------------------------------------------------^

Regards,
DickMS

From: RjOllos <rjo...@gmail.com>
To: Trac Users <trac-...@googlegroups.com>
Sent: Saturday, February 13, 2016 10:43 AM
Subject: [Trac] Re: Missing header and footer when running with WSGI


        environ
.setdefault('trac.env_ path', '/var/wiki/funambulus_trac')

   
if 'PYTHON_EGG_CACHE' in environ:
        os
.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
   
elif 'trac.env_path' in environ:
        os
.environ['PYTHON_EGG_CACHE'] = \

            os
.path.join(environ['trac. env_path'], '.egg-cache')

   
elif 'trac.env_parent_dir' in environ:
        os
.environ['PYTHON_EGG_CACHE'] = \

            os
.path.join(environ['trac. env_parent_dir'], '.egg-cache')

   
from trac.web.main import dispatch_request
   
return dispatch_request(environ, start_request)



When I access trac through WSGI, the header and footer are missing everywhere. The site seems to work fine otherwise.


I've added TRAC_ADMIN temporarily to anonymous role to help with debugging, in case someone wants to take a look.

Does anyone have pointers as to where to start looking to resolve this? I've not done much web development with Python / WSGI, but since everything seems to be working fine without WSGI - I could use some pointers.

Thanks,
Vijay Varadan


I'm unsure what the issue it, but I can reproduce by putting a file name theme.html in $env/templates, with the following content:

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      py:strip="">

</html>

Continuing to investigate ...

- Ryan 
--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.


Dick Martin Shorter

unread,
Feb 13, 2016, 2:16:26 PM2/13/16
to trac-...@googlegroups.com
And, looking further, it would appear that there is that same space in almost every usage.... and only one of them is quoted, if you actually for some reason really wanted the space there...



From: 'Dick Martin Shorter' via Trac Users <trac-...@googlegroups.com>
To: "trac-...@googlegroups.com" <trac-...@googlegroups.com>
Sent: Saturday, February 13, 2016 11:12 AM
Subject: Re: [Trac] Re: Missing header and footer when running with WSGI

Vijay Varadan

unread,
Feb 13, 2016, 2:52:07 PM2/13/16
to Trac Users, dmartin...@yahoo.com
Hey Dick,

Actually there's no space in the Apache .conf file or in my original post. I suspect they may have gotten inserted as a result of formatting the section(s) for syntax coloring to make it easier to read. 

Thanks.
-Vijay

RjOllos

unread,
Feb 13, 2016, 3:56:26 PM2/13/16
to Trac Users


On Saturday, February 13, 2016 at 9:08:49 AM UTC-8, Vijay Varadan wrote:
I think the documentation for Apache with mod_wsgi needs to be improved. Could you please try starting from the following?

Define hostname myhost.com
Define envname proj-1.0
Define sitepath /Users/rjollos/Documents/Workspace/trac-dev
Define envpath ${sitepath}/${envname}

WSGIDaemonProcess ${hostname} python-path=${sitepath}/pve/lib/python2.7/site-packages:${sitepath}/pve/bin maximum-requests=1000 processes=2 threads=25 inactivity-timeout=120

<VirtualHost *:80>
ServerName ${hostname}
DocumentRoot ${envpath}/www

WSGIScriptAlias /${envname} ${envpath}/www/cgi-bin/trac.wsgi
<Directory ${envpath}/www/cgi-bin>
WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup ${hostname}
Require all granted
</Directory>

Alias ${envname}/chrome ${envpath}/www/htdocs

<Directory ${envpath}/www>
Options -Indexes
Require all granted
</Directory>

<Directory ${envpath}/files/attachments>
Options -Indexes
Require all granted
</Directory>

</VirtualHost> 


You'll need to set hostname, envname and sitepath, and possibly modify the port 80 -> 8000.

- Ryan

RjOllos

unread,
Feb 13, 2016, 4:03:04 PM2/13/16
to Trac Users
One additional change was needed to run on a port other than 80 with a default apache.conf (or httpd.conf, depending on your platform). I added a port variable to be set during configuration. Also note, with this configuration the environment name is mapped directly to the server path, which is different than how you had configured Apache. For example, /var/wiki/funambulus would be accessed at ${hostname}:${port}/funambulus.

-------------------------

Define hostname myhost.com
Define port 8080
Define envname proj-1.0
Define sitepath /Users/rjollos/Documents/Workspace/trac-dev
Define envpath ${sitepath}/${envname}

Listen ${port}

WSGIDaemonProcess ${hostname} python-path=${sitepath}/pve/lib/python2.7/site-packages:${sitepath}/pve/bin maximum-requests=1000 processes=2 threads=25 inactivity-timeout=120

<VirtualHost *:${port}>
ServerName ${hostname}
DocumentRoot ${envpath}/www

WSGIScriptAlias /${envname} ${envpath}/www/cgi-bin/trac.wsgi
<Directory ${envpath}/www/cgi-bin>
WSGIApplicationGroup %{GLOBAL}
WSGIProcessGroup ${hostname}
Require all granted
</Directory>

Alias ${envname}/chrome ${envpath}/www/htdocs

<Directory ${envpath}/www>
Options -Indexes
Require all granted
</Directory>

<Directory ${envpath}/files/attachments>
Options -Indexes
Require all granted
</Directory>

</VirtualHost>


-------------------------

[EOM]

 

Vijay Varadan

unread,
Feb 13, 2016, 4:35:24 PM2/13/16
to Trac Users
Hey Ryan,

I added the WSGIDaemonProcess line, modifying the python-path to work for my system. It looks like this:

WSGIDaemonProcess funambulus python-path=/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages maximum-requests=1000 processes=2 threads=25 inactivity-timeout=120

I left the port at default.

But, it's still the same. No header or footer on any page.

Thanks,
-Vijay

Ryan Ollos

unread,
Feb 13, 2016, 4:55:05 PM2/13/16
to trac-...@googlegroups.com

From: Vijay Varadan
Sent: Saturday, February 13, 1:35 PM


Subject: [Trac] Re: Missing header and footer when running with WSGI

To: Trac Users

Hey Ryan,

I added the WSGIDaemonProcess line, modifying the python-path to work for my system. It looks like this:

WSGIDaemonProcess funambulus python-path=/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages maximum-requests=1000 processes=2 threads=25 inactivity-timeout=120

I left the port at default.

But, it's still the same. No header or footer



Good point about the python path needing to be changed.  Did you try to use the virtualhost  configuration I provided,  or did you just edit yours?  I don't know what might be wrong with your virtualhost  configuration,  but the one I provided at least has been tested.

Make sure you have nothing in your environment templates directory.

Vijay Varadan

unread,
Feb 13, 2016, 6:01:46 PM2/13/16
to Trac Users
Hey Ryan,

>>Make sure you have nothing in your environment templates directory.
The only file that's in the environment templates directory (/var/wiki/funambulus_trac/templates) is site.html.sample

Here's my VirtualHost config (note that I have it listening on port 8080 now):

 <VirtualHost vijay.tech:8080>
         ServerName vijay.tech
         ServerAlias www.vijay.tech
         DocumentRoot /var/www/tech/vijay/www/public_html
         Options -Indexes -MultiViews
         
<Directory "/var/www/tech/vijay/www/public_html/">
                 Options -Indexes -MultiViews +SymLinksIfOwnerMatch
                 AllowOverride All
                 Order allow,deny
                 Allow from all
         
</Directory>



         Alias /funambulus/chrome/common /var/wiki/funambulus_trac/www/htdocs/common
         Alias /funambulus/chrome/site /var/wiki/funambulus_trac/www/htdocs/site
         
<Directory "/var/wiki/funambulus_trac/www/htdocs">
                 # For Apache 2.4
                 
<IfModule mod_authz_core.c>
                         Require all granted
                 
</IfModule>
         
</Directory>



         WSGIDaemonProcess funambulus8080
python-path=/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages maximum-requests=1000 processes=2 threads=25 inactivity-timeout=120
         WSGIScriptAlias /funambulus /var/wiki/funambulus_trac/www/cgi-bin/trac.wsgi
         
<Directory /var/wiki/funambulus_trac/www/cgi-bin>

                 Options -Indexes -MultiViews -SymLinksIfOwnerMatch
                 AllowOverride All
                 WSGIApplicationGroup %{GLOBAL}
                 # For Apache 2.4
                 
<IfModule mod_authz_core.c>
                         Require all granted
                 
</IfModule>
         
</Directory>

 
</VirtualHost>


Thanks,
-Vijay

Vijay Varadan

unread,
Feb 13, 2016, 6:16:47 PM2/13/16
to Trac Users
Hey Ryan,

I'm also running tracd on port 8000 and you should be able to access it via http://vijay.tech:8000/funambulus_trac in case you'd like to verify that it _is_ actually working perfectly via tracd.

Thanks,
-Vijay

Ryan Ollos

unread,
Feb 13, 2016, 11:34:14 PM2/13/16
to Trac Users
You are mixing Apache 2.2 and 2.4 access control directives:

Seems like you have a lot of htaccess directives, and I'm unsure of why you would need those.

I'm also unsure of the consequences of defining WSGIDaemonProcess within the VirtualHost and omitting WSGIProcessGroup. Maybe it's fine.

I can't easily test the config you sent because all the paths are hard-coded. The intention of the one I sent you is that it's a working configuration based on several sites that I'm running, and it's easy to change a few paths to make it fit the paths on your filesystem.

- Ryan

Vijay Varadan

unread,
Feb 14, 2016, 5:16:45 AM2/14/16
to Trac Users, ryan.j...@gmail.com
I'm also unsure of the consequences of defining WSGIDaemonProcess within the VirtualHost and omitting WSGIProcessGroup. Maybe it's fine.
I've used it with Bloodhound instances and you can either define the WSGIDaemonProcess outside VirtualHost and use WSGIProcessGroup or you can directly use WSGIDaemonProcess within VirtualHost without the WSGIDaemonProcess directive.

That said, I changed it to the way you've done it, but once again, still no headers or footers. I've also reduced the directives to the minimum. As for the hard-coded paths, those are the default paths where python packages are installed on Ubuntu. I don't run an virtual environment for trac.

Here's my changed configuration:

        WSGIDaemonProcess funambulus8080 python-path=/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages maximum-requests=1000 processes=2 threads=25 inactivity-timeout=120
<VirtualHost vijay.tech:8080>
       
ServerName vijay.tech
       
ServerAlias www.vijay.tech
       
DocumentRoot /var/www/tech/vijay/www/public_html
       
Options -Indexes -MultiViews


       
WSGIScriptAlias /funambulus /var/wiki/funambulus_trac/www/cgi-bin/trac.wsgi
       
<Directory /var/wiki/funambulus_trac/www/cgi-bin>
               
WSGIProcessGroup funambulus8080
               
WSGIApplicationGroup %{GLOBAL}

               
# For Apache 2.4
               
<IfModule mod_authz_core.c>
                       
Require all granted
               
</IfModule>
        </
Directory>
</VirtualHost>


-Vijay

Vijay Varadan

unread,
Feb 14, 2016, 5:24:00 AM2/14/16
to trac-...@googlegroups.com, ryan.j...@gmail.com

I'm also unsure of the consequences of defining WSGIDaemonProcess within the VirtualHost and omitting WSGIProcessGroup. Maybe it's fine.

I've used it with Bloodhound instances and you can either define the WSGIDaemonProcess outside VirtualHost and use WSGIProcessGroup or you can directly use WSGIDaemonProcess within VirtualHost without the WSGIDaemonProcess WSGIProcessGroup directive.

--
You received this message because you are subscribed to a topic in the Google Groups "Trac Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trac-users/AQpVWTXVwsg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trac-users+...@googlegroups.com.

RjOllos

unread,
Feb 14, 2016, 2:51:30 PM2/14/16
to Trac Users, ryan.j...@gmail.com


On Sunday, February 14, 2016 at 2:24:00 AM UTC-8, Vijay Varadan wrote:

I'm also unsure of the consequences of defining WSGIDaemonProcess within the VirtualHost and omitting WSGIProcessGroup. Maybe it's fine.

I've used it with Bloodhound instances and you can either define the WSGIDaemonProcess outside VirtualHost and use WSGIProcessGroup or you can directly use WSGIDaemonProcess within VirtualHost without the WSGIDaemonProcess WSGIProcessGroup directive.


I don't have any other ideas, except maybe something in your global server configuration (/etc/apache2/apache.conf). It can sometimes be useful to check the virtualhost configuration using "apache2ctl -S":

The different behavior running Apache vs TracStandalone certainly points to the issue being an Apache configuration problem. However, the only way I can imagine the behavior occurring is by manipulation of the theme.html template.

- Ryan 

RjOllos

unread,
Feb 14, 2016, 3:22:59 PM2/14/16
to Trac Users


On Saturday, February 13, 2016 at 9:08:49 AM UTC-8, Vijay Varadan wrote:
I did a fresh install of trac in the following environment:

Ubuntu 14.04.3
python 2.7.,6
PostgreSQL 9.3.11
psycopg2 2.6.1
Genshi 0.7-3
Babel 1.3
setuptools 3.3

Does "fresh install" mean that this is a new virtual machine that is guaranteed to have no other modifications other than the changes you've made in setting up Trac? 

Vijay Varadan

unread,
Feb 14, 2016, 4:43:17 PM2/14/16
to trac-...@googlegroups.com

Hey Ryan,

 

Does "fresh install" mean that this is a new virtual machine that is guaranteed to have no other modifications other than the changes you've made in setting up Trac? 

No, it’s an existing server where I primarily run Wordpress instances. But this is the first python/WSGI site I’m running.

 

That said, I spent the better part of today setting up a new virtual machine with the same configuration as the one that has missing headers & footers. Everything works fine on the new server.

 

I did directory comparisons of trac and genshi  between the two machines to ensure nothing was messed up. Things match exactly, including ownership and permissions. I tried debugging and single stepping through the code using “import pid; pid.set_trace()”, but that only resulted in a BdbQuit error [ sorry I’ve never done python web debugging before ].

 

I guess it’s not an issue with Trac / Genshi, so much as it is with that specific server. I’m not sure how to debug this. If you have any pointers, I’d appreciate it.

 

Thanks.

-Vijay

 

 

From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] On Behalf Of RjOllos
Sent: Monday, February 15, 2016 1:53 AM
To: Trac Users <trac-...@googlegroups.com>
Subject: [Trac] Re: Missing header and footer when running with WSGI

 

--

Vijay Varadan

unread,
Feb 14, 2016, 4:43:26 PM2/14/16
to trac-...@googlegroups.com, ryan.j...@gmail.com

Hey Ryan,

 

I checked the VirtualHost config using apache2ctl -S as you suggested. Things look normal.

 

Thanks,

-Vijay

 

From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] On Behalf Of RjOllos


Sent: Monday, February 15, 2016 1:21 AM
To: Trac Users <trac-...@googlegroups.com>

--

Ryan Ollos

unread,
Feb 14, 2016, 4:45:54 PM2/14/16
to Trac Users
On Sun, Feb 14, 2016 at 1:44 PM, Vijay Varadan <vi...@axham.com> wrote:

Hey Ryan,

 

Does "fresh install" mean that this is a new virtual machine that is guaranteed to have no other modifications other than the changes you've made in setting up Trac? 

No, it’s an existing server where I primarily run Wordpress instances. But this is the first python/WSGI site I’m running.

 

That said, I spent the better part of today setting up a new virtual machine with the same configuration as the one that has missing headers & footers. Everything works fine on the new server.

 

I did directory comparisons of trac and genshi  between the two machines to ensure nothing was messed up. Things match exactly, including ownership and permissions. I tried debugging and single stepping through the code using “import pid; pid.set_trace()”, but that only resulted in a BdbQuit error [ sorry I’ve never done python web debugging before ].

 

I guess it’s not an issue with Trac / Genshi, so much as it is with that specific server. I’m not sure how to debug this. If you have any pointers, I’d appreciate it.

 

Thanks.

-Vijay


 I might look at differences between the /etc/apache2 directories, particularly /etc/apache2/apache.conf.

- Ryan 

Vijay Varadan

unread,
Feb 14, 2016, 5:08:54 PM2/14/16
to trac-...@googlegroups.com

Hey Ryan,

 

Nailed it! :-D

 

The issue was with the wsgi.conf file in /etc/apache2/mods-enabled –  WSGIPythonOptimize 2  was set on the server that rendered pages without headers / footers, but was  WSGIPythonOptimize 0  on the 2 servers (including the new built-from-scratch virtual machine) where Genshi was working.

 

It looks like the Trac / Genshi has an issue with optimizations turned on. The comment for this setting indicates that this might be the case:

 

    #WSGIPythonOptimize: Enables basic Python optimisation features.

    #

    #Sets the level of Python compiler optimisations. The default is '0'

    #which means no optimisations are applied.

    #Setting the optimisation level to '1' or above will have the effect

    #of enabling basic Python optimisations and changes the filename

    #extension for compiled (bytecode) files from .pyc to .pyo.

    #When the optimisation level is set to '2', doc strings will not be

    #generated and retained. This will result in a smaller memory footprint,

    #but may cause some Python packages which interrogate doc strings in some

    #way to fail.

 

I changed the setting to 0 and headers and footers began rendering once again.

 

Thanks for staying with me through this. Appreciate your patience a ton.

 

Should I edit the wiki and put in a note to indicate that when running Trac under WSGI, python optimizations should be turned off?

 

Cheers,

Vijay

 

 

From: trac-...@googlegroups.com [mailto:trac-...@googlegroups.com] On Behalf Of Ryan Ollos


Sent: Monday, February 15, 2016 3:16 AM
To: Trac Users <trac-...@googlegroups.com>

--

Ryan Ollos

unread,
Feb 14, 2016, 5:24:31 PM2/14/16
to Trac Users
On Sun, Feb 14, 2016 at 2:10 PM, Vijay Varadan <vi...@axham.com> wrote:

Hey Ryan,

 

Nailed it! :-D

 

The issue was with the wsgi.conf file in /etc/apache2/mods-enabled –  WSGIPythonOptimize 2  was set on the server that rendered pages without headers / footers, but was  WSGIPythonOptimize 0  on the 2 servers (including the new built-from-scratch virtual machine) where Genshi was working.

 

It looks like the Trac / Genshi has an issue with optimizations turned on. The comment for this setting indicates that this might be the case:

 

    #WSGIPythonOptimize: Enables basic Python optimisation features.

    #

    #Sets the level of Python compiler optimisations. The default is '0'

    #which means no optimisations are applied.

    #Setting the optimisation level to '1' or above will have the effect

    #of enabling basic Python optimisations and changes the filename

    #extension for compiled (bytecode) files from .pyc to .pyo.

    #When the optimisation level is set to '2', doc strings will not be

    #generated and retained. This will result in a smaller memory footprint,

    #but may cause some Python packages which interrogate doc strings in some

    #way to fail.

 

I changed the setting to 0 and headers and footers began rendering once again.

 

Thanks for staying with me through this. Appreciate your patience a ton.

 

Should I edit the wiki and put in a note to indicate that when running Trac under WSGI, python optimizations should be turned off?

 

Cheers,

Vijay


Great find! Yes, please do edit the page to add your findings.

I've checked all the servers that I manage which use mod_wsgi and WSGIPythonOptimize has the default value of 0.

It would be interesting to know if the pages render correctly wth WSGIPythonOptimize = 1. Maybe we just need to alert users against WSGIPythonOptimize = 2.

However, there may be another reason to avoid using WSGIPythonOptimize = 1, which is #12004. I am not sure yet whether WSGIPythonOptimize = 1 has the same effect as -o, but it does sound like it's the case.

- Ryan

Vijay Varadan

unread,
Feb 14, 2016, 5:30:36 PM2/14/16
to Trac Users, ryan.j...@gmail.com
Hey Ryan,

I'll add the information to the wiki in a bit.

And to answer your question about WSGIPythonOptimize 1  - nope, I already tested it and it doesn't work either. The only value that works is 0.

I feel I ought to file an issue to track this. That way someone can look into it and determine that it's not a bug and desired behavior - If it is not desired behavior, then it gets fixed, if so, then we have an entry in the system indicating that it's expected behavior. Your thoughts?


Thanks,
-Vijay

Ryan Ollos

unread,
Feb 14, 2016, 5:41:41 PM2/14/16
to Vijay Varadan, Trac Users
On Sun, Feb 14, 2016 at 2:30 PM, Vijay Varadan <vi...@axham.com> wrote:
Hey Ryan,

I'll add the information to the wiki in a bit.

And to answer your question about WSGIPythonOptimize 1  - nope, I already tested it and it doesn't work either. The only value that works is 0.

I feel I ought to file an issue to track this. That way someone can look into it and determine that it's not a bug and desired behavior - If it is not desired behavior, then it gets fixed, if so, then we have an entry in the system indicating that it's expected behavior. Your thoughts?


Thanks,
-Vijay

It looks like there is a ticket for the issue:

The issue is documented for ModPython:

and for WikiMacros:

So it's probably sufficient to just add an entry to TracModWSGI that is similar to the entry on TracModPython.

- Ryan

Vijay Varadan

unread,
Feb 15, 2016, 6:05:21 AM2/15/16
to Trac Users, ryan.j...@gmail.com
I've added the information to the TracModWSGI wiki page.

Once again, thanks for everything.

Cheers,
Vijay Varadan

RjOllos

unread,
Feb 15, 2016, 2:32:11 PM2/15/16
to Trac Users, ryan.j...@gmail.com


On Monday, February 15, 2016 at 3:05:21 AM UTC-8, Vijay Varadan wrote:
I've added the information to the TracModWSGI wiki page.

Once again, thanks for everything.

Cheers,
Vijay Varadan

It would be interesting to see if we can retrieve the Python optimization level and log a warning. Perhaps it's possible to display the optimization level on the About Trac page. I might investigate further someday.

- Ryan

RjOllos

unread,
Feb 15, 2016, 3:49:37 PM2/15/16
to Trac Users, ryan.j...@gmail.com


On Monday, February 15, 2016 at 11:32:11 AM UTC-8, RjOllos wrote: 
It would be interesting to see if we can retrieve the Python optimization level and log a warning. Perhaps it's possible to display the optimization level on the About Trac page. I might investigate further someday.

- Ryan

After some additional investigation, I raised a ticket for the issue:
Reply all
Reply to author
Forward
0 new messages