Python 3.12 release: The BIGGEST in 15 years
Vložit
- čas přidán 21. 07. 2024
- Python 3.12 is easily the biggest release since...well, perhaps 3.0! It's packed full of game-changing features and improvements, and I can't wait to tell you about them!
Below is a list of chapters cited against any relevant references which you'll find further down. It's absolutely worth doing further reading using these if you want to learn more!
Chapters:
0:00 - Intro
0:21 - A per-interpreter GIL [1-5]
1:59 - Performance improvements [6]
2:39 - Syntactic formalisation of f-strings [6-8]
3:11 - Type parameter syntax [9]
3:38 - Override decorator [10-11]
4:06 - Using TypedDict for more precise **kwargs typing [12]
4:28 - Double Standards! [6, 13]
6:22 - Removals [6, 14-15]
6:56 - Deprecations [6, 16]
7:19 - Outro
References:
[1] docs.python.org/3/whatsnew/3....
[2] peps.python.org/pep-0684
[3] www.artima.com/weblogs/viewpo...
[4] wiki.python.org/moin/GlobalIn...
[5] peps.python.org/pep-0554
[6] docs.python.org/3.12/whatsnew...
[7] peps.python.org/pep-0701
[8] peps.python.org/pep-0617
[9] peps.python.org/pep-0695
[10] peps.python.org/pep-0698
[11] pypi.org/project/overrides
[12] peps.python.org/pep-0692
[13] docs.python.org/3.12/library/...
[14] setuptools.pypa.io/en/latest/...
[15] peps.python.org/pep-0623
[16] docs.python.org/3.12/library/...
-
If you enjoy my content, consider supporting me on Patreon or becoming a member!
patreon.carberra.xyz
join.carberra.xyz
If you need help with anything, feel free to join the Discord server:
discord.carberra.xyz
I get a lot of people asking, so here's my Visual Studio Code setup!
• My Visual Studio Code ...
-
If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.
#python #coding #howto
I’m waiting for Pi-thon (3.14). 😊
Oh wow, I'll have to make a note of that!
Underrated
You beat me to it! 👏👏👏
🙄
Does Python have some semantic versioning schema they are required to adhere to or are they free to keep the 3.14 forever and subsubversion that instead of ever getting to 3.15?
Great to hear about the performance improvements! I remember the core devs targeting a 15% overall improvement per new release, I hope it materializes.
Wow, that would be amazing if those targets were hit! I wonder how 3.11 did on that front as well, would be interesting to see how close they've come in the releases since Faster CPython was a thing.
Great video! Excited about all the new features
Glad you enjoyed it! Yeah, should be a fun one!
Super excited about the sub interpreters. But im a bit confused about how it differes from multiprocessing 😮
I believe the difference is that multiprocessing is based around *multiple processes*, where subinterpreters are *isolated threads*. In theory, the overheads that come with multiprocessing should be mitigated.
The "Concerns" section in PEP 554 justifies the existance of subinpreters in a world where the other types exist, so it may be worth reading that: peps.python.org/pep-0554/#concerns
Only really interested in true multithreading once it becomes a thing and accessible in pure Python, so I'm sitting out the improvements here and migrating code to Go in the meantime.
i didn't undertand half of what you said in the video but i loved your video and i love python so you got a like and a new sub
Does the latest Tensorflow Extended have a support for the latest python 3.12 or even 3.11 . I'm just having one hell of a time using TFX in my local.
Tensorflow is often pretty late to the party with new releases, so I'd be surprised if it supported it yet. I don't know for sure though.
Do you have an idea on when 3.12 stable version will hit the market?
Today! Not sure on an exact time.
is already out! 🥳
Sweet! 🎉
I hear that version 3.7 is losing support. Does that mean everything written in older versions of Python 3 will stop working, like what happened to Python 2?
Python 3.7 is just at end of life, everything written to support 3.7 will still support it for now, though there's nothing to say things written in 3.7 will work on 3.12. It just depends exactly what libraries etc. they use.
Already, unable to successfully install any jupyter extensions with 3.12.
There's a chance Jupyter, or extension devs, haven't added support for 3.12 yet. Data science tools and libraries do tend to sit a little behind with support, so will probably be available soon™.
They removed setup tools from and the numpy distutils cannot anymore be used in 3.12. As a package maintainer whose software contains a lot of Fortran code that only distutils could manage to autocompile, that is a lot of work to migrate the setup of the package just to add support to 3.12. I believe that my library will not support 3.12 in the next few years, unless I get a pull request from some nice guy that decides to do the boring job for me.
@@lorenzomonacelli In the downloads release documentation, under Deprecation, it mentions that distutils module continues under setuptools package. I'd provide the URL here, but it seems CZcams sysadmin 🤡 thinks it is spam and won't let me post it here.
I wonder if a new GILess python will be released soon?
There actually kinda of is! I talk about it more in this video: czcams.com/video/Wy4sI0zFXsU/video.html
Working at Python development and maintenance must be very interesting given how much they develop and optimize, besides eorking at other projects like their several libraries and frameworks
Can't read and listen at the same time. Had to give up at 1:26. Of course I can pause it, but it's a constant occurrence and not an intermittent one, making it very difficult to follow along. Just my personal feedback and may not be applicable to most viewers who are already subscribers and like this format, so maybe this critique may not be relevant in informing the format of future video releases, or maybe it will, or maybe your other videos which I haven't seen yet are completely different. Either way, it's just my personal feedback and nothing more than that. Having said that, it's also most likely due to my lack of knowledge in understanding the content in the first place.
0:48 Okay, I'm old thank you
no, he’s just super young. not even 30
I turned 25 in September!
I would have thought "Comprehension inlining" (PEP 709) would have been worth a mention. Considerable performance improvement from what I understand.
It was in the original draft of the script but I ended up cutting it out. It is indeed a 2x speed improvement though, which is always great to see!
Just read about threads in operating system and found out python doesn't support true multithreading and next day this video popped out .
"Which module will automatically select the best child watcher?"
Me: wha, uh, hmm. Umm.
I just tried sqlite3 CLI and it's kinda useful, but I rather just write an actual script.
It's great if you need to check something really quick for debugging, but yeah I agree I'd rather do a script for anything proper.
utcnow bering removed is huge
Nothing excites me like typing improvements in Python!
Having taken but a quick peek at the somewhat hyped Mojo (aka Better Python for AI), most of its innovation seems to be in adding strong typing.
P.S. I was actually guessing "pathlib" for the "os" question, so close...
you may need to get out more
Well I suppose that could have been worded better: No improvement in Python excites me like a typing improvement.
Yet it's still but a shadow of the pure unbridled ecstasy of _s t r o n g_ typing.
@@davidanalyst671
The typing improvements are pretty awesome this time round, can't argue with that! And well, there's a reason I made them both options 😉
looking at Mojo syntax makes me want to stay away to be honest...gone are the clear readable Python syntax we know and love.
but I'm sure Mojo is going be amazing for the correct audience.
Biggest in 15 years? What a clickbait title! These are good, but most of them are not so exciting for the majority of Python programmers.
The f-string parsing changes are quite nice, and the performance increases are interesting! You clearly aren't looking close enough at the changes...
@@cynical5062 Performance increase started in 3.11. Keep your f-strings simple unless you want your code hard to read.
either you are a web developer or a script kiddie
After I installed 3.12 having 3.11 before nothing works anymore, libs are not detected and whats worse PIP isnt working either.
Python devs doing this for so long and cant even create a working installation file that wouldnt create any problems !
I use pyenv and it works, so perhaps it's just an issue with the official installers.
possibly a PATH issue, and that may not be the fault of the devs.
@@truthmatters7573Maybe but Im sure i ticked the PATH box when installing the app.
@@temp911Luke a lot of things could go wrong with the PATH. Depending on what terminal you use, there are various configuration files that can override the PATH as well.
Have you sorted the issue by now or is it still broken? if not what OS are you on?
@@truthmatters7573 Ive got win10. No, not sorted. Im using the latest ver 3.11.6 instead.
This is it. Its all downhill from here. C++ does an update on their standards every year, but nothing you use or understand has changed other than maybe some internet crap in the last 30 years of C++.
No? The C++ standards committee publishes new standards roughly every 3 years. They publish *drafts* fairly often, but those are NOT official standards.
At least you can compile a 50 years old C code with the latest version of g++, good luck trying to run a 2 years old python code with the latest interpreter
Backwards compatibility is the whole shtick of C++ and the reason why it's such a complicated (although powerful) mess. You can do things ten different ways precisely to still support legacy features and code. You can compile ancient C++ just fine today, I am not so sure about Python.
Cant read nothing 😂
I believe you can talk faster. Just concentrate!
so this is bigger than 2 to 3
You’re wasting so much screen real estate.. can barely read the writings
Honestly now you've pointed it out I agree with you. I'll make scale them up a little more going forward, thanks!
I didn't understand a single thing. Python getting geeky and autistic by the day.
My view exactly
Python documentation has always been incomprehensible and unreadable (it is presented as if by a super-autistic person) so I'm not surprised.
Unfortunately you speak way too fast.
Ahh yet another base env 🫠 one day all repo’s and api’s will catch up and we will have universal Python.