Removing Python 2.x support from Django for version 2.0
github.com
github.com
https://www.djangoproject.com/weblog/2015/jun/25/roadmap/
I've grow to highly respect the Django project for its good documentation, its healthy consideration for backwards compatibility, security, steady improvements and all round goodness.
I hate their API and overall architecture, which I find to be the result of glueing features on top of features for many years. The internal code also is just like that: looks like every single method is riddled with out-of-band conditionals, which is the result of a community that prefers to hack things to work, instead of rethinking/refactoring.
We are users of Django, and it helps us to deliver projects, quickly. Interested to know how you think things could be improved.
There was a patch to change this to use templates, but it was rejected at the time as it slowed things down too much.
FormWizard (which I hear doesn't exist now), was a nightmare to use for any sort of complex form - I tried to do just this and had to call many private methods.
I understand metaclasses, but found the implementation of the ORM a little overcomplex.
Trying to use the ORM API to work out the structure of the DB was a bit of a pain last time I tried (had to call private APIs).
The html forms (used in the admin and everywhere else) have until now been generated from strings, however the next realise 1.11 (went to alpha yesterday) this has been changed to using the template tools.
I myself and also other people I know have written quite some domain-specific applications almost entirely within the Django admin, which are as a result: secure, fast and easy to use, which in some cases are not just a bit better than the existing commercial tooling in these domains.
But there are components that fit that. The entire form subsystem is awful to work with. Working with Javascript, webpack apps etc is a huge pain.
The template syntax is also a failed design experiment, based on the premise that backend coders and template authors are not the same people and should not have the same level of power -- some of this is based on a good idea at its core, but Django ended up backtracking on that half-way and we're now with a very inconsistent template system and having to implement kludgy template tags and filters or new object methods that do not take parameters whenever we want to do anything remotely complex.. At this point I wish it'd just move towards supporting Jinja syntax (that is, alongside the regular syntax, not as a separate engine like it's currently possible).
Could you explain what you mean? Django doesn't need to have any connection at all to your JavaScript stack.
We use Django Webpack Loader for our sites: https://github.com/owais/django-webpack-loader - This allows us to do `{% render_bundle ... %} which pulls in the appropriate script tag.
But even then you can really feel how painful it is to work with, especially if you're adding typescript/scss to the mix. Solutions like Django Compressor are not really the right model anymore.
And there's other issues as well. If you want to share settings between Django and the JS stack for example, you'll need to build your own pipeline for that. Building a form in react? Say goodbye to DRY on the form fields. Just, in general, Django predates JS apps being anything more than in-place enhancements and it shows.
For large apps it makes sense to do it this way. For smaller apps it really sucks.
on a really fundamental level working with complicated forms is just a complicated thing to do, no matter what kind of technology you're doing it with.
This also has the side-effect of making the transition to client-side templating easier.
A project I was really impressed with the internals of is Celery (was expecting the worst having seen Django).
But is it really? Speaking from personal experience it is easy to compare project with large featureset (and one with heritage) to one with scope on doing single thing and come with conclusion that smaller, focused codebase is more consistent and better implemented. At the end of day what matters is if those terriblenesses actually bite back:
- is this code changed frequently? Does it need to be changed frequently? - is it written in a way that that makes fixes and improvement unbearably costful? - is it written in way that allows it to be put apart? How costful are those individual parts to improve?
Django is large codebase that is worked on by different people and when time permits this, which means different parts differ in their age, practices, and ultimately, quiality. This eventually results in codebase that may give appearance of being messy.
Joel Spolsky explains this nicely in his article about old and large codebases appearing as hairy and messy to developers:
https://www.joelonsoftware.com/2000/04/06/things-you-should-...
Especially the part that follows below quote is valuable wisdom to keep in mind:
> When programmers say that their code is a holy mess (as they always do), there are three kinds of things that are wrong with it.
Also, up until recently it was a one man job by Ask Solem. He's done incredible work making this project live and I am grateful for that. However I fear others have found it hard to maintain as well, slowing down progress on a very popular backend python project.
I'm curious, what's an example of a framework that you think has a better architecture, and in what context are you evaluating this?
[0] http://keitheis.github.io/use-pyramid-like-a-pro/?full#Cover
Use Pyrapid Like a Pro
"Like a pro(fessional)" implies that you, the target audience, are not "professionals". However, if you use it in the corporate world, you do use it as a professional.This makes it sound like an advanced toy rather than a bullet-proof work of engineering you can rely on. Which is really a pity, because Pyramid _is_ a framework you can rely on.
It's a shame, because I've wanted to try Pyramid since I watched their talk at PyCon 2011, but the branding (including the new 99 Designs looking logo / theme) has always made me think, "This will never really take off."
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
The theme is one of the included ones, Ribbon.
Offers Django feature parity with best of breed components.
If you have any questions please pop into the chat http://gitter.im/websauna/websauna
However, once you're out of the unrealistic scenarios (single query benchmarks, etc.), it doesn't do that well[1]. It's not prohibitively slow, but to make the jump from something as well documented and with as large a community as Django, most developers would need to see major gains in one or more areas; performance, docs, community, coding efficiency, etc.
Pyramid doesn't offer these gains. It only makes promises about maintainability, which are hard to verify, unless you personally know somebody that you trust as a skilled developer, and who has worked on a sufficiently large enough project in Pyramid to make such claims... it's easy to see how this creates a hole that Pyramid has to dig itself out of.
Also, Pyramid still talks about "supporting your decisions", like Jinja2, etc., as if that's a problem people are still dealing with. Django supports Jinja2 even in the admin now, let alone being able to use whatever you want elsewhere. As a side note, I don't see many Python developers wanting to use anything other than Django templates (for simplicity and separation of concerns) or Jinja2 (for speed and flexibility) these days.
If the argument, in response to the aforementioned difficulty in verifying claims about maintainability, is "well, it's up to you; Pyramid stays out of the way", then the immediate response is that you're better off using Flask or Falcon; the former if you need third-party tools, and the latter if you need maximum raw speed, but still want Python. Both of those frameworks will drastically outperform Pyramid and stay out of your way.
IOW, I don't think Pyramid fills any reasonably sized and easily understood market gap.
1. https://www.techempower.com/benchmarks/#section=data-r13&hw=...
I'm curious about the result since it didn't matched my experience. So I proceed to take a look at the source code for both Pyramid's[1] and Django's[2] benchmarks. From the look of it, I feel like there are too much difference in implementation to call this a realistic comparison.
From a quick glance, Django's benchmark seems to contain a little bit of micro-optimization and is rendering JSON response directly with uJSON[3] (which looks to be a lot faster than native JSON module)[4], while Pyramid's benchmark did not seems to go through any optimizations and is returning a list of SQLAlchemy objects that get passed into a custom renderer[5]¹ and render using native JSON module.
So I don't think it's entirely fair to say Pyramid is slow in a real world scenario based on this benchmark alone.
[1]: https://github.com/TechEmpower/FrameworkBenchmarks/blob/c8a5...
[2]: https://github.com/TechEmpower/FrameworkBenchmarks/blob/c8a5...
[3]: https://pypi.python.org/pypi/ujson
[4]: http://artem.krylysov.com/blog/2015/09/29/benchmark-python-j...
[5]: https://github.com/TechEmpower/FrameworkBenchmarks/blob/c8a5...
¹ Using pyramid.renderers.JSON here probably make more sense, but to match Django's implementation, one can wrap a serialized JSON into `Response` object.
Django has grown up a lot in the last several years. It used to be really hard to use a different templating language, and I personally really dislike Django's templating language. That was the biggest turn off for me every time I looked into Django. If it had been pluggable earlier, this probably would've changed the calculation for me.
I've always thought of Pyramid as the ideal framework, conceptually. It feels like you're writing Python, not Pyramid, which is GREAT. Pyramid only shows up when you say "OK, I have my Python stuff; I need to make this show up in the web browser now." It is entirely unobtrusive. All frameworks should strive for that.
Unfortunately, the vast majority of frameworks take the opposite approach. Django at least used to be an example of that by forcing DTL (is this the abbreviation for "Django Templating Language"?) down everyone's throat, among other things.
I've also been very impressed by Chris McDonough and the rest of the Pyramid team. They're extremely helpful in IRC, they keep up the great work even after spending years as a small/niche framework, and their code is very clean and well-tested, not obnoxious or overcomplicated. It's a tight, consistent framework that stays out of the way and is just there to serve the developer, not to force him/her to comply. It is so everything a framework should be and so everything most frameworks aren't that I can't help but love it.
I haven't done a major Python-based web project for many years (have one in progress, porting a Rails-based site to a Mezzanine-based site, but work on it only rarely), so I'm sure some of this is outdated.
What makes Pyramid better for you than e.g., Falcon?
From your comment, it sounds like a lot of the value you've gleaned from Pyramid is based on the framework staying out of your way, so why not use something 5x faster that does the same thing? Does Pyramid provide some unmatched abstractions? (I'm coming from a position of no true experience in Pyramid)
You have event system, security abstraction, all kinds of overloading helpers for views and internal machinery that falcon doesn't seem to provide at least from my cursory look. Compare the size of documentation and configuration options between both projects.
Also looking at this http://klen.github.io/py-frameworks-bench/ the 5x better speed of falcon seems to be completly made up or occur in some very specific situation. More realisticly it looks like falcon can be 30% faster in some scenarios not involving storage - but for the price of giving you less options.
Which probably means that if you use any kind of storage the difference between those two can be ignored.
And the developers seem to think this is totally ok.
In my experience, anything that doesn't have a commitment to at least fixing security issues for ~5 years, isn't a good choice for business. Businesses don't want to tie their internal development and release cadence to an external development team with less than 3 year cycles, ideally 5+.
I've seen it time and again over dozens of companies. There is no time to qualify apps for new major/minor releases. Anything that doesn't have a LTS release story is just not something I can feel good about deploying in my business.
To be clear the core maintainer-ship of pyramid is about 2-3 people. We would love more contributors to the core codebase, but with that level of commitment we're obviously not able to provide a comparable level of support to a project with more contributors. This is the nature of open source and it is the rare exception to the rule to find packages / projects that have grown to be able to offer such a level of support.
(Aside: mmerickel is the developer I was talking to in Freenode)
Honestly, I didn't know that Pyramid had such a small amount of manpower behind it. It presents itself and has a reputation in the Python community, at least in my experience, of a bigger project.
But, as far as not being able to commit to security releases for old versions: it's obviously a choice in where to spend the available resources, not one of the size of those resources. Choosing new development over providing critical fixes of older releases is a choice, it's just one I need to understand before I commit to using a component. I understand why one would make either of those choices, I just need to know which one has been selected. It is great for people who want to choose forward development focus, I'm just not one of them.
I believe it's better for them to focus on what they know they can do day in and day out regardless of the circumstances and let companies make the decisions that make sense to them.
In a world where the hardware is written off by the business in 3 years though and websites age out at 3 years and car manufacturers are increasingly trying to hit a 3 year model revision mark it seems to me it's not too much to ask that companies investing hundreds of thousands in an application using Django or Pyramid also invest in maintaining it and keeping it modern or perhaps their existing business model needs additional revision too.
Just a thought as the least informed member of HN.
- 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).
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 <100, or maybe even <1000 lines of code. However, a 10k line Django site and a 100k line Django site basically look the same in my experience, and that is hugely valuable.
The biggest red flag from Pyramid for me is their point: "Use Pyramid as a "framework framework" to craft your own special-purpose, domain-specific web system".
In my experience, this means that every project is a special snowflake of a project that works in a very different way to other projects. With Django you have a tried and tested architecture, with Flask and Pyramid, it often seems that you have to create your own architecture in some ways, and that results in each project being really quite different.
And breaking backwards compatibility
Django is not RoR. Their users rely on being able to upgrade seamlessly.
The overall Api makes sense, there are some rough corners (yes Sites, I'm talking about you) the docs are ok once you get the hang of them
If so, I have to very strongly disagree. It's almost mind boggling to me how much they break backwards compatibility as a framework. They usually warn users with a deprecation warning in one version and then they make the backwards incompatible change in the next version, but the sheer amount of these kind of changes makes upgrading an infuriating process. Especially when upgrading a large codebase.
That's exactly how _not_ to break backwards compatibility.
No, no, no. Backwards compatibility means that there are no breaking changes at all - announced by deprecation warnings or not. Think Linux's public API.
IIRC the most impacting changes I remember were in Config, replacement of South with a native solution and some timezone issues
The documentation was telling something like: Ensure you applied all previous migrations and then start from scratch. Thats not an upgrade path. It may work for standalone web applications, but I have a python project (packaged as deb/rpm package and using the packaged django version of different distributions) that should work with multiple django versions and the user may upgrade the django version at any point.
I had to write raw sql statements to get the mirgration status of south (after the upgrade, without a working version of south anymore) and "fake" apply the migrations of the new native solution.
A platform that works hard to be backwards compatible does only additions and extensions, and keeps maintaining the old API as well so that old apps run without changes; possibly keeping around multiple depreciated ways to do the same thing (e.g. as win32 does).
It is debatable whether backwards compatibility is worth that cost (and it often isn't), but it's certainly a choice.
Then view HN threads of people saying they have thirty-million-line codebases which utterly rely on deprecated functionality and they never ever plan to upgrade or do even basic maintenance ever for any reason ever, and will abandon your platform and completely rewrite in something that treats them "better".
Not at all. That would have the added benefit of core developers thinking twice before introducing a new API - exactly like it happens with Linux syscalls.
That said, having started on updating that same codebase to Python 3, the Django team tries hard to provide the KEY thing you need to seamlessly update a codebase: a version which can support both incompatible features. Without this, you need to have one giant branch with a bunch of renames and other changes. They actually introduce deprecation warnings, and have something non-deprecated you can use in the same version. I think if Python core had introduced a version of Python including both versions of all the module renames with deprecation warnings, the community would be much further along on the upgrade path.
content_types, generic foreign keys, and basically any other uncommon use pattern for RDBMS are very rough in django. Tradeoff of their ORM being heavily streamlined for the 90% use cases (typical SQL selects and upserts).
Might be easier to just write SQL in those cases
The overall architecture is sound though. Tight coupling of core components, loose coupling of non-core components. Keep in mind that it's an "opinionated" framework though, so they do safely assume that if you're using django you want to be using its core components as a bundle, and will work with them as designed.
Like screwing the huge majority of users with Python 2.x Django projects and having them update or be left behind?
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.
That's the version of Python that most of their users actually use -- with no major plans of mass updating.
What are the alternatives? Forking the language or switching to another language look to have a higher cost.
(auto-correct)
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.
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.
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.
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.
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.
> Ansible 2.2 features a tech preview of Python 3 support.
So they are working on it.
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.
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.
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.
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.
Python 2.7 will EOL in 2020. But I guess even then some luddites will complain how they will have been left hanging
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.
There's less muscle behind keeping Python 2, but there's a lot less muscle needed to keep it going than to extend copyright.
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.
That's illogical and inconsistent. they're providing an LTS release for you. Get over it
Start your migration now.
Is this a joke? They break backwards compatibility with every minor version, wasting tens of thousands of man-hours all over the world - time that, if we're honest, is not exactly billable.
Most people don't upgrade because of this and keep on using vulnerable versions. It's good that they are trying to kill the project. It saves newbies from stepping into the tar pit.
Java 7 had less than four years of support.
Ubuntu Desktop LTS was three years, and starting with 12.04 it increased to five years.
That's a language runtime and an operation system known for their stability, forming the bottom of very wide and deep ecosystems.
Show me a web framework with a 3 year LTS, and I'm overjoyed.
I think the project is venerable and I have respect for it in general. It's one of the most accessible major open-source projects for newcomers; like I said, I'm not a heavy user and I've already submitted a couple of patches and had them merged. But issues like this one are worth pointing out.
Is there a deficiency in the test suite? Is the open and accepting nature of the community that I just praised the cause of this issue, because it leads to a bias against thorough vetting? I really don't know enough about the project to know, but it'd be nice if they figured it out.
I manage a modest project and there are plenty of issues with corner cases that I knew were possible but never could reproduce. As people stumble upon them and report issues I can update the test suite to avoid stepping on the landmine again, but that doesn't change the fact that we've barely scratched the surface.
Here is a strawman low level test: Randomly generate a sequence of nonsensical (but legal) API calls by randomly generating some data layout, then feed it into a state machine of legal API calls (eg. CRUD), and check the return values. Once that runs for 10 minutes without crashing, extend the test to be multithreaded and run with 1000 thread for a few hours. Dial back the runtime to 60 seconds, and stick it in the regression suite.
As long as there is a well defined API, this finds most bugs (and I also write targeted tests to exercise tricky / error prone paths).
Any thoughts on why it is so much harder to implement reliable high level frameworks? Is it dynamically typed languages / lack of encapsulation, or something more fundamental?
I had to search for Tox. It seems like analogous tools would be nice for statically typed "systems" languages too, though there is less need for them there (more bugs are caught at build time, instead of after deploy).
Debian sort of does the same thing when it builds packages, but only checks compatibility with current versions of dependencies. It would be nice if they also checked / tracked compatibility breakage (the "not all libraries are good" observation is language independent, and a "n days since we broke users of this library" label would be great).
For the most part, they think they things through a lot and most importantly they document breaking changes. Their approach is an absolute dream compared to, say, updating xcode/iOS apps. It's a total shit show at Apple.
Sure legacy projects still need support and for that they get the 1.11 LTS, but otherwise it's really time to move on.
The only reason why it might be hard is you are unfamiliar with the extension's code and/or C
Practical example: https://github.com/zopefoundation/BTrees/blob/master/BTrees/... https://github.com/zopefoundation/BTrees/blob/master/BTrees/...
There are a couple #if PY3K, but not much, really.
I ported a bunch of extension modules, total a couple thousand LOC, and it was pretty much a matter of reading the docs (see guide at https://docs.python.org/3/howto/cporting.html ) and adding a few #ifs. Total time maybe an hour or two.
One possible solution would be to offload this work into a celery worker which can call python2 as necessary.
Release Date: 2014-12-10
Replacing hot spots with C is a tried and true tactic. I don't see how django would substantially change that equation.
Making code compatible with python2.7 onward means that you can't use any new features from 3+ and the code is plain ugly, I don't know if you wrote 2/3 compatible code, it is not as enjoyable to do.
I think Django's approach where the LTS will still work on 2.7 (and LTS is for 3 years, which is until python2 itself stop being maintained) is fair.
You still have 3 years to fix things and if you want to use latest Django and be cutting edge, you probably should use latest Python as well.
How about millions of lines of code in your company in Python 2, and several Python 2 based services and websites?
Why on earth will you go to Python 3 at huge rewriting costs? To get some fancy syntactic sugar and improved unicode?
And the latter doesn't work so well thus far for Python 3.
If you're starting a brand new Django project you're not rewriting anything. If you're rewriting something, it's not really new.
My company is a Django shop and while we have no intention of upgrading Python 2.x codebases to 3, we do start all our new projects on Python 3. It just doesn't make sense not to do it.
Except that there are still some critical packages that aren't on Python 3 yet. Not to mention a lot of functionality breaks even if the libraries do exist, which means you have to code things up quite differently sometimes.
We ended writing a service in PHP to use Google's APIs, and are mostly using Scala or JS instead of Python for the Lambda services because this project is basically a ton of unicode mangling, and you can pry Python 3's sane unicode support from my cold dead hands! But the libraries still aren't totally perfect. It just takes on dependency being out of date to screw your plans.
https://github.com/google/google-api-python-client/
I see only one Py3 bug is the open issues. And I think even their ancillary library Python Flags is now officially Py3 compatible, even though there has been a Py3 fork of it for years.
I didn't mean the one literally called google-api-python-client though (forgot they had that, ha). The googleads-python-lib is the critical one for me. PyPI says it supports 3+, but do one search in the repo for "print" and you'll see that's clearly not true.
Looking through the history, seems like they've claimed support for it for a while. We've tried it twice and had issues both times, though I never tried it in Py2, so maybe it just has problems in general.
There's a "hack" of running Python 3 on AWS Lambda via subprocess until it's officially supported.
http://stackoverflow.com/questions/36143563/using-python-3-w...
Included in the list: nodejs, chromium, trac, bugzilla, bazaar
[citation needed]
Pretty much all critical packages now work on 3, as witnessed by the Wall of Superpowers.
Maybe some django-specific lib is still 2-only? In which case, rewrites/forks should be relatively trivial and I'm even happy to have a look myself.
https://python3wos.appspot.com/
almost everything on the list has gone green now
2) Let's see some proof of your argument, because many packages and platforms are happily supporting Python 3 now. Put your money where your mouth is.
If in half a decade things haven't been ported there are more serious issues.
Can someone explain what benefit I would actually gain from upgrading to Python 3 if I'm already "handling Unicode properly" in Python 2? So far it still seems rather minimal at the moment, and the risk of breaking something during the upgrade process (either in my own code or in one of my dependencies) doesn't seem like it's worth the effort.
What's annoying is discovering that it's a struggle to upgrade to a newer OS because you're using some old python dependency that has some C component linking to some library that you're going to spend a week getting working (and then have to continue to maintain).
It sounds like you might not have too much trouble upgrading anyway. The strings and missing libs are the places most people get caught out and it sounds like you're already handling the worst of those.
If I were you, I'd try switching to python3 and see what breaks. When I did it, it took about a day to get up and running again on a reasonably complex project (numpy, scipy etc). One of the main things I ran into was places where python3 had swapped lists to generators etc (eg, some_dict.keys()[0] no longer works).
It turns out that most developers have a desire to move to the next version if it's not too hard. There's still COBOL programmers out there too and that's perfectly fine.
Django has made the process as smooth as it can be. You can upgrade to python3 while maintaining your Django version. Then update to the next Django version as a separate step. It's fine to have waited until now. You can keep waiting if you want but it's getting to the point where you should really just do it. It's not so bad.
We switched and python2 --> python3 was bumpier and more work than most Django updates we've done (we've done pretty much every one since 1.0) but it was still entirely reasonable. We're much happier now.
Even if you think you would not use those features, other libraries you may use might benefit a lot from it.
A few features: async/await, lists (and others) use iterators, no var leaking in list comprehensions, super().my_method() instead of super(MyClass, self).my_method(), class MyClass: instead of class MyClass(object):, improved exception handling, required arguments, ", ".join(["etc"]* 1000)
Besides that: a much improved standard library, although that technically not is language design.
You could do ", ".join(["etc"]* 1000) in python2 - what am I missing?
", ".join(['ètç']* 1000)
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 and tell you where the issue is.
So if you're handling lots of unicode text and think you've handled all the string correctly already - that's the reason to move. Now you'll be sure it's correct. The problem with py2 wasn't so much that it was handling anything badly - it was that the default, easy way was incorrect and just waiting to blow up in peoples' faces. (or maybe just silently corrupt something)
Python 2 will allow this to sometimes work, Python 3 will make sure this never works, because there's a bytes/text mismatch. It's nice to rule out entire classes of bugs like this
from sys import argv
import json
with open(argv[1], 'rb') as f:
json.loads(f.read())
Porting is still difficult. But when we ported from Py2 to Py3, we found a couple issues like this (despite dealing with weird encodings all the time).You can do this correctly in Python 2, it's just much harder.
How much faster might your code run just by upgrading to Python 3? How much memory might you save?
I don't think you're suppose to depend on the ordering of dictionaries. It's an implementation detail which might get changed, although it wont actually ever be changed because people will come to depend on it.
I came here to make the same distinction - though I will say I hope you are wrong about people coming to depend on it when OrdereredDict is still there for a reason. The docs still plainly state that Dict should be considered un-ordered and do not make mention of this implementation detail (nor should they).
> New in version 2.7.
If you don't need any of the new features and fixes, don't, that's perfectly fine.
But the big one is that Python 2.7 will go away at some point.
I believe this already exists: https://docs.python.org/2.7/library/logging.config.html#logg...
The most important scientific libraries have pledged to drop support before 2020, and are all python3-ready
I used to work on a GUI app in Python. I ported it to Python 3, then switched OSes for various reasons. 5 years on, on Ubuntu Xenial (so new I can't even use it in Travis, but that's a separate whine), I install pykdeuic4 and it's using Python 2. So I've basically abandoned that project for 5 years now, because every time I looked at it I thought "surely Python 3 will be here in a few months, I don't want to port backwards to Python 2".
(Serious question: is there a PPA or anything I can use to get these things for Python 3? I need PyQwt as well as PyKDE)
Seriously: if you can, try building your thing with tkinter. It's the standard lib, and will "work"
Qt's binding support has been it's biggest issue since forever.
It has quite a few bindings already, here are the python ones: https://github.com/joaoventura/pylibui .
I love catching errors at compile time, not runtime :-)
Plus, it runs faster
If there were an ML-family language with good Qt support I'd use that for my GUIs - I use ML-based languages for almost all my non-GUI work. There's plenty I dislike about Python but it's still the best desktop GUI experience I've found.
% python --version
Python 3.5.2
% pip install numpy
Collecting numpy
Using cached numpy-1.12.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.12.0Not numpy, scipy, tensorflow...
Not enough people are using tests. A decent set of tests make upgrade super easy. The upgrade documentation is decent so you just spend 20 minutes upgrading broken things until it all works again.
People pick the wrong version. I've seen people develop and even deploy on -dev and it makes me cry inside because they'll need to track Django changes in realtime or near enough. Pick an LTS release and you get up to three years on that version with security and data-loss upgrades and no API changes.
What do people think of that?! I'm a newer dev and I'd really really love to hear what people think of that and what it means for the future rather than side conversations about how bad their API is, how good it is, how good their Docs are and how bad they are.... Blah blah.
Please!! This community is filled with some of the most brilliant minds and I for one don't want to miss out on this chance to hear what people think of this change.
Please please don't reply that you disagree with my POV. That's irrelevant, but please do if you are interested in the initial topic. I'd be be very excited to hear your thoughts.
So Django moving to Python 3.X Go :)
Second, this is necessary. Support for Python 2.x is supposed to end in 2020, per Guido's keynote at PyCon 2016, so Django is going to have to get in line in ~3 years one way or the other. A major version increment is a great time to introduce such a breaking change.
So ... "what this means" is that Django is doing what it has to do, which happens to coincide with the interests of the community at large. shrug I'm glad it's happening, but there shouldn't be a whole lot of drama or hand-wringing here.
[1] https://patch-diff.githubusercontent.com/raw/django/django/p...
A) You mostly have Python3 projects: Then you like it because you know more ressources will be spent on your pipeline and having more Py3 packages is also helpful.
B) You still have Python2 projects: You hate it, because it pushes you out of your comfort zone.
But I have to say, we want our langauges to develop as well. We want our packages to get attention. And there was lots of time to switch and experiment with switching. Ergo, it should happen. Even if you don't like it as much, that's where things are heading. Deal with it, move on. Let the community help you, if necessary.
there are lots of other cleanups happening right now. It's a real pleasure to look at the diffs :)
Such as?
I've worked primarily with Django for years and I think if the ORM really had "numerous serious annoying bugs" I'd have a mental library of these things to watch out for. But I can't think of any ORM bugs off the top of my head, I don't really remember encountering any.
We all know SQL Alchemy is 'better' and there are things Django ORM can't do, but 99% of the time it's adequate.
Are you sure you didn't mean "features I wish it had"...?
1. multi-column primary key.
2. annotate several counts for some query correctly.
that what I remember for now.
2. Yep. Still a crappy situation to be in, but one that's also tricky to solve due to not being able to control the joins across multi-valued relationships.
Make sure you have dedicated time for the migration
Lots of beginners and low-attention devs will find "Django 3 needs Python 3" easier to keep straight than "Django 2 needs Python 3".
https://www.reddit.com/r/Python/comments/5otufg/django_20_no...
I speculate that the latest Django 1.x will remain used - and possibly the most used - for a lot, lot of time.
You mean exactly like Django's progressive deprecation and evolution that you're complaining about in your parent post?
Then, they released a first 3.x compatible LTS with Django 1.8. Then they released 1.9, compatible with 3.4 and 3.5.
They then release 1.10. And they are releasing 1.11 soon as an LTS, which they previously announced would be the last in the 1.x branch and the last to support Python 2. It will be supported for AT LEAST THREE YEARS after its released.
Good lord. If the deprecation and evolution gets any more progressive, it'll compete with darwinism. And yet, alanfranzoni complains about it. And YOU COMPLAIN ABOUT IT elsewhere in the thread, saying they're "screwing their userbase" and "leaving their users in the dust".
Don't you think you're being a little fricking entitled? This is an open source project and they're doing quite literally everything right.
But I doubt it'd be worth it. Python 3 is getting great traction and is a fundamentally better language.
Python 3 is already a fork.
And others are bickering for the opposite opinion, so?
Did someone die and gave you authority on what others should think about Python 2 vs 3 transition?
>It is very hard not to notice your comments if one frequents this site.
I guess tolerating the presence of a counter opinion is hard. That said, it's a open discussion, and the comments are not directed at you in any way. Maybe skip them if they upset you?
The problem is that Python 2 cannot evolve freely alongside Python 3, because even if someone wants to maintain it and keep releasing versions, the Python Software Foundation won't let them use the name Python (there was a post some weeks ago about someone who actually tried). So there is no free competition between 2 and 3. 2 has been basically killed by a decision from above.
Don't get me wrong, I'm no Python 3 hater. In fact, I have some projects in Python 3 and I would leave Python 2 if I could. But I, like many people, have to code stuff that has dependencies on Python 2, and the way they have handled the update bothers us for no good reason. In fact, the whole schism fiasco is making me use less Python and more Java, where my stone-age code still runs, lately.
The previous version is being sunsetted, as is common for legacy software. By the time 2.7 is EOL'd, it will have enjoyed a decade of active development and maintenance. That's just one version of Python.
If there were a compelling enough argument for a fork, it would happen and a new name would be chosen. But alas, it makes very little sense for the wider world.
It's not difficult to write software that works with Python 2 and 3. It's just becoming less and less worth it, as evident by announcements like this Django 2.0 one. The scales have tipped towards Python 3.
That's how trademarks are supposed to work; they must go after anyone using without permission or they lose it.
People are complaining about Python 3 being named Python because some code breaks under it. That would be hell.
Some things that are very useful are backported to 2, but others are just too much work.
That's why if you want to make a fork you're free to do so, but you need to make a different name. If it's something people desire it will be used, you can't just ride on the popularity of the name. If your fork has different name and is not popular, it means that there was not much interest in it, period.
Some of successful forks:
openOffice -> LibreOffice
MySQL -> MariaDB
ZFS -> OpenZFS
Ultimately, they are the ones who maintain, care for Python and have grown the community to its current size. I totally respect their decision. Even if py3 was complete useless, I would just stop using python, not complain about how they are not doing things the way I like it.
The Python ecosystem would have been better served if they killed support for Python 2 much earlier, so that we can avoid wasting time on this tired debate, and more time writing useful code
At my last job they were still using Django 1.6 when I quit last year. Updating to a new version takes a lot of manhours. Rewriting the codebase in a new language (which basically what Python 2 -> Python 3 transition is) would be completely out of the question.
Not even close to rewriting in a new language. In my experience upgrading from django 1.6 to 1.7 is a bigger change than python 2 to 3
Where's the benefit in doing that?
I am also almost 100% certain that if scientific programmers leave Python, the language will stall, and the current 3.x pushers are dangerously looking a gift horse in the mouth. This is particularly true given that Go is rapidly eating Python's lunch in all non-science use cases.
This sounds like such similar sour grapes to the systemd escapades. Huge initial outroar as certain things happened, followed by a gradual diminishing, then [mostly] acceptance.
This is what is happening with Python 3 and a smaller, doom-and-gloom subset of the userbase. Most of us are thankful that Python is striving to improve, and that we continue to pay nothing to use it. The alarmists are far more noisy than those that are happily continuing to build stuff.
Python will remain massively used in the sciences. It's simple, easy to learn, expressive, and has an excellent ecosystem of modules (which now mostly work on Python 3).
And yes Python will likely continue massively to be used in the sciences, 3 bears like me notwithstanding, so it would be good if the current stewards would actually recognize the fact that this is their core base of users and please could they focus on them instead of the web people who are much more fickle and moving already.
Ahhh, I see what's going on now. You may be vastly underestimating the size of variety of the Python userbase. This is one of the absolute most popular languages on the planet. Your science subset is but one of many. And it's not even the biggest if we're talking sheer user counts.
Python must be steered for the good of the majority of the userbase. Not just for vegabook. The fact that you described them as "useless" to me just speaks to someone being impatient and dismissive of a ton of excellent work by the contributors. These changes weren't made just for the hell of it. Particularly the Unicode example that you gave above.
If you want help understanding the rationale behind some of these changes, feel free to ask here. Someone with more familiarity will chime in and help clear up the confusion or angst.
Lol. Before Numpy and friends even existed, Python was used mostly by "the web people" and sysadmins. Scientists are one of a number of Python constituencies, and not even the best-paying nor most visible one.
Only here we don't have mere service scripts, but millions of lines of code people have written in perfectly fine 2.x Python.
And also here we don't have any significant uptake -- Python 2.x is still over 60% of what's used (according to PyPi stats and everything we've seen), and that's after 6+ years that Python 3 had its chances.
As pointed out by others, those PyPi stats are super off. Better to look at what's going on out in the community and with the most popular packages (like Django).
I'm not sure why you expect GPU from the python itself though. That's completely up to libraries and they can exist for either 2.x or 3.x. Was there ever a CPython GPU related project?
And even if (there were patches for removing the GIL already around in the 90s): All of the approaches and patches shown so far significantly degraded single-threaded performance, which matters to way more applications than the GIL, which typically is not a significant limit to using multiple cores/processors.
"Teh GIL" is a very, very overblown issue, and is -- I don't want to be condescending here, but well -- usually brought up by people that have little experience writing software that makes effective use of multiple-many cores.
I attended this talk, and it was really great. PyPi is pursuing software transactional memory, which is massively difficult to implement. The Gilectomy approach is much more community oriented, and focuses on the transition.
Put a bit differently: it's easy to remove the GIL safely, it just incurs a non-trivial performance penalty and breaks C extensions, so the Gilectomy effort is around a combination of removing or avoiding that penalty if you're not multi-threading, and smoothly transitioning C extensions. After that talk, removing the GIL looks inevitable.
That Unicode "cruft" is especially appreciated by the rest of the world that exists outside of the US. Python 2's approach to bytes and encoding is naive and horrible for 2017.
I'm outside of the US and Python 2 has worked wonderfully for ages. Its unicode support is good. You work with strings as unicode, then at I/O boundaries (and exceptions) you convert to bytes. What specifically do you find "naive and horrible" about its bytes and encodings?
Python 3 can use less memory for unicode strings (a cool optimization introduced in py3.3, IIRC), and it did away with the "narrow/wide build" distinction (same release). That's about the only every-day advantage I can think of. But I suspect that's too technical, or do you mean that?
It shouldn't take 8 years to understand this issue, and I'm positive you do understand it because you're an intelligent person, so please don't troll about it.
See what I did there?
toyg, I found your comment unbearably rude, condescending and arrogant, and downvoted it for that reason.
Confused your terminology? With static typing, the compiler will warn you, not the runtime.
Regardless, the difference is that in practice, file-handling boundary calls don't need to be as flexible as internal interfaces, and it's obviously much more difficult to figure out what The Right Thing To Do is in the latter case (or whether there is a Right Thing at all, in a lot of cases). How many times do you need to change the encoding you use for writing files? How many times do you change an internal class or type? They are totally different ballgames.
> I found your comment unbearably rude, condescending and arrogant
Apologies, but after 8 years and countless hours of bickering on this point, patience can wear really, really thin.
Yes, Python 3 is an improvement over Python 2. I like Python 3. No, Python 2's unicode support was fine, contrary to OP's claim.
But those for whom the majority of input is ASCII can often get away with broken code (that e.g. writes out Latin-1 JSON) for a while. And then they get input with a word like "naïve", and oh look, all hell breaks loose.
Python 3 solves this problem by making every transition problem explicit, requiring the developer to stop and think what they're doing when going from byte representation to strings, and vice versa.
"Explicit is better than implicit."
Besides speed, I never seen any good argument that would make me start a new project on 2.7, rather than the latest v3 release. I get that there was a series of data science libraries that wasn't supported initially, but seems to have been solved at this point. So I really do see why people continue to hate Python 3.
I'm not going to argue that the transition couldn't have been handled more smoothly, the period of broken libraries and terrible performance was a little too long.
That's because you start "new projects". Some of us have 10+ years of codebases to maintain, and we don't care for Python 3 features...
While I do believe that your point is still valid, one also have to accept that Python 2 will be a legacy platform at some point. In the long run I don't view that as much different than people complaining about Visual Basic 6 being deprecated.
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 "BDFL" says about an official EOL that will settle the matter, but actual adoption in the field. But in addition to the low adoption rate, we've even seen people leave Python for Go and Node/JS.
The fact that you personally weren't particularly affected by the problems in 2 doesn't mean the problems weren't serious.
Please don't make generalizations about people who disagree with you just to score a rhetorical point, and please don't break the HN guidelines by going on about downvotes: https://news.ycombinator.com/newsguidelines.html.
There is an awful lot of hyperbole around the difficulty of upgrading from python 2 to 3, however with the latest changes in 2.7 and 3.6 the gap isn't as big as you expect. I converted our (admittedly not massive) 35,000loc Django project from 2 to 3 in about four hours, starting with with 2to3 tool then working though test failures it wasn't nearly as bad as I was expecting. Most of the issues were as I expected around the new string handling, but as soon as something broke, I knew before looking at the code what the problem was.
- We already have linting in place that encourages Python 3 compatibility (and have no linter warnings on master).
- We already use six for moved modules.
- And we have a test suite that is not exhaustive, but 'good enough' to find the common patterns of bug for this kind of thing.
- We also have a style-guide that favours the ability to find-replace project wide with relative safety.
- We don't have much 'math heavy' code that will fail with the changes in operations in Python 3.
- We already use unicode for the majority of strings.
- We don't use my Python networking code directly, it's mostly just Requests (so a lot of the moved modules don't apply).
This excludes the upgrading of dependencies, I think that's where we will spend more time, but the actual Python 3 transition for the main codebase should be ok, mostly because of the effort we've put into style and review since it started ~5 years ago.
+1. IMO this is the 2nd most overblown python issue next to the GIL.
It's also not actually that difficult to maintain code that works on both.
Upgrading Django OTOH has caused me quite a bit more pain over the years.
That's not what the announcement is about. Django worked with python 3.x for a long time already. Now they're actually going to drop 2.7, so back to one supported version.
The support should have been cut a long time ago and now we wouldn't be having this discussion.
This is the price you pay for staying on an old version. You do not get to stick to an old version AND demand that others do too.
You CAN stay on Python 2. You CAN stay on Django 1.11. It's LTS. So is Python 2.7. You get to use both until 2020 with no issues. After that, not upgrading is a technical debt that will start to accrue, faster and faster as you can no longer use recent versions of various software.
You are free to make your infrastructure immutable; you then become responsible for it of course. And the money you're not willing to spend porting to Python 3 today will be money you spend on costs related to being on outdated infrastructure, years in the future. That's a tradeoff. Banks do it a lot I hear. A bunch of companies still use ancient hardware and technologies nobody would think of starting a business with today. These companies make billions.
You know what the employees of these companies aren't doing? They're not bitching on HN that the tech they're using is no longer supported.
As someone who has 6 comments in this thread yourself, I don't think you are in position to complaint.
I also find "what bit you" and "please stop" rude. You don't get to dictate what others opinion should be.
>This is the price you pay for staying on an old version. You do not get to stick to an old version AND demand that others do too.
7+ years on and the "old" version has more users than the new one. That's a fact supported by numbers. So maybe you want to recheck with reality whether the transition was a success instead of arguing with me?
Not all transitions go well, the Perl 6 transition killed Perl, the PHP 4 to 5 transition (another major one) went quite smoothly.
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 arguing with me?
You completely missed the point.
says who? It this the standard FOSS strives for?
FOSS gives you freedom to do these things on your own. Money gets you other people doing it for you.
The issue here is suggesting you shouldn't freely criticise flaws in FOSS software. This is harmful, and goes directly to affecting information people have available to them in choosing whether or not to use a piece of software in the first place.
Do you actually know what money/time OP might be spending, losing, or making on Django?
> FOSS gives you freedom to do these things on your own. Money gets you other people doing it for you.
What a cop out. A lack of being paid (money at least) doesn't imply no obligations, nor freedom from criticism.
Do you speak for every Django contributor?
Because I was referring to coldtea's demands.
> What a cop out. A lack of being paid (money at least) doesn't imply no obligations, nor freedom from criticism.
Excellent, then you should be fine with me criticizing the attitude that's been displayed here.
> The issue here is suggesting you shouldn't freely criticise flaws in FOSS software. This is harmful, and goes directly to affecting information people have available to them in choosing whether or not to use a piece of software ion the first place.
Why is this the conclusion you draw from my posts? I said it before, the Python 3 transition sucked. It's something we kind of all agree on. There is plenty of criticism to be made.
However, I really want to recontextualize this: Django is an open source project, maintained by a non-profit. Python is an open source project, maintained by a non-profit. The projects in question, with "tens of millions of lines of Python 2 code" (only a tiny amount of which would need to be ported, but I disgress...), are most often for-profit projects. Yeah, it's a bit rich.
This is the same as the IE6 situation: Want support for it? Pay extra for it! You should not expect free support for technology for which the EOL was announced years in advance just because you're using a lot of it. And you will have no issue finding paid support. Heck tell you what, if you do, shoot me an email, I do contract work sometimes.
You know why FOSS is great? It's great because the PSF/DSF do not get to revoke your license to use the software they're no longer supporting. You get to use it forever. This is your freedom and it's a good one. Make use of it!
>> A lack of being paid (money at least) doesn't imply no obligations, nor freedom from criticism.
> Excellent, then you should be fine with me criticizing the attitude that's been displayed here.
Great. Do you actually have a response to this point in context, then?
> This is the same as the IE6 situation: Want support for it? Pay extra for it!
You did not argue this. You said "shit on", which doesn't translate to "demanding support". you are deflecting from the one thing I actually criticised.
Your strawman is "support is being demanded" - this isn't the case. Any further arguments on that topic are just beating the strawman.
Furthermore, oficially changing the direction of Django also may affect contributions, changes to the roadmap or architectural design for example.
Edit: Yes, appropriating. You're taking criticism I specifically directed at coldtea, applying them to your comments and then complaining it doesn't fit. I am done talking to you.
Edit 2: This was not meant to sound as aggressive as it did, sorry.
Perhaps, can you give an example?
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 using a project you're not paying for.
You don't know what I've paid or what I've donated to the PSF since 1998 that I've been using the language, or what the companies I've worked for have done for Python. So it's not your business to talk about me personally as I've not talked about you. Can you stop being rude and ad hominem?
(And of course, any user who has evangelized, worked with, and devoted time to a language pays the opportunity cost, whether he pays for its development directly or not).
The community of a language's users can, and do, have an opinion on its progress and the changes that happen to it, whether it goes against the ideas of the volunteers working on it, or not (and it's not all volunteers, a lot of programmers are paid by corporations to work on OSS projects, including Guido who was paid by Google and now Dropbox, and that way companies often get a say on the direction a project takes).
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.
You originally said:
> making money using a project you're not paying for
No mention of support, just "shitting on the efforts of" (IYHO), So it seems you are moving the goalposts.
If you're not paying for it and you are making money off it, I don't see this attitude as being okay. You can ask. You can also be told no!
Python 2 advocates like to bring up the PyPI download numbers as some kind of "reality". But here is the reality: The PSF, governing body for the Python project, has decided years ago that Python 3 will EOL in 2020. It has given ample heads up for everybody to migrate.
Years. That's the reality. This decision didn't come out of nowhere. Don't expect a yes.
Edit: I am wasting my time replying to you.
This was the line I responded to, and it has nothing to do with support, but with the ability to criticise something you aren't paying for. You introduced the idea that something was being "demanded" so that you could beat up that strawman.
Not argument or not (and as you said, you didn't think you needed one) you don't have the right to tell me to stop bringing my opinion to the table.
Whether you think it's negative or not, it's not your place to conduct the discussion on HN. Just state your case, and let others state their case. I wouldn't even have left all those comments if I didn't have to defend myself, as most as responses to your demands that I "just stop" and your accusations.
>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.
I didn't force anybody to provide me support. I didn't even ask anybody for support for me specifically, and I didn't hold a gun to anybody's head on the matter.
I criticized projects dropping support for Python 2.x, and made my case. Criticizing is not the same as demanding.
>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]"
Which is a perfectly reasonable argument, only you omitted the part where I said that the majority of Python users seem to be in the same position (and thus such a drop could be bad for Django itself -- if people are forced to migrated an old project, they might as well bite the bullet and try something else entirely, Node for example).
>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.
The transition itself might kill the language, it has already taken far too long with meagre results thus far. It's not impressive that "nearly all popular libraries" have been ported to 3, when it's close to 10 years past 3.x and the majority of users are still on 2.
In any case, there are ways to "support both" that don't kill anything, e.g. making a "merged" Python 2/3 hybrid release that runs both 2.x and 3.x codebases, and is the official CPython going forward.
Or supporting 2.x as longer as needed for 60 or 70% of the users to migrate, as opposed to an arbitrary optimistic cutoff date in 2020, set when people still thought 3.x will get quickly adopted.
>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"
Sounds perfectly reasonable. If the largest stakeholders (people with actually large Python codebases) can't speak up, then who can? Newbs that started some small greenfield project with 3.x?
We detached this subthread from https://news.ycombinator.com/item?id=13434460 and marked it off-topic.
Yea, I know, shouting is not the best thing, but this is a really good news.