Live data from Hacker News

Removing Python 2.x support from Django for version 2.0

github.com

371–380 of 413 posts

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

#371
post #59

Earlier quoted context omitted.

Why can't your Python 2 services talk to your Python 3 web app?

Why should I maintain code, servers and libs in 2 versions of a backend programming language?

Because it is and always has been a sensible middle ground between rewriting everything for every release and never upgrading.

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

#372
post #272

Earlier quoted context omitted.

Just use C++ and your Qt bindings will never go away!

Qt is a point in C++'s favour, but not enough to outweigh the downsides of the language.

Could you write your UI in c++ with custom bindings and have the rest of the app in python?

Qt's binding support has been it's biggest issue since forever.

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

#373
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.

I've been talking to some of the developers on FreeNode about their support of old releases. In particular, related to statements about "Once 1.8 comes out, 1.6 will no longer receive patches". 1.7 came out 9 months ago and 1.8 is in beta. In other words, they don't really have a LTS process. And the developers seem to think this is totally ok. In my experience, anything that doesn't have a commitment to at least fix…

But you think about this in a wrong way - pyramid is a "glue" framework, unlike django.

- request/response (webob) gets its own updates.

- templates get their own updates.

- sqlalchemy gets its own updates Etc.

You WILL get security fixes for most of your application even without upgrading the framework itself (the attack surface for pylons/pyramid itself is smaller than monolith).

By being on a lower version you don't really miss much - the API's are very stable. And 99% of time you can update pyramid version itself without risking application breakage (the chance of it is probably a lot lower than with monolithic framework).

I know about very heavy websites that are still using pylons(precursor to pyramid) in production without issues (8 years now).

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

#374
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.

My problem with Pyramid (although having never used it in production) is the same as my problem with Flask. They say "Start small, finish big", and push the fact that Pyramid scales from a single file codebase, up to many files. This is something that I just haven't seen in practice. A Django project requires quite a few files, so it's never a great answer when the total amount of business logic is The biggest red fl…

Well, for what its worth 1.7 ships with new default scaffolds that that have better separation between models,views and templates - and now is a very decent starting point with everything preconfigured for you (certainly much better than starting with flask from scratch in my opinion if you are not really experienced). You do not start with a single file codebase anymore - if you have a moment try it again you might like it.

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

#375

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…

"I have a Python 2.6 project that has been running smoothly, why upgrade to 2.7?" If you don't need any of the new features and fixes, don't, that's perfectly fine.

The difference between going from 2.6 -> 2.7 and 2.7 -> 3 is enormous though.

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

#376
post #128

Earlier quoted context omitted.

Python 2.7 will not be maintained by PSF soon anyways.

The Python 2.x EOL was extended to 2020.

Yeah thats 3 years for now... thats very little time - especially if you have to migrate old projects.

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

#377

Earlier quoted context omitted.

There are some major products like Ansible, that are still only compatible with Python 2.7.

Yea, that really annoyed be about Ansible. You have to bootstrap systems like Ubuntu Xenial which only ship Python3 using the raw tasks. As seen with Django, they were able to support both. I've been able to support both with the code base to some of my projects as well. Currently I have one project I'd like to be Python3, but it will involve forking two dependencies (owfs and phidgets) and having them support Py3 (p…

https://docs.ansible.com/ansible/python_3_support.html

> Ansible 2.2 features a tech preview of Python 3 support.

So they are working on it.

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

#378
post #376

Earlier quoted context omitted.

The Python 2.x EOL was extended to 2020.

Yeah thats 3 years for now... thats very little time - especially if you have to migrate old projects.

The same argument could be made for any arbitrary amount of time though.

1 week is not enough

1 month is not enough

1 year is not enough

5 years is not enough

10 years is not enough

20 years is not enough...

Do you really have Python projects that can't be migrated in 3 years?

At some point the line has to be drawn to move everyone forward. Extending the EOL for the last long-term of 2.7.x by 5 additional years is pretty generous.

https://pythonclock.org/

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

#379
post #71

Earlier quoted context omitted.

But the Python developers will abandon v2 sooner or later, so IMHO it's wise to start following the bilingual development guidelines https://wiki.python.org/moin/PortingToPy3k/BilingualQuickRef and eventually upgrade to v3. What are the alternatives? Forking the language or switching to another language look to have a higher cost.

Guide announced at PyCon last year that Python 2's end of life is extended to 2020. https://www.python.org/dev/peps/pep-0373/

*Guido

(auto-correct)

Post reply on HN