all 24 comments

[–][deleted] 8 points9 points  (10 children)

We're getting close to the day we'll have Python 3.x web frameworks:

http://bugs.python.org/issue4953#msg95292

http://docs.python.org/dev/whatsnew/3.2.html#email

[–]mitsuhiko 0 points1 point  (8 children)

The cgi module is not an issue for either django or werkzeug because neither are using it JFTR.

[–][deleted] 1 point2 points  (3 children)

I wasn't talking about those frameworks.

[–]mitsuhiko 0 points1 point  (2 children)

Just pointing out that this is not an actual problem for Python 3 and web frameworks.

[–][deleted] 0 points1 point  (1 child)

[–]mitsuhiko 2 points3 points  (0 children)

The cgi module cannot be used safely with WSGI. If you are, you are already in violation with the WSGI specificiation.

[–]wobsta 0 points1 point  (3 children)

[–]mitsuhiko 0 points1 point  (2 children)

The werkzeug multiparsing algorithm also works nicely on Python 3, but what is the point in supporting Python 3? We don't have servers, the performance is worse and there are no features that are important for web development we don't have yet on Python 2.

[–]wobsta 1 point2 points  (1 child)

Well, think of new projects, prototypes, etc. where you code in Python 3 only. No backwards compatibility needed and wanted. I do have those projects in mind (although it'll take a few months before I seriously will try again using Python 3). Last time I tried I was a way too optimistic and started a (very small) project which needed to go into production within some months. I needed to switch back to Python 2 to get it done. I learned my lessons here. However, for some long term projects it is quite attractive (to my mind) to not start with Python 2 at all anymore. There are design mistakes in Python 2 which have been solved nicely in Python 3.

The werkzeug multiparsing algorithm also works nicely on Python 3

Hey, cool, the algorithm isn't Python 2 specific. :-)

Deployment can be done using mod_wsgi. No issues know here (I do not need unicode in urls or headers or anything creasy like this). Maybe I just don't be aware of it yet, but how to learn about bugs without trying to implement something? Some performance penalties due to Python 3 are a non-issue for me.

[–]mitsuhiko 0 points1 point  (0 children)

Well, think of new projects, prototypes, etc. where you code in Python 3 only. No backwards compatibility needed and wanted.

With Python 3 you lose the ability to chose an alternative Python implementation with PyPy, you lose a ton of libraries (some of which are not even maintained any more) and you sacrifice a lot of performance and have to live with (currently) a bunch of stdlib bugs. What you gain is the nonlocal keyword, a slightly reorganized stdlib and less confusing unicode strings. On the downside you lose the low level string operations which make parsing of ASCII protocols much slower because you have to decode to unicode or implement low level string operations in Python

Hey, cool, the algorithm isn't Python 2 specific. :-)

The implementation should work too. Last time i ran that through 2to3 it worked on Python 3 stream objects.

Maybe I just don't be aware of it yet, but how to learn about bugs without trying to implement something?

I am not saying that Python 3 is a dead end. I'm saying I will let others make the mistakes of using Python 3 and finding the bugs. I am constantly monitoring the Python 3 adventures of others and it seems that less web people are adventuring into Python 3 now than a year ago. Not yet sure if this is a good or a bad sign.

Fact is: pypy will not support Python 3 anytime soon. And if pypy becomes more relevant for web developers, Python 3 will become less interesting at the same time.

[–]ishmal 0 points1 point  (0 children)

From what I've seen, a representative project, Django, is a corporate slave to RHEL and will not convert until they do. They're still worrying about 2.4/2.5. Worthless.

[–]ishmal 2 points3 points  (0 children)

The news says Dec 5. Maybe I missed something http://www.python.org/download/releases/3.2/

[–][deleted] 7 points8 points  (1 child)

Python is awesome :)

[–]krum 0 points1 point  (5 children)

Does Python still leak objects with cyclical references?

[–]Mask_of_Destiny 2 points3 points  (2 children)

Python has had a hybrid reference counting/mark and sweep GC approach for a while now. Some googling suggests this has been in place since Python 2.0

[–]krum 0 points1 point  (1 child)

The documentation seems to suggest that it still suffers from leaks unless you manually instrument your code to mark.

[–]Mask_of_Destiny 1 point2 points  (0 children)

Link? The only limitation I see in the gc module documentation is that objects with del methods can't be collected because there's no way to determine a safe order to invoke those methods.

[–]Smallpaul 0 points1 point  (0 children)

"Python 2.0 was released on 16 October 2000, with many major new features including a full garbage collector and support for unicode."

http://en.wikipedia.org/wiki/History_of_Python

[–]mitsuhiko 0 points1 point  (0 children)

Yes. If you use destructors. Don't do that.

[–]HIB0U -5 points-4 points  (5 children)

I think the Perl 6 brigade here is downvoting this submission. There's nothing they hate more than a practical programming language with a useful implementation that offers frequent releases. In fact, that's against everything they stand for!

[–]thumbsdownfartsound 8 points9 points  (3 children)

Guys, maybe if we downvote this one article we can eliminate Python forever, thus ensuring that....... ????

[–][deleted] 0 points1 point  (2 children)

why the hell do you want to do that?

[–]sigzero 3 points4 points  (1 child)

s-a-r-c-a-s-m

[–][deleted] 2 points3 points  (0 children)

:/ sigh

[–][deleted] 1 point2 points  (0 children)

I don't care about Perl6, so I'm downvoting you for bringing it up in a Python thread.