News for hackers. Stuff that matters.
Re:Flask 2.0 by endisneigh on Wednesday May 12, 2021 @03:00PM (#27133886)
I'm surprised that it doesn't support Python 3.5. I've been a bit out of touch with Python - is there something that changed significantly in subsequent versions to justify this?
Re:Flask 2.0 by bredren on Wednesday May 12, 2021 @03:34PM (#27134267)
Flask's creator, Armin Ronacher, was asked on the Real Python podcast in July 2020 what specifically he would have done differently.

He said he under appreciated how big the community would get but also the number of people who would use it.

He faulted himself for not spending time thinking about the transition from him primarily working on it to others. And that he should have been thinking about how things would work when he was not involved.

The specific item he was concerned about was that he did not work to build a "community of like minded people" which he says Django did a much better job at doing.

At the very end of the comment, he openly considers if there are things he should have done differently:

"I probably would feel less detached from it if I would have communicated some of my ideas more.

I feel like it is no longer my fight to make it more backwards compatible for instance. The community sees this differently than I do, so that's fine."

https://realpython.com/podcasts/rpp/58/#t=1202

Re:Flask 2.0 by morvita on Wednesday May 12, 2021 @03:09PM (#27133993)
Python 3.5 was declared end of life in September 2020, so it makes sense for library developers to drop support for it as well. Something like Flask 2.0 may work in Python 3.5 (I haven't tested it myself), but it isn't worth the developers' time to guarantee that support for a language version getting no support upstream.

https://www.python.org/downloads/release/python-3510/

Re:Flask 2.0 by ehsankia on Wednesday May 12, 2021 @04:06PM (#27134523)
Deprecation aside, Flask 2.0 begins adding type annotations, which is 3.6+

https://github.com/pallets/flask/pull/3973

Re:Flask 2.0 by matthiasv on Wednesday May 12, 2021 @04:43PM (#27134948)
Type annotations started with 3.5, 3.6 added type annotations for variables.
Re:Flask 2.0 by yuy910616 on Wednesday May 12, 2021 @03:04PM (#27133936)
3.6 had a couple of big improvement - f strings, annotation, and if I'm not mistaking, the devs did something to improve the dictionaries; from 3.6 on dicts are ordered.

I don't know too much about it but raymond hettinger gave a talk about it. https://www.youtube.com/watch?v=p33CVV29OG8

Re:Flask 2.0 by ehsankia on Wednesday May 12, 2021 @04:05PM (#27134509)
Considering the last item in the changelog is:

- Add type hinting. https://github.com/pallets/flask/pull/3973

I think it's fair to assume annotations is the big reason.

Re:Flask 2.0 by detaro on Wednesday May 12, 2021 @04:18PM (#27134646)
Annotations were added in 3.5, so no reason to drop 3.5 for them, and 3.5 support had been dropped from Flask over a year ago.
Re:Flask 2.0 by TkTech on Wednesday May 12, 2021 @03:07PM (#27133970)
-
Re:Flask 2.0 by morvita on Wednesday May 12, 2021 @03:14PM (#27134051)
Order-preserving dicts were added as a side effect of an optimization in CPython 3.6 [0]. They were considered an implementation detail of CPython in 3.6, it wasn't until Python 3.7 that is was declared an official part of the language [1].

[0] https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-compa... [1] https://mail.python.org/pipermail/python-dev/2017-December/1...

Re:Flask 2.0 by orf on Wednesday May 12, 2021 @03:09PM (#27133996)
Ordering was stable within a process (and within a given PYTHONHASHSEED value), but not stable across processes.

They are now insertion ordered.

Re:Flask 2.0 by TkTech on Wednesday May 12, 2021 @03:11PM (#27134015)
Thank you for the clarification :)
Re:Flask 2.0 by 1f60c on Wednesday May 12, 2021 @03:02PM (#27133908)
3.5 has been EOL for 8 months now. (Source: https://endoflife.date/python)

I’m guessing they want to tell people it’s time to upgrade. And 3.6 brings a lot of niceties that they might want to use, like f-strings.

Re:Flask 2.0 by skvark on Wednesday May 12, 2021 @03:39PM (#27134299)
Many projects are dropping support for old Python versions very fast. It's not surprising given the history of the Python 2 -> 3 transition. No one wants to end up in that situation anymore. For example, NumPy has already dropped 3.6 support (3.6 will be EOL later this year).
Re:Flask 2.0 by remram on Wednesday May 12, 2021 @04:47PM (#27134974)
I don't know about "very fast", Python 3.6 was released in 2016 giving people plenty of time to update from 3.5. Those are backward-compatible too.

If you haven't updated in that time, you probably have a systemic problem which shouldn't be blamed on Python moving too fast (in fact I suspect those people don't keep up with bugfixes either, so nudging them to upgrade when they try to update flask/numpy is a good idea).

Re:Flask 2.0 by kstrauser on Wednesday May 12, 2021 @03:17PM (#27134083)
That’s what I’ve done on personal projects. The benefits of dropping support for the old version are large enough to outweigh the tiny drawbacks of not supporting it.
Re:Flask 2.0 by nicolaslem on Wednesday May 12, 2021 @03:03PM (#27133928)
Python 3.5 is end of life, as it doesn't receive security fixes anymore no one should really use it for production.

I imagine that removing it from the supported versions in Flask allows for example to use f-strings.

Re:Flask 2.0 by matusf on Wednesday May 12, 2021 @03:03PM (#27133920)
Python 3.6 added f-strings which are rather popular and they cause syntax error in previous versions of Python.
Re:Flask 2.0 by nijave on Wednesday May 12, 2021 @03:45PM (#27134342)
Afaik the Python foundation supports the current and 3 previous Python releases and many developers track CPython interpreter support. Can't find a link to n+3, though

(Current is 3.9 so 8,7,6 are also supported)

Re:Flask 2.0 by tusharsadhwani on Wednesday May 12, 2021 @04:18PM (#27134647)
The biggest reason of all would be that 3.5 is already end of life :)
Re:Flask 2.0 by formerly_proven on Wednesday May 12, 2021 @03:12PM (#27134026)