Re: [IronPython] Django, __unicode__, and #20366

2010-03-17 Thread Dave Fugate
Straight to RTM. Dave -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy Sent: Wednesday, March 17, 2010 9:07 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On Tue

Re: [IronPython] Django, __unicode__, and #20366

2010-03-17 Thread Jeff Hardy
On Wed, Mar 17, 2010 at 10:16 AM, Dave Fugate dfug...@microsoft.com wrote: Straight to RTM. Is there a timeline? At one point I thought it was to coincide with VS2010 RTM, but I may be thinking of something else... - Jeff ___ Users mailing list

Re: [IronPython] Django, __unicode__, and #20366

2010-03-17 Thread Dave Fugate
Yes, it'll coincide with VS2010 RTM;) -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy Sent: Wednesday, March 17, 2010 9:34 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__

Re: [IronPython] Django, __unicode__, and #20366

2010-03-16 Thread Dino Viehland
Jeff wrote: On Mon, Feb 15, 2010 at 4:41 PM, Dino Viehland di...@microsoft.com wrote: We could make % on a Unicode literal do something special much like we're doing for calls to unicode(...).  Alternately we could make % try to invoke __unicode__ before __str__ - but that would sometimes

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
: Friday, February 12, 2010 2:24 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On 12/02/2010 03:37, Dino Viehland wrote: And it turns out this works great! We now pass all of the tests in test_str and test_unicode related to calling str/unicode and getting

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Jeff Hardy
Viehland Sent: Wednesday, February 10, 2010 9:38 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 It definitely won't be in 2.6RC1 but could be in 2.6 final (or RC2 or whatever). I'm still looking into Michael's proposed fix of recognizing calls

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Jeff Hardy
On Mon, Feb 15, 2010 at 3:57 PM, Dino Viehland di...@microsoft.com wrote: This was relatively easy, it was just work once Michael came up with the great idea.  But I do manage to get plenty of sleep - I just put off other mundane but important things on my TODO list like updating our perf

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
, February 15, 2010 3:00 PM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On Mon, Feb 15, 2010 at 3:57 PM, Dino Viehland di...@microsoft.com wrote: This was relatively easy, it was just work once Michael came up with the great idea.  But I do manage to get plenty

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Jeff Hardy
] On Behalf Of Dino Viehland Sent: Wednesday, February 10, 2010 9:38 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 It definitely won't be in 2.6RC1 but could be in 2.6 final (or RC2 or whatever). I'm still looking into Michael's proposed fix of recognizing

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
Subject: Re: [IronPython] Django, __unicode__, and #20366 On 12/02/2010 03:37, Dino Viehland wrote: And it turns out this works great!  We now pass all of the tests in test_str and test_unicode related to calling str/unicode and getting the appropriate __str__/__unicode__ method called.  We

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Jeff Hardy
On Mon, Feb 15, 2010 at 4:13 PM, Dino Viehland di...@microsoft.com wrote: Is the template string really a constant in the case that you care about? Yeah, it is, thankfully. I doubt there's a ton of cases where it occurs, and I really hope there aren't any where the format string is in a variable

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dave Fugate
3:10 PM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 It's not the tests, it's the infrastructure. Years ago when we were on the CLR team we wired up everything to run on their perf testing infrastructure. They've since moved on and we've been running

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Dino Viehland
and expecting __str__ to be returned with a significant difference. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Jeff Hardy Sent: Monday, February 15, 2010 3:32 PM To: Discussion of IronPython Subject: Re: [IronPython] Django

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Jeff Hardy
On Mon, Feb 15, 2010 at 4:41 PM, Dino Viehland di...@microsoft.com wrote: We could make % on a Unicode literal do something special much like we're doing for calls to unicode(...).  Alternately we could make % try to invoke __unicode__ before __str__ - but that would sometimes be wrong.  

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Michael Foord
On 15/02/2010 23:51, Jeff Hardy wrote: On Mon, Feb 15, 2010 at 4:41 PM, Dino Viehlanddi...@microsoft.com wrote: We could make % on a Unicode literal do something special much like we're doing for calls to unicode(...). Alternately we could make % try to invoke __unicode__ before __str__ -

Re: [IronPython] Django, __unicode__, and #20366

2010-02-15 Thread Michael Foord
On 15/02/2010 23:53, Michael Foord wrote: On 15/02/2010 23:51, Jeff Hardy wrote: On Mon, Feb 15, 2010 at 4:41 PM, Dino Viehlanddi...@microsoft.com wrote: We could make % on a Unicode literal do something special much like we're doing for calls to unicode(...). Alternately we could make % try

Re: [IronPython] Django, __unicode__, and #20366

2010-02-12 Thread Michael Foord
Sent: Wednesday, February 10, 2010 9:38 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 It definitely won't be in 2.6RC1 but could be in 2.6 final (or RC2 or whatever). I'm still looking into Michael's proposed fix of recognizing calls to unicode - it's

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Michael Foord
On 11/02/2010 15:44, Vernon Cole wrote: Just a little reminder in all this noise... The correct thing to do with unicode(u'a unicode string') is MAKE NO CHANGE. The correct thing to do with str('an ASCII string') is MAKE NO CHANGE. I assume by ASCII string you actually mean bytestring?

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Jeff Hardy
On Thu, Feb 11, 2010 at 8:44 AM, Vernon Cole vernondc...@gmail.com wrote: Just a little reminder in all this noise... The correct thing to do with unicode(u'a unicode string') is MAKE NO CHANGE. The correct thing to do with str('an ASCII string') is MAKE NO CHANGE. Ah, but it's not string

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Vernon Cole
On Thu, Feb 11, 2010 at 8:48 AM, Michael Foord fuzzy...@voidspace.org.ukwrote: On 11/02/2010 15:44, Vernon Cole wrote: Just a little reminder in all this noise... The correct thing to do with unicode(u'a unicode string') is MAKE NO CHANGE. The correct thing to do with str('an ASCII

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Dino Viehland
Vernon wrote: You need the 'byte' class for Python 3 anyway. Implement it now. Done! Assuming you mean bytes it’s in 2.6 already. Now if everyone would upgrade their code to use b’’ :) A small sample... code x.py import sys u = u'1234\u00f6' s = '1234' x = str(s) print type(x),

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Dino Viehland
of IronPython; Michael Foord Subject: Re: [IronPython] Django, __unicode__, and #20366 Vernon wrote: You need the 'byte' class for Python 3 anyway. Implement it now. Done! Assuming you mean bytes it’s in 2.6 already. Now if everyone would upgrade their code to use b’’ :) A small sample

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Vernon Cole
Dear Dino and Jeff: I think we are all on the same wavelength. IronPython makes unicode and str the same implicitly. Python 3 makes them the same explicitly -- by getting rid of __unicode__ completely. The effort to make django (or any other application) run on IronPython and the effort to

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Dino Viehland
Subject: Re: [IronPython] Django, __unicode__, and #20366 It definitely won't be in 2.6RC1 but could be in 2.6 final (or RC2 or whatever). I'm still looking into Michael's proposed fix of recognizing calls to unicode - it's a little tricky dealing with * and **args calls to it and I got

Re: [IronPython] Django, __unicode__, and #20366

2010-02-11 Thread Jeff Hardy
On Thu, Feb 11, 2010 at 8:37 PM, Dino Viehland di...@microsoft.com wrote: And it turns out this works great!  We now pass all of the tests in test_str and test_unicode related to calling str/unicode and getting the appropriate __str__/__unicode__ method called.  We also now properly don't

Re: [IronPython] Django, __unicode__, and #20366

2010-02-10 Thread Jeff Hardy
On Mon, Feb 1, 2010 at 2:46 PM, Dino Viehland di...@microsoft.com wrote: Messing with identity starts to get really scary and I'd rather not go there - I'm sure there will be lots of edge cases which will be broken. I could see is making unicode(foo) do something different.  If you aliased

Re: [IronPython] Django, __unicode__, and #20366

2010-02-10 Thread Dino Viehland
To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On Mon, Feb 1, 2010 at 2:46 PM, Dino Viehland di...@microsoft.com wrote: Messing with identity starts to get really scary and I'd rather not go there - I'm sure there will be lots of edge cases which will be broken

Re: [IronPython] Django, __unicode__, and #20366

2010-02-10 Thread Jeff Hardy
[mailto:users- boun...@lists.ironpython.com] On Behalf Of Jeff Hardy Sent: Wednesday, February 10, 2010 9:21 AM To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On Mon, Feb 1, 2010 at 2:46 PM, Dino Viehland di...@microsoft.com wrote: Messing with identity

Re: [IronPython] Django, __unicode__, and #20366

2010-02-10 Thread Jeff Hardy
I understand now why it couldn't get into RC1 :) I thought 2.6.1 was further out than this - if you have to hold it for 2.6.2, it won't be that big a deal. It's a pretty big change to slip into an RC. - Jeff On Wed, Feb 10, 2010 at 10:38 AM, Dino Viehland di...@microsoft.com wrote: It

Re: [IronPython] Django, __unicode__, and #20366

2010-02-01 Thread Jeff Hardy
On Mon, Feb 1, 2010 at 2:46 PM, Dino Viehland di...@microsoft.com wrote: I could see is making unicode(foo) do something different.  If you aliased unicode then you'd get str's behavior though but that might be perfectly acceptable.  It's definitely a solution I had not considered and it'd

Re: [IronPython] Django, __unicode__, and #20366

2010-02-01 Thread Michael Foord
On 01/02/2010 23:58, Jeff Hardy wrote: On Mon, Feb 1, 2010 at 2:46 PM, Dino Viehlanddi...@microsoft.com wrote: I could see is making unicode(foo) do something different. If you aliased unicode then you'd get str's behavior though but that might be perfectly acceptable. It's definitely a

Re: [IronPython] Django, __unicode__, and #20366

2010-02-01 Thread Vernon Cole
Actually there is a project underway at the University of Toronto as we speak to port Django to Python 3. See Porting Django to Python 3http://groups.google.com/group/django-developers/browse_frm/thread/bf9d8808ee5aadb4/4ec8330ae28ce4e3?lnk=gstq=python+3#4ec8330ae28ce4e3on the django developers

Re: [IronPython] Django, __unicode__, and #20366

2010-01-31 Thread Michael Foord
On 31/01/2010 01:21, Jeff Hardy wrote: Hi all, I've got a question regarding __unicode__ and issue #20366[0]. Django explicitly encourages the use of __unicode__ on models[1], which would not be available on IronPython. Also, they have some lazy evaluation functions that depend on differences

Re: [IronPython] Django, __unicode__, and #20366

2010-01-31 Thread Dino Viehland
To: Discussion of IronPython Subject: Re: [IronPython] Django, __unicode__, and #20366 On 31/01/2010 01:21, Jeff Hardy wrote: Hi all, I've got a question regarding __unicode__ and issue #20366[0]. Django explicitly encourages the use of __unicode__ on models[1], which would

Re: [IronPython] Django, __unicode__, and #20366

2010-01-31 Thread Michael Foord
of imagination on my part... All the best, Michael -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Sunday, January 31, 2010 11:25 AM To: Discussion of IronPython Subject: Re: [IronPython] Django