Re: Re: Porting Django to Python 3.0 as a GSoC project
Ah. I'm glad I brought it up. When the time comes to port my code, I'll try skipping step 1 first. -- Daryl On Fri, Mar 28, 2008 at 5:48 PM, Martin v. Löwis <[EMAIL PROTECTED]> wrote: > > > I think you misunderstand the role of 2.6. See the seven steps under > > "The recommended development model for a project that needs to support > > Python 2.6 and 3.0 simultaneously..." in > > http://www.python.org/dev/peps/pep-3000/#compatibility-and-transition. > > Step 1 reads "Port your project to Python 2.6." > > I believe this recommendation is flawed. It assumes that it is acceptable > that you break 2.5-and-earlier compatibility in the process of porting to > 2.6. > This, in turn, is assumed because it was considered impractical to have > code that runs on 2.3, yet 2to3 could still fix it correctly. Again in turn, > this assumption results from the actual lack of opportunity to try out any > other strategy. > > At the PyCon sprint, I tried a different strategy for Django, and it seems > to work fairly well. > > The authors of the PEP certainly did not mean to say that 2to3 can't possibly > create correct output if applied to source that also runs on 2.5. > > Regards, > Martin > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
> I think you misunderstand the role of 2.6. See the seven steps under > "The recommended development model for a project that needs to support > Python 2.6 and 3.0 simultaneously..." in > http://www.python.org/dev/peps/pep-3000/#compatibility-and-transition. > Step 1 reads "Port your project to Python 2.6." I believe this recommendation is flawed. It assumes that it is acceptable that you break 2.5-and-earlier compatibility in the process of porting to 2.6. This, in turn, is assumed because it was considered impractical to have code that runs on 2.3, yet 2to3 could still fix it correctly. Again in turn, this assumption results from the actual lack of opportunity to try out any other strategy. At the PyCon sprint, I tried a different strategy for Django, and it seems to work fairly well. The authors of the PEP certainly did not mean to say that 2to3 can't possibly create correct output if applied to source that also runs on 2.5. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
> So this means, though, that folks running from SVN will still need to > run setup.py every time they update, right? Not that that's a > dealbreaker -- I think Django-on-Py3k'ers will be on the cutting edge > anyway -- just wanna check. Correct. distutils operates using time-stamps, so it will only overwrite (and then re-2to3) newer files. I arrange it so that the build/ tree contains the converted files. I never tried running it from build/, but instead perform a full "setup.py install" to get django on sys.path. See http://svn.python.org/projects/python/branches/py3k/Lib/distutils/command/build_py.py for build_py_2to3; in Django's setup.py, I use try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: from distutils.command.build_py import build_py ... setup(... cmdclass = {'build_py':build_py} ) to invoke 2to3 in the build step. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
I think you misunderstand the role of 2.6. See the seven steps under "The recommended development model for a project that needs to support Python 2.6 and 3.0 simultaneously..." in http://www.python.org/dev/peps/pep-3000/#compatibility-and-transition. Step 1 reads "Port your project to Python 2.6." And step 6 is "If problems are found, make corrections to the 2.6 version of the source code and go back to step 3." I take this to mean that one likely needs to make 2.6-specific changes in order to get the code working on 3.0 after running it through 2to3. -- Daryl On Fri, Mar 28, 2008 at 12:32 PM, Patryk Zawadzki <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 28, 2008 at 8:07 PM, Daryl Spitzer <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 28, 2008 at 8:57 AM, Jacob Kaplan-Moss > > > > Ahh -- this was the part I was missing; my apologies for being dense. > > > I've been thinking of 2to3 as a one-time tool -- run it to move to > > > 3.0, and never look back -- not as part of a distribution process. > > Unless I'm missing something, wouldn't Django likely have to include > > code that would only work on 2.6 for this to work? > > As far as 2to3 is involved, you are supposed to modify the python 2.5 > code until 2to3 gives perfect conversion, not play with the results. > The goal is to prepare the code so the future move involves running > one tool, not to convert now and drop 2.5 support. So the only way > this could work is to alter possibly ambiguous 2.5 code and watch the > diffs generated by 2to3 without actually switching to python 2.6/3.0. > > -- > Patryk Zawadzki > PLD Linux Distribution > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Fri, Mar 28, 2008 at 8:07 PM, Daryl Spitzer <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 8:57 AM, Jacob Kaplan-Moss > > Ahh -- this was the part I was missing; my apologies for being dense. > > I've been thinking of 2to3 as a one-time tool -- run it to move to > > 3.0, and never look back -- not as part of a distribution process. > Unless I'm missing something, wouldn't Django likely have to include > code that would only work on 2.6 for this to work? As far as 2to3 is involved, you are supposed to modify the python 2.5 code until 2to3 gives perfect conversion, not play with the results. The goal is to prepare the code so the future move involves running one tool, not to convert now and drop 2.5 support. So the only way this could work is to alter possibly ambiguous 2.5 code and watch the diffs generated by 2to3 without actually switching to python 2.6/3.0. -- Patryk Zawadzki PLD Linux Distribution --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Fri, Mar 28, 2008 at 8:57 AM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 5:10 PM, Martin v. Löwis > <[EMAIL PROTECTED]> wrote: > > So leave the code as-is, and have 2to3 fix it at installation > > time (whenever setup.py is invoked by 3.x; setup.py itself > > runs without changes on 3.x) > > Ahh -- this was the part I was missing; my apologies for being dense. > I've been thinking of 2to3 as a one-time tool -- run it to move to > 3.0, and never look back -- not as part of a distribution process. Unless I'm missing something, wouldn't Django likely have to include code that would only work on 2.6 for this to work? -- Daryl On Fri, Mar 28, 2008 at 8:57 AM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On Thu, Mar 27, 2008 at 5:10 PM, Martin v. Löwis > <[EMAIL PROTECTED]> wrote: > > So leave the code as-is, and have 2to3 fix it at installation > > time (whenever setup.py is invoked by 3.x; setup.py itself > > runs without changes on 3.x) > > Ahh -- this was the part I was missing; my apologies for being dense. > I've been thinking of 2to3 as a one-time tool -- run it to move to > 3.0, and never look back -- not as part of a distribution process. > Neat trick -- wish I'd thought of it :) > > So this means, though, that folks running from SVN will still need to > run setup.py every time they update, right? Not that that's a > dealbreaker -- I think Django-on-Py3k'ers will be on the cutting edge > anyway -- just wanna check. > > I'd still be happier thinking about this process post-Django-1.0 and > post-Py3k-release (or at least rc status), but I've got no objections > to other folks working on it until then. > > As for SoC, I can only see it working under these conditions: > > (1) A student with a fair deal of both Django and Python knowledge. > The Python knowledge is more important; the places where bugs in > Django are going to crop up are going to be internal, undocumented > areas. This student also should probably be prepared to work with 2to3 > fixers, though I've got a lot of knowledge here and can help out. > (2) A mentor ditto. I suspect finding a mentor interested in this > project could be difficult. > (3) Willingness from both parties to work from Martin's plan/patches > forward. Now that I understand how he's going about this, I'm > convinced it's the correct path. > (4) A *realistic*, *solid* project plan -- with dates -- that clearly > lay out what "success" means in this context. This plan should *not* > define "success" as "all code merged into Django in August" since that > probably will depend on lots of factors out of your control. > (5) A commitment from mentor and student to stick around after the SoC > and help idiots like me get the code merged once the time comes. > > Jacob > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 5:10 PM, Martin v. Löwis <[EMAIL PROTECTED]> wrote: > So leave the code as-is, and have 2to3 fix it at installation > time (whenever setup.py is invoked by 3.x; setup.py itself > runs without changes on 3.x) Ahh -- this was the part I was missing; my apologies for being dense. I've been thinking of 2to3 as a one-time tool -- run it to move to 3.0, and never look back -- not as part of a distribution process. Neat trick -- wish I'd thought of it :) So this means, though, that folks running from SVN will still need to run setup.py every time they update, right? Not that that's a dealbreaker -- I think Django-on-Py3k'ers will be on the cutting edge anyway -- just wanna check. I'd still be happier thinking about this process post-Django-1.0 and post-Py3k-release (or at least rc status), but I've got no objections to other folks working on it until then. As for SoC, I can only see it working under these conditions: (1) A student with a fair deal of both Django and Python knowledge. The Python knowledge is more important; the places where bugs in Django are going to crop up are going to be internal, undocumented areas. This student also should probably be prepared to work with 2to3 fixers, though I've got a lot of knowledge here and can help out. (2) A mentor ditto. I suspect finding a mentor interested in this project could be difficult. (3) Willingness from both parties to work from Martin's plan/patches forward. Now that I understand how he's going about this, I'm convinced it's the correct path. (4) A *realistic*, *solid* project plan -- with dates -- that clearly lay out what "success" means in this context. This plan should *not* define "success" as "all code merged into Django in August" since that probably will depend on lots of factors out of your control. (5) A commitment from mentor and student to stick around after the SoC and help idiots like me get the code merged once the time comes. Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Fri, Mar 28, 2008 at 4:50 AM, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Hi, > > > [ugly stories about other source transformer tools and > > how they failed deleted] > Actually, the translator was successful. I'm not talking about any specific project, I'm mentioning my opinion of machine-based translation in general. It's great for when something just needs to work, but for a project like Django where people have expectations of the quality of the code (which is generally quite high, in my experience), machine translation alone won't cut it. Sorry if you find this ugly, but I tend to find machine translated code ugly. This is not to say you shouldn't try it, just be careful. > I don't understand all the negative thinking. > > Django would probably be a great show case to see whether the planned > transition to python 3.0 works as it is designed. If things do not work out, > this might still influence the python 3 development. > > I see it as a win-win situation: python developers get a lot of feedback > from a real-world project, and Django might get a lot for shifting to python > 3. The student would learn a lot about both Django and python 3. > I see your point. My opinion (I'm not a mentor or in any way involved in Summer of Code this year) is that some of the other projects provide a more direct benefit to Django. You might pitch you project directly to Python? > And in the end, Django is in no way obliged to take the resulting code. > > No worries 8-) > :) > > Michael > > -- > noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - > Tel +49-911-9352-0 - Fax +49-911-9352-100 > http://www.noris.de - The IT-Outsourcing Company > > Vorstand: Ingo Kraupa (Vorsitzender), Joachim Astel, Hansjochen Klenk - > Vorsitzender des Aufsichtsrats: Stefan Schnabel - AG Nürnberg HRB 17689 > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
Hallo Martin, offensichtlich hält sich das Interesse der Django-Entwickler in Grenzen. Kann ich die Sache anderweitig unterstützen, eventuell als Co-Mentor von der Django-Seite? Mit was für zeitlichen Anforderungen müsste ich da rechnen? Ich hab das noch nicht gemacht. Ich bin allerdings von 7.4. - 18.5. auf einem längeren Urlaub in Australien und dort praktisch nicht erreichbar. Ich bin seit 2 Jahren in Django involviert, kenne viele Teile des Codes, bin aber kein Kernentwickler. Viele Grüße, Michael On Thu, Mar 27, Martin v. Löwis wrote: > > > I'm still a bit worried about the fact that, aside from Django being a > > moving target and Python 3.0 being a moving target, WSGI for Python > > 3.0 is *also* a moving target; there still seems to be a fair bit that > > hasn't been settled on how things ought to work. > > That is the reason why I think this project *should* be a SoC project. > Python 3 being a moving target is a good thing for the project (although > certainly a challenge for the student). It's likely that problems are detected > in Python 3 in the way of porting applications such as Django, and > those problems can be easily fixed before Python 3 gets released. > Fixing them afterwards is much more difficult. So porting *should* > start before Python 3 is released, to simplify it, not afterwards. > (of course, the code should be released for general use only > after Python 3 is released). > > Regards, > Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Fri, Mar 28 2008 at 11:20:52AM BRT, Peter Herndon <[EMAIL PROTECTED]> wrote: > As Alberto said, and James and Jacob, I don't see enough value for > Django. The key here is to define a project that results in a usable > code contribution by the end of the summer *for the project*. Not for > Python3k, but for Django. If you want to port Django to Python3k for > Python 3.0's benefit, where Django is simply an example code base, > well, submit that to the Python folks. FWIW, that's what I initially did :). As I had mentioned on my first email, I proposed the project to Martin Löwis, after he sent an email apropos his migration attempt to the python-3000 list, and he suggested that I submitted it to Django developers, which I thought made sense. I don't think it'd benefit only Python, but that's been discussed already. > In addition, one of the side benefits is to get another contributor of > code to the project, right? Is the student in question willing to > commit to working on a project that doesn't finish over the summer? As a matter of fact, yes. Of course, you have no way of knowing this will actually happen (neither have I, obviously, apart from my intentions). > I would encourage the student to commit to that project, just not under > the aegis of SoC. Do it because it is useful, but do it on the side. That's what I intend to do, but of course I won't be able to devote as much time to it. In any event, by now it's pretty clear that my proposal isn't all that popular, so I'm retracting it. Thanks for all the feedback! I'll be lurking around :) Cheers, rbp -- Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> | GPG KeyId: <0x0DB14978> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
El 28/03/2008, a las 11:50, Michael Radziej escribió: > > Hi, > >> [ugly stories about other source transformer tools and >> how they failed deleted] Not to understimate the student nor the Python community, but think about it in terms of developer time. TrollTech worked on Qt4 for some years with multiple developers and couldn't provide a decent automatic code translator for translating the codebase at build time. On the other hand, it did something right: provide a starting ground for projects moving from the old to the new version of the toolkit. > > I don't understand all the negative thinking. > > Django would probably be a great show case to see whether the planned > transition to python 3.0 works as it is designed. If things do not > work out, > this might still influence the python 3 development. > I see it as a win-win situation: python developers get a lot of > feedback > from a real-world project, and Django might get a lot for shifting > to python > 3. The student would learn a lot about both Django and python 3. > I see a clear win for Python and the 2to3 tool, but not for Django. As others have said, Python will change a lot before reaching 3.0, both in terms of Python code as C API and even Guido expects a five year transition. So you'll end up with a half baked solution which is likely to stale. Again, not to understimate the students, but I've seen lots of semi-finished GSoC projects in the latest years (take a look at the GPE and Maemo lists, almost none of the students followed contributing after SoC ended). So, it's really important to define a project which can be completely done over the summer, and I think this is not the case. > And in the end, Django is in no way obliged to take the resulting > code. > What's the point of accepting a project when you aren't thinking in taking the resulting code? > No worries 8-) ;-) Regards, Alberto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
Hi, > [ugly stories about other source transformer tools and > how they failed deleted] I don't understand all the negative thinking. Django would probably be a great show case to see whether the planned transition to python 3.0 works as it is designed. If things do not work out, this might still influence the python 3 development. I see it as a win-win situation: python developers get a lot of feedback from a real-world project, and Django might get a lot for shifting to python 3. The student would learn a lot about both Django and python 3. And in the end, Django is in no way obliged to take the resulting code. No worries 8-) Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The IT-Outsourcing Company Vorstand: Ingo Kraupa (Vorsitzender), Joachim Astel, Hansjochen Klenk - Vorsitzender des Aufsichtsrats: Stefan Schnabel - AG Nürnberg HRB 17689 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
El 28/03/2008, a las 5:42, Sage La Torra escribió: > > I'll throw in my 2 cents too: > > I think machine based translation is iffy at best. I'm not the most > up-to-date on py3k, but I have experience with other such projects (I > wrote a Perl 5 to Perl 6 translator for Summer of Code 2006). This is > just my opinion, but I think it would be best for Django (and most > other python-based projects that are targeted at a large user bases) > to wait until python 3 hits a version where it has stabilized and then > do a port based on hand checking and modification of machine > translated code. > > In general, the more versions of a language targeted by a project, the > less efficient the project is. I'd say py3k is a great chance to > 'start clean' more or less: deprecate the python 2.x code and have > Django for python 3 be the official release. > > Python 3 makes it easy to get the right version to the right people. > There will be one distribution for python 2.x and one for python 3. > Django currently supports so many versions of python because so many > are in use. Python 3 is a great opportunity to trim this down, make > development easier, and still have something to give those who cannot > or will not upgrade to python 3. > > This is, after all, just my opinion. If you choose to go forward with > it, or if this gets accepted for Summer of Code, good luck with it, I > look forward to seeing what you produce. > > Sage > +1 Think about what KDE did when porting the codebase to Qt4. There was a translation tool released by TrollTech, but had exactly the same problems Sage has mentioned: you're code wasn't optimized for the new version of the toolkit. So, they decided to reimplemente a bunch of things, breaking the API and the ABI, but taking full advantage of the new toolkit. On the other hand, it's usually a tedious task, but and the end of the day, the benefits outweigh the hassle of rewriting some parts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
I'll throw in my 2 cents too: I think machine based translation is iffy at best. I'm not the most up-to-date on py3k, but I have experience with other such projects (I wrote a Perl 5 to Perl 6 translator for Summer of Code 2006). This is just my opinion, but I think it would be best for Django (and most other python-based projects that are targeted at a large user bases) to wait until python 3 hits a version where it has stabilized and then do a port based on hand checking and modification of machine translated code. In general, the more versions of a language targeted by a project, the less efficient the project is. I'd say py3k is a great chance to 'start clean' more or less: deprecate the python 2.x code and have Django for python 3 be the official release. Python 3 makes it easy to get the right version to the right people. There will be one distribution for python 2.x and one for python 3. Django currently supports so many versions of python because so many are in use. Python 3 is a great opportunity to trim this down, make development easier, and still have something to give those who cannot or will not upgrade to python 3. This is, after all, just my opinion. If you choose to go forward with it, or if this gets accepted for Summer of Code, good luck with it, I look forward to seeing what you produce. Sage On Thu, Mar 27, 2008 at 5:05 PM, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Hi, > > I think that the pure process of porting Django is a good testcase for > python 3 and for 2to3. So, even if the resulting code could not be used, > the result would still be valuable to python. And that is also good for > Django! > > > Just my 2c, > > Michael > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
Hi, I think that the pure process of porting Django is a good testcase for python 3 and for 2to3. So, even if the resulting code could not be used, the result would still be valuable to python. And that is also good for Django! Just my 2c, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
> The specific issues I've run into so far: > > * Exception-catching syntax (i.e. ``except Whatever as e`` vs. > ``except Whatever, e``). 2to3 fixes these, and transparently transforms "the except clauses. > * Unicode literals (u'...'). Likewise, 2to3 removes the u"" prefix. So leave the code as-is, and have 2to3 fix it at installation time (whenever setup.py is invoked by 3.x; setup.py itself runs without changes on 3.x) > Those are the show-stoppers (for me -- maybe I'm just missing > something?) Indeed - the ability to have 2to3 fix it for you. There are more essential fixes that 2to3 supplies, in particular fixes to relative imports, plus a number of non-essential ones, such as the replacement of the unicode identifer with str. >, but I'm actually more worried about the subtle > differences between str/unicode and bytes/str... I suspect there'll be > many subtle bugs there. Indeed, this needs a lot of testing. > Ditto anything using io, really, because the > new io library isn't in any way the same as the old one (in a good way > :) Not so. open() pretty much works the same way as it did before, except that Django should open files in binary mode most of the time. > I'm also just worried about the uglyness of code needed to maintain > something like this. Like about all the ImportErrors we'll have to > catch once all the stdlib reorg happens... It's possible to factor those out if things get too unreadable. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
> > You can (probably) support Python 2.x and Python 3.x out of a single > > source tree. > > From what I've read, this is true as long as the X after 2 is >= 6. > That's a problem with Django's stated intent to support Python 2.3 on > Django's release 1.0. > > Please correct me if I'm wrong on this. This is wrong; my port works nicely on 2.3 (only 2.5 tested) except for a few minor bugs in 2to3, see http://wiki.python.org/moin/PortingDjangoTo3k Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 3:19 PM, Daryl Spitzer <[EMAIL PROTECTED]> wrote: > Do you maintain them side-by-side, or do you just reject patches that > require new features introduced in 2.4 and 2.5? (I just assumed that > you maintain 2.3 compatibility by testing on 2.3.) Exactly. It's not like testing on 2.3, 2.4, and 2.5 (and soon 2.6) is an easy thing to do. Adding another release (times N database backends, times N OSes, etc.) exponentially increases the number of possible bugs. I'm trying to *reduce* the number of support Pythons before we start adding new ones! Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 4:21 PM, Martin v. Löwis <[EMAIL PROTECTED]> wrote: > No hurt feelings, no. However, I would find it useful if you could > add specific reservations and doubts to that. What aspects of Django > (that I perhaps haven't touch yet) do you consider unmaintainable > under such approach? The specific issues I've run into so far: * Exception-catching syntax (i.e. ``except Whatever as e`` vs. ``except Whatever, e``). * Unicode literals (u'...'). Those are the show-stoppers (for me -- maybe I'm just missing something?), but I'm actually more worried about the subtle differences between str/unicode and bytes/str... I suspect there'll be many subtle bugs there. Ditto anything using io, really, because the new io library isn't in any way the same as the old one (in a good way :) I'm also just worried about the uglyness of code needed to maintain something like this. Like about all the ImportErrors we'll have to catch once all the stdlib reorg happens... Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
> Please see my recent report: 0 years, 0 months, 0 days, 0 seconds. > You can (probably) support Python 2.x and Python 3.x out of a single > source tree. >From what I've read, this is true as long as the X after 2 is >= 6. That's a problem with Django's stated intent to support Python 2.3 on Django's release 1.0. Please correct me if I'm wrong on this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
> I hope you won't take it the wrong way when I say I have an extremely > difficult time believing that. No hurt feelings, no. However, I would find it useful if you could add specific reservations and doubts to that. What aspects of Django (that I perhaps haven't touch yet) do you consider unmaintainable under such approach? Web server, models, and templating seem to work fine. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 3:56 PM, Martin v. Löwis <[EMAIL PROTECTED]> wrote: > Please see my recent report: 0 years, 0 months, 0 days, 0 seconds. > You can (probably) support Python 2.x and Python 3.x out of a single > source tree. I hope you won't take it the wrong way when I say I have an extremely difficult time believing that. At any rate, there are things of more practical use we can and should be considering for SoC; porting to Python 3.0 would be much less of a "because it's useful to people" and more of a "because we can", and that's the wrong way to approach SoC. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
> Except if Django has a Python 3.0 version, say, this fall, that means > how many years of supporting two parallel versions of Django and > merging features and fixes back and forth between them? Please see my recent report: 0 years, 0 months, 0 days, 0 seconds. You can (probably) support Python 2.x and Python 3.x out of a single source tree. > And if the > initial port isn't supported that long, don't we just get to port all > over again down the line? If the porting strategy is used that I'm proposing, the worst thing that may happen is that the 3.x support in Django suffers from bitrot, but it won't be wasted if people start picking it up again. More likely, people occasionally try it out again, and prevent bitrot by providing fixes. Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
> I'm still a bit worried about the fact that, aside from Django being a > moving target and Python 3.0 being a moving target, WSGI for Python > 3.0 is *also* a moving target; there still seems to be a fair bit that > hasn't been settled on how things ought to work. That is the reason why I think this project *should* be a SoC project. Python 3 being a moving target is a good thing for the project (although certainly a challenge for the student). It's likely that problems are detected in Python 3 in the way of porting applications such as Django, and those problems can be easily fixed before Python 3 gets released. Fixing them afterwards is much more difficult. So porting *should* start before Python 3 is released, to simplify it, not afterwards. (of course, the code should be released for general use only after Python 3 is released). Regards, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
Jacob writes: > It's hard enough maintaining 2.3, 2.4, and 2.5 side-by-side... Do you maintain them side-by-side, or do you just reject patches that require new features introduced in 2.4 and 2.5? (I just assumed that you maintain 2.3 compatibility by testing on 2.3.) -- Daryl On Thu, Mar 27, 2008 at 12:43 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On Thu, Mar 27, 2008 at 2:30 PM, Rodrigo Bernardo Pimentel > <[EMAIL PROTECTED]> wrote: > > Thanks again for your feedback, James! I'd love to hear more from other > > developers on this matter. > > I have to say I agree with James on this one. SoC projects out to be > stuff that can *finished* in a couple of months; Django on 3.0 is a > long process, and a sorta-kinda version just isn't worth anyone's > efforts. > > > > I have a different view of GSoC projects. I don't think it should be an > > isolated, "end of summer, end of story" project. > > I'm really glad you see it that way -- my dream for SoC is that > students stick around and become contributors. However, that's > something that's impossible to predict so we have to be pragmatic in > what projects we accept. I have no reason to doubt your commitment, > but something as big and open-ended as this project just isn't a good > match. > > The biggest problem is maintainance. I don't think we've got the > collective time and energy to maintain two parallel versions of Django > -- even if one version is automatically generated with 2to3. It's hard > enough maintaining 2.3, 2.4, and 2.5 side-by-side; 3.0 isn't yet worth > the effort. > > We've committed to 2.3 compatibility in Django 1.0, and that's what > we'll do. Once that's behind us, we can start dropping older versions > until we're ready to make the big jump. > > Jacob > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 2:35 PM, Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> wrote: > I'd argue that Python 3.0 is not that much of a moving target either. Of > course, such a porting project would require following development of 2to3. Then you need to read the Py3k PEPs more closely. PEP 3000 says: I expect that Python 3.1 and 3.2 will be released much sooner after 3.0 than has been customary for the 2.x series. The 3.x release pattern will stabilize once the community is happy with 3.x. This implies that a number of quick changes will happen between 3.0 and 3.1. This matches something Guido has said in public and on mailing lists; he's indicated that 3.0 is really the "early adopters" release, and that he expects most people to switch around the 3.1 release. Also notice that the 3.0 alphas have been anything but stable; there have been serious feature changes (including changes to the new io library, changes to the byte/string API, etc.) between releases. On top of that, the C API is still not yet finalized, and there's no way anyone can start writing stable 3.0 C-extensions without a final API. Jacob NB: As I read the above it looks like I'm ragging on 3.0. That could hardly be farther from the truth; I'm incredibly excited about the awesome shit in 3.0 and I can't WAIT to get my hands on it. However, you need to keep in mind that Guido himself sees a *five year* transition period from 2 - 3. The only thing we'll get by being antsy now is a bunch of work in the future. Once 3.0 stabilizes, and once we start dropping support for older Pythons from Django, this work will go much much easier. We just need a bit of patience. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 2:30 PM, Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> wrote: > Thanks again for your feedback, James! I'd love to hear more from other > developers on this matter. I have to say I agree with James on this one. SoC projects out to be stuff that can *finished* in a couple of months; Django on 3.0 is a long process, and a sorta-kinda version just isn't worth anyone's efforts. > I have a different view of GSoC projects. I don't think it should be an > isolated, "end of summer, end of story" project. I'm really glad you see it that way -- my dream for SoC is that students stick around and become contributors. However, that's something that's impossible to predict so we have to be pragmatic in what projects we accept. I have no reason to doubt your commitment, but something as big and open-ended as this project just isn't a good match. The biggest problem is maintainance. I don't think we've got the collective time and energy to maintain two parallel versions of Django -- even if one version is automatically generated with 2to3. It's hard enough maintaining 2.3, 2.4, and 2.5 side-by-side; 3.0 isn't yet worth the effort. We've committed to 2.3 compatibility in Django 1.0, and that's what we'll do. Once that's behind us, we can start dropping older versions until we're ready to make the big jump. Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 2:30 PM, Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> wrote: > Besides, people are already experimenting with porting their code to py3k, > so I'm getting the feeling it won't take so long for libraries to get > ported. Requests from Django developers who are already playing with py3k > code should help speed up that process. Except if Django has a Python 3.0 version, say, this fall, that means how many years of supporting two parallel versions of Django and merging features and fixes back and forth between them? And if the initial port isn't supported that long, don't we just get to port all over again down the line? Logistically, this just doesn't work right now. Maybe it'd be a good project for SoC 2010 instead... -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27 2008 at 06:25:52AM BRT, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Mar 27, 7:17 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > > I'm still a bit worried about the fact that, aside from Django being a > > moving target and Python 3.0 being a moving target, WSGI for Python > > 3.0 is *also* a moving target; there still seems to be a fair bit that > > hasn't been settled on how things ought to work. > > Thus, I don't really see WSGI for > Python 3.0 as being a moving target, I'd argue that Python 3.0 is not that much of a moving target either. Of course, such a porting project would require following development of 2to3. rbp -- Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> | GPG KeyId: <0x0DB14978> http://isnomore.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Mar 27, 9:36 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Mar 27, 8:25 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > On Mar 27, 7:17 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > > On Thu, Mar 27, 2008 at 12:56 AM, Graham Dumpleton > > > > <[EMAIL PROTECTED]> wrote: > > > > Actually, I already have a copy of mod_wsgi mostly working on Python > > > > 3.0, just sorting out areas where now need to handle both unicode and > > > > bytes, where before only used to have to deal with bytes (old string > > > > object). > > > > Hence my comment about the rest of us being mere mortals ;) > > > > I'm still a bit worried about the fact that, aside from Django being a > > > moving target and Python 3.0 being a moving target, WSGI for Python > > > 3.0 is *also* a moving target; there still seems to be a fair bit that > > > hasn't been settled on how things ought to work. > > > Having updated mod_wsgi for Python 3.0, the WSGI changes aren't really > > as big a deal as I thought they would be. A lot of code could in > > practice should work just fine without requiring changes, at least as > > far as the WSGI interface goes. Thus, I don't really see WSGI for > > Python 3.0 as being a moving target, it all sort of falls out quite > > simply and logically when you get in and do it. I will admit that I > > probably got it quite easy though as the changes for Python 3.0 at the > > C API level where mod_wsgi exclusively works were really minor, and > > were perhaps much less than what a WSGI adapter written in Python code > > would have to deal with. The final code for the updated mod_wsgi > > should quite happily compile on old and new Python with only a few > > #ifdefs for new Python. > > > It will be interesting to see to what degree Martin actually had > > Django running under Python 3.0 because I'll be pushing something back > > into the mod_wsgi repository quite soon which will allow it to be > > tested under Apache with Python 3.0. > > If curious enough that you want to start playing (Martin???), have > committed initial changes into source code repository for mod_wsgi and > Python 3.0. Works for basic hello world program although I know I > still have more work to do with updating some stuff like write() > function and wsgi.errors to accept unicode strings in correct ways to > satisfy suggested changes to WSGI specification. I also haven't touch > non WSGI stuff like auth and dispatch hooks. > > Biggest problem I got now is working out all the module changes. Also > little things like open() not being available when run under mod_wsgi > even though it is with command line Python 3.0. > > If you have any feedback, perhaps bring it to the mod_wsgi discussion > group on Google groups. Hmmm, I guess location of repository would be a good idea: http://code.google.com/p/modwsgi/source/checkout Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Mar 27, 8:25 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Mar 27, 7:17 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > > > On Thu, Mar 27, 2008 at 12:56 AM, Graham Dumpleton > > > <[EMAIL PROTECTED]> wrote: > > > Actually, I already have a copy of mod_wsgi mostly working on Python > > > 3.0, just sorting out areas where now need to handle both unicode and > > > bytes, where before only used to have to deal with bytes (old string > > > object). > > > Hence my comment about the rest of us being mere mortals ;) > > > I'm still a bit worried about the fact that, aside from Django being a > > moving target and Python 3.0 being a moving target, WSGI for Python > > 3.0 is *also* a moving target; there still seems to be a fair bit that > > hasn't been settled on how things ought to work. > > Having updated mod_wsgi for Python 3.0, the WSGI changes aren't really > as big a deal as I thought they would be. A lot of code could in > practice should work just fine without requiring changes, at least as > far as the WSGI interface goes. Thus, I don't really see WSGI for > Python 3.0 as being a moving target, it all sort of falls out quite > simply and logically when you get in and do it. I will admit that I > probably got it quite easy though as the changes for Python 3.0 at the > C API level where mod_wsgi exclusively works were really minor, and > were perhaps much less than what a WSGI adapter written in Python code > would have to deal with. The final code for the updated mod_wsgi > should quite happily compile on old and new Python with only a few > #ifdefs for new Python. > > It will be interesting to see to what degree Martin actually had > Django running under Python 3.0 because I'll be pushing something back > into the mod_wsgi repository quite soon which will allow it to be > tested under Apache with Python 3.0. If curious enough that you want to start playing (Martin???), have committed initial changes into source code repository for mod_wsgi and Python 3.0. Works for basic hello world program although I know I still have more work to do with updating some stuff like write() function and wsgi.errors to accept unicode strings in correct ways to satisfy suggested changes to WSGI specification. I also haven't touch non WSGI stuff like auth and dispatch hooks. Biggest problem I got now is working out all the module changes. Also little things like open() not being available when run under mod_wsgi even though it is with command line Python 3.0. If you have any feedback, perhaps bring it to the mod_wsgi discussion group on Google groups. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Mar 27, 7:17 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 12:56 AM, Graham Dumpleton > > <[EMAIL PROTECTED]> wrote: > > Actually, I already have a copy of mod_wsgi mostly working on Python > > 3.0, just sorting out areas where now need to handle both unicode and > > bytes, where before only used to have to deal with bytes (old string > > object). > > Hence my comment about the rest of us being mere mortals ;) > > I'm still a bit worried about the fact that, aside from Django being a > moving target and Python 3.0 being a moving target, WSGI for Python > 3.0 is *also* a moving target; there still seems to be a fair bit that > hasn't been settled on how things ought to work. Having updated mod_wsgi for Python 3.0, the WSGI changes aren't really as big a deal as I thought they would be. A lot of code could in practice should work just fine without requiring changes, at least as far as the WSGI interface goes. Thus, I don't really see WSGI for Python 3.0 as being a moving target, it all sort of falls out quite simply and logically when you get in and do it. I will admit that I probably got it quite easy though as the changes for Python 3.0 at the C API level where mod_wsgi exclusively works were really minor, and were perhaps much less than what a WSGI adapter written in Python code would have to deal with. The final code for the updated mod_wsgi should quite happily compile on old and new Python with only a few #ifdefs for new Python. It will be interesting to see to what degree Martin actually had Django running under Python 3.0 because I'll be pushing something back into the mod_wsgi repository quite soon which will allow it to be tested under Apache with Python 3.0. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27, 2008 at 12:56 AM, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Actually, I already have a copy of mod_wsgi mostly working on Python > 3.0, just sorting out areas where now need to handle both unicode and > bytes, where before only used to have to deal with bytes (old string > object). Hence my comment about the rest of us being mere mortals ;) I'm still a bit worried about the fact that, aside from Django being a moving target and Python 3.0 being a moving target, WSGI for Python 3.0 is *also* a moving target; there still seems to be a fair bit that hasn't been settled on how things ought to work. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Mar 27, 4:41 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > And it's extremely > unlikely that there'll be stable web server interfaces to run behind; > at this point we're still not quite certain what WSGI on Python 3.0 is > going to look like, and though Graham is a god among mere mortals I > doubt very much that there'll be a mod_wsgi or a mod_python ready for > general use in time to handle this. Actually, I already have a copy of mod_wsgi mostly working on Python 3.0, just sorting out areas where now need to handle both unicode and bytes, where before only used to have to deal with bytes (old string object). Actually not that many changes needed in the end. As to mod_python, I know I will not be porting that and so I somewhat doubt whether it ever will be ported. Graham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Re: Porting Django to Python 3.0 as a GSoC project
On Thu, Mar 27 2008 at 01:31:04AM BRT, Sage La Torra <[EMAIL PROTECTED]> wrote: > On Wed, Mar 26, 2008 at 6:03 PM, <[EMAIL PROTECTED]> wrote: > > I wrote him and said I had contemplated porting Django to py3k as a > > project for the Google Summer of Code. He answered that there was > > probably still much work left, and that I should contact the Django > > developers about it. So here I am :) > > Sounds cool to me. I do have a couple of questions: > > First of all, do you plan on using the 2to3 tool, or do you plan on > mostly doing it by hand? I intend to use 2to3. It is the recommended migration path, and part of the project is to use the Django migration as a documented migration example. Of course, using 2to3 also means adjusting code in 2.x so that it is 2to3-friendly. > Second of all, do you think this is a reasonable scope for a one > summer project? The official Google timeline is May-August, so if you > think you need more time then that you should start noting that now, > just so everybody knows what to expect. >From what I've seen of Martin's first migration attempt, I think it is feasible, though it'll probably be demanding. I must also take into account that, as far as I could tell, Django intends to remain 2.3-compatible, so that should create some aditional complexity. Still, my goal is to have a well-defined and reproducible migration path to have Django fully working on pyk3. As for whether it should be included in trunk or as a branch, I'd like input from my would-be mentor, as well as on what concerns external dependencies that might also need porting. > Anyway, good luck with the Summer of Code. Thanks, and thanks for the feedback! :) Cheers, rbp -- Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> | GPG KeyId: <0x0DB14978> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Wed, Mar 26, 2008 at 7:03 PM, Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> wrote: > Martin mentioned that he would be willing to co-mentor me for GSoC along > with a Django developer, with either one being the "official" mentor. > > So I'd like to know what you think about this as a GSoC project, and if > someone would be willing to mentor (or co-mentor) me on it. Although I'm not mentoring this year (the period when the most work needs to be done on the mentor side is, coincidentally, the period when I'll be tearing my hair out trying to finish writing a book), and though I'm not saying that you shouldn't apply for SoC, I'd like to say that I'd approach this with extreme reservations. Here's why: Porting Django to Python 3.0 at this point is likely to be a rather complex task; it'll require a solid working knowledge of both Django's internals and Python 3.0, and a familiarity with the codebases that can only come from an extensive commitment to knowing and understanding both. So I'm a bit worried that anyone would try it without the requisite background in how Django currently works or a history of contributing code to the project. Add to that the fact that "Django", just Django, doesn't exist in a vacuum: at a bare minimum it needs database adapters and a web server interface. It's unlikely that any of the non-SQLite database adapters will be ported to Python 3.0 by the time SoC is over, which means that you'd have something that only runs on SQLite. And it's extremely unlikely that there'll be stable web server interfaces to run behind; at this point we're still not quite certain what WSGI on Python 3.0 is going to look like, and though Graham is a god among mere mortals I doubt very much that there'll be a mod_wsgi or a mod_python ready for general use in time to handle this. And on top of that, the big draw of Python and, by extension, Django, is and always will be the rich ecosystem of third-party code to draw on in writing applications. If I need to deal with feeds I go grab the feedparser. If I need to scrape HTML I use BeautifulSoup. If I need to talk to a web service I use a Python wrapper around its API. There's a vast amount of software out there that's necessary to make any Python web framework truly useful, and it's going to be a good long while before enough of it is on 3.0 to really offer anything to application writers. So even if this project wraps up with a spot-on perfect port of the Django codebase, it would still be developing something that only runs on (at most) one database, probably can't actually sit behind a web server, and which doesn't have any useful third-party code to draw upon. To me, the key to a successful SoC proposal is something that, at the end of the summer there's something people can immediately pick up and get use out of, something that's already adding value to Django for end users. And unfortunately, porting to Python 3.0 -- while a cool thing to do -- isn't likely to be of much practical use any time this decade. So if I were mentoring (and, hence, judging applications as they come in), I'd probably give this an immediate -1 in favor of something which will add practical value to Django by the end of the summer. Python 3.0's cool, don't get me wrong, but porting Django to it is going to be a long and tricky process unfit for the SoC timeline, and it's probably going to be two or three years before it's anywhere near as useful as Django already is on Python 2.x. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Porting Django to Python 3.0 as a GSoC project
On Wed, Mar 26, 2008 at 6:03 PM, Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> wrote: > > Hi! > > A few days ago, Martin Löwis mentioned here and on the python-3000 list that > he had started porting Django to Python-3000 > > (http://groups.google.com/group/django-developers/browse_thread/thread/d0922f1d56b09a4c). > I wrote him and said I had contemplated porting Django to py3k as a project > for the Google Summer of Code. He answered that there was probably still > much work left, and that I should contact the Django developers about it. So > here I am :) > Sounds cool to me. I do have a couple of questions: First of all, do you plan on using the 2to3 tool, or do you plan on mostly doing it by hand? Second of all, do you think this is a reasonable scope for a one summer project? The official Google timeline is May-August, so if you think you need more time then that you should start noting that now, just so everybody knows what to expect. Anyway, good luck with the Summer of Code. > I don't have extensive Django experience, but I've been playing with it for > a while and am very impressed (which is why I thought of porting it in the > first place). I'm currently starting a few projects with it, both > professional and free software (about which I hope you'll hear more > soon). I'm a Computer Science MSc student with ~5 years of Python experience > (and also a few years of Zope/Plone experience, which is also why I've been > looking at Django ;)). > > Martin mentioned that he would be willing to co-mentor me for GSoC along > with a Django developer, with either one being the "official" mentor. > > So I'd like to know what you think about this as a GSoC project, and if > someone would be willing to mentor (or co-mentor) me on it. > > Thanks! > > > rbp > -- > Rodrigo Bernardo Pimentel <[EMAIL PROTECTED]> | GPG KeyId: <0x0DB14978> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---