[modwsgi] Re: Mod_wsgi

2008-10-02 Thread Graham Dumpleton
We're using mod_wsgi for some of our back-end components that utilize Pylons. I'm emailing today in the hopes that I could get a few tips on configuring this apache module. Essentially, we're using Python 2.5 with the latest mod_wsgi (and the latest apache), under a RHEL 5 configuration.

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-10-02 Thread Toshio Kuratomi
On Oct 1, 12:41 am, Toshio Kuratomi [EMAIL PROTECTED] wrote: Thanks Graham! On Sep 30, 11:45 pm, Graham Dumpleton [EMAIL PROTECTED] wrote: For Python 3.0, if I use a URL:   /wsgi/scripts/echo3000.py/%E2%82%AC.html in Safari, where:   /wsgi/scripts/echo3000.py just echos back

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-10-01 Thread Toshio Kuratomi
On Sep 30, 4:32 am, Clodoaldo Pinto Neto [EMAIL PROTECTED] wrote: I tested that url with Firefox and Opera in Linux utf-8 and what happens is that Firefox does what Brian says. But testing Firefox in Windows XP it substitutes € for %80 and IE6 changes € to %e2%82%ac. You have to look at

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-10-01 Thread Graham Dumpleton
2008/10/1 Toshio Kuratomi [EMAIL PROTECTED]: On Sep 30, 4:32 am, Clodoaldo Pinto Neto [EMAIL PROTECTED] wrote: I tested that url with Firefox and Opera in Linux utf-8 and what happens is that Firefox does what Brian says. But testing Firefox in Windows XP it substitutes € for %80 and IE6

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-10-01 Thread Graham Dumpleton
2008/10/1 Toshio Kuratomi [EMAIL PROTECTED]: Thanks Graham! On Sep 30, 11:45 pm, Graham Dumpleton [EMAIL PROTECTED] wrote: 2008/10/1 Toshio Kuratomi [EMAIL PROTECTED]: Can some clearly just tell me what you want me to test. For Python 3.0, if I use a URL:

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Toshio Kuratomi
On Sep 29, 3:24 pm, Brian Smith [EMAIL PROTECTED] wrote: Toshio Kuratomi wrote: Graham Dumpleton wrote: As to the HTTP request headers, the RFCs say they are effectively latin-1. Thus, all HTTP_? variables in WSGI environ can only be processed as latin-1 when converting toUnicode.

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Toshio Kuratomi
On Sep 29, 4:33 pm, Graham Dumpleton [EMAIL PROTECTED] wrote: 2008/9/30 Toshio Kuratomi [EMAIL PROTECTED]: For response headers and content, the application can either generate bytes and thus control the encoding, or it will fallback to trying to convert it as latin-1

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Toshio Kuratomi
On Sep 29, 4:38 pm, Graham Dumpleton [EMAIL PROTECTED] wrote: As to this whole discussion, as much as it is interesting there is nothing I can do about it. It really needs to be brought up on the Python WEB-SIG where I originally raised the issue of Python 3.0 support for WSGI. I can only

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Graham Dumpleton
2008/9/30 Toshio Kuratomi [EMAIL PROTECTED]: On Sep 29, 4:33 pm, Graham Dumpleton [EMAIL PROTECTED] wrote: 2008/9/30 Toshio Kuratomi [EMAIL PROTECTED]: For response headers and content, the application can either generate bytes and thus control the encoding, or it will fallback to

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Graham Dumpleton
Can we stop with the mod_wsgi should do this or mod_wsgi should do that. The Apache/mod_wsgi module is just one implementation of the WSGI specification. You need when talking about this to look at the bigger picture and what other implementations exist, plus how they all work and interact with

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Graham Dumpleton
The BaseHTTPRequestHandler in http.server of Python 3.0 also only makes headers available as Unicode (latin-1). headers = [] while True: line = self.rfile.readline() headers.append(line) if line in (b'\r\n', b'\n', b''): break

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Clodoaldo Pinto Neto
2008/9/30 Toshio Kuratomi [EMAIL PROTECTED]: On Sep 29, 3:24 pm, Brian Smith [EMAIL PROTECTED] wrote: Toshio Kuratomi wrote: Graham Dumpleton wrote: As to the HTTP request headers, the RFCs say they are effectively latin-1. Thus, all HTTP_? variables in WSGI environ can only be

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Brian Smith
Toshio Kuratomi wrote: On Sep 29, 3:24 pm, Brian Smith [EMAIL PROTECTED] wrote: Toshio Kuratomi wrote: If mod_wsgi assumes latin-1 and converts that intounicode before it hits the app, the app will see this:: Refererhttp://localhost/â%82¬.html No, it will leave it as

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Graham Dumpleton
2008/9/30 Brian Smith [EMAIL PROTECTED]: mod_wsgi receives a sequence of bytes from apache. It transforms those into unicode by pretending that those bytes are latin-1 and sticks them into SCRIPT_NAME. IMO, mod_wsgi should just drop SCRIPT_NAME and all other non-WSGI environ keys except

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-30 Thread Graham Dumpleton
2008/10/1 Brian Smith [EMAIL PROTECTED]: mod_wsgi already mangles the URI components too much in SCRIPT_NAME and PATH_INFO (in its defense, it does so because CGI/WSGI require it to for the most part, except for // munging). That is why I fall back to parsing REQUEST_URI myself. In my

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-29 Thread Graham Dumpleton
It will take me a while to absorb what you are saying but a few comments. The most important thing to realise is that for wgsi.input it will be a stream of bytes. Thus it is up to the application when processing the request content to say what encoding is to be used when converting to Unicode.

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-29 Thread Brian Smith
Graham Dumpleton wrote: As to the HTTP request headers, the RFCs say they are effectively latin-1. Thus, all HTTP_? variables in WSGI environ can only be processed as latin-1 when converting to Unicode. Anything that is part of a URI (e.g. SCRIPT_NAME, REQUEST_URI) must be ASCII by

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-29 Thread Clodoaldo Pinto Neto
2008/9/29 Brian Smith [EMAIL PROTECTED]: Graham Dumpleton wrote: As to the HTTP request headers, the RFCs say they are effectively latin-1. Thus, all HTTP_? variables in WSGI environ can only be processed as latin-1 when converting to Unicode. Anything that is part of a URI (e.g.

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-29 Thread Toshio Kuratomi
On Sep 29, 12:47 am, Graham Dumpleton [EMAIL PROTECTED] wrote: It will take me a while to absorb what you are saying but a few comments. The most important thing to realise is that for wgsi.input it will be a stream of bytes. Thus it is up to the application when processing the request

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-29 Thread Graham Dumpleton
2008/9/30 Toshio Kuratomi [EMAIL PROTECTED]: For response headers and content, the application can either generate bytes and thus control the encoding, or it will fallback to trying to convert it as latin-1 ifUnicodesupplied, so like wsgi.input, no problem there. Unlike wsgi.input where the

[modwsgi] Re: mod_wsgi

2008-09-25 Thread issya
Thanks for the link. One more question, if I ran mod_wsgi in daemon mode, wouldn't I still have to restart apache when app code changes take place? Is there any way to get around this in daemon mode? I read the wiki article on django but that looks like it applies to embedded mode. On Sep 25,

[modwsgi] Re: mod_wsgi

2008-09-25 Thread Graham Dumpleton
2008/9/26 issya [EMAIL PROTECTED]: Thanks for the link. One more question, if I ran mod_wsgi in daemon mode, wouldn't I still have to restart apache when app code changes take place? Is there any way to get around this in daemon mode? I read the wiki article on django but that looks like it

[modwsgi] Re: mod_wsgi

2008-09-23 Thread issya
Thanks for the follow-up and thanks for adding it to the mailing list. I should have did that in the first place. You don't say whether Apache is compiled for prefork or worker MPM. As for the version of apache, it is whatever installed as the default ubuntu package when I installed mod_wsgi.

[modwsgi] Re: mod_wsgi on Python 3.0 (was Re: Python 2.6 and migration warnings flag for Python 3.0.)

2008-09-23 Thread Brian Smith
Graham Dumpleton wrote: I am quite ignorant on the intricacies of unicode, but I thought the whole thing with Latin 1 was that all 255 characters would convert and so it couldn't fail in converting to Unicode. Presuming I haven't got this wrong as I usually do with unicode stuff, but

[modwsgi] Re: mod_wsgi

2008-09-23 Thread Graham Dumpleton
2008/9/23 issya [EMAIL PROTECTED]: Thanks for the follow-up and thanks for adding it to the mailing list. I should have did that in the first place. You don't say whether Apache is compiled for prefork or worker MPM. As for the version of apache, it is whatever installed as the default

[modwsgi] Re: mod_wsgi + AMD64

2008-09-19 Thread Graham Dumpleton
2008/9/20 TheIvIaxx [EMAIL PROTECTED]: As i understand it, i will need to build mod_wsgi for Vista 64 on the AMD64 architecture. Unfortunately i have never built a python module :) That is okay, it isn't a Python module so that will not help. It is actually worse than a Python module, it

[modwsgi] Re: mod_wsgi + rpy (R connector to Python)

2008-09-18 Thread Graham Dumpleton
Message forwarded to mod_wsgi group on Google groups. http://groups.google.com/group/modwsgi Will be a few hours before I can response properly. In the interim, read through: http://code.google.com/p/modwsgi/wiki/ApplicationIssues

[modwsgi] Re: mod_wsgi 2.2 seems to be breaking CGI

2008-08-23 Thread Graham Dumpleton
[EMAIL PROTECTED] http://www.douglasthrift.net - Original Message - From: Graham Dumpleton [EMAIL PROTECTED] To: modwsgi@googlegroups.com Sent: Saturday, August 23, 2008 3:57 AM Subject: [modwsgi] Re: mod_wsgi 2.2 seems to be breaking CGI Are you using mod_cgi or mod_cgid? Graham

[modwsgi] Re: mod_wsgi 2.2 seems to be breaking CGI

2008-08-23 Thread Graham Dumpleton
PROTECTED] http://www.douglasthrift.net - Original Message - From: Graham Dumpleton [EMAIL PROTECTED] To: modwsgi@googlegroups.com Sent: Saturday, August 23, 2008 3:57 AM Subject: [modwsgi] Re: mod_wsgi 2.2 seems to be breaking CGI Are you using mod_cgi or mod_cgid? Graham

[modwsgi] Re: mod_wsgi 2.2 seems to be breaking CGI

2008-08-23 Thread Graham Dumpleton
[EMAIL PROTECTED] To: modwsgi@googlegroups.com Sent: Saturday, August 23, 2008 3:57 AM Subject: [modwsgi] Re: mod_wsgi 2.2 seems to be breaking CGI Are you using mod_cgi or mod_cgid? Graham 2008/8/23 Douglas Thrift [EMAIL PROTECTED]: Hello, This is really strange, but after upgrading

<    1   2   3   4   5