Re: Porting Django to Python 3

2010-02-02 Thread Martin v . Löwis
> Some examples: Thanks for posting them: > >>> Template(u"{{ foo }}").render(Context({"foo":"bar"})) > u'bar' I get py> Template("{{ foo }}").render(Context({b"foo":b"bar"})) '' I think that's correct: the dictionary has no key "foo". I'm also unsure what this has to do with UTF-8: isn't

Re: Porting Django to Python 3

2010-02-02 Thread Mathieu Leduc-Hamel
By the way, did you the effort of porting reported on the python website: http://wiki.python.org/moin/PortingDjangoTo3k Seems to the good way to achieve it some times... On Tue, Feb 2, 2010 at 5:37 PM, Dave wrote: > Ok everyone, a bit of a status update. > > We finished our

Re: Porting Django to Python 3

2010-01-15 Thread Martin v . Löwis
> > In many cases, this is true, but there are other scenarios (certain > > forms of exception handling, for example) where there is no syntax > > that's valid in both versions. That's syntax, not just libraries and > > functions. There's no way to even get a file to parse in both Python 2 > > and

Re: Porting Django to Python 3

2010-01-14 Thread Łukasz Rekucki
2010/1/14 Marty Alchin : > On Thu, Jan 14, 2010 at 2:32 PM, Karen Tracey wrote: >> Martin's approach was single codebase where the 3.x version for execution is >> generated by 2to3, not single source for execution across 2.x and 3.x.  Thus >> I'm wondering

Re: Porting Django to Python 3

2010-01-14 Thread Marty Alchin
On Thu, Jan 14, 2010 at 2:32 PM, Karen Tracey wrote: > Martin's approach was single codebase where the 3.x version for execution is > generated by 2to3, not single source for execution across 2.x and 3.x.  Thus > I'm wondering if this difference is accounted for by 2to3?  If

Re: Porting Django to Python 3

2010-01-14 Thread Karen Tracey
On Thu, Jan 14, 2010 at 2:17 PM, Marty Alchin wrote: > 2010/1/14 Łukasz Rekucki : > > It is possible to write 3.x code that is backwards-compatible with > > python 2.6+. There are some rough edges like, names of stdlib modules, > > instance checks for

Re: Porting Django to Python 3

2010-01-14 Thread Marty Alchin
2010/1/14 Łukasz Rekucki : > It is possible to write 3.x code that is backwards-compatible with > python 2.6+. There are some rough edges like, names of stdlib modules, > instance checks for strings and some introspection details. In my > opinion, it's pretty much the same as

Re: Porting Django to Python 3

2010-01-14 Thread Łukasz Rekucki
2010/1/14 Jesus Mager : > Hi! > > I don't think we can have a library working on python 2 and at the > same time on python 3.(Dont know if 3to2 is a good solution). It is possible to write 3.x code that is backwards-compatible with python 2.6+. There are some rough edges like,

Re: Porting Django to Python 3

2010-01-14 Thread Josh Roesslein
>From my experience with the 2to3 tool, it's no silver bullet for porting to 3. I have had plenty of cases where manual tweeking of the code was needed. The tool does help a lot on getting trivial things changed over, but certain things it just can't do. Now this is with a very small library of

Re: Porting Django to Python 3

2010-01-13 Thread VernonCole
Having survived the update of pywin32 to python 3, let me say that both comments are correct: 1) you do NOT create a fork, you convert the existing code so that it will run through 2to3 2) it takes a LOT of hand refactoring of older 2.x code to get ready for 2to3. and, may I add: 3) it's worth the

Re: Porting Django to Python 3

2010-01-13 Thread Karen Tracey
On Wed, Jan 13, 2010 at 4:21 AM, Hanne Moa wrote: > 2010/1/13 Tobias McNulty : > > I am by no means an expert on the matter, but I remember seeing a comment > > awhile back suggesting that it generally makes more sense to fix the 2to3 > > script than

Re: Porting Django to Python 3

2010-01-13 Thread Russell Keith-Magee
On Wed, Jan 13, 2010 at 5:21 PM, Hanne Moa wrote: > 2010/1/13 Tobias McNulty : >> I am by no means an expert on the matter, but I remember seeing a comment >> awhile back suggesting that it generally makes more sense to fix the 2to3 >> script than to

Re: Porting Django to Python 3

2010-01-13 Thread Hanne Moa
2010/1/13 Tobias McNulty : > I am by no means an expert on the matter, but I remember seeing a comment > awhile back suggesting that it generally makes more sense to fix the 2to3 > script than to maintain two branches of the same library. Might that be the > case here as

Re: Porting Django to Python 3

2010-01-12 Thread Tobias McNulty
I am by no means an expert on the matter, but I remember seeing a comment awhile back suggesting that it generally makes more sense to fix the 2to3 script than to maintain two branches of the same library. Might that be the case here as well? Sent from a mobile phone, please excuse any typos. On

Re: Porting Django to Python 3

2010-01-12 Thread Alex Gaynor
On Tue, Jan 12, 2010 at 10:52 PM, Joshua Partogi wrote: > On Jan 9, 1:02 pm, Russell Keith-Magee wrote: >> On Sat, Jan 9, 2010 at 2:25 AM, Dave wrote: >> > Hello everyone, >> >> > My name is Dave Weber, and I'm a student at

Re: Porting Django to Python 3

2010-01-12 Thread Joshua Partogi
On Jan 9, 1:02 pm, Russell Keith-Magee wrote: > On Sat, Jan 9, 2010 at 2:25 AM, Dave wrote: > > Hello everyone, > > > My name is Dave Weber, and I'm a student at the University of Toronto, > > studying Computer Science. For one of our undergraduate

Re: Porting Django to Python 3

2010-01-09 Thread Jesus Mager
Hi all! I'm CS student at the National Autonomous University of Mexico, and I'm very interested to porting Django to Python 3 too. I hope the efforts porting Django will be public on a svn branch, so I can also collaborate. And of course, if a core developer can guide us, it will be much better.

Re: Porting Django to Python 3

2010-01-08 Thread Russell Keith-Magee
On Sat, Jan 9, 2010 at 2:25 AM, Dave wrote: > Hello everyone, > > My name is Dave Weber, and I'm a student at the University of Toronto, > studying Computer Science. For one of our undergraduate courses led by > Greg Wilson (http://www.cs.utoronto.ca/~gvwilson/), myself and a

Re: Porting Django to Python 3

2010-01-08 Thread VernonCole
Dave: Wonderful! I am presently working on a project to get adodbapi (http://sourceforge.net/projects/adodbapi) working in django. That may be important to you since it is one of few db interfaces which has a working python 3 version for Windows. Keep in touch. -- Vernon Cole On Jan 8, 11:25 

Re: Porting Django to Python 3

2010-01-08 Thread Jerome Leclanche
Best of luck in your port. On that note, I'm hoping when the 3k port will be officially supported, it will not be backwards compatible. The core idea of 3k itself is the lack of backwards compatibility ... J. Leclanche / Adys On Fri, Jan 8, 2010 at 8:25 PM, Dave wrote: >