Python 3.12 release: The BIGGEST in 15 years

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

Пікірлер: 75

  • @williamsquires3070
    @williamsquires30708 ай бұрын

    I’m waiting for Pi-thon (3.14). 😊

  • @Carberra

    @Carberra

    8 ай бұрын

    Oh wow, I'll have to make a note of that!

  • @ocaly

    @ocaly

    8 ай бұрын

    Underrated

  • @christopherscottdempwolf5759

    @christopherscottdempwolf5759

    8 ай бұрын

    You beat me to it! 👏👏👏

  • @csanadtemesvari9251

    @csanadtemesvari9251

    8 ай бұрын

    🙄

  • @taimunozhan

    @taimunozhan

    8 ай бұрын

    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?

  • @pietraderdetective8953
    @pietraderdetective89539 ай бұрын

    Great to hear about the performance improvements! I remember the core devs targeting a 15% overall improvement per new release, I hope it materializes.

  • @Carberra

    @Carberra

    9 ай бұрын

    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.

  • @mrdogebro
    @mrdogebro9 ай бұрын

    Great video! Excited about all the new features

  • @Carberra

    @Carberra

    9 ай бұрын

    Glad you enjoyed it! Yeah, should be a fun one!

  • @shamaldesilva9533
    @shamaldesilva95339 ай бұрын

    Super excited about the sub interpreters. But im a bit confused about how it differes from multiprocessing 😮

  • @Carberra

    @Carberra

    9 ай бұрын

    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

  • @hebozhe
    @hebozhe8 ай бұрын

    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.

  • @arnabsaha1817
    @arnabsaha18178 ай бұрын

    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.

  • @Carberra

    @Carberra

    8 ай бұрын

    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.

  • @jaoanunes1438
    @jaoanunes14388 ай бұрын

    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

  • @SaiKumar-jy5ub
    @SaiKumar-jy5ub9 ай бұрын

    Do you have an idea on when 3.12 stable version will hit the market?

  • @Carberra

    @Carberra

    9 ай бұрын

    Today! Not sure on an exact time.

  • @MrAlanCristhian

    @MrAlanCristhian

    9 ай бұрын

    is already out! 🥳

  • @Carberra

    @Carberra

    9 ай бұрын

    Sweet! 🎉

  • @illegalsmirf
    @illegalsmirf8 ай бұрын

    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?

  • @Carberra

    @Carberra

    8 ай бұрын

    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.

  • @whowhatwhenwherewhyhow
    @whowhatwhenwherewhyhow9 ай бұрын

    Already, unable to successfully install any jupyter extensions with 3.12.

  • @Carberra

    @Carberra

    9 ай бұрын

    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™.

  • @lorenzomonacelli

    @lorenzomonacelli

    8 ай бұрын

    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.

  • @whowhatwhenwherewhyhow

    @whowhatwhenwherewhyhow

    8 ай бұрын

    @@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 KZread sysadmin 🤡 thinks it is spam and won't let me post it here.

  • @JorgeEscobarMX
    @JorgeEscobarMX5 ай бұрын

    I wonder if a new GILess python will be released soon?

  • @Carberra

    @Carberra

    5 ай бұрын

    There actually kinda of is! I talk about it more in this video: kzread.info/dash/bejne/ia1o1atpqqm-o7g.html

  • @pedroivog.s.6870
    @pedroivog.s.68708 ай бұрын

    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

  • @Thiagola92
    @Thiagola928 ай бұрын

    0:48 Okay, I'm old thank you

  • @asdfghyter

    @asdfghyter

    8 ай бұрын

    no, he’s just super young. not even 30

  • @Carberra

    @Carberra

    8 ай бұрын

    I turned 25 in September!

  • @kevin_mitchell
    @kevin_mitchell8 ай бұрын

    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.

  • @ChrisJones-hv7mo
    @ChrisJones-hv7mo6 ай бұрын

    I would have thought "Comprehension inlining" (PEP 709) would have been worth a mention. Considerable performance improvement from what I understand.

  • @Carberra

    @Carberra

    6 ай бұрын

    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!

  • @JorgeEscobarMX
    @JorgeEscobarMX5 ай бұрын

    I just tried sqlite3 CLI and it's kinda useful, but I rather just write an actual script.

  • @Carberra

    @Carberra

    5 ай бұрын

    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.

  • @thatstupiddoll
    @thatstupiddoll8 ай бұрын

    utcnow bering removed is huge

  • @LavaHotMan
    @LavaHotMan8 ай бұрын

    "Which module will automatically select the best child watcher?" Me: wha, uh, hmm. Umm.

  • @Turplemaple6318
    @Turplemaple63188 ай бұрын

    Just read about threads in operating system and found out python doesn't support true multithreading and next day this video popped out .

  • @GeorgeNoiseless
    @GeorgeNoiseless9 ай бұрын

    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...

  • @davidanalyst671

    @davidanalyst671

    9 ай бұрын

    you may need to get out more

  • @GeorgeNoiseless

    @GeorgeNoiseless

    9 ай бұрын

    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

  • @Carberra

    @Carberra

    9 ай бұрын

    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 😉

  • @pietraderdetective8953

    @pietraderdetective8953

    9 ай бұрын

    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.

  • @temp911Luke
    @temp911Luke9 ай бұрын

    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 !

  • @Carberra

    @Carberra

    9 ай бұрын

    I use pyenv and it works, so perhaps it's just an issue with the official installers.

  • @truthmatters7573

    @truthmatters7573

    9 ай бұрын

    possibly a PATH issue, and that may not be the fault of the devs.

  • @temp911Luke

    @temp911Luke

    9 ай бұрын

    @@truthmatters7573Maybe but Im sure i ticked the PATH box when installing the app.

  • @truthmatters7573

    @truthmatters7573

    9 ай бұрын

    @@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?

  • @temp911Luke

    @temp911Luke

    9 ай бұрын

    @@truthmatters7573 Ive got win10. No, not sorted. Im using the latest ver 3.11.6 instead.

  • @jabuci
    @jabuci8 ай бұрын

    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.

  • @cynical5062

    @cynical5062

    8 ай бұрын

    The f-string parsing changes are quite nice, and the performance increases are interesting! You clearly aren't looking close enough at the changes...

  • @jabuci

    @jabuci

    8 ай бұрын

    @@cynical5062 Performance increase started in 3.11. Keep your f-strings simple unless you want your code hard to read.

  • @jma42

    @jma42

    8 ай бұрын

    either you are a web developer or a script kiddie

  • @Luix
    @Luix8 ай бұрын

    so this is bigger than 2 to 3

  • @davidanalyst671
    @davidanalyst6719 ай бұрын

    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++.

  • @cynical5062

    @cynical5062

    8 ай бұрын

    No? The C++ standards committee publishes new standards roughly every 3 years. They publish *drafts* fairly often, but those are NOT official standards.

  • @lorenzomonacelli

    @lorenzomonacelli

    8 ай бұрын

    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

  • @mrgalaxy396

    @mrgalaxy396

    8 ай бұрын

    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.

  • @jcbritobr
    @jcbritobr8 ай бұрын

    Cant read nothing 😂

  • @burakdemircan_
    @burakdemircan_8 ай бұрын

    I believe you can talk faster. Just concentrate!

  • @BR-hi6yt
    @BR-hi6yt8 ай бұрын

    I didn't understand a single thing. Python getting geeky and autistic by the day.

  • @pauldhartley

    @pauldhartley

    8 ай бұрын

    My view exactly

  • @illegalsmirf

    @illegalsmirf

    8 ай бұрын

    Python documentation has always been incomprehensible and unreadable (it is presented as if by a super-autistic person) so I'm not surprised.

  • @PursuitOfMastery
    @PursuitOfMastery8 ай бұрын

    You’re wasting so much screen real estate.. can barely read the writings

  • @Carberra

    @Carberra

    8 ай бұрын

    Honestly now you've pointed it out I agree with you. I'll make scale them up a little more going forward, thanks!

  • @drewsarkisian9375
    @drewsarkisian93758 ай бұрын

    Unfortunately you speak way too fast.

  • @1vEverybody
    @1vEverybody8 ай бұрын

    Ahh yet another base env 🫠 one day all repo’s and api’s will catch up and we will have universal Python.