Live data from Hacker News

Removing Python 2.x support from Django for version 2.0

github.com

181–190 of 413 posts

Re: Removing Python 2.x support from Django for version 2.0

#181
post #139
post #126

Earlier quoted context omitted.

I would bet my horse on https://trypyramid.com/ when it comes to API consistency, I've updated my applications from 0.9 to 1.7 and that was a breeze. Over the years it was exceptionally great experience.

Pyramid is great, but for years they had a ridiculous Iron Maiden- heavy metal like branding [0] which make it hard to sell it in the corporate world. I'm glad they evolved on this point. [0] http://keitheis.github.io/use-pyramid-like-a-pro/?full#Cover

Not to mention, a few parts / typical components of pyramid are kind of nuts, like auth. Colander is also a struggle to use.

Still my go-to framework though. The websauna framework linked above might be something I have to try.

As I build more and more side projects I find myself wishing pyramid were just a bit more opinionated so I could get the basics up and running a tad faster. At this point I mostly cut up old projects and port them to each next one, heh

Re: Removing Python 2.x support from Django for version 2.0

#182

I have a Python 2.7 project that has been running smoothly for many years now and I'm having trouble finding a reason to upgrade to Python 3. The project uses the unicode type to represent all strings, and encodes/decodes as necessary (usually to UTF-8) when doing I/O. I haven't really had any of the Unicode handling problems that people seem to complain about in Python 2. Can someone explain what benefit I would act…

You gain access to continued language support in 2020. New features involving strings will have less risk of bugs. The "range" function is more memory efficient. Integer division automatically floors, reducing bug risk. Dictionaries with guaranteed ordering. Thousands separator in string formatting. Bit length on integers. Combinations with replacement on itertools. New, faster I/O library and faster json. Concurrent futures module. Ability to define stable ABI for extensions. New CLI option parsing module. Dictionary-based logging configuration. Index and count on ranges. Barrier synchronization for threads. Faster sorting via internal upgrade to Timsort. Async I/O. Support for spawn and forkserver in multiprocessing. Child context in multuprocessing. Has collision cost reduced. Significantly faster startup. Type hints. Faster directory traversal. Faster regular expression parsing. Faster I/O for bytes. Faster dumps. Reduced method memory usage through better caching. Dramatically less memory usage by random. Faster string manipulation. Faster propert calls. Formatted string literals (interpolated strings). Asynchronous generators. Asynchronous comprehensions.

How much faster might your code run just by upgrading to Python 3? How much memory might you save?

Re: Removing Python 2.x support from Django for version 2.0

#183

Earlier quoted context omitted.

What py3 does is it enforces the things that py2 only suggests as far as unicode goes. That means on py2 you can go for the proper handling and if you did do everything right, then py3 migration should be almost boring. The difference is when you didn't handle all the cases correctly. In that situation Py2 will silently do either the right, or the wrong thing and you'll never know. Py3 will likely throw an extension…

I'm fairly sure I'm handling strings correctly under Python 2. What I'm not sure of is the risk of something breaking if I upgrade to Python 3, especially when it comes to upgrading external dependencies. Even if it's just non-backwards compatible API changes, it's more risk to deal with.

Do you think you will ever have to move to Python 3?

Re: Removing Python 2.x support from Django for version 2.0

#185

Earlier quoted context omitted.

> As someone who has 6 comments in this thread yourself, I don't think you are in position to complaint. This isn't a numbers contest. Unlike yours, none of my comments are shitting on the efforts of volunteers that are doing their best to keep people like you happy and making money using a project you're not paying for. > So maybe you want to recheck with reality whether the transition was a success instead of argui…

> This isn't a numbers contest. And yet you complained about my many comments. If you just had an issue with their content, you could have said so instead of that, and with specific arguments not just "stop" and "lalala hands in the ears, I don't want to hear you". > Unlike yours, none of my comments are shitting on the efforts of volunteers that are doing their best to keep people like you happy and making money usi…

> If you just had an issue with their content, you could have said so

I did. I did not think I needed an argument to ask you to stop bringing such an incredibly negative attitude to the table.

> You don't know what I've paid

I was referring to Django, to be clear. And whatever you've paid, it's in donations -- that's great! But if you want to see support, you'll need to directly pay people to maintain that support. I believe in fact you yourself said that before, here on HN, about other tech.

> The community of a language's users can, and do, have an opinion on its progress and the changes that happen to it

"as long as that opinion is the same as mine", right?

I mean, here is one of your comments for example:

> Some of us have 10+ years of codebases to maintain, and we don't care for Python 3 features

This is basically saying "I do not care for python 3 features, therefore Python 2 should continue being supported even longer [because I have an old codebase to maintain]".

The argument in a nutshell is that because the transition is hard, the Python team should just give up on the transition and support both. It's an argument I've heard before. The reason it doesn't hold water is because doing so would completely kill the language, for good.

We all, as the python community, collectively admitted that the Python 3 transition was awful. It still is pretty bad, although it has improved a lot. Could still be better! But now, we're on the final stretch and the remaining complaints are from people in similar situations as you: Large Python 2 codebase to maintain, therefore can't switch, therefore "please give us more time, and by more time I mean just forget Python 3 ever happened and come back".

Another place I've heard that argument is back when IE6 went EOL. And went EOL again. And a third time for good measure. And then MS had to declare it dead for good. It was holding the web back and we've been better since. We had the same sort of people back then, asking for "more time", "more leeway", "more support" and "please add ActiveX back to the web we promise we'll switch eventually". Do I need to give an argument why that didn't hold water then either?

I am sorry that you have to deal with that. It sucks. I've been in this position before (different language) and back then, FWIW, we bit the bullet and we migrated. It sucked for two months, and then it didn't. The longer we'd have waited, the longer it would have sucked. I can only recommend you do the same; it's a good long term investment.

At the end of the day, you can try to pull all the numbers you want, the Python team isn't going to suddenly go back on the plan they've been making very clear and insisted on for several years now. Because it would be a betrayal to the rest of the Python community and would severely harm the language and its future. I do believe it's extremely selfish of you at this point to ask that they cater to the group you happen to be a part of, rather than the overall good of the community.

Re: Removing Python 2.x support from Django for version 2.0

#186
post #158

Earlier quoted context omitted.

Python 3.0 was released in 2008. Python 2 will EOL in 2020. You've had about 9 years to start the transition to 3.0, and you still have 3 more years before EOL. A 12-year upgrade window sounds pretty reasonable.

> You've had about 9 years to start the transition to 3.0, and you still have 3 more years before EOL. Most of those years library support was non-existent or lacking. And still today the majority uses Python 2.x (Pypi stats). So it's not like the migration was some great success since the start, and all those years were just wasted by some minority not migrating. In the end, it's not a discussion on HN or what the "…

I think I know the chart you're referring to, but I can't find it. I remember Python 2 was in the majority in that case. Do you have the source handy?

Re: Removing Python 2.x support from Django for version 2.0

#187

Earlier quoted context omitted.

Just one step. https://code.djangoproject.com/ticket/23919

Gotcha. Thanks for the clarification (actually 2 of those steps). This is a great reference.

Also factor in halving the on going QA, testing and environment dependent bug fixing efforts.

Re: Removing Python 2.x support from Django for version 2.0

#188

Earlier quoted context omitted.

Because one is essentially EOL?

Well, I'm for user driven EOL, as opposed to top-down, we-know-better EOLining. And the latter doesn't work so well thus far for Python 3.

If enough people like Python 2 that much, I guess someone else can take over maintaining and developing this language version past the official EOL date.

Re: Removing Python 2.x support from Django for version 2.0

#189
post #139
post #126

Earlier quoted context omitted.

I would bet my horse on https://trypyramid.com/ when it comes to API consistency, I've updated my applications from 0.9 to 1.7 and that was a breeze. Over the years it was exceptionally great experience.

Pyramid is great, but for years they had a ridiculous Iron Maiden- heavy metal like branding [0] which make it hard to sell it in the corporate world. I'm glad they evolved on this point. [0] http://keitheis.github.io/use-pyramid-like-a-pro/?full#Cover

One of the off-putting remarks I get is, "what is this, a pyramid scheme?". I don't like the name, they should have stuck with Pylons.

Re: Removing Python 2.x support from Django for version 2.0

#190

Earlier quoted context omitted.

Python 3 is a seriously misguided project. It's got tons of newer-to-Python fans (your HN downvoter demographic), and tons of silent-majority "real-world" users especially in scientific programming who just don't like it. I moved to 3.4 a year ago and, as a data scientist, I have to say I find nothing in 3 to be better than 2, other than the extremely marginal default float arithmetic. I may be wrong for web developm…

For what it's worth, as someone who ha been working with Python for 11 years, Python 3 is a huge improvement over Python 2 and is certainly very popular with my peers. The fact that you personally weren't particularly affected by the problems in 2 doesn't mean the problems weren't serious.

and the converse applies.
Post reply on HN