Python 3.12 release: The BIGGEST in 15 years

Поделиться
HTML-код
  • Опубликовано: 10 июл 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

Комментарии • 75

  • @williamsquires3070
    @williamsquires3070 9 месяцев назад +185

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

    • @Carberra
      @Carberra  9 месяцев назад +24

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

    • @ocaly
      @ocaly 9 месяцев назад +1

      Underrated

    • @christopherscottdempwolf5759
      @christopherscottdempwolf5759 9 месяцев назад

      You beat me to it! 👏👏👏

    • @csanadtemesvari9251
      @csanadtemesvari9251 9 месяцев назад

      🙄

    • @taimunozhan
      @taimunozhan 9 месяцев назад

      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
    @pietraderdetective8953 9 месяцев назад +37

    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 месяцев назад +3

      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
    @mrdogebro 9 месяцев назад +4

    Great video! Excited about all the new features

    • @Carberra
      @Carberra  9 месяцев назад +1

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

  • @shamaldesilva9533
    @shamaldesilva9533 9 месяцев назад +20

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

    • @Carberra
      @Carberra  9 месяцев назад +10

      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
    @hebozhe 8 месяцев назад +4

    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.

  • @jaoanunes1438
    @jaoanunes1438 8 месяцев назад

    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

  • @arnabsaha1817
    @arnabsaha1817 9 месяцев назад +1

    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  9 месяцев назад

      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.

  • @SaiKumar-jy5ub
    @SaiKumar-jy5ub 9 месяцев назад +7

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

    • @Carberra
      @Carberra  9 месяцев назад +3

      Today! Not sure on an exact time.

    • @MrAlanCristhian
      @MrAlanCristhian 9 месяцев назад +2

      is already out! 🥳

    • @Carberra
      @Carberra  9 месяцев назад +1

      Sweet! 🎉

  • @illegalsmirf
    @illegalsmirf 9 месяцев назад +1

    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  9 месяцев назад +4

      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.

  • @JorgeEscobarMX
    @JorgeEscobarMX 6 месяцев назад

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

    • @Carberra
      @Carberra  6 месяцев назад

      There actually kinda of is! I talk about it more in this video: ruclips.net/video/Wy4sI0zFXsU/видео.html

  • @pedroivog.s.6870
    @pedroivog.s.6870 9 месяцев назад +2

    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
    @Thiagola92 9 месяцев назад +1

    0:48 Okay, I'm old thank you

    • @asdfghyter
      @asdfghyter 9 месяцев назад +1

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

    • @Carberra
      @Carberra  9 месяцев назад +2

      I turned 25 in September!

  • @dailypotstirrer
    @dailypotstirrer 9 месяцев назад +3

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

    • @Carberra
      @Carberra  9 месяцев назад +1

      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 9 месяцев назад

      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.

    • @dailypotstirrer
      @dailypotstirrer 9 месяцев назад

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

  • @ChrisJones-hv7mo
    @ChrisJones-hv7mo 7 месяцев назад

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

    • @Carberra
      @Carberra  7 месяцев назад +1

      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!

  • @kevin_mitchell
    @kevin_mitchell 9 месяцев назад +3

    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.

  • @LavaHotMan
    @LavaHotMan 9 месяцев назад

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

  • @Turplemaple6318
    @Turplemaple6318 9 месяцев назад

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

  • @JorgeEscobarMX
    @JorgeEscobarMX 6 месяцев назад

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

    • @Carberra
      @Carberra  6 месяцев назад

      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.

  • @jabuci
    @jabuci 9 месяцев назад +12

    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 9 месяцев назад +3

      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 9 месяцев назад

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

    • @jma42
      @jma42 9 месяцев назад +3

      either you are a web developer or a script kiddie

  • @GeorgeNoiseless
    @GeorgeNoiseless 9 месяцев назад +2

    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 месяцев назад +2

      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 месяцев назад +1

      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.

  • @thatstupiddoll
    @thatstupiddoll 8 месяцев назад

    utcnow bering removed is huge

  • @temp911Luke
    @temp911Luke 9 месяцев назад +1

    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 месяцев назад +1

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

    • @truthmatters7573
      @truthmatters7573 9 месяцев назад +1

      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 месяцев назад +2

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

  • @davidanalyst671
    @davidanalyst671 9 месяцев назад +2

    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 9 месяцев назад +4

      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 9 месяцев назад +3

      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.

  • @Luix
    @Luix 9 месяцев назад

    so this is bigger than 2 to 3

  • @jcbritobr
    @jcbritobr 9 месяцев назад

    Cant read nothing 😂

  • @burakdemircan_
    @burakdemircan_ 8 месяцев назад

    I believe you can talk faster. Just concentrate!

  • @PursuitOfMastery
    @PursuitOfMastery 9 месяцев назад +1

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

    • @Carberra
      @Carberra  9 месяцев назад +2

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

  • @BR-hi6yt
    @BR-hi6yt 9 месяцев назад +7

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

    • @pauldhartley
      @pauldhartley 9 месяцев назад

      My view exactly

    • @illegalsmirf
      @illegalsmirf 9 месяцев назад

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

  • @drewsarkisian9375
    @drewsarkisian9375 9 месяцев назад +3

    Unfortunately you speak way too fast.

  • @1vEverybody
    @1vEverybody 9 месяцев назад +1

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