News for hackers. Stuff that matters.
Re:Removing Python 2.x support from Django for version 2.0 by coldtea on Thursday January 19, 2017 @04:38AM (#13434382)
>its healthy consideration for backwards compatibility

Like screwing the huge majority of users with Python 2.x Django projects and having them update or be left behind?

Re:Removing Python 2.x support from Django for version 2.0 by bildung on Thursday January 19, 2017 @05:00AM (#13434518)
It was pretty clear for multiple years that Django would eventually migrate to python3 only. Even regarding library support, I've started going python3-only with my Django projects at the beginning of 2015 and had practically zero problems, as only some esoteric packages were not supporting python3 (and then I wouldn't have used them for client projects anyway, because esoteric).

I still have one customer with a Django/python2 code base. When migrating to Django 1.11 in 2017, that project gets security updates until at least 2020. Plenty of time to gradually transition to py3. I honestly don't see the problem.

Re:Removing Python 2.x support from Django for version 2.0 by dagmx on Thursday January 19, 2017 @11:01AM (#13436778)
You're complaining about not being able to use the latest major version of a library when you refuse to change to the corresponding latest version of the language? So you want to stay cutting edge here but not there?

That's illogical and inconsistent. they're providing an LTS release for you. Get over it

Re:Removing Python 2.x support from Django for version 2.0 by danpalmer on Thursday January 19, 2017 @04:39AM (#13434391)
Well it has been on the roadmap for around 3 years, and they will have support for Python 2 in active maintenance for the next ~3 years, so I think this is actually fantastic support from the core team.
Re:Removing Python 2.x support from Django for version 2.0 by gtaylor on Thursday January 19, 2017 @04:48AM (#13434448)
It's going to be more and more of a burden for the developers to maintain compatibility with a 7-year old version of Python.

I think this is smart and will help them focus on the road forward. Django 1.11 is an LTS release, so legacy stuff can stick with it and be just fine.

Re:Removing Python 2.x support from Django for version 2.0 by coldtea on Thursday January 19, 2017 @05:00AM (#13434519)
>It's going to be more and more of a burden for the developers to maintain compatibility with a 7-year old version of Python.

That's the version of Python that most of their users actually use -- with no major plans of mass updating.

Re:Removing Python 2.x support from Django for version 2.0 by throwawayish on Thursday January 19, 2017 @05:36AM (#13434683)
Yeah no.

I know that there are domains that are mostly on Python 2, and of course you'll always have legacy / unmaintained things lying around. But "zeee majoritie is Python 2.7!!1111" does not become true by some people chanting it over and over again. The simple fact that frameworks and libraries are moving away from Python 2 already proves that the majority does, in fact, not use Python 2. Otherwise maintainers would also be in an approximate majority to block/veto such changes.

Re:Removing Python 2.x support from Django for version 2.0 by coldtea on Thursday January 19, 2017 @06:46AM (#13435026)
>But "zeee majoritie is Python 2.7!!1111" does not become true by some people chanting it over and over again.

Maybe check your language a little? "zee majoritie", "chanting it over and over" etc, gets tired and offensive soon.

That aside, there are actual numbers for Pypi supporting that. What do you have to counter these?

>The simple fact that frameworks and libraries are moving away from Python 2 already proves that the majority does, in fact, not use Python 2.

It just proves that after 7+ years, some frameworks and libs managed to justify porting over to 3 too. It doesn't say much about which is used more.

Re:Removing Python 2.x support from Django for version 2.0 by LeifCarrotson on Thursday January 19, 2017 @08:24AM (#13435548)
> there are actual numbers for Pypi supporting that. What do you have to counter these?

99% of Pypi traffic is composed of mirrors and bots. Python 3 toolchains are more likely to use tools like devpi, wheel, and Docker to cache their packages, while Python 2 toolchains are often going to hit Pypi directly.

We're concerned about which version has the majority of users, not about which has more downloads on Pypi.

Re:Removing Python 2.x support from Django for version 2.0 by lima on Thursday January 19, 2017 @10:11AM (#13436335)
Exactly. PyPi numbers are totally meaningless. It's commonly used for installing applications (that's how packages like supervisor end up in the top 20) and used in all sorts of CI scenarios.

Every OpenStack build, for example, pulls in hundreds of packages from PyPi.

In terms of real-world use, all of the Python devs I personally know moved to Python 3.

Re:Removing Python 2.x support from Django for version 2.0 by compuguy on Thursday January 19, 2017 @01:17PM (#13437992)
There are some major products like Ansible, that are still only compatible with Python 2.7.
Re:Removing Python 2.x support from Django for version 2.0 by djsumdog on Thursday January 19, 2017 @05:54PM (#13440236)
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 (phidgets actually builds and entire python3 tree and installs it and yet you can't import anything from it because it's all python2 syntax -_-)

Python 3 has been out for quite some time. I don't see why everyone is still holding out.

Re:Removing Python 2.x support from Django for version 2.0 by johnny22 on Thursday January 19, 2017 @06:55PM (#13440566)
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 by pmontra on Thursday January 19, 2017 @05:11AM (#13434570)
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.

Re:Removing Python 2.x support from Django for version 2.0 by tedmiston on Thursday January 19, 2017 @11:09AM (#13436842)
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/

Re:Removing Python 2.x support from Django for version 2.0 by tedmiston on Thursday January 19, 2017 @07:00PM (#13440610)
*Guido

(auto-correct)

Re:Removing Python 2.x support from Django for version 2.0 by sametmax on Thursday January 19, 2017 @12:48PM (#13437706)
The ruby community moved on after their last breaking change in less than 2 years.

The JS community deals with breaking changes every 3 months or so.

From Python 3.0 the end of support, you have __15 freaking years__, warnings, tutorials and excellent tooling at your disposal. Oh, on a free software. Half made by some charity workers.

Now you made a choice, and there are very good reasons to have made it. We won't criticize it.

But you lost the right to complain.

Re:Removing Python 2.x support from Django for version 2.0 by TylerE on Thursday January 19, 2017 @02:07PM (#13438553)
Ruby also BROKE A LOT LESS, and offered immediate, tangible reasons to upgrade.
Re:Removing Python 2.x support from Django for version 2.0 by gtaylor on Thursday January 19, 2017 @02:42PM (#13438840)
The reasons to upgrade are often dependent upon your usage case. To me, the Unicode improvements are reason enough on their own before you even get into the other great stuff (async work, type hinting, stdlib cleanup, pyc rework, etc).

asyncio is going to be a slow build, as the ecosystem starts unifying around it. But as that happens, we'll be much better off for it.

Re:Removing Python 2.x support from Django for version 2.0 by TylerE on Thursday January 19, 2017 @03:01PM (#13439001)
Ruby offered an immediate 25% performance increase. That's a lot less niche than Unicode.
Re:Removing Python 2.x support from Django for version 2.0 by sametmax on Friday January 20, 2017 @03:40AM (#13442436)
LOL, "niche", says the english native.

Plus, 25% of performance, while nice, is not really something that would matter for most Ruby projects. They are web projects, and their bottleneck is not Ruby. Same for Python. While I'm telling you, good unicode support in most european countries is a HUGE deal.

But that's not all. Often People thinking about Python 3 think unicode, but for me there are 2 other things that made my life much nicer:

- better debugging. Error handling is a hell lot better, with better and messages, greater granularity, more safety nets... E.g: you can't compare some objects anymore, you have several exceptions to handle file opening, imports are absolute by default, division is what you expects, a lot more operations are lazy, the stdlib has been cleaned manu redundancies, encoding parameters everywhere, etc. - less verbosity. Writting is consistently reduced. You get finner file boilerplate, shortcuts for OO, unpacking generalization, yield from, f-strings, etc.

Now those are things that are not easy to sell. You don't see them as a reason to migrate when you hear about it. But once you used to them, going back to Python 2.7 feels so bad.

Re:Removing Python 2.x support from Django for version 2.0 by cdelsolar on Thursday January 19, 2017 @05:24PM (#13440029)
Unicode is niche?
Re:Removing Python 2.x support from Django for version 2.0 by gtaylor on Thursday January 19, 2017 @05:37AM (#13434684)
We'll just have to see. That's the beauty of this. Don't want to upgrade? Stick with Django 1.11, since you don't want or need new things. It's LTS, so you won't miss out on critical fixes.
Re:Removing Python 2.x support from Django for version 2.0 by raverbashing on Thursday January 19, 2017 @05:10AM (#13434559)
Django and most libraries were already working seamlessly 2 years ago

Python 2.7 will EOL in 2020. But I guess even then some luddites will complain how they will have been left hanging

Re:Removing Python 2.x support from Django for version 2.0 by throwawayish on Thursday January 19, 2017 @05:38AM (#13434691)
When I started with Python - around 2011ish - Python 2.7 on Windows (with Qt 4) was a reasonable choice. Not much later almost everything I did was on Python 3. No regrets, no looking back, and no missed opportunities.
Re:Removing Python 2.x support from Django for version 2.0 by luckydata on Thursday January 19, 2017 @08:38AM (#13435631)
they aren't screwing anyone, if you want to stay on an outdated version of a language that won't be receiving updates you can do the same with Django.
Re:Removing Python 2.x support from Django for version 2.0 by ergo14 on Thursday January 19, 2017 @06:51AM (#13435052)
Python 2.7 will not be maintained by PSF soon anyways.
Re:Removing Python 2.x support from Django for version 2.0 by tedmiston on Thursday January 19, 2017 @11:10AM (#13436853)
The Python 2.x EOL was extended to 2020.
Re:Removing Python 2.x support from Django for version 2.0 by dragonwriter on Thursday January 19, 2017 @12:25PM (#13437480)
Which, I believe, is also the support timeline for the Django 1.x LTS release before 2.0. So Django plans to support Python 2.x as long as the PSF does.
Re:Removing Python 2.x support from Django for version 2.0 by ergo14 on Thursday January 19, 2017 @06:31PM (#13440442)
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 by tedmiston on Thursday January 19, 2017 @06:59PM (#13440597)
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 by ergo14 on Friday January 20, 2017 @04:17AM (#13442546)
I think you completly misunderstood my comment ;-) And yes 3 years for some projects with small teams is barely enough :)
Re:Removing Python 2.x support from Django for version 2.0 by JCzynski on Thursday January 19, 2017 @11:25AM (#13436981)
I suspect Python 2.x will be extended like copyright.
Re:Removing Python 2.x support from Django for version 2.0 by djsumdog on Thursday January 19, 2017 @05:59PM (#13440261)
I doubt it and that argument makes no sense. Copyright is extended thanks to the lobbying effort of huge business like Disney in order to make a ton more money.

Unless you see some big corporate support contracts coming over the horizon for PSF, not to mention they'd have to be worth the money vs the technical debt, I don't think Py2 support will get extended.

Re:Removing Python 2.x support from Django for version 2.0 by JCzynski on Wednesday January 25, 2017 @10:50PM (#13488546)
Backlash from the tons of big companies still using it will become lobbying to keep it supported. I don't expect them to stop in the next couple years, or the next few, etc.

There's less muscle behind keeping Python 2, but there's a lot less muscle needed to keep it going than to extend copyright.

Re:Removing Python 2.x support from Django for version 2.0 by urda on Thursday January 19, 2017 @05:14PM (#13439944)
Protip: Python 2 is EOL'd in 2020.

Start your migration now.