Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2012-06-14 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
---+
 Reporter:  mgood  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  HTTP handling  |  Version:  1.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  1  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by claudep):

 * needs_tests:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2011-09-09 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
   Reporter:  mgood |  Owner:  nobody
   Type:  Bug   | Status:  new
  Milestone:|  Component:  HTTP handling
Version:  1.0   |   Severity:  Normal
 Resolution:|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  1
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+---

Comment (by Jeff Buttars ):

 Replying to [comment:10 grahamd]:
 > Should be fine leaving:
 >
 >   path_info = u'/'
 >
 > That should always be the same as:
 >
 >   '/'.decode('latin-1')
 >
 > anyway.

 Yes, I realized that line probably didn't need to change, after I uploaded
 the patch.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2011-09-09 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
   Reporter:  mgood |  Owner:  nobody
   Type:  Bug   | Status:  new
  Milestone:|  Component:  HTTP handling
Version:  1.0   |   Severity:  Normal
 Resolution:|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  1
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+---

Comment (by grahamd):

 Should be fine leaving:

   path_info = u'/'

 That should always be the same as:

   '/'.decode('latin-1')

 anyway.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2011-09-09 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
   Reporter:  mgood |  Owner:  nobody
   Type:  Bug   | Status:  new
  Milestone:|  Component:  HTTP handling
Version:  1.0   |   Severity:  Normal
 Resolution:|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  1
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+---
Changes (by Jeff Buttars ):

 * has_patch:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2011-09-09 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
   Reporter:  mgood |  Owner:  nobody
   Type:  Bug   | Status:  new
  Milestone:|  Component:  HTTP handling
Version:  1.0   |   Severity:  Normal
 Resolution:|   Keywords:
   Triage Stage:  Accepted  |  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+---
Changes (by Jeff Buttars ):

 * ui_ux:   => 0
 * easy:   => 0


Comment:

 The WSGI spec says all strings should be of the str type and be encoded as
 ISO-8859-1(latin-1) or be MIME encoded according to RFC 2047. When dealing
 with the PATH_INFO and SCRIPT_NAME environ variables I think it's to safe
 to say we don't want to put MIME encoded data in them. Which leave us with
 the latin-1 encoding. We can always explicitly decode those variables into
 latin-1 to ensure we follow the spec. Doing so should also handle the case
 of being handed unicode data, we'll simple re-encode it with undefined
 results (which is also in the WSGI spec). I'll attach a patch that
 demonstrates this.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2009-05-25 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
  Reporter:  mgood  | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Accepted   | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by SmileyChris):

 * cc: mtredinnick (added)
  * stage:  Unreviewed => Accepted

Comment:

 Ok, fair enough. I'll make the call that Django should be following wsgi
 spec regarding unicode vs string. Malcolm would probably know if there's
 some reason why it shouldn't, so I'm ccing him in for an opinion.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2009-05-25 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
  Reporter:  mgood  | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by grahamd):

 I don't use Django or even know much about Django code internals, so I
 wouldn't like to be saying it is okay or not. In other words, I might be
 able to comment on WSGI and web hosting mechanisms, but far from being
 qualified to comment about Django itself. :-)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2009-05-25 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
  Reporter:  mgood  | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by SmileyChris):

 Graham, you're more than qualified to promote this from an unreviewed
 ticket - at least to a Design Decision if you don't want to make the call
 ;)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2009-05-14 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
  Reporter:  mgood  | Owner:  nobody
Status:  new| Milestone:
 Component:  HTTP handling  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by anonymous):

  * component:  Uncategorized => HTTP handling

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2009-05-14 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
  Reporter:  mgood  | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by mgood):

 Replying to [comment:1 grahamd]:
 > FWIW, it looks like that WSGI for Python 3.0, if specification is ever
 actually updated, will have WSGI environment variables be unicode, ie.,
 Python 3.0 strings and not byte strings, which would have been the proper
 equivalent to Python 2.X strings.

 Yes, but only by decoding as "latin-1" which means it's still 1 character
 per byte.  Django could re-decode these values as utf-8, but it would not
 be valid to put them into the WSGI environ as such since they could
 contain code points above \uFF which can not be encoded as latin-1.

 Here's a demonstration of the reported problem:
 {{{
 #!pycon
 >>> from django.core.handlers import wsgi
 >>> path = '\xc3\xbc'
 >>> print path.decode('utf-8')
 ΓΌ
 >>> environ = {'REQUEST_METHOD': 'GET', 'PATH_INFO': path}
 >>> req = wsgi.WSGIRequest(environ)
 >>> environ['PATH_INFO']
 u'\xfc'
 >>> path == environ['PATH_INFO']
 __main__:1: UnicodeWarning: Unicode equal comparison failed to convert
 both arguments to Unicode - interpreting them as being unequal
 False
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2009-05-13 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
+---
  Reporter:  mgood  | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by grahamd):

 * cc: graham.dumple...@gmail.com (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 FWIW, it looks like that WSGI for Python 3.0, if specification is ever
 actually updated, will have WSGI environment variables be unicode, ie.,
 Python 3.0 strings and not byte strings, which would have been the proper
 equivalent to Python 2.X strings.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11111: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode

2009-05-13 Thread Django
#1: WSGIRequest should not make PATH_INFO and SCRIPT_NAME unicode
---+
 Reporter:  mgood  |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 The [http://www.python.org/dev/peps/pep-0333/ WSGI spec] requires the
 standard environment values to be `str`, not `unicode` types, but the
 WSGIRequest object updates the environ (via self.META which is a
 reference), setting PATH_INFO and SCRIPT_NAME to unicode objects.  These
 unicode values led to some issues with [http://pythonpaste.org/webtest/
 WebTest] which checks to ensure that the environ only contains `str`
 values.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---