News for hackers. Stuff that matters.
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 :)