Assigned: (MODPYTHON-117) PythonImport that works for any
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Assigned: (MODPYTHON-117) PythonImport that works for any




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Assigned: (MODPYTHON-117) PythonImport that works for any  
Graham Dumpleton (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-11-06 01:45 AM

[ http://issues.apache.org/jira/brows...ON-117?page=all ]

Graham Dumpleton reassigned MODPYTHON-117:
------------------------------------------

Assign To: Graham Dumpleton

> PythonImport that works for any interpreter.
> --------------------------------------------
>
>          Key: MODPYTHON-117
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-117
>      Project: mod_python
>         Type: Wish
>   Components: core
>     Versions: 3.2.7
>     Reporter: Graham Dumpleton
>     Assignee: Graham Dumpleton

>
> Currently PythonImport requires that the name of the interpreter be explicitly nam
ed. If running lots of virtual hosts, where each is dynamically assigned their own i
nterpreter name automatically, it is a lot of work to have to specify PythonImport d
ire
ctives for all virtual host interpreters where a particular module needs to be loaded in all
 interpreters.
> Syntactically, it isn't hard to allow something like:
>   PythonImport moduleforallinterpreters
> or:
>   PythonImport moduleforallinterpreters *
> however the current location where such Python imports are done in mod_pyt
hon will not allow this.
> This is because such Python imports are done in the PythonChildInitHandler() funct
ion right after the child process is initialised. The code iterates through the list
 of imports and creates interpreters for the named interpreters and loads the module
s.
Where we want a module loaded into all modules, we will not actually know the names of all p
otential modules in advance at that point so can't do it.
> The logical spot is to to load a module common to all modules in get_inter
preter() when a request is first made for the interpreter. Thus, it may be p
ossible to move the module imports from PythonChildInitHandler() into get_in
terpreter().
> One issue that needs to be considered is that currently, having a PythonImport dir
ective means that any named interpreter is always created at child initialisation, e
ven if a request never arrives that is processed within the context of that interpre
ter
. It might also be worthwhile adding syntax which allows one to specify whet
her a PythonImport should be performed at the point of child initialisation,
 or only when a request comes in that requires that specific interpreter. To
 keep backward compatabilit
y, the default would be at child initialisation time.
> Not sure what would be a good syntax. The options would be 'child intialisation' a
nd 'interpreter initialisation'. How to express that????






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:25 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register