python 3.13 release highlights
ฝัง
- เผยแพร่เมื่อ 17 ก.ย. 2024
- it's just around the corner! I walk through the things that I think are noteworthy / I'm excited about in python 3.13! don't worry not too much typing stuff this time smile.
- why remove the GIL? • why remove the python ...
- python is removing the GIL! • python is removing the...
- what's new in python 3.12? • python 3.12 release hi...
- typevar defaults PEP 696 QoL: • PEP 696 is a huge qual...
- TypeGuard in typing: • python TypeGuard (PEP ...
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/aso...
stream github: github.com/ant...
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Intro 00:00:00
List of 7 topics covered 00:00:48
1 Build/etc Improvements 00:01:10
1.1 Removal of GIL 00:01:16
1.2 Experimental JIT 00:05:43
2 Quality Of Life Improvements 00:08:31
2.1 New REPL 00:08:40
2.2 Tracebacks are coloured 00:10:56
2.3 breakpoint() at end of functions 00:11:55
2.4 Improved error message for standard library name clash 00:13:13
3 Its personal 00:16:28
3.1 venv .gitignore 00:16:43
3.2 importlib.resources 00:18:18
3.3 itertools.batched 00:20:08
4 Micro optimisation 00:21:07
4.1 pydoc optimsation 00:21:12
4.2 docstring optimsation 00:25:14
4.3 __static_attributes__ 00:26:54
5 Deprecations 00:29:44
6 Typing stuff 00:35:07
7 Misc 00:43:12
7.1 random 00:43:14
7.2 argparse deprecated option 00:43:52
7.3 os.process_cpu_count() 00:44:26
7.4 types.SimpleNamespace now takes mappings 00:45:49
7.5 copy.replace() 00:46:31
Mind blowing you maintain the deadsnakes ppa. I never knew that lol
Holy shit etho reference
Unbelievable crossover, etho jumpscare
I did not expect that either :D so wholesome
In the past I have used many times deadsnakes ppa for our Ubuntu machines. Thanks for creating it!
oh snappers!
Just wanted to say I appreciate your energy! You seem legitimately charmed with all of the new updates. It's refreshing!
Awesome video! I learned quite a bit and am looking forward to 3.13’s official release even more.
EDIT: Removed the rough timestamps since other comments covered them better.
9:32 timestamp for the best change
Oh man, I'm right there with you on the breakpoint things. I've made a habit of just putting print() on the next line, but I'm excited to break that one.
I'm `breakpoint() pass` gang myself :)
20:48 well you certainly showed me 🤣 Great to actually have that flag though!
Thank you so much for this video that let us have a quick overview of the good stuffs! And I am grateful for your hard work. On the subject of Traceback colors, I think you have weird colors because you use the Ubuntu gnome terminal, which modify default colors. If you use a more standard color profile (where blue is encoded blue, black is black and so on) you may have more coherent colors for the tracebacks
Thanks for the in-depth video, Anthony. I'd love to see you discuss how to begin contributing to Python open source project. The open source collaboration ecosystem can be daunting even for intermediate devs with no open source xp.
fortunately I've got one already! th-cam.com/video/NFW22q-vI6I/w-d-xo.html
@@anthonywritescode thank you
hell yea -- the pdb thingy is so great! its not tiny its HUGE!
Cool, good video as always. I'm a little torn on the .gitignore being created. Part of me wants to say "why does Python need to know about Git at all?".
In the end you still need a good .gitignore file for the projects you're working on anyway or you'll end up with __pycache__ directories added as well.
Can’t wait to see what‘s new jn Python 3.141592653589793238462643383279502884197
Very informative & entertaining xD Thank's a lot for your videos!
The breakpoint change yessssssss I can't believe this has been broken for so long
I like `copy.replace`, I think I will use it in my language's typed AST for substitution - I don't mutate because it's easier to reason about immutability, and also because I plan to rewrite my compiler later in Coq for formal verification
[37:25] YESSS. It always upset me that I had to enter None twice. They've finally fixed that!!!!!!
No click bait? Sad.
OMG I trained myself on putting the breakpoint a line above the last one and I'm so. happy to hear thy fixed it.
That new repl 🤤
23:40 What are some usecases for conditional class definitions? This feels like a can of worms I'd never want to open for someone who's looking at the code later. Probably I'd prefer one class that has a mode switch or something.
usually compatibility code
I'm watching a Python 3.13 highlights video, yet most of the servers at my company still run Python 2, so I hardly use Python 3 at work. xD
Oh yeah, this is the good stuff!
i am programming since 10+ years in python and don't understand half of the things you say - but i love how happy you are about your personal stuff ;)
The new tracebacks remind me of rusts compiler errors
How are the performance improvements? I recall there being a plan coming from 3.9 to 3.13 to 5x improvement or something? Anything concrete for 3.13?
I guess the JIT is part of that plan, but that doesn't bring any improvements. Impressive that they wrote a JIT which first version isn't slower than the non-JIT, but I was hoping for improvements. Guess I'll have to wait another two versions (we always skip one version so we don't have to migrate 50 applications every year :P).
there's some noticeable improvements even outside of the JIT though nothing felt worth calling out explicitly besides the few things I mentioned
go get yer snacks 🍪
I hope they do something special for the π update
and eventually we'll get pypy π too!
I am curious what you think about the suggested tag strings (PEP 750)
I think it's a terrible idea personally. has some niche use cases but will make python even more understand and action-at-a-distance
@@anthonywritescode You're referring en.wikipedia.org/wiki/Action_at_a_distance_(computer_programming), yes?
I have a question and I have no one who could answer. So if you feel like answering I’d appreciate it.
System - M1 Max MacBook Pro. I usually use pyenv to manage multiple versions. The issue is with pyenv. Versions installed with pyenv are working slower than either the same system version or manually compiled from the source version. It seems pyenv does not use compile optimizations or smth. Does anyone noticed the same or know how to address?
personally I avoid pyenv. building from source correctly is very difficult to get right and there's so many ways it can end up broken in mysterious ways. macos is kinda a disaster as well but I usually either use the indygreg pythons or brew's personally
How come you pronounce "GIL" = "Gee-Eye-Ell" but "JIT" = "Djitt" ? :)
because then I don't have to worry about it being GIF or GIF
Great review!
Any plans for a Python to native code compiler? I really don’t want to distribute Python with Apps or use one of these tools that package up Python. But rather take Python and compile straight to an executable. I have said for ages we need an interpreter, JIT and compiler.
there's several tools which do that -- you still would need to embed an interpreter one way or another
Nicee
Awesome video. Good job 👍👍👍👍
Go get your snacks lol
Whts new
But...did you know that python 3.13 is just one version after 3.12, I didn't see you cover that Mr. Python
As always Thanks Anthony!