IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Actualités Discussion :

Le projet mod_python est "officiellement mort"

  1. #1
    Expert éminent sénior
    Avatar de Katleen Erna
    Profil pro
    Inscrit en
    Juillet 2009
    Messages
    1 547
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Juillet 2009
    Messages : 1 547
    Points : 76 188
    Points
    76 188
    Par défaut Le projet mod_python est "officiellement mort"
    Le projet mod_python est "officiellement mort", le module Apache aidant à la programmation d'applications Web en Python n'est plus

    Le projet mod_python consistait en un module Apache permettant d'intégrer un interpréteur Python, et de programmer des applications Web en Python.

    C'était l'équivalent de mod_php ou mod_perl (qui intègrent respectivement un interpréteur PHP et Perl dans le serveur Apache).

    Beaucoup d'applications et de frameworks Web écrits en Python supportent mod_python.

    Malheureusement, ce projet vient d'être déclaré "officiellement mort" par son responsable (un développeur et consultant indépendant, australien). Lors de la dernière assemblée de la Fondation Apache (le 16 Juin 2010), il a été décidé à l'unanimité de cesser le projet Quetzalcoatl.

    Comme ce dernier était en quelque sorte le dossier parent de mod_python, il en a signé l'arrêt de mort ; puisque son abandon signifie l'abandon de ses composants, dont mod_python.

    Graham Dumpleton explique plus en détail sur son blog, dans un billet daté du 27 Mai, les raisons de cet échec (majoritairement : l'inactivité). Mais aussi, plus globalement, l'historique et le futur de Python. Enfin, il prodigue des conseils pour cesser l'utilisation de mod_python ; en présentant des alternatives.

    Voici l'intégralité de son message :

    The mod_python project last had a release February 2007. There has more or less been no developer activity since. Under the rules of the Apache Software Foundation if a project becomes inactive then it can be moved into what is called the Apache Attic. Come the next meeting of the ASF board a proposed resolution will be put up to dissolve the Quetzalcoatl project management committee and projects which it overseas, namely mod_python. Thus, in some respect one can say that mod_python will be officially dead.

    What will this really mean. Well, no more development on mod_python, but then that isn't happening now. Linux distributions will likely still carry the package, but they will need to apply any changes themselves to ensure that it continues to work for newer versions of Apache. This actually is already being done as a bug in mod_python was exposed by some changes to the Apache runtime library and since no mod_python release has been made since then, only option was for distributions to patch it themselves.

    I suspect though that this patching by distributions will only extend to Apache 2.2.X as Apache 2.4 changes the internal APIs enough that getting mod_python to compile will need more significant changes than a minor patch. You also will never see a version of mod_python for Python 3.X as that is going to require a radical rewrite.

    For platforms like MacOS X where the last release of mod_python doesn't build properly, the only option will be to checkout mod_python source code from the subversion repository as that incorporates a fix for those issues, although it has since been shown to not be a complete fix and so you may still have some problems. In other words, the subversion repository will still exist, but it will be made read only and the location may potentially move.

    What options exist if you want to move away from mod_python?

    If you are only using mod_python as a means of hosting within Apache a distinct Python web framework or application and it supports the WSGI interface, then the obvious candidate is to move to mod_wsgi instead.

    If you are using mod_python to implement custom access, authentication or authorization handlers, then you may also be able to get away with using mod_wsgi. You may have to make compromises though as mod_wsgi doesn't currently allow you to write full blown Apache style handlers and instead only implements the Apache authentication and authorization provider interfaces. This actually makes it easier to do most things, but you loose the ability to do some more complicated stuff which depends on using different error status values or custom error pages. You can partly get away with using ErrorDocument directive to return custom error pages, but not always.

    Although proper support for Apache style handlers could be added to mod_wsgi, and a lot of work has been done in that direction already through the implementation of SWIG bindings for Apache, whether the remaining work to allow the actual hooking of handlers into mod_wsgi will be done will really depend on interest in it. Up till now, there hasn't been sufficient interest to justify doing the final bit of work and there has actually been some resistance put up to the idea of extending mod_wsgi too far beyond the core goal of providing WSGI hosting.

    If you are not using the basic handler mechanisms of mod_python and are instead using the CGI handler, the publisher handler or PSP handler, then there aren't really any options at this point except for rewriting your application on top of a WSGI framework. If you have to do such a rewrite, but like the low level that one works at when using mod_python, then would strongly recommend you perhaps look at Werkzeug andFlask.

    If you are using mod_python input or output filters there simply isn't any replacement. Frankly though I always thought that writing input or output filters in mod_python was a really bad idea. Yeah it may work, but it wouldn't exactly be efficient. You would be much better writing a proper Apache module in C to do what is required, certainly if performance is an issue.

    Finally, the ability to use Python code with Apache server side include mechanism also has no real equivalent. But then, not sure anyone ever actually used that feature anyway. Something similar could possibly be implemented in mod_wsgi but not sure there would really be a point. If you are only using ability to include Python code, you would be much better off using a proper templating system that works with a WSGI framework.

    So, the writing is on the wall so to speak and if you are using mod_python, you really should be starting to plan how to move away from it as eventually it will likely not be an option you can use if you want to keep up to date with Apache and/or Python.

    Could it yet be saved by a white knight. Well, yes it could as the Apache Attic does allow projects to be resurrected or forked with it then being maintained outside of the ASF. If someone does do the latter though, you would need to be mindful of the name as the ASF in some respects has rights over the mod_python name. As such, you would likely need to rename the project when you take it over.

    If you fork mod_python, you would also want to think about capturing all the details of the significant number of still open bug reports for mod_python in its issue tracker, as am not sure what will happen to that and whether it will be made read only or whether it will be completely closed down.

    Anyway, will be interesting times ahead. I should point out though that according to Google trends(currently borked), searches on WSGI finally overtook those for mod_python recently. Searches for mod_wsgi haven't yet, but not far off occuring. It is also the common belief that WSGI is the way to go for Python web applications now, so perhaps it is simply time to just move on from mod_python. If we could only just get newbies, who even now keep using mod_python even though better options exist, to understand this, then maybe it can finally be left to die in peace.
    Source : L'annonce de l'abandon de mod_python par Graham Dumpleton

  2. #2
    Membre habitué Avatar de TSalm
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    361
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 361
    Points : 177
    Points
    177
    Par défaut
    Une nuance est placée sur le site officiel :
    Currently mod_python is not under active development. This does not mean that it is "dead" as some people have claimed. It smiply means that the code and the project are mature enough when very little is required to maintain it.

  3. #3
    Inactif  
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    215
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 215
    Points : 0
    Points
    0
    Par défaut
    Je sais pas, j'ai jamais acrocher avec Python et sa syntaxe mais a vrai dire ça serait bien on aurait autre chose que du php partout.

  4. #4
    Membre habitué Avatar de TSalm
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    361
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 361
    Points : 177
    Points
    177
    Par défaut
    Ce n'est pas le langage qui est remis en cause, mais mod_python, qui est une extension à apache.
    Je l'ai un peu expérimenté. C'est un plutôt intéressant.
    Il y a 3 modes (handlers) différents :
    - CGI, qui permet d'appeler directement un script Python avec son chemin
    - Publisher, propose une architecture différente et pas inintéressante puisque qu'il dirige vers une fonction spécifique d'un script centralisé(http://monadresse.com/monscript.py/mafonction). C'est aussi beaucoup plus rapide que le handler CGI.
    - PSP, où tout est centralisé dans la fonction "handler" d'un script. C'est à script de parser le reste de la requête et de gérer ce qu'il retourne. Mega rapide de traitement, il permet des choses très spéciales puisqu'on peut placer ce qu'on veut dans la requête. Mais c'est une vue de plus bas niveau donc un peu plus complexe à gérer...

    Pour ceux qui veulent se faire une idée, la doc officielle est à lire :
    http://www.modpython.org/live/current/doc-html/

    A+
    -TSalm

  5. #5
    Inactif  
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    215
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2006
    Messages : 215
    Points : 0
    Points
    0
    Par défaut
    Tres dommage que ce projet ne soit pas actif a l'heure actuelle.

  6. #6
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Décembre 2002
    Messages
    46
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Décembre 2002
    Messages : 46
    Points : 37
    Points
    37
    Par défaut
    Moi qui pensais sérieusement me mettre au développement web en Python, voilà qui me coupe l'herbe sous le pied...

  7. #7
    Rédacteur/Modérateur

    Avatar de gorgonite
    Homme Profil pro
    Ingénieur d'études
    Inscrit en
    Décembre 2005
    Messages
    10 322
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'études
    Secteur : Transports

    Informations forums :
    Inscription : Décembre 2005
    Messages : 10 322
    Points : 18 679
    Points
    18 679
    Par défaut
    bof... regardes mod_wsgi sous Apache par exemple
    Evitez les MP pour les questions techniques... il y a des forums
    Contributions sur DVP : Mes Tutos | Mon Blog

Discussions similaires

  1. Windows XP est officiellement mort
    Par Hinault Romaric dans le forum Windows XP
    Réponses: 29
    Dernier message: 29/04/2014, 10h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo