Python 3.10 Release Stream — with Pablo Galindo

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Feel free to ask your questions here, or over in the youtube or discord chat! We'll relay them and try to get them answered!

👍︎︎ 1 👤︎︎ u/IAmKindOfCreative 📅︎︎ Oct 04 2021 🗫︎ replies
Captions
option because it says one exception under encryption unencrypted connections live stream are you sure that passcode is correct cat which passcode the one that shows up when i click on the yellow shield in the top left we are live oh yep we are live all right cool wow oh sorry about that we've had some technical difficulties getting this started uh probably due to the outage uh that's affecting facebook as well we had to switch to zoom as our platform to pull this off so some uh it might not look exactly the same as we had planned but uh let's just try to make the best of it we've got some wonderful people here we're going to be doing a release of python version 310. i've got pablo galindo with me he's the release manager for 310 why don't you introduce yourself pablo hey um so i'm pablo galindo i'm the release manager of python supreme 10 and 311 i'm also serving in this year's student council and hopefully i'm going to see if i don't break any more internet services today apparently because in the other release i broke also github so just you know get in there excellent we also have some of the ac python core developers who worked on this release um carol willing you want to introduce yourself as well sure um thanks leona and kat for getting us live much appreciated and i'm carol willing i am um have been on the steering council since its inaugural student council and um love education and science and um the fact that python is truly a global language so um thank you to everybody who contributed it's it's really great i'm really excited for what's to come next what kind of stuff did you work up for this release i worked on mostly the steering council related stuff a little bit of documentation reading a lot of peps and um kind of advocating for pattern matching excellent um we've got brent butcher with us hey brad hello yeah thanks for putting this together uh my name is brandt i've been involved in python development for a little over two years now i've been a core developer for a little over a year um and i worked on structural pattern matching in python 3.10. i'll be talking about that today i'm looking forward to that and we've got irit yes i um i'm one of the more recent co-development joiners i became a co-developer in in may and i actually didn't do a lot for 310 and this is why i would be talking today about what we're going to be working on for 311 and how people can kind of join and become contributors as well that's great i love your hat and uh last but not least we've got bukash uh longa with us hey hi uh well i'm the release manager of the now old versions of python three eight and three nine also uh starting recently the c python uh developer in residence so that's my day job now which is amazing uh and i'm i'm here mostly to witness how to do a new release because i'm not gonna be doing any more of those i'm i'm a little nostalgic about this but yeah like let's let's see how uh pablo does today yeah i'm also really looking forward to learning how this works uh i think it's kind of a new thing i've never seen anyone stream the process of releasing a new version of a major programming language before and i think a lot of our viewers are probably interested in what exactly does that mean how does that work uh and pablo you're gonna be walking us through that step by step today so can you give us like the high level like what are you gonna do yeah absolutely so apparently the first step is to break something big and you know like leave half the internet not working and then you can start the release um so uh okay so let me kind of walk you in a very high level what i am going to do so the release of python in particular as any like major uh programming language is kind of a long process this can take a lot of hours like lucas knows very well um so i before this this stream i have pre-made some of this work just because it's going to be quite boring just for me to show how we test the thing because it takes normally you know several hours to do all the slow testing and validation so that is already done so we we check that we can go ahead so what we need to do right now is basically graph like a snapshot of the python repository which is also a bit special i will explain why just in a second but we are going to grab a snapshot of the python repository that will become the 310.00 and we basically will produce um like first a as an artifact like a binary artifact that people can download this is the target set that artifact will be signed and you know we will be the documentation from that artifact we'll check that that actually also works once we produce it it's basically a file when i say artifact for those that are not used to the definition is a file like a zip file basically and then once that is done we will contact the windows and mac os experts who will grab that snapshot and it will produce the windows and mac os installers that's something that we are going to see that we need to wait on them probably they are seeing the stream so hello ned and steve um so once those are ready um we will graph um all those files and then we will upload them to several servers and this includes also documentation that you will see normally on uh docks.python.org and the the load page where you normally will download the python version depending on your operating system and um can you see if you can increase your microphone volume tiny bit we're getting something yeah absolutely give me s6 seems to be a little bit low in the chat let me also let me put it closer hello hello yeah yeah kiss the mic awesome so that looks good yeah fantastic so um right so once you we have uploaded basically all those all those things to the server we just need to kind of fill the details on the download server we will put like a a science fact because i don't know if you i'm basically a physicist and on every release i've been doing like a small science fact on the download page for those that have been checking the betas and the prereleases so i will um i will release a very uh a very vr science fact because it's from my psd so surprise surprise well will be um and then once that's done we just need to like uh activate all the links and that's done python superintendent will be will be live uh so i have prepared basically just a small button that we can actually press and call it release although the actual release moment is when we upload the file but that's like kind of secret so that's that's what we are going to do for a highlighter the big red button is not great i think it's great button but i can you know i can zoom into the into the web browser and make it really big so you know we can we can click it um the script also that's it and the script also does it so and it has some emojis actually let me very quickly share for those of you that are because you know i kind of explain it very fast but i would like to share very quickly um oh apparently the host needs to allow sharing but yeah meanwhile i'm going to explain why i'm going to search so i'm going to share basically these instructions you can actually read them they are not kind of secret uh so this is pep 101 you can meanwhile i said it you can actually search for it so that basically is a big document that explains um how to do how to do python releases so yeah it seems that i can share now so just give me a second right there you uh whoop so so this this is the basically the pep is you search for pep 101 you will see this very long document and this document basically explains all the process so it's all these steps what basically make the release uh you will find like as a curiosity you will find this fun stop stop stop steps which i still understand what they are for but actually i don't know i normally take a coffee on those or something um and yeah so you can check actually it's quite a very complex process it used to be quite manual although there is some parts that are actually automated and i've been working with the rest of the release team in a script that hopefully automates the whole thing uh so ideally this um this doesn't this doesn't fail incredibly hard at this time but hopefully you know it's just like uh it's not fully automated but you can you can more or less like you know be a bit unattended um so yeah and that would be the idea so as long as uh everything works uh between the different talks that will happen i will be updating on the status of the of this long release process i think the stops are when you break the internet we have to wait for it to come back for for for an hour or something right right yeah try not to do that but um well can you walk us through what's the first thing that you're going to do now right so what i'm going to do is to basically uh first double check um that uh i have my setup correct and that i'm not going to release python 311 by mistake because that is quite important so let me actually kind of share a bit how the thing starts and once it's still running we can start with the with the talks so hopefully i can just share the terminal i will just work cool so um i'm here in basically a clone of the c python repo and i have checked out this special branch normally i will have to check out like the 3.10 branch or uh 311 or something like that in this case because um 310 is a is basically like becoming 3.10.1 because it's getting more and more bug fixes um so for not risking stability and basically not releasing things that have been only test for a couple of weeks i have this special branch when i've been uh backboarding only specific comments that i'm interested on to be included this is are like things like very special fixes or you know very important uh changes that we absolutely need to be uh to be there so um i just checked that i have not any weird change and i'm seeing that i'm clean so basically i'm going to create 3.10 from this particular comment the last comment that we see is this uh what this b blah blah blah blah and this is the last comment that is going to be included in python 3.10 and i have tested that thing like almost 12 times already so everything looks good so now i'm going to go to the release tools repo which is also public it's in the python arc you can actually see the script that i'm going to run it's not any mystery and from here um i can run basically the whole thing it used to be that you know you need to do all these steps that you see on the pipe manually um it's literally copy pasting the commands and hoping that nothing breaks uh but i can show you like how this works so in this particular case i indicate what release i want to do which is python 3.10 i indicate what is the repository with the snapshot and this is the user that i use for going into the service that i need to run so hopefully well sorry you see this is precisely what way doesn't work i was like messing around with the script so i'm going to uncomment all of these things what [Music] i knew that something like is going to happen okay so there you go so now we start so at the beginning is doing some checks it's checking that we i have all the tools needed for the release and then i select by my my gpg key that i want to use for signing is also checking that it's going to work and hopefully it's checking then that the ssh connection works and it's starting to do its thing so now it's going to like start to do a lot of things like checking building the documentation and a bunch of things this will take 20 minutes among other things because it's going to build the latest box which is some forsaken process that involve you know summoning old guts um we you will see the output because it's ridiculous uh but yeah this this hopefully will not break which means that obviously it's going to work at some point and we will need to fix it but hopefully um we can see one of the talks that my colleagues have meanwhile uh everything you know builds um on the background so yeah yeah we'll be checking back with you a little later but before we move on i just want to ask you you said that you've been testing this build religiously before we're doing the release now all right right can you go into sort of what's the testing strategy for a release of python what kind of tests do you have and uh how do you guys run them yes that's actually a very important step that i just forgot so thank you thank you a lot for reminding me uh right right very important very important so so there is that is several of uh the most important so when you merge something to see python there is there is a ci in github actions and we have other providers although we are mainly using github actions now and it tests basically your comments on every single comment on linux on windows and on mac os and i think windows 32 bits and and 64 bits right so we we know that every commit basically works but the thing is that c python actually is supported on or or works on more platforms than just those three things like freebsd powerpc or other architecture right like instead of intel uh maybe some arm chip or you know m1 mac os or who knows right so there is a lot of different architectures so once the comment lands into the master branch now is the main branch uh there is like a lot of machines which are called billboards and these billboards basically test every single comment some of these billboards are testing basically just see python in normal mode uh so just to run the test suite um which we can go into a bit of detail later but they run just the same test within the ci just in different machines or maybe you know some some abm or m1s or whatever but then there is also some billboards um i'm going to show those now there is also some billboards that uh test in various special configurations so for instance we have billboards that check things like uh invalid memory addresses using the clang and gcc sanitizers or like you know race conditions uh or which which are breaking all the time because you know like what happens is that those checks are not executed on every comment because they normally take hours or some of those checks are not executed on every coin so these are run after the fact so sometimes we kind of need to go back and fix the thing or revert the comments which is something that happened a lot just before the release like the two weeks before the release it happens like every single day like for instance i was yesterday until like 1am fixing one of these so so this is what it goes and then there is another billboard that for instance checks for reference links uh i can go into details on what that is later as well but basically c python is a reference count language so when you're doing the kind of the the inner part of the language and then you're checking with see the c parts of of it you can measure the reference count of objects and we have several billboards that check that the reference count is correct which all my colleges here are not because they probably have been annoying one or two times about like you know those bubbles breaking so let me show you very very quickly how this looks and where you can see them um right so the billboards are basically let me make this a bit bigger so the billboards are basically in a webpage called billboard.python.org and basically it's quite a you know it's quite a known framework this is not something that we have made it's a python ci system and it has like a lot of tabs and you know it can be quite confusing but basically i one thing that i was working on is this release status slide tab and this basically shows you all the main brands that we have and what problems they are so we have like the three point x is main then we have 3.9 and 3.8 and these are like billboards are failing so you can kind of click here and see what's the problem that they have unbelievably like i can literally not believe that this is happening 310 is fantastic no problem at all and you know this is not like a screenshot or something that i photoshop it's actually it's actually real um but yeah so this is like a quick view over every branch and basically this is made for release managers like me and gookash so we can quickly see if there is any problem on the branches that we are going to release so for instance if you go here to builds and click builders you will see the list of all these different configurations and machines so you can see like there is a lot of them some of them are different branches some of them like for instance this a sun stands for address and a dicer so this is the one checking like that all the addresses uh in c python arkham are correct and we don't go into out of bound uh in arrays and things like that there is also like different uh configure options for instance there is like different ways to compile c python so we are checking that all of these uh ways uh are there and for instance if you are aware with the pec parser project we have this vintage parser billboard which is checking that three nine words with the old parser um which out of uh you know we call it lovely vintage parser fantastic thing um yeah yeah very cool very cool um so for instance you can click in one of these so you can say okay let me show show me only the ones that are built in the master branch the ones that are stable which are the ones that are in you know are supposed to be green and you can see all the different builds that these billboards have been doing like apparently they are all green but you know if you go wow i cannot believe they're still all green incredible this is kind of a lie uh let's let's clear 3a which is a bit worse um right so for instance this guy here is a unhappy right it's like red so you can click one of these and you can expand and you can see kind of what happened so apparently this build here uh so it failed because you know something on on freebsd which is a different os you know it's not working on the os module uh unclear what it is because we are not releasing 3.8 we don't care but basically this is you can see here everything that we have and you can actually continue some of these machines so most of the machines are actually run by community members or are donations that companies and individuals made so for instance recently we have these um these m1 machines so all of these arm 64 billboards are m1 os so we can check the you know see python works in and one with native um native assembly which is quite cool and this was a donation by a community member so you can actually run your billboards you're interested in obviously you know you need to give us some guarantees if you really want to run a stable one but yeah this is basically what it is and the most difficult part obviously is to take care that you know everything is green and if something breaks you know we go back to the developers and the corelabs and and we tell them that they need to fix things right sometimes we have automated systems that like bots that tell you these things so the core developers are not angry with us because we tell them that their commit have been breaking something uh but yeah that is the whole thing and basically you cannot technically do a release if your branches doesn't have all the machines getting like one of the important parts before doing any release is basically making sure that all the machines are green and if there is anything that is red checking that maybe it's a false positive or something that you know that is failing or because sometimes there is some machines you know where the error is on the machine and not only python because you know it's badly configured or something which happens a lot unfortunately so you need to kind of filter so but apparently today everything is green which i literally cannot believe so so if you hadn't been able to fix that problem at 1 am last night we wouldn't be having this release now or or i will highlight the billboard yeah i mean i will either have to kind of take a decision an official decision and say i'm going to do release even if i know about this problem and i'm going to push the fix to 3.10.1 but if it's a very very important problem like you know pattern matching is broken or you know by consecutive of course the security issue uh so in that case i will have to delay this party and you know maybe maybe effects will be still working if that will have happen all right thank you for that excellent answer i think a lot of people find this really interesting to sort of peer behind the behind the scenes and see how you guys work on this um i think at that point we're going to um go to ukash for a presentation on typing improvements and um we'll be disabling some of the other participants camera so just note that you may have to re-enable them after the presentation for those so it's just me and my hair okay cool um let's uh let's start uh well i have no other no other choice i have to like it as well let me share the screen and see if that works boom share can you see it yeah all right cool um there's been a few typing changes in python 310 everybody talks about this one which is also arguably my favorite one um which allows us no longer to use very verbose uppercase unions optionals and so on but instead to use the pipe operator which is just as readable in fact more readable since it's concise but also kind of you know gets out of the way more right like so the the point always was that on type annotations when they described complex types they appear scary to users right they're like hey i don't want to use typing because you know those types are very complicated well the types aren't like your code is if it has complex types but now if we no longer have to use the verbose union or an optional syntax we can actually see that some of those even non-trivial types are in fact that are crazy and in this particular example straight from the pep the link to the pep is right here in the file um you can see that there's a list of either insert or strings and there's some parameter that can be either int or none and the return uh the returned value is going to be either float or string um this is simple to increase your font size a little bit uh increase your font size let's let's go with that is that enough that looks good i think okay cool um yeah so um this works from python 310. you can sort of get this working uh for many purposes in other python versions starting with three seven if you're using from future import annotations however in this particular scenario what you won't be able to do is for example define aliases like list 2 which is a list of int or string that will still not work with future import annotations because that in future import only affects what's happening here in the type annotations not in a runtime code which this line is right so um for full usage of uh the pipe syntax you will have to upgrade to python 310 which you should um so yeah moving on that's pep 604 i recommend you read it um there's another one right here which there's a lot of scary code but what we need to only focus on here is this there's a callable that takes some parameters and returns some value before this particular pep was in effect what we could be doing is specifying concretely what those parameters are and what this return value is this is cool for concrete callables that we want as arguments to a function or returned from a function but it is problematic for decorators in this example coming from the pep as well um is in fact defining a decorator this particular decorator just adds logging okay so it modifies any callable of any param specification to just change the return value to now be awaitable right uh so thanks to pep 612 now we can use just like type variables before we can use param specs here and thanks to this we can define um well generic decorators to work on any type and still be a very neatly typed before we could sort of you know put any here and there uh to just specify that you know we don't know because this can be any parameter so this is just a callable but it can do whatever but in this case our static typing was not uh tight enough to do type checks when things go wrong for example like here we're uh doing what we what we mean right like with our function we put the integer first and the string second but if we were to do um the wrong parameter order before my pi wouldn't be able to tell that there's an issue because uh there was no way to generically specify that whatever parameters are callable except the decorator returns a callable with the same param spec so a rather advanced feature it might look scary for casual users at the moment but the point of it for regular users is that um decorators defined with types right now as of now will be uh better working with type checkers right like so code using those decorators will be type checked just as strongly as regular functions moving on uh pep 613 is specifically talking about uh what i already showed which is type aliasing right like i can easily as a type saying for example that um user id is uh just some int right that that works on my pi will is going to understand this i can now uh in some function um just say that this returns a user id right however if we instead of putting a type to a name put a string to a name like in this particular example now my pi won't work with this kind of declaration because it cannot differentiate whether this is really a type just using the string forward reference syntax or is it um just a regular string right which it can be so it doesn't know so it won't guess right like as the zen of python tells us so now in phase of forward references and maybe even in other cases just to be explicit which again zen of python we can say type alias right to make sure that everybody understands that what we just did is create an alias for a type which is not needed to the type checker it's needed for us humans to have our annotations to be more readable right so now we can do this uh with aliases and the last pep that we had accepted for 310 regards with uh with regards to typing is 647. uh interestingly we often talk about my pi as the type checker for python but there's more right um one of the very popular ones these days is um the one that ships with vs code um as part of its uh python plugins right as part of pylons so this pub actually comes from eric trot which is one who is one of microsoft's employees working on typing there um so in this particular case this also solves an issue that is advanced but it just makes the overall user experience much better so what are we talking about well type checkers need to be smart right if we have a value that is an optional string then if we tell it that oh um there's an if statement checking if it's not none the type checker should know that here inside this particular path it can treat value as a string for sure right we can do lower on it we can do upper on it and and so on and so on it can assume it's going to be a string because there is a none check right here and in the else we know it's a non like for sure this is going to be a non value so type checkers do a bunch of those kinds of checks like for example like if it's optional we cannot specify uh value is none in particular we can just say if val and that should still work uh similarly if we have a union of types we can specify that you know uh if this is an instance of one of those types in this case string we know that inside this path this is a string so if we call lower upper and so on and so on and concatenate it to another string the type checker will be fine with this it won't raise any issues inside and here with else we know for sure that it's it has to be a float right like we specified it as a union of either string or float so here uh the type checker will know and will allow you to just you know do additions multiplications and so on and so on um so yeah like we can even do stuff like literals which is a kind of newer addition to typing where we don't want any integer value we want specifically one and two so we can do comparisons with those values and the type checker will again be smart right but what if we have a much more complex type this is what this pep is about um if we for example have a typed dict so any dictionary can arrive at our doorstep like we know be passed as an argument to our function but what we're what we are interested in is a dictionary that has a name uh key and then the values there are strings and has an age uh key where the values are ins so we can write a check in python right like it shouldn't be very hard for us to just be able to check you know like whether the instance of a key here uh matches and the instance of this other key also matches and if there isn't a key that we want like we're just going to return false saying this is not a person so now thanks to this type guard um type we can tell the type checker that hey this is actually what we uh use to specify that something is or is not of a certain type so as i showed the um examples before with if this person the type checker will now understand that this particular dictionary for sure is a person right like very useful uh you won't probably create many of those type guards yourself but some of your used um frameworks like adders and so on might right like this might be helpful for that uh so those are the peps uh just to you know close off with a a smaller feature that i also think is important for typing in 310 now we have in the inspect module a new function uh which is called get annotations so that is sort of like uh get type hints in the typing module but more generic and is now the recommended way uh to retrieve annotations from classes and functions and modules um so yeah like if you ever need to get annotations back from any sort of object i use inspect dot annotations um i get annotations all right uh that's it on my end um i hope uh you're gonna enjoy typing more now that it is kind of a nicer syntax in python 310 um we're going to be improving it further uh there is one big feature of typing that we were supposed to enable by default the um future import of annotations this is being held back to 311 um since um there is now a competing pep pep 649 that um looks like it provides a more flexible and backwards compatible way to achieve the same thing that the original pep 563 uh was meant to do which was to enable forward references um transparently to the user uh so like for that you're gonna have to wait for for news on this front uh this is going to happen over the next uh few weeks this is not a 310 feature uh so for the time being if you're already uh future import user you're going to have to use from future import annotations uh all along through the 310 release as well all right thanks so much we're um while we're doing these little presentations we're also keeping an eye on the chat and we're getting some questions from some of our users so i'm going to be asking you guys to answer a couple of those questions after each of the presentation um one thing that we're seeing is that there seems to be still a little bit of confusion about exactly what the purpose of the type guard is do you think you could zoom out and maybe try to explain it at an even slightly higher level oh yeah sure um let me come up with an example right now uh let me just share the screen again so we can we can talk specifics um okay let me make a new file in fact ah here let's save it so it's a python file on type guard py okay so um if you write a function right uh say i don't know like foo i i really am kind of blanking on a sensible example right now and and now what you can get is uh some object from the user which is maybe old user right so there might be an old user or there might not be um so that old user might be either oh let's say id right so that might be a string or none right um so in this case if i only suddenly started using old user id as a string for example a bike calling old user id dot uh capitalize right for exa that that is one of the uh available options for us uh if we ran the type checker on this which in fact we can let's do that where am i so let's switch to here if we run a my pi on this type guard file that i just created it should be unhappy with us like it is a little slow for now i'm not sure why that is uh oh uh because the python 310 build that i have is um is a debug build so it is much slower than uh what you're gonna be seeing i don't think this is gonna have much of a uh effect on the stream but of course it does uh because it would be too boring otherwise um but this is actually even slower than i thought it would be so i'm not sure what this is doing at the moment maybe maybe he thinks he's very grown like this oh it can be wrong finally finally my my my uh decided to to show us error uh so yeah so see what it says is hey if the thing that you just called capitalize on turned out to be none which it can because you told me that it could be then uh there is no attribute capitalize on unknown type right this is what it tells us so instead what we need to do is we need to guard it right and regard it by saying if all the user id is not none right in this case we know for sure like now there is no question because we just checked it at runtime that it's not and if we do this then after 10 minutes uh my pi will also tell us that there is no no now it's fast somehow uh it was probably just compiling a ton of poic files um that that's a very very new build of 310 that i just did so yeah see now it's a success right it's great and the point of the type guard pep is that there is a number of those checks that work for anything in python right but if you have a very complicated uh need to narrow a type that is not covered by this instance and checking against you know none or whatever then before the type checker was kind of you know blind to the fact that you know for sure that something is of a type or isn't now uh with type cards uh you can specify a custom type guard to allow type checkers to understand stuff like this that you know that in this particular path some particular method in a key in a type dictionary and some other things like now they are available uh everything is fine right um so i i hope i uh explain this better uh right now but like that that's the entire reason why we have this okay yeah that makes sense so it's for communicating really with the type checkers exactly this um makes perfect sense thank you for that explanation i think that's the only question that we had uh that we need to take right now we're saving some of the questions that you guys are asking in the stream for the end of the stream we're going to have a little q a at the end where all of our core developers here will be invited to join and answer as appropriate and if you have questions to the presentations that you're seeing please do ask them uh in the chat we're picking them up we have a whole uh small staff of people who are in the chat paying attention to your questions sending them over to me so that we don't miss them and whether that question is pertinent to the thing that you're seeing on the screen right now or even if it's just a general question that you'd like to ask the core devs just ask and we'll we'll try to add it to the stream if we can so let's uh go back to pablo and check on the release how are we doing pablo hello again so oh sorry lucas i don't know if you want to see something i know like you re-enable video so it's all good like i i couldn't see you in before right let me let me share this so we are building the docs right now which is this weird process that i mentioned before um so hopefully you can see kind of the the kind of output that this is emitting which is ridiculous um as a release manager you need to read all of this and make sure that it's okay especially very important yeah this number is very important um also i just discovered like looking at the output so this is pass output so of course you know like it's looking like you know latex latex warning like yeah something is wrong but like you look at this is the part like as a release manager you look somewhere else not at the screen and then you say yeah everything is fine but i just noticed that apparently there is like digits of pi somewhere i'm not joking like look uh so so apparently the version of something is pi as a scientist probably you have to love those because latex no matter what um whatever you're doing it it always adds another fun dimension of things right right indeed i mean i was it was a pleasant surprise compared to the the the list of important numbers you know maybe there is some some mysterious message someone is trying to you know like send an sos message or something with this text but um it's not going to happen in 3d 10 or 11. yeah you have to do some calculus on it and they derive it or something yeah indeed i was i don't know this takes like a ridiculous amount of ram so you check like the ram is like six gigabytes of ram for whatever reason doing those digits of pi maybe it's mining cryptocurrencies we don't know um but yeah um we are building the documentation so and we probably will be still building documentation when wishing is the next store we will see uh i've got an important question here in the chat where can we buy pablo's hat in in some big company that sells products for money uh it starts with a and s with uh n right yeah okay excellent this is this is my i'm gonna buy mine you can buy it yeah you could make one with circuit python uh or micropython and um some leds actually that's a fantastic idea absolutely um all right okay let's uh let's move on for now we'll check back with pablo soon uh brandt do you want to talk about pattern matching for a bit i can't start my video because the host has stopped it oh wait here we go cool uh yeah let me uh share my screen real quick it slides up can everyone see this okay yep yep awesome so today i'm going to be talking about structural pattern matching oh is that me it appears okay yeah um so today i'm going to be talking about structural pattern matching uh i am brand poker i'm one of the authors of structural pattern matching um and it is easily the biggest project that i've ever worked on so i'm happy to talk about it today um if you like this talk i'm going to be delivering a much longer version of it at pycon japan in two weeks so you can check it out there if you're more curious about how it actually works rather than just getting this top level overview so i'm going to start by just clarifying one thing structural pattern matching is not a switch statement a lot of people think it is a switch statement like you'd see in a language like c for example um the truth is that a switch statement does a lot of things that pattern matching can't do and pattern matching does a lot of things that a switch statement can can't do um and so if you kind of try to equate the two i think you're just going to be disappointed and you won't be able to use its full power so it's important that if you're encountering this for the first time to kind of approach it with an open mind so if it's not a switch statement then what is pattern matching so structural pattern matching is combining two ideas um control flow and destructuring and these are both things that we're already familiar with so you know a simple example of control flow would be uh you know matching a subject based on its value and so this is just normal python 3.9 code where you know we're checking to see if our entree is equal to spam which if you don't know is delicious canned pork product or if it's equal to eggs or if it's equal to something else so this is the sort of control flow that we're all very very familiar with um but you don't only branch based on the value of a subject your control flow may look a little bit more like this where you're branching on what can be called the shape of the subject and here meal and entre are subjects the thing that we're branching and destructuring against um so your code may look more like this where you you have a sequence for example meal here where you're checking if it's length two or length one or something else um and so that's control flow what do i mean by destructuring so destruction is the idea of taking complicated data structures and pulling them apart so this is also something that we're very very familiar with um so for example here you may be iterating over an iterable to pull it apart into an entrained side you may be indexing into a sequence or indexing into a mapping or even just using plain attribute access these are all ways of destructuring a more complicated data structure and so what structural pattern matching is is this idea of well what if we can branch while we're destructuring and what if we can destructure while we're branching and and that's what it is so i want to go over the syntax real quick um because i don't have a lot of time today we'll just cover some of the basic patterns um but if you're curious i highly recommend checking out pep 636 that's 636. um it's an awesome tutorial that goes in depth into how to use this new feature in your own code a lot of the edge cases and a deep dive into the different types of patterns but today i just want to give you a taste so on the left you'll have python 3.10 on the right you'll have the equivalent python 3.9 code um and you can see here that this is kind of the basic structure of the match statement is we match meal in this case the subject which can be any expression uh here we're just using a name and then one or more cases and each case has a pattern um so after the case keyword on the left we have entree comma side and it's important note that this is a pattern not an expression or a statement or anything else so uh pattern matching introduces this new concept of a pattern and the easiest way to think about it is sort of like the left hand side of an equal sign so entree side here is not building a tuple from the name's entrance side it's actually pulling apart a sequence of length two and binding the first element to entree and the second element to side then executing the corresponding case block and you can see that the equivalent code on the right there um and you don't need to is similar to the left-hand side of an equal sign when doing iterable unpacking you can surround this in parentheses um you can leave it on parenthesis like we do here you can also use brackets sort of like a list syntax also and you can do star and packing too um so here's a very similar example but now we'll match any sequence of length one or more um and uh it will bind the first element to entree and collect the rest of the elements into a list sides we also have what are called value patterns um and this is kind of uh what makes it look a little bit like a switch case statement if you have these at the top level but the cool thing about pattern matching is that patterns can be nested um so while here i'm just checking if entree is equal to spam in the simple example which is kind of boring you can you know say well i want a sequence of length two or more where the first element is spam and collect the rest into a list or something like that and we'll see examples of that later to show kind of a trivial example of nesting we can look at what are called ore patterns and so this is a way of combining several patterns using the vertical pipe operator so here we'll match at any entree that is either the string spam or equal to the string eggs and you can see the equivalent code on the right here we also have one more pattern that i'll cover today which is called an as pattern and that adds that as e syntax on the end of our existing pattern and basically what this does is it allows you to for example if your subject is equal to spam or equal to eggs then we'll want to bind it to e at the top level here it makes a little less sense but when nested inside of other patterns it can be really really helpful for destructuring more complicated nested patterns as well and so like i said i just covered kind of the basics here but as you can see there are a lot more patterns we have what are called class patterns for matching instances of arbitrary classes we have mapping patterns so that you can pull apart mappings like dictionaries and as you can see on the last case there at the bottom we also have what are called guards which is the if x equals y at the bottom there and what that allows you to do is kind of add more dynamic uh checks to your patterns so um after the pattern matches and all the names are bound the corresponding case will only be executed if that uh block or if that expression x equals y in this case uh uh returns a truthy value so again i highly recommend checking out pep3636 if you're interested in this again one reminder these aren't expressions so we're not constructing point classes here or constructing dictionaries um this is uh these are patterns they're just telling the compiler how you want to handle your different data and one thing i kind of want to point out is that we didn't invent most of this um you know the pattern matching has been around for something like 50 years most prevalently in functional languages but also um in other languages like rust for example um and to kind of illustrate that i have a simple factorial function here just to walk through we match against a parameter n if it's either 0 or 1 we return 1. otherwise that underscore a case underscore is what we call a wildcard it matches anything otherwise we return n times the recursive factorial and what i want to highlight is that you know we didn't invent most of this we stole a lot of it um so a lot of the design process was figuring out what we liked from other languages and what would feel familiar to people coming from those other languages and trying to use it in python or vice versa and if i kind of reformat the rust and scala examples here to use kind of more python style formatting while keeping them legal code you can really really see a lot of the shared elements there and how the basic building blocks of the syntax are the same but the one on the far right definitely feels a lot more like python which is cool so i want to cover uh the implementation unfortunately i don't have a ton of time um again you can check out my longer uh icon japan talk in two weeks if you're curious about the actual way that the compiler works the structural pattern matching piler as i like to call it the spam compiler is something i spent the better part of a year working on and i'm currently rewriting it which we'll hear a little bit about more later but one of my favorite parts the implementation is actually in the parser and i can't take credit for it guido wrote this it's called soft keywords um and i think this is best explained with an example so a lot of you may be looking at this and saying oh brand but i have a bunch of uh you know regular expression code that uses things like match as identifiers so will the new keywords break my old code and the answer is no the new feature is completely backwards compatible which is really really cool and i kind of want to show how that works so say we have this regular expression parsing code where we're taking say you know a feed from our local law enforcement station parsing in offering hot takes on currently open cases if we take this and we rewrite it to use structural pattern matching you'll notice that it looks weird but it does work but we have a match and case being used in two different contexts here in the blue you can see that it's being used as a keyword and as in the red matching case are being used as identifiers and our new peg parser that was introduced i think in python 3.9 makes this possible basically the parser while it's parsing your code can tell from context whether you wanted to use a keyword or an identifier here and so even though this is a huge new feature with lots of new syntax it's actually entirely backwards compatible which is awesome and so since i have a couple minutes i just want to talk briefly about the future this will be touched on later but basically i'm working on rewriting the pattern compiler for um python 3.11 and basically the the main thing that's going to fall out of this is improved control flow um so i think this is the best illustrator with an example again this isn't in python 3.10 everything i talk about here will be in python 3.11 hopefully if i can get it finished in time um so here uh just to kind of recap what's happening here we're matching a meal and um we are checking if it's a sequence of length two and the first element to spam then bind this first element to entre and the second element to side otherwise if it's a two element sequence and the first element is eggs and uh then bind the first element to entre and second element side otherwise if it's a two element sequence find the first element to entree and the second element to side and the way that python 3.10 compiles this code to bytecode that runs at runtime is a lot like the way i just explained it verbally where it considers each case in isolation and each case is is uh you know once we've either matched or not matched a case all that information is thrown away and we start from scratch but what you may notice is that a more efficient way of doing this would be to realize that all the cases are matching sequences of length two they're all binding the first element to entre and they're all binding the second element to side and it's only after that that we need to differentiate between spam eggs or something else and so to kind of drive this point home this is similar to what python 3.10 will generate for you when you compile the previous match statement and you can see that there's a ton of repeated work in blue they're corresponding to the blue on the previous slide um so when you see this as a python programmer you might be tempted to rewrite it to something like this where you reduce your repeated work and only do what's strictly necessary for matching each case and this is what the new rewritten compiler in python 3.11 will do and i think that's close to my time so thank you i'm at brent bucher on github i'm also here on python discord so i'll try to be pretty responsive if anyone has questions and wants to ping me i can also be reached at brandt python.org thank you thanks brand sure here we go get my mouse back um we have a couple of questions here already also i'm made a note to myself that uh earlier i called you bran butcher which has a sort of cruel irony since i butchered your name yeah i haven't heard that one before brent bucher is that it yeah i also get boucher a lot yeah boucher yeah excellent we've got some some people in the comments um michael a says this is the best pattern matching intro i have seen yet okay murray is says i love the willingness to see good in other languages and the willingness to go hey we could use that these aren't questions nope that's true i'm just uh leading with uh some feedback you deserve to hear the good things that people are saying about this too i think um sir sock sock x iron this is impossible to pronounce it says this is amazing reminds me of oh camel match with pattern matching you familiar with that uh yeah i've seen it before i've never used ocamel but i i i've i'm familiar with the syntax yeah so we have a question from aaron hall he says could we match on dict having key value pair where the key is a specific string and the value is a type or subtype of a specified type absolutely that's called a mapping pattern and a class pattern respectively so i would encourage you to check out pep 636 and just grep for mapping and class but basically yeah if you want to for example parse json this is a great tool for doing that especially if you have a big complicated nested dictionaries and lists for example yeah it's totally possible to uh match on a key um that's a string and then check that uh you know uh something else is a subclass of some type you want to pull it apart um that's that's a great use case for this and it's what it's made for yeah jason's the thing i was thinking of too that's really clever all right um abby says how do you compare a not nun in match case this is something he was trying to and failing at yeah so um none uh this is something that i didn't have time to cover today but uh the singleton's none true and false um when they're used as values in patterns they don't compare by equality they compare by identity because that's typically what you want when comparing against true false and none so the way you would do that is because patterns are tried from top to bottom you would first try to match it against none whether that's at the top level or within your sub pattern and then all later cases if it didn't match that none in the first case then you know in all later cases um that it cannot be none and you know once the type checkers and linters catch up with python 3.10 they'll probably give you that information as well where you'll get that sort of narrowing excellent devonte says why was the pipe operator chosen over the or keyword for patterns or can you use both yeah so this is one of the things that we kind of went back and forth on we the only acceptable syntax is the pipe operator and the reason that we chose it is because it creates a nice visual separator um so if you try writing out a you know say four element or pattern um you find especially if they're strings or something kind of wordy syntactically you find that the pipe operator is a really nice visual separator between the different elements whereas or kind of gets lost in the line noise i mean that was something that we wanted to really uh that was something that we really valued was keeping patterns readable because it's really easy if you design the syntax wrong to have it kind of turn into a garbled mess hmm and now we saw the pipe being used also in the in the typing improvements so is that sort of a new direction for c python now we're going to see more pipes going forward i don't think it's necessarily a new direction i think that uh you know it just fit both of those use cases really well it's natural to think of a pipe as a union of two things so in typing it really fits naturally and and here in addition to it being a visual separator you know um it that's kind of the idea that it represents is it's one of these two things [Music] okay we've got a question from lemur gamer yt he asks um what if you have case underscore where underscore is already defined as a variable yeah so this is another thing that i glossed over today so the underscore is actually its own type of pattern and and uh underscore is a wild card so it does not bind to any names um so for example if i had case a um again this isn't a switch statement you can think of it as the left hand side of an equal sign so if i had case a for example um that wouldn't be comparing my subject to a it would be binding my subject to a and so the underscore for example wouldn't stomp your local underscore name which you know if you're using that for something important uh other than internationalization i would maybe suggest uh using some other name as well um but uh it will actually not bind um and that's useful especially in kind of more complicated patterns like for sequence patterns um if you actually don't care what an element of a sequence is but you just care about the length or you want to say i'll match something of any length using the underscore there allows you to tell the compiler i want the sequence to be a certain length but where you don't care to bind it to a name you don't want to actually spend the time collecting everything into a list for example we can just do star underscore comma and move on [Music] excellent we have a question from saudi pourion is there any specific reason not to use else keyword in the default case of pattern matching why using underscore instead of the else keyword yeah well like the pipe in the wild card this was another uh kind of more controversial uh uh part of the proposal um it's kind of two answers first of all we needed the wild card underscore for other reasons um you know just to be able to uh to nest this idea of a wild card inside of other patterns and so it's natural that it also works at the top level like any other pattern so we already have a way to spell that else case using patterns so if we did add else it would kind of combine it would kind of create two ways of doing the same thing um and so it's always possible to add else later if it turns out to be uh you know some huge mistake to exclude it um but it would be really hard to remove else if we decided to go um in that direction this early on another problem is that um we were amongst the pep authors i think we're exactly evenly split on the indentation level else whether it should be indented the same as match or indented the same as case um and that alone was enough for us to say okay we'll let you know future generations figure that out if they want this right yeah okay we've got a three more questions here and then i'll let you go thomas gringer asks can you match on the contents of the weak ref what about the abcs will there be a mix-in method for mutable mapping etc um yeah so if i understand the question correctly is basically can i match on arbitrary stuff um and the answer is yes so again this is class patterns um that you can check out in pep 636 but the basic idea is um if you use the kind of constructor syntax like i showed there where there's a point and then two positional um sub patterns um that basically compiles to an is instance check um and then it pulls attributes off of that object so if you want to match attributes of an object of a specific class you can absolutely do that yeah okay and last question from gregory bergaard does that mean other implementations of python can't do 01 implementations of structural pattern mask i'm matching i hit back to check them in order yeah so this isn't a switch statement um first of all just a quick reminder for everyone out there um in general no in some cases yes um you know as i like to say the short answer is no the long answer is yes um so you can never guarantee that um you know all uh patterns are going to be uh o one just because it's so dynamic so for example if i'm matching three different classes a b and c those can't be known at compile time those need to be evaluated at runtime because a b and c could be different classes and that's kind of another thing i glossed over is that you get really powerful type parameterization inside of python's pattern matching where you can change the types being matched on at run time dynamically which is pretty neat but it also means that no there is no you know a guaranteed o1 an implementation could for example if you're matching against a bunch of constants turn that into a jump table um but again for cases where you're just matching on specific values um i think if else is much much clearer for that um i like to say that the key word in structural pattern matching is structural so if you're not matching the structure of a subject it's probably not the right tool for the job um again if you're really really concerned about performance what you probably want is to use a dictionary instead and you know kind of roll your own jump table this way um we focus a lot more on expressiveness with the new pattern matching syntax uh less on performance which you can see uh by you know the the later focus on uh kind of compiling more efficient decision trees in uh python 3.11 excellent thank you so much for your time brad yeah thanks for having me really appreciate that we'll probably get back to more questions about padma at the end in the q a section but for now let's check back with pablo and see how we're doing with the release absolutely what's up so right now let me share so we can see what's going on so we are now we have finished building the artifacts and we are now doing the last like check uh so right now we are building c python um this is actually super quick we are building and testing the whole thing um so normally this will take a lot of time but i have a machine with like 32 uh threats so it's going to like run super fast and the idea of doing this thing is because um sometimes very weird thing happens on the release artifacts unfortunately for instance in the last rc we detected something that i needed to fix very quickly so i decided to add this this last check even if we have like validated four weeks that everything goes correctly um i basically check the artifacts that i'm going to release and i installed that python on some temporary directory in my machine and then i run the full test suite from that you can see that it's like flying normally this takes like minutes like uh but in this machine like you know it's probably like destroying my cpgs right now and you see all the all the all the nice cores um but yeah this this check is just to make sure that everything works nicely and once this test finishes we can start the upload and hopefully um ned and steve kind of started producing the windows on mac os binaries so that's where we are right now excellent all right next up we're going to hear from uh carol are you there still with us carol and you may have to remember your video by the way i am still with you and i may actually if it's okay if we don't need it for bandwidth if we can bring all the core developers back that would be awesome because this is really more an interactive thing because um one of my key lucas that is fabulous i love it um you know people are such a key part of a programming language you know we've been talking about the technical guts of the language but all of this stuff doesn't happen without a whole lot of people and it is people far beyond the core development team people like leon and kat that are orchestrating this great event today everybody brings their unique talents and one of the things that you know i'm 56 so i've been using computers since i was in fifth grade so a few years um but essentially at its core computer programming languages help you get things done in the real world that solve a real problem and as we approach python we want to make sure that the language is relevant and in particular python is used in so many different technical communities and so many global geographic communities that sometimes that's a phenomenal strength and and why we're so popular and sometimes that's a challenge when you're trying to create a language and you know people have different opinions and and thought processes and i like to think that we are probably the friendliest computer language and oftentimes i will say python is the people's programming language because at its core and as it was designed python was designed to be readable and people have to be able to read code in order to use it well when we write code we typically write it initially once but then people are maintaining it for many many years to come and in in our case even the core language 30 years of um iteration on language the fact that the future is so bright is a matter of the people that have come together over the years and sustain the language and help keep it relevant and help it solve use cases so what may have started as a systems uh language and then transitioned into web stuff you know now into scientific programming um and also into hardware um which is really cool um so we've done a lot of stuff um i think with those challenges with people um what we saw was some changes when guido stepped down as benevolent dictator for life and that sort of threw our community a curveball in terms of timing and the core developers came together and had to come up with a new governance model and i think it's probably the smoothest governance transition that i have seen in my open source lifetime uh people like lukash was very instrumental with that um and and others as well um there were a number of peps and for those that maybe are new to python or coming from a different language peps we've used a few times now they're called python enhancement proposals and oftentimes they are for technical elements like structural pattern matching or a new parser but it's also used for how we govern the language and how we interact as a larger development community and so coming up with perhaps for what the language governance should be was a challenge and you know one that the core developers rose to in a six-month time window from pretty much announcement to of guido's retirement through implementation i've had the pleasure of serving on the first three steering councils with some wonderful folks and want to encourage folks because the release milestone actually triggers today something else it triggers a new slate of elections for a new slate of steering council members and um i am stepping down um which i had shared at pycon mostly because i believe that having turnover in steering councils or any kind of governance group is really important because you bring fresh ideas and new ideas if we look at the core developers that are on this call today uh three of them were core developers after i became a core developer and you look at what they're bringing to the community now eric had said she didn't contribute a whole lot to 3.10 uh i would beg to differ on that one but um she's been super active in many different areas and you know i can remember when she started doing pr reviews and triaging things and those are folks that are absolutely critical in terms of getting a solid stable language that is secure and um you know it's not like a play project this has to work because millions of people are depending on it and um so first thank you to everybody who's done anything related to the language and that includes documentation it includes teaching the language writing about it speaking about it people in the community who are doing user groups or in the last couple years virtual user groups that knowledge transfer and sharing of information really is the secret sauce beyond just the language of python and the technical aspects so um i don't know pablo do you have any thoughts from the steering council perspective going forward i kind of expect you'll continue to be on the steering council but that might be an assumption i mean i'm still thinking about it um i i still find like very useful to also like be doing like the release my position on the student council because i think that has a that has proven to have a lot of good synergy especially given like um the different uh like like the annotations par and all the different things that we have to modify given the releases um so about if i run again probably would be one one um one more uh because i also believe in you know like fresh people and and new new blood uh you know in taking care of things a new perspective so if if i decide to run it would be it would be one one one one more only um i think yeah so but yeah otherwise i cannot share everything um i maybe i i'm not going to say a lot more because i found that i had to do that says update this for the final release and i actually did that so i'm figuring out what's going on ah that's fine that's fine thoughts about the steering council and how it's worked since when we started well um first of all i was very surprised that um it was such a smooth transition that we really didn't have any python releases that would be feature free right like there was no feature freeze there was no um you know kind of confusion as to how to do business now like we we have smaller releases now and that arguably caused um you know a change in our velocity more than the change to the string council um one thing that my particular proposal at the time stressed and i see this working right and right now very well is that we need to ask you know people who are involved in a particular part of python about um their particular expertise when we are accepting and discussing peps and whatnot and um if you look at peps right now very often they would be sponsored by a particular expert um so it's not that it's the steering council that single-handedly just decides on the future of python like far from it um there is plenty of communication happening right now um a lot of it in a more structured way than before i'm not saying it was bad but um a lot of it was kind of impromptu right now there are processes for a lot of the things that we need um so i actually think at the time where python became such a crucial tool for data science and as well for teaching and whatnot it was just high time to standardize on those things so um in the end i feel like the model that we arrived at is a very healthy one i'm i'm very happy to see it work oh that's awesome and you were a big part of that too um and and one of the cool things that lugosh is going to share later is something that the steering councils have been working on since the first inaugural steering council which is um a funded core development position that can really provide continuity on certain aspects of language development that may be hard for volunteers to do on a regular basis there's a lot of work that needs to be done and the vast majority of the core developers are volunteers and what you want to make sure happens is some of the key things that might seem unglamorous to other people but are so key in terms of a release process and getting quality code out there that i'm really really pleased that you know even though it took three terms that we actually now have one and the plan is to um make sure that that is sustainable over time as well um getting back to the peps for a moment and then i will talk briefly about documentation um the paps are something that um bran and eric and pablo and lucas have all been a part of being authors and it is a time-consuming dance for lack of a better word because you are balancing competing interests and in particular the structural pattern matching one could have gone the way of the walrus operator and we spent a lot of time as the steering council as well as everybody who was involved with that pep really i don't know how many drafts we did a lot uh at least three maybe more and having reference implementations and you know what happened in the evolution of the pep and bran can maybe or it can talk to it a little bit as well is there were changes that were made as people provided feedback so each of the steering council members provided written feedback to the pep authors and several times we talked about writing a tutorial which we did which i'm glad we did um but thoughts eric brant uh i'll go yeah process yeah no it was definitely like it was tough but it was a good tough because you know after completing a process like that um you you have a reasonable level of certainty that the right decision was made because that decision was so rigorous i mean if people remember we originally um had pep 622 which if i remember was the second largest pep ever written i'm not sure who wrote the longest one ever maybe they're on this call um but it was the second largest pep ever written and it was just it was a beast you couldn't find anything you needed in there but we wanted to be comprehensive if we left anything out then the questions would come up and and so i think there's a syrian council who suggested that we break it up into three separate parts with three separate readers 634 for the maintainers 635 for anyone making decisions about the feature like the steering console and 636 for anyone actually using it um and so i was huge and and i think that along the way we ended up getting three additional competing pets for different variations on the syntax etc um or semantics and so all in all i think there were seven peps and it was something like you know two python versions over 14 months or something crazy even longer for us when we were working on it before we had a pep so it's definitely a rigorous process for something as huge as that um you know obviously less rigor for smaller changes but uh still that level of care um which i think is is really really important you know we're stewards of the language right and and so it's really important that we don't just kind of bolt on things that don't belong there yeah and i think as a result the the pattern matching what is in release 3.10 is so much better now than where we started because of all the compromises and input and trying to do it in a thoughtful way as opposed to a polarized like i want this i want that no there shall be nothing in between um and so i think you know the core development community as well as the larger community of users really helped as well eric i know you're working on some peps now any thoughts about peps in general well for me it's all very fresh because our pep was accepted just over a week ago um i i think it's great to have the discussion on python dev it it is not easy but uh the fact that things are that we do get input from many people about about you know different aspects of what we're doing it's it's fantastic i mean i haven't worked in open source before python and it this whole situation where you're working in public and everybody sees every comment you make on everybody's kind of draft of something or anybody can see it because it's all in the public domain this is very new to me and it's very strange but it's also very refreshing in the sense that yes you do get input all the time as you are typing people are giving you feedback on what you're doing and it's um if it's done correctly you know and people respect each other's time and and and points of view then then it's it's just fantastic obviously sometimes things get a bit heated i i don't think you can avoid that yeah i think heated when it is on the technical content itself and not on the personalities is is key um you know when it becomes personal and away from the actual technical guts of a proposal that's when things sort of go downhill fast and i think yes and i think yeah i think it's just kind of making sure that the discussion is progressing somehow right exactly exactly that's a good way of of looking at it because otherwise you're stuck at this frozen stand still of people here people there and nothing gets pushed by word and that's when it turns personal yes yes good point all right well um we also had a pep in this release that luke talked about earlier um with typing that we had to make some significant rollbacks um thank you pablo so that some of the dynamic pipe typing uses of python wouldn't be impacted in particular things like fast api and pedantic and you know one of the things the steering council has been looking at is how do we get more large projects involved in understanding what peps are coming down the pike so that we don't surprise people or people's you know i'm a maintainer on other projects like jupiter and there's only so much time that you have to read peps and everything else so um you know we're trying to both as a steering council reach out to different communities and projects using discord using blog posts what not um to kind of get the word out and and that's where folks like leon and discord channels and many different ways of communicating really help um and you know i'm really you know as a user of fast api and pedantic i'm really happy that we didn't do the disruption um but you know we're going to see how things go as we move forward but it is clear that dynamic typing as well as static typing is something that python is going to have to consider as we move forward and then on documentation documentation is something that i view as a way to empower everyone whether you're a world-class developer who've been using python since its inception um you know reference documentation is key documentation within the dock strings that allow things like if you're using vs code or pycharm that on hover you get context sensitive information is super useful or if you're brand new if you're trying to get an example or see how something works documentation is critical and as a project that's been around for 30 years things have changed and you know it wasn't that long ago that python 2 was the predominant language 10 years ago when i started it was 2.6 i think was the predominant version at the time and then the science community i think it was probably 3.3 we started adopting um python 3 more and more and really help try and push things along because as you know at least within jupiter it was hard to maintain two code bases for two and three and a bunch of the science folks got together and said okay let's just transition everybody as soon as we can to three and i think that's was really helpful in help pushing more of the projects um as well as the folks like brett who kept track of the counters of which top libraries and all of that really helped but you know there's going to be changes going forward and documentation is how people learn about changes and so one of the things we're starting and my apologies for it taking as long as it has but a documentation work group currently it is mariada julian pillard ned bachelder and myself and joanna joanna uh who wrote great blog posts about pycon and the language summit has been helping us get the application process out um covid as well as a startup and things kind of threw me a big curveball as well as you know the mental health aspects of covid impacted me depression is a reality in my life and you know having to step back from time to time i think is really important and i think it's something we don't talk about enough but you know i think time and again i've seen the python community rally around people and that's that's a secret sauce if you will in terms of making a language sustainable because much like there needs to be on-ramps to a language there needs to be off-ramps or you know temporary like you know parking spaces until you're able to come back and and do what you do well and um i'm incredibly grateful for all the support pablo and other lukash and others have given me over the last two years um it's been huge um and um you know it lets me be the best developer and organizer that i can be so the documentation work group itself is going to help create like an editorial board of people who are core developers and folks that come from the greater community as well because while core developers might be awesome at writing code and not every core developer is as comfortable writing documentation and there are folks that are really great with teaching and communicating that you know you know write the docs read the docs eric holscher comes to mind as somebody who really is passionate and understands that there are best practices that we could be using with our documentation and one of the things that i am interested in doing when i retire from steering council life is sort of rebooting our beginner documentation like i'm coming to python for the first time as a new coder that's one thing i'm coming to python from another programming language that's another on-ramp and i'm coming to to python for it from a relatively new use case such as hardware what's my on-ramp with that and sort of helping modernize the look and feel of the documentation some work has been done already on that is huge and i think it's much like the language evolves to suit what's going on the documentation needs to evolve to suit the people that it's serving and pablo how's our release going yeah i managed to i really had a hard time but like i managed to figure out what's going on so finally something i'm sure is related to the facebook graphs but something so that the bsf has in front of all the infrastructure um like a cache and so it takes a bunch of time to embody the cache when you upload new pages or like new files or whatever i was uploading those files but i was not able to download them and i was like what is going on and i'm quite sure because of the outage or something some service is affected so the cache is not refreshing that the uh fast so i needed to manually send porch requests to every like file or web page that i'm managing so yeah i managed to understand what's going on but i was like well let's go you know i don't understand what i'm doing but yeah everything is good everything's good everything's good yeah yeah we are now uh waiting for ned and steve to prepare the windows and macos binaries and after that we can actually just uh we're super close to the final with the final goal uh so we just need to wait for them uh so now steve if you are watching the stream you have an email um so just tell me when you're ready thank you ned thank you steve they've been vital over the years in in you know helping us get the mac specific releases and the windows um i can remember pre steve um windows deployments posty window deployment we we've come a long way in our support of python and windows and i can continue to see that grow so thank you steve i don't have any other off i mean my comments i just came back from vacation so everything i'm doing is off the cuff and from the heart um you know so if there's questions leon uh you know yeah we've got some comments and we've got some questions cool um i'm coding uh james murphy some of you might know asks i would love a documentation contribution fast path so many people could fill out and improve the draw docs drastically even if they don't necessarily understand the c api and the interpreter source comments on that i think that's a spectacular idea and there is under the python github repo there is a docs community uh repo that um has suggestions and ideas like that and if you could file an issue for that i think and maybe bullet out what you think some of the key points would be um i think that would be great because i think that is that is part of you know onboarding people in all aspects we've been really trying to document and write down like pablo said how to make a release how to you know run a language you know the steering council has tried to document the processes to onboard a new steering council member so um i think it's a great idea and i would love to see that happen so in lieu of that how would someone get involved writing documentation today um with today's mechanisms for for that with today's mechanisms probably the first place to start from most things documentation or python development is the developer guide and sort of following the path through there discord also has if you do some searches on how to get involved there's some i mean on discourse um the python discourse there's some things but for documentation um you know it depends on the type of documentation if you're wanting to write a brand new hey this would be a great piece of documentation to add to python then i would make an issue on the docs community repo and if you're wanting to rewrite parts of the documentation you know probably filing an issue on bugs.python.org sort of giving people a heads up that this is what you're thinking about is valuable because i would hate people to go to the effort of writing a lot of documentation and then have it not be accepted um you know another really key thing about documentation is documentation goes beyond just the official docs and a lot of you know we all have google or search engine duckduckgo whatever um is to write blog posts because those blog posts often become later talks or suggestions that get incorporated um and and so that's another way and um you know so i think those are the places i would start that's great um we have some comments from um josh peak says i love the visibility of the governance change over all the peps as well as the injuries on podcasts etc that put people behind perhaps out there and also says it's it's excellent watching highly emotionally intelligent people at work in public lots of respect well hopefully that is not like the reality tv show drama and more like you know a finely orchestrated like ballet instead right another comment from snoop jedi very impressed with how the steering console managed to stir up around deferred annotations really a win for the governance model thank you it was uh a stressful i would say a couple weeks there but um you know pablo stepped up big to do the the rework and um you know i think all the community really did a great job providing insights in a constructive way like eric said you know when you hit these impasses it's how you move forward that really is the key absolutely uh we have a question from keith first time checking out new releases on release day how soon do new releases typically hit brew casks and the dead snakes bpa uh pretty quick uh lukasz pablo you might have a better sense than i do that is run by anthony sotil i think is that sorry if i missed france uh so he's also the author of a bunch of like supernova tools like flygate and other things normally he's extremely quick he's ridiculously fast how he makes it but that's kind of not we don't do it from the sea python core team that's something he does in his spare time with his efforts so thank you because i think almost everyone in the window is probably using those if they want to get 310 but that's like after we get the release our artifacts out so pablo when we get the release artifacts out is it the python.org site but it's available and the github repo i guess yeah so the the the artifacts are restoring the python.org like when you get the download passion there is a there will be a big download button that now 639 but when we literally will say it's written and also if someone wants to check the tag which i think is what he does uh it checks the python strip with the attack that we push uh then um that is uh yeah so that is what the people use normally like i have um buy them yeah buy amp i think right no no yeah yeah they also check the tax um and i think barry does some docker containers uh although i'm not quite sure but yeah kind of the official release is only the files then the community starts willing from those cool yeah uh christian hayes here in the chat from um from christian it says um that dead snake and fedora usually have a new alpha release a couple of hours or a day after the release is available yeah good good good call yeah um all right okay and we also have another question or a comment from keith saying carol is rocking it this was super informative and nice to hear about the social and personal aspect of leadership oh that's very sweet i'm you know i i have so much that the python community and the people of python have given to me over the years um you know what started as you know working on a non-profit called open hatch that helped people make their first contributions to open source before there were like github guides and all of that and how teaching people how to structure projects so that they would be more accessible to contributors as well as you know my local python community in san diego the workshops we did um you know we even did like you know test driven development intro to python in 90 degree heat with you know no ac um you know it's been a great great ride and the core development team some of the best people you will run across um you know in terms of you know i wish we could profile every single one of the folks that we have and i can't wait till we can be in person again so so thank you for the kind words and everybody make python continue to be the people's programming language as you go forward you're here uh with that i wanna go back to pablo how's the release doing by the web pablo yeah so he just got a word from steve like he's building the windows like artifacts apparently there is some eventuality but i think maybe it will be good um they will be ready in like 30 minutes from now so we have time for the talk and maybe some extra q a meanwhile these builds and i think i have also worked from ned uh and he mentioned that yeah also 30 minutes as well so yeah we are now waiting for them okay um what i if you have time yeah would you be able to say something about the new error messages that are coming in 310 yeah of course um so kind of this is something that it was quite fun because um like the the actual way this was born this small project that i started was born is because like precisely anthony the the the person who does this like the snakes uh thingy on ubuntu um he was complaining that like he want he has an error message because some parenthesis was not close and you know see python does some horrendous message like says like unexpected enough file which doesn't even like spell it out for you just says eof now like yeah this is the error like go home and you know like that that was that he was like complaining he was like saying yeah you know popeye which is like you know a super great interpreter like that they do the same like much better and like it's just a pity that see python does this so badly so i kind of like you know took it as a challenge because like so why is this like happening actually it turns out that it's it's not it's not an easy topic to do and particularly for instance this particular case is not just a matter that no one has thought about doing this thing before is that um c python is kind of a very old um like cold base like remember that the oldest parts of c python are from 91 right um so particularly the tokenizer and the old parts are are one of the oldest pieces and that doesn't mean that they are badly written by any means but the problem is that they have not been updated that much as the rest of the galway so precisely doing those kind of um like improvements is quite challenging not only because it's quite difficult to make it in a way that you don't break things but also you know it it requires very um very precise surgery let's say uh so i managed to fit that one the the challenge with this one is that when you do like uh and close parenthesis error message the problem is that the tokenizer has already tokenized like a like a bunch of things and the error happens behind because when you see that you actually like reach the end of the file and you know the parenthesis isn't closed then you need to go back and say actually the brand was here right so so the brains that this kind of like retroactive error messages was not especially easy especially for instance when you take into account the rebel and other modes when you know like you don't have all the source like in a file uh so you know it's just like a matter of like sitting down and thinking a lot and debugging um and you know like it turns out that a lot of people find that super cool like um and they give us a lot of feedback so i feel encouraged to start you know examine what other things i could do so i started using and leveraging the new big parser that we built with less andros and we and we do and and it turns out that the parser has is more powerful in the sense that it allows a much more flexible approaches to our matching even if it's a bit like um it's a bit like funny because technically back uh tech parsers are quite bad at reporting errors like genetic errors in the sense that the person who doesn't have a real concept of what an error is i'm not going to go into details but like that doesn't happen so you need to build it on top and teach the parser to recognize errors and think about that recognizing errors is a specifically funny aspect because it's not valid python like when when the interpreter tells you like this is wrong it has to recognize what you wanted to do in in something that is not valid python so you have never teach the parser exactly you know like this is correct python this is incorrect python so that's good but you have you you have not teach the path like all possible ways something can go wrong right so so you need to kind of do some some techniques sometimes you need to match like grammar structures that you know are going to be incorrect or sometimes you need to do it in a very generic way and also the the most difficult part is doing it in a way that they don't kind of go one over each other so they don't kind of like give false positives just because you much like uh smaller pieces but you know it turns out that everybody was super happy so i just started like going even more like we started like you know the the more granular messages that it's going to learn in 311 uh that is uh um we had a like a pep with that and was a big work with uh batu hantaskaya and amara's car i hope that i'm pronouncing these names correctly i i think i'm not but um but yeah and also like all the other improvements that you see on the what's new page and um i watching more than are coming right so so yeah you see at the end of the day the the keep component here and i think the interesting story is that if you like something um say it out loud because you don't know who is actually listening and you may be actually starting a big movement right and i wouldn't have been because you know i'm quite busy not only for being in the release manager and the student council but also like i have my projects in python um so for me to prioritize other messages among maybe like other things like you know i've stream parsers or whatever or other things that i'm working on like trying to make python faster so i need to know what people like and you know what people are excited about and if you if you kind of assume that you know all right this is cool so everybody's going to love it so i'm not going to say anything so probably then you know uh myself or some other coordinators won't won't see that actually this is something that people really really want as much as other language features i actually made a super unscientific poll on twitter and it was like it was the same amount of votes of spatter matching which means nothing but like you know it's quite cool that people like error messages as big as like one of the biggest python features right so you know um that that was like the way it started um i have also like one one thing to say um every time this happens i don't know why but i think i don't know why but every time this happens that is and we saw a new error message or a new technique or something there is always someone that says was this inspired by rust and now here every that everyone is listening this was not inspired by us braz do a lot of like super good things but it was inspired by trying to make people's life better which i think the rash compiler does very well but we are not trying to to just like you know steal or copy watch we are getting inspired by like other languages as well not only right like like um this is like a thing that many people care like having uh you know good error messages so we obviously find inspiration in many places but you know like grass doesn't have the um you know the ownership of good error messages um and i don't have anything against us right i love i love the language and i use it a lot uh you know it's just like just for those all the time is like sure yeah i mean maybe it was part of our lives but also other things sorry uh for those listening who maybe aren't familiar with what the changes to the error messages can you can you give an example like how how yeah and what means maybe your screen yeah doesn't create errors right right let me see if i can share uh without destroying the the release one second um let's see if i have a three thing compiled somewhere if not i think lucas has it so maybe he can actually show it meanwhile um hmm oh i think i have 39 okay yeah i think i can do it give me one sec um yeah okay this works this is c9 it's not 310 but it's the same idea okay let me let me share the screen um cool i'm going to make this bigger so you know like it's a it's a small thing so for instance this is uh python39 and um so if you for instance do a small mistakes like uh instead of like saying like you know x equal equals y you remove one y like python will tell you some generic thing like invalid syntax or if you know you have a file and then you you know you have some some list but you forgot to close the parenthesis um and maybe you have here a function or something uh so so the problem is that you know like my editor is already confused by this but like because i include the parenthesis but if you try to run this thing with python 3.9 uh it's going to tell you like something super weird like it's going to point you to the function is going to tell you yeah invalid syntax turns out that you know if you look at this file is invalid syntax because it's in the open bracket and it's you know parsing the list and then it's finding this function definition and it's saying like yeah you know like you cannot put function definitions on your list but you know if you are not aware of what is going on which is what happens because you made a mistake uh this invalid syntax are pointing to the function definition with another context is extremely confusing right um so in python 310 uh or 311 as i'm going to run but it buys the same thing uh this now tells you okay the actual branch that you know this bracket over here is is not close but it has like a lot of improvements all over the place like for instance uh if you do x equal y now it tells you like oh actually you know not only um understands the range and it like highlights the whole expression instead of just the beginning but also it tells you actually you know you maybe meant like two equals or the wall roots right because that will make this this work correctly um so for instance a lot of like people started to learn they they forget like semicolons that's quite common apparently uh so you know you forget the semicolon now you you get like small messages like you know i was expecting this semicolon or sometimes you know you're creating some list and then let's say uh you know you you forget a comma so you do x y with no comma in the middle and you know python now will tell you actually this doesn't look correct but maybe what happened is that you know maybe you forgot a comma now or for instance do you do like a generator comprehension in the middle of a function for y in range 10 and you know not bound and then it will highlight the whole thing for you which is the actual change because this error was there before but like now it is much more clear for someone and started to learn in the language like what is the actual problem here right it's not like you know this part is wrong it's like this whole part you know you need to parenthesize the whole thing while in python three nine um if you do the same thing this error was there before as i mentioned but it only points to the beginning so for someone who doesn't understand the construct already or what needs to be parenthesized because you know it says here generator expression must be parenthesized but like for someone who is new like what needs to be parenthesized this this this like everything so you know now it tells you exactly what is the range that is going what's going on and there's like tons of them like there is a huge amount of this of these problems uh all over the place like for instance another thing that happens on python 311 uh very quickly is that if you for example have like some some dictionary which is very common when you are like receiving json or like some some requests and you know you have some some structure here with some keys and turns out that some of these keys are known uh let's say the second one and you know you maybe this is a response right and then you say okay response and i want my x and then i want my y and then i assume that you're expecting you know set uh and then you know maybe something else so in python 3.5.10 and before if you run this thing it's going to tell you something like uh well invalid syntax yeah actually what those what what does python 3.0 say here yeah the same okay so that was not the the best um so this is because i miss here uh dictionary okay right so if you run this thing with python 3.9 it's going to tell you non-type object is not subscriptable um so something here is none but you know you don't know what it is right you will need to touch the barrier and you know like trying to inspect what what is the response or maybe like what is the levels if you have some intent to think and you know python 3.11 will tell you like yeah actually you know this is what is known because accessing this set key here actually failed uh so you now know what exactly your expression is is wrong the same thing if you have like some uh you know like uh you maybe have some numbers um and now you have something complicated and let's say set is known so you have some complicated formula or something like that and you know it involves like a lot of these things and you know you get some error here and it tells you yeah i support the operands for type plus and non-type so something here is a nint and the other is a non-type but yeah i would like trying to find what it is right but like with python 3.11 it will tell you exactly what it turns out that this was what is uh with this number the result of adding these two and when it's trying to add here so you know that is an integer because that's the first element here and the set is the actual thing that is known so you know you get it for free so it's just you know as you can see it's little little things like this it's nothing like super fundamental but we think that you know once you add them together it's going to increase like the experience for everyone in a very good way yeah so to bring a little bit of perspective into that as um in my involvement with python discord we answer hundreds if not thousands of questions a day from mostly beginners and intermediates at uh different levels and i think that just this little change here is going to change everything for many of these people because there's so many questions that come in and try to get us to help them parse the exception they say you know this exception doesn't make sense to me because this line looks fine and then we say almost every time this happens we say if something goes wrong in python and you don't understand the exception just look a little further up right above word the syntax error ones like oh my goodness you know i agree with you leon i think it's huge for beginners um to get better error messages well and one big thing too that pablo didn't mention is that you know the the infrastructure for adding these and maintaining these is super extensible and i wrote a few for the structural pattern matching and it's it's super easy and um really really clean so it's not some huge maintenance or performance burden or anything like that which is great actually now thanks a lot actually now that you mentioned that i think is it would be good to show that um one thing that i am also working a lot recently um since the other message is trying to improve like for the developers of c python themselves like documentation about how to do these things so for instance i'm going to share here in the python dev guide which is like as it will mention one of the resources that will happen but i'm not going to explain everything but now here you have this uh parser what is this parser yeah guys to see python parser so i wrote this um this big document you know it's quite extensive and it goes into a lot of detail on how to actually modify python parser and how to add rules so for instance you have a section on how to debug like the persons that you generate or how you test the thing it has like a bunch of like you know um like small small you know boxes telling you like what to take care about like for instance in our home so you can see here well sorry you can see here um how syntax error are reported and there is this this you know section that explains to you how the whole thing works and how to modify it and how to make sure that you make mistakes when you do it um so this is obviously not for users this is for free python core developers but you know it turns out that see python changes that fast and you know especially pieces like the compiler or you know the evaluation loop or or the person in particular they can be quite complicated right and a lot of the times like for instance brad is a good example like he doesn't need to understand the whole thing like he doesn't need to maintain the parts right he wants to implement like pattern matching and you know he doesn't need to have the whole thing in his head right and if something goes wrong he wants to be able to understand what's going on without understanding how to develop the whole thing so i'm trying to develop this is the second big document that i had the other was the garbage collection one uh which is also another piece of python that i maintain currently and it's just to make sure that you know the the c python developers can can you know understand these things and use them if they need to interact with them without having to have the whole context in their head and in the case that you know i decide for whatever reason to step out of of python development so i can you know i i don't even take my knowledge with me uh so everyone can can continue uh you know with what i know so i'm making myself replaceable which is i think a good thing i just want to jump into his earlier article on the uh the garbage collector is one of my favorite parts of the dev guide even if you're not planning on working on the garbage collector just read it it takes like 15 or 20 minutes it's the most interesting piece of python documentation out there i think thank you that's great um pablo we have one question before we're going to move on from the highly esteemed joseph banks co-owner of python discord and a a psf fellow by the way he says uh pablo drop the shell what are you using ah for the shell i'm using a starship which is made in russ by the way i don't know how your messages will be uh but i think it's a starship and from the front i think it's just one of the nerf phones that come with the like just have the patch symbol for the python thing yeah yeah um i i used to use a lot of them but like this is quite easy to just configure and you don't need like six million dollar files so yeah starships uh prompt i think it's called all right so um we're gonna hear from eric catrio on the future that is 311 and to segue into that i want to ask in terms of these improved error messages are we done with that or is there going to be further improvements in 311 we are not done we are always looking for improvements but uh we'll see we'll see uh right now i'm trying to focus also on the performance project the fastest python project with mark and the rest of the team and i'm also trying to do some f-string stuff that i think actually edit is going to discuss so but yeah i'm not forgetting about more more improvements okay hear it take it away uh thank you so yeah i i did make slides i i never go to a party without slides so here we go so i i want to talk about kind of leading into country for kind of get people to join me in kind of joining the becoming python contributors what i did in the last year and a half and um what i'm going to do is i'm going to go over kind of very briefly some of the problems that we're working on for 311 and and then i'll give you a tour of the office and talk about how to kind of a little bit about i don't know maybe some tips about joining and then in the q a we can all answer questions about that as well so um i think that kind of the most uh high-profile project probably going on now is uh faster c python this was announced in may in the in the language summit so and the story is that that microsoft is funding a team of several people to focus on on performance of python make python faster people always work on performance but it's kind of you know it's like bug fixing it's like people do a project and improve something and go but now we have several kind of heavyweights uh focusing on that full-time so mark shannon did a phd on optimizations in python and then guido van wassen also knows something about python and eric snow um has has been a core developer for a long time and did work on the interpreter so so they're kind of the idea there is to to do incremental improvements there are no there's not like one big bottleneck that you can um that you can fix but it's basically and it's all obviously on github although they're working at microsoft um so other people are joining in that's why i wrote kind of others are dipping in and out um so and they're looking at everything so it's like are the object layouts optimal you know we added fields where moved fields is it is it still the right thing the memory allocations are the free lists as fast as they could be or can we make faster free lists so you know i think pablo dipped in and did some work on function coils it's when you when one function calls another if it's a c function python function python called python c coding c all these cases like are are they as fast as they can be um there's a lot of work looking at the set of op codes that then the the execution loop uses is that the optimal set of up codes so if there's a pair of up codes that appears frequently together maybe replacing the pair by a new op code is more efficient so it's a lot of ideas like that and specializations that's another big piece so uh runtime specialization of opcodes right python is a dynamic language you don't know when you have an op code that says add two things you don't know if these two things are going to be integers or strings or what but there is locality so if you use the types that you see to predict what they will be in the future then you can optimize um and and it's it's often it pays off i mean the fact is that it pays off and so it's going to be um a lot of a lot of these optimization or some of this work already made it into 310 so that's good news because that's being released today and i have some uh sorry my i have a new mouse that um is a bit reactive um right so we have um some benchmarking numbers in in a website called speed.python.org you can go there it's the api is [Music] it looks like something that c developers designed but if you kind of work through it then um yeah you can you can get interesting numbers and and this is some of the benchmark results so you see here that the blue the the line at the bottom for each benchmark that's 3.9 and it's all normalized to 3.9 and then you have the middle line is three three eleven kind of the current development branch and and we have three ten numbers and this is only a kind of sum of the list kind of the bottom of the list but it's a pretty clear picture uh you know 310 is faster than three nine and the 311 development patches by and large even faster and so life is good in life and it's getting better so that yeah that's um the fastest c python project um oops sorry that's my mouse again i'll use the keyboard instead um right the next thing i wanted to mention was uh this is the prep that we um that we we mentioned before when i was talking to to carol um so the problem we're trying to solve here is what happens if if you have more than one exception um that happened in your code so imagine look at the code on the left so you have some kind of loop and it does something and it does something many times and every time it does it it can get an exception so it collects these exceptions in a list and then it you need to report to whoever called this function about all the problems that happened so why when would you where would you see this pattern you can see it the motivation for for our work is async io task groups if you want to implement something that does something asynchronously then okay it's not in a loop it's just a bunch of asynchronous jobs and then you get back a lot of exceptions but there are also non-asynchronous use cases you can imagine like if you're trying to make an http connection and you retry several times and you you try several different addresses maybe and you get different errors from each one we actually have an open ticket about this case so what do you do so some apis that have this problem they will just report one exception and throw away all the other exceptions and some of them will maybe return a list of the exceptions or wrap the list in another exception and raise them then you catch it the problem with that is okay the first solution you you were losing information because you threw away all but one exception and the other two you're basically treating exceptions like error codes so you can get the list of exceptions and you can inspect them and you can figure out what happened but you can't catch them you can't do exception handling with except according to their type so something that's lost here and the idea of the step is to give an api that that will allow you to raise a group of exception a group of exceptions a list and and then handle them with it with a syntax that says now give me all the exceptions from the group that match this type and raise all the rest so that that is very important i don't have to remember to do something with exceptions i don't want to handle they just get automatically re-raised so that's kind of the idea of the pep you see in the box on the right a code snippet that is some probably very close to what's going to be where we're we're ironing out some detail but that that's probably what something like this it's going to look like you you have a different syntax it's not accept it's not compatible with accept so we we're not touching except except we work the same and you you have some kind of ability to to to extract all exceptions from the group that match a certain type handle them move on to the next clause extract any that match the second type and re-raise automatically whatever was not matched um so where this is as i said the stage that this is in the prep was implem was accepted and we're implementing it and pretty soon we would want people to who have an interest in such an api to look at it try it give us feedback um this is joint work with your silly banner friend guido the next project is uh this is what bran um already mentioned so yeah i i put this on the list of kind of things that people are working on and and he already covered this more or less so i don't have a lot to add except to say that i think he glossed over how hard this is i think he's going to have another interesting year working on this so the idea is you have all these this is kind of currently what the translation does for pattern matching it takes all the cases and there's some kind of simple one-to-one translation with a lot of redundancy and brent wants to remove that redundancy um yeah it's it's we probably haven't complete problems here that he's trying to solve he will have to make interesting trade-offs um it's it's a nice project yeah but he covered it so i think i will move on um there's a similar kind of problem that is also i mean here what we have is bran implemented something very simple and now he wants to make it more sophisticated something similar happened with with f strings so f strings came in python 3.6 eric smith implemented them and what they do is they you write a string you if you put an f in front of it then it's a an f for format string and then anything in a curly curly braces is is uh treated as a python expression and its value is printed instead of the thing itself um it's a lot more sophisticated than what i'm showing here but this is just kind of for the sake of example um the the thing that is still left to do here those expressions in in red they are not paused by the python parser they have their own parser that was again the simple way to implement it at the time it was the right thing to do when you implement a big new feature you want to do it in the simplest possible way without changing everything around it and but now probably kind of raised on the on the mailing list a few weeks ago he said i want to kind of sort this out like integrate the parsing of of those expressions and f strings into the python parser and the reason he raised it on the mailing list is because the f-strings parser is actually weaker than the full python parser so not every uh everything that the python parser will eat that parser will also eat and what this means is that those expressions you know one once pablo does what he's planning to do that those expressions would python can allow more sophisticated expressions and f strings and then the question is how sophisticated do we want them to be so um so this is this is what he brought up for discussion like should we allow this should we allow that and and that's probably going to go on in python dev um for a while the last item that i wanted to mention was sentinel values so this this pattern on the left this is what you do when you want to um you want to know for sure whether the some optional argument was given a value by the user so right if if any value is possible and you default this to any kind of value that the user could give then you never know if the user gave you the value or not and if you want to know for sure then you will you you kind of create an object that is not equal to anything else and you and you check if that's the value that you got now this is this is a kind of a one-liner so what's the problem the problem is that usually you don't want it to be that because if now if i call help on this function then this sentinel appears in the the string representation of the sentence which is kind of a string representation of object which is a very ugly thing that will appear in the help in the signature of this function so pretty quickly you end up creating a class and giving it a nice string representation and then you you decide okay i want to to add type type annotation so you need the type of the sentinel to match the type of this argument so you do something about that so pretty quickly you end up implementing something that is not as trivial as a one-liner and then talinat in the summer said why don't we have a standard sentinel in the in the library and he's kicked off a discussion about this and personally when i thought this saw this i thought yeah okay he'll do it and take two weeks and he's done actually there's quite a long discussion on uh discuss python org if you go to the peps area there's a thread about pep 661 which is still a draft phase so he hasn't finished writing it he's still kind of brainstorming with the team what to do and i i personally was surprised by the amount of ish the number of issues that came up so last week there was a discussion about what should be the the boolean value of a sentinel there's a truth here or falsity and um and and if it's configurable what should be the default and and it was you know it it really is interesting to follow this discussion and if somebody wants to kind of get in and see how something is designed by the python dev team this is a good example because it's very accessible you don't need to understand python internals to kind of dive into this discussion you need to understand python but not kind of internals of the interpreter kind of things that a lot of program python programmers don't necessarily feel confident with so um i i think i i mean this is obviously still in the in the kind of brainstorm phase there isn't even a final draft of the pep but i think you know chances are something will come out of this and chances are it would be in time for 311. so um right so those were kind of some of the things we're working on now it was not by any means an exhaustive list it was just a few kind of things that i know about that people were happy for me to talk about i wanted to give you a tour of the office just to see where we work so it's uh the code is on github obviously um well not obviously but it is and but the bug tracker is is a separate um a separate um site that we use it it predates to move to github and this this book this is where you kind of go every day to look for work you know this is this is particularly when you're starting out and you don't have a big project like that you're into um and and this is i think where you should go today and tomorrow when you start start to use python 310 when you find issues because you want to be the first person to report a bug because there are rewards for this the reward is that you get to fix it and in terms of the team itself the discussions we have uh we have two areas where we kind of talk to each other there's a mailing list in mailpython.org and then there's the discussion forums on discuss python org why are there both its historical reasons first there were mailing lists now there's discussion forums but not everybody made the switch so they both exist but they are kind of um there are some parallels and the structures basically there is uh most most of the discussions are in the core development list or python dev on the mailing list that's why most of the uh discussions about about things that are actually getting done happen there is a committee's uh list which is just for boring stuff that that um we don't want to spam everybody with so it's things like the billboard is broken it's it's it's really not it's it's open to the public but the public cannot uh post a song but so python dev is where you want to talk about actual development and then there's python ideas which is where it is appropriate to to to suggest things that aren't likely to happen um it's it's a bit less work focused and more kind of um what if we did this syntax and and if you if you are not sure whether an idea you want to suggest is appropriate for python developer python ideas i think it's polite to er on the side of going to python ideas so if it's not about something that actually is happening what needs to happen then i would go there um so that's that's basically where we work and um in terms of kind of getting started so this is where you would go initially we have uh uh the developer guide that was already mentioned it has sections that are kind of organized um you know you have all these sections for new contributors which is how do you set up your environment how do you build how do you kind of create a poor request and so on and then um it it goes on um to you know this is kind of the the career track in in python new contributors start just creating pull requests and and fixing a few bugs then triages are uh help kind of looking at tickets and assigning them or closing up you know uh dealing with with the tickets on the book tracker and then core developers actually uh merge pull requests of other people so um now we do have also a core mentorship list which is i believe the archive is not publicly available to make it a bit friendlier for people to ask questions a good question uh to ask on core mentorship is is a specific question um occasionally we get a question like i want to contribute can somebody mentor me and it's very hard to kind of give an answer beyond you know read the developer guide and start doing something because there are many areas in python and and when somebody comes and says i want to contribute you don't know what they want to do do they want to work on the garbage collector or do they want to work on one of the standard libraries and depending on what they want to do that will determine who their mentor will be so for that reason and also because you kind of you're asking for somebody's time so you need to kind of indicate that you know you're serious and you're here to make an effort so kind of go go through the developer guide and get started and look at the bug tracker and kind of spend some time figuring out what's going on look at pull requests do some code reviews look at what other people are doing i've put that time into to figure out what's going on what when carol said earlier that i did a lot of triage that's true that's how i learned about what's going on in python just looking at old tickets what kind of problems are there what are people working on what are they not working on how are they discussing problems how are they you know reviewing um it you learn a lot just by observing so that is my tip kind of for for new contributors to kind of get as far as you can and then come and ask questions excellent um i just wanted to mention in in regards to the mailing list you mentioned um some of the users uh in our community have said that they found the mailing lists a little overwhelming so we implemented a feature in python discord where we have a channel called mailing lists that will output stuff that goes into python ideas and python dev and using discord's subscription feature you can subscribe to that channel to get those delivered into your discord server if you want to so if you're interested in seeing the stuff that goes into those particular mailing lists then we have that as a feature very cool leon yeah um there's a question here regarding whether there are any plans to move the bug tracker into github can anyone answer that i i believe there are um actually i can do an update from the update like the status report from the student council so uh what sorry hello um so we yeah i don't see or maybe it's because the can you ensure it i think um i'm sure yeah stop sharing yeah right that's cool right so i think so so we have um like someone who is working on this and there has been like a lot of updates because unfortunately it has been some synchronization between github part and the um and the person working on this which is ezio is also another quarterly uh but it seems that now that is like um so the project is still going going there um it's just that more slowly than we expected unfortunately because of this uh you know when we have was available to discuss it wasn't and vice versa but now uh things are going on faster and i think um if i'm reading the see the steam comes with chat today we have uh we we're going to start probably very very soon uh uh like a sample repo when people can see how the issues ported will look like so we can start discussing labels and like problems and whatnot so so it's just like it's a bit slow unfortunately um and you know it's mainly because uh these the synchronization problems but yeah it's something that we you know we are working on and you know there is a four continuous just that you know just please please be a bit patient which i know is quite difficult when you don't hear about the things but um we are trying to be as transparent as possible with the news that we have we are also having for the sake of transparency we are also having like uh bi-weekly cuddle i think it's bi-weekly or weekly uh by week one bi-weekly yeah by the weekend it is with with us you to know what's going on like what problems so to see if the steering comes we can't help so you know we are taking it very seriously and we took it very seriously uh it's just that now there is some momentum and we want to make sure that you know like we we can use this moment to get there and we are also like trying to see how you know like every two weeks like how the stream config can help or like you know to coordinate things and to prioritize stuff so we can uh do the transition as fast as possible so yes it's short it's short it's happening i have not been you know very updated because of these eventualities but but we someone is working on uh right now and you know we will get there um it just takes time and effort excellent okay um okay so um how much time from josh peak how much time per week or per month does it take to be a core dev or a steering council member or someone else yes i don't want to handle that how about for you brandt how much time are you spending in your involvement um so i'm actually about to start a new job i guess i can say uh next week i'll be joining the the python performance team at microsoft which i'm super stoked for um so at that point it'll be a full-time job uh previously i got uh 20 of my time at my previous job and before that it was just nights and weekends um so a lot of time right but i take it that this varies wildly between the different core developers right absolutely yeah no i mean there have been months where i haven't done anything you know i just needed that time off and i think it's important um i would actually recommend it sometimes to do things like that um but at the same time you know especially during the pattern matching it was it was a significant portion of my uh free time and part of my working time as well um so i think it's important to you know stay engaged if you want to be engaged but you know also don't let it just kind of take over everything yeah so from my perspective uh someone running python discord we try to establish this culture of you know it's okay to take breaks because uh burnout is dangerous and we we do our best to try to fight against burnout do you guys have any kind of cultural norms or you know uh etiquette written down somewhere in terms of like preventing burnout and then taking care of your members like that i think in terms of like norms there are several community members who make it very publicly known that they won't be available for a week or a month or several days or something like that because they're taking a break from open source and i think that's a really really healthy way of approaching it um but i think it's also like if if you're not currently taking a break and someone takes a couple days or a couple weeks to get back to your email um you know there's also understanding that too that on the other end they they you know they may not be intentionally ignoring you they may just be intentionally ignoring python in general for for the time being um and you know uh within reason i i think that's uh you know just something that is just kind of a part of python core development as well and and i think there are some of us that have tried to normalize that people need to take breaks for whatever reason health care you know child care elder care and you know there shouldn't be a stigma around it like grant said you know you don't have to give a reason hey i'm taking a break for a month or a week or three months that's cool um you know and you know definitely come back when you're ready to come back you know because we are mostly volunteers uh congratulations to brant um happy to see that very happy to see that but but yeah um but you know in terms of time commitment i think it sort of varies and the type of time um you know the steering council meets formally for an hour each week but then i don't know how many hours we spend at least several hours each week reading peps and answering questions and discussing things so i mean i think i think the thing that takes the most time is to make sure that you know go into the mailing list and make sure that all the comments are accounted for like this is something that you know for complicated tabs like you know the exception groups or pattern matching i spent like i don't know maybe those weeks two hours a day just going through the whole mainly checking that all the comments are accounted for so we don't miss that particular person point on the you know string council discussion and you know maybe some doing some schematics over like like what you what you think sometimes i didn't like have something clear so i contact the author uh and maybe like we we bring the author into the seed for more questions so it takes a lot of time um but it's you know it's it's it's uh it's what it is it's not just sitting around in some you know chair and saying i will approve this perp no it's not like that it's mostly you know like reading emails making sure because ideally the steering council won't decide anything it's just like the in the sense that the community will have a decision like either some idea is not good or is is bad unfortunately many times you know there is division so that's why the steering council is useful but we try to as much as humanly possibly encourage the community to read some consensus before we we decide on like this thing also decided um sometimes it's been very difficult but yeah uh that takes a lot of time unfortunately well unfortunately okay i got a question for carol from me what was your first contribution to see python and how has uh the onboarding for for for new developers changed since then wow um i may not technically remember i think it was a dev died um contribution um you know at the time i was um also working on jupiter and so i would at the time my python notebooks and so i was seeing a big disparity between the how the communities interacted and and the feel of the community and you know having a background that in management project management and also you know deep technical work as well i thought felt that there were ways that the workflow process could be improved and the sharing of knowledge could be improved so i spent a bunch of time trying to you know document what the dev process was how to do it i think what has changed since i started which was probably a good seven years ago is we've increased the diversity of our contributors um and our core developers i think we've worked very hard to try and create a open productive and respectful discourse on the key mailing lists and you know disco course as well um you know it's it's been a work in progress um and will continue to be a work in progress um yeah i don't know you know it it's hard for me to think back because i remember just doing it but um i also try and spend time i'm a big fan of like five minute mentoring where you take the five minutes to actually answer somebody's question thoughtfully and i can remember a time at a a core developer sprint pablo came up to me i don't know if you remember and well i'll let you share what you said i don't know i mean you can say that you wanna i yeah sorry go ahead no no you do it you do it i actually like yeah it was quite quite an incredible experience because my first pull request in the world ever was to fix some to implement this ipython so the ipython timeline command it already existed but i implemented a feature that added like the standard deviation like the error so you see now these plus miles and you know i interacted a lot with carol and it was my first time in open source i didn't know anything like you know not good uh nothing and you know carol hal was like this super patient person like you know she went like okay yeah let's do this thing let's check that and you know you fix this thing this way and like it was super helpful it was such a nice experience uh you know i was in the cold of spring several years after that and i i just like i saw the name it like oh god carol williams like and you know i i mentioned that one of the reasons i was actually you know in the court of spring with the rest of the team was was because she reviewed my first protocol which was i think a very beautiful moment and the fact that he came back and told me that that was really cool and i know like lukasz and yuri and brett and nick i mean there were victor uh matches other folks i mean and guido himself were were super encouraging when i started um you know i had a fussy background that is my first well not my first language but where i have the most depth um now i guess it's python but um yeah i mean it it takes a village it's sort of the bottom line i think we have we can continue do the actual release actually uh yay i just wanted to have a super quick speed round where i want each of you to answer in 10 words or less why that particular hat pablo well this particular house because it was the only hat i had available at home and the and the thing because i thought it was not ten words yeah maybe it's like six what excellent eat it what about yours well i um i i can't give a reason for the hat but i did want to say that while i was sitting here i was thinking to myself if you told me a year ago that i'd be on the internet a clown hat and that would be and that would make me the least silly person in the room [Laughter] i would not have believed it how would you brent what are you wearing uh i don't wear hats and so i went to my parents and said do we have that old box of halloween costumes and they're like yeah it's out with all the halloween decorations and so i was like sweet i need to just dig around for something there's either this or like a full head like head darth darth vader mask like a robin hood yeah well i was thinking like if you watch silicon valley i'm waiting for after the release all the rats to rise from oh cool um i rated my 26 year old daughter's uh room and she lives in japan and so she's got all kinds of fun hats like this super cute all right okay but um let's uh let's go check in on pablo how's the release going yeah so we are all like we have everything already and we just need to you know like do the actual button passion so we can we can see what's going on i'm going to do it very quickly uh so you know it's been a long long long stream so i don't want to make it like more long so let me share with you like how this looks like and we can just like go ahead okay so uh let's see give me a sec right cue their guitar riff so this is how the release like page looks like when you configure it you basically have to put like the name of the release on a slide and you know already this is already up because i was like checking not everything like goes correctly especially with the um like the the facebook outage or whatever that is making the cache in the psf server go a bit slow and the actual recently happens when you go to python.org i'm defining this in here so you know like this is the definition of the release actually happening and here is a street type because right now although you can access the download page he says 39 so you need to say yes this is the stable release yes it's published and yes on the download page you put the release text which i just copy and prepare before the files are already uploaded and this is the big button that is not very big but i'm going to make this thing gigantic so i'm going to three two one save and hopefully uh okay yeah and hopefully now we'll be back here and now we update this and we update the psf um like the load page so you know it doesn't use the cache version loads hopefully now it's just written it doesn't say it's interesting okay give me a second maybe we'll have some some more problem try not try again try again it's published yes okay save man always the same always the same now okay yeah 500 mind this is again the file version shenanigans yes this is a windows one oh boy there's there's two there's two windows uh like just um uncheck one of the download buttons for windows versions the 32-bit one the 32-bit one this one so what i do like uh no like this is another one so like look which which one we're actually unchecking now that this one you want to leave right so this this is unchecked here right yeah like see when this happens to me on three nine that's because there's too many windows ah there is one here yeah exactly the 32-bit one here uncheck this one like yeah right that's that's deprecated let's see no all right this this always happens uh no not at least not at least without problems um maybe i can delete everything and re-upload them again or something and i don't know like so like well you you can't but like we should be able to just uh save it with unchecking the thing um but for now like you just ch check the website again with the weather it's because it doesn't it doesn't appear as published you see it's published uh so we have macos we have the terrible the turbo and we have 32-bit windows 32-bit win 64 windows the hell file i have the 32-bit windows the 64-bit windows installer and i don't know and these are mark do you know what this could be so this is for sure the windows installer 32-bit also being like marked as download uh so let's let's just uh let's let's just try to okay so we have the download button for 64 bits yeah okay just a second like i i kind of i think i found it uh so like so yeah let's see okay try it now yeah like just refresh the the editor and like do the big button again okay so i unchecked the 32-bit right right right so we mark this save yep okay yeah this is good this is good thanks congratulations nice this is so exciting [Laughter] yeah that's great always always some surprise at the end like that's how releases like you know release management is like you know lucas was a bit a bit scared that nowadays a bunch of the script is automated like you know maybe people think that the release manager job is just to press the button and everything goes automatically as you can see it's always like full of like problems yeah yeah well like 310 was particularly hard because there's a double digit version number so so there's like so many things broke just because of that like i i had it easier like with three nine and three eight like those were the easier releases right right and i'll buy that for one second lucas um oh that's excellent so we've uh we've done a release there are a bunch of questions that people have asked we're going to probably do a few of them and and then try to wind down the the stream which has been running uh a little longer than we initially planned but i think there doesn't seem to be anyone who minds in the chat so far but um a few questions here that i think i would love to hear the answer to myself so let's start and this will be up to anyone who wants to answer it uh go ahead and just speak out how do you decide what to include or to leave out of the python release like from the from the python theme or like so you mean like python features or do you mean like in the released release process yeah i mean like are you just releasing whatever is ready or do you have a process of like selecting the specific things that go into the release i mean apart from the fact that some of these features are discussed as peps and some other features are discussed in the issue tracker technically we have like the english period so you can go to the like python 3.1 whatever you're interested in release pep and you will see that there is like several stages the most important one is beta1 it's also called feature freeze so at that stage of development the whole feature set is frozen so whatever is there is there like peps implementations features so anything that is there is frozen and the only thing that can be included in that particular release because it's just still beat up one so it has to go through with the two three and four and two release candidates so the only thing allow is back fixes and documentation improvements and things like that so in that sense the core team has pre-selected those things either via peps or the c or or by discussing the issue tracker and once you know the release cut the first beta is there then the whole feature set is frozen that's i don't know if that's that answers your question or the question though right yeah that's great um when should people start using 310 right away or are there any caveats to to jumping into it and using only 310 at this point well people can already start using python310 it's just been released it's available um there are obviously you know caveats to availability of third-party packages this time around we reached out to a popular package maintainers like to let them know that hey like you can already start building uh your releases for python 310 so so they're just waiting for users when python 310 0 comes out so for a number of them uh like numpy for example like the the wheels already waiting so you can already pip install numpy should work just fine for python 310. um other packages well there might still be hit or miss like those are all volunteers so you need to understand you know kind of just give them some time to actually build their uh stuff and release it for you um some features of the language uh some of which we discussed today like pattern matching or some of the typing functionality is still waiting for tooling support so for example visual studio code might not highlight everything like quite there yet and uh you know some of the newer typing features might not be fully supported by my pi for example um in the current release like the future release will will do this uh like fully so yeah like it's always like the you know you're living a little on the bleeding edge if you're just uh downloading and using python 310 that's true for any serial release um but it's extensively tested we've had to release candidates that took us you know two months of testing so um we're confident it's a good release excellent thomas gringer asks what's the changes from the rc2 to 310 zero and do you know what's going to be in 310 one well from the rc2 to threat and zero is mainly like documentation changes because the docks that are rendered are the ones that are in the the ones that i just built so it's augmentation changes there is some critical bug fixes uh or fixes that are absolutely sure we are absolutely sure it won't impact um you won't impact anything or won't have any any possibility of having backs or features that uh maintainers of several open source projects have reached out to say that having the thing on 3.10.0 but not sorry not on 3.0 but on 3.01 will make their life very hard so for those who i did some extra value there's only two commits for those so i did some extra validation to make sure that those are very very very low risk and they make sense because one is basically a syntax server change and the other is like um something with the with the display and syntax errors in the traceback model so very very small in scope um so and things like like cold economies that make the merge easier like called uh like removing white spaces and whatnot because then when i merge the tag back into three time branch that makes the merchant issue but that's the changes and the changes that are in the 3.3.10.1 you can just go to the 3.10 branch on github.com as you click 3.10 and whatever is there if you know some git you can actually see the difference in the command line but but yeah um development is is already happening for 3.101 and you can see basically everything that is not on the on the merge tag is basically for 3.01 okay excellent um osgoor esmere comments came for the release stayed for the hat uh we got a question what are the limits of the updated error messages and what can we expect uh in terms of error messages in the future in do you mean a new new a new release yeah the new exception handling right right so in 311 you can use the new pap the granular you know something something i don't know how i call it but granular better or something so that is the example that i saw before when you can see like you know for every every exception you can see exactly what happens so that's a ridiculously big feature on my view at least so very good but i'm i'm going to work on trying to improve those as well like as he had mentioned if i managed to get for 311 the new f string in the parser uh you will get much much better error messages sorry much better messages on f strings which i think it will be very cool because right now although they are not bad there is a lot of custom things is improvable especially you are also doing some asd parsing and whatnot so so that's for sure and i also taking a look it's just that i'm also doing like you know the the speed speed project for python with hito and and the rest so maybe a bit less space so less improvements um but you know i otherwise i will spread myself too thin we got a question from uh gabriel pattier who's one of the core developers on kivy he says is there an effort to build the binaries on something like github actions so that the releases become more of a push button affair no the reason is because there is something that you cannot have easily on github actions for instance the release the the release artifacts are signed and i have my gpg key on some hardware like aji wiki and i cannot put that famously and i don't want to actually to put a thing on github actions and also that requires some specific validation that happens on your on your computer and not on the github action socket container so technically it's possible to automate a bunch of it like for instance steve tower has automated almost everything on his side uh and i maybe as well i don't know but i know that still has a very super cool azure pipelines like thing one builds the whole thing uh but i think unfortunately there is a lot of things that cannot be automated like checking the you know checking when the billboard fail like you need to check what's going on or checking for release blockers or you know like um like an advantage of the process is actually already like this button and if everything goes good uh you know do you don't do anything but as you can see today there is tons of things that go wrong just because you know like things happen so so yeah i mean um at this stage is almost 90 automated uh but it still has a lot of money on labor unfortunately that you need to know how to solve yeah um one last question um is c python doing anything for hacktoberfest are you guys familiar with the event are you participating in it personally i'm familiar with the event typically we haven't participated formally some of the third party projects that are using python do so there's a balance between introducing unnecessary churn on small tiny things that people will you know somebody reviewing code takes time even if it's a a typo or whatever and what we don't want to do is introduce a whole bunch of prs that are perhaps not high value prs that are tapping you know our our ability to review prs is limited um right now by the people that we have so um yeah i think there's i think oh yeah he'll go ahead i i was just gonna say i think there's also a balance too between like fostering new contributors and kind of uh you know just opening ourselves to drive by contributions where then someone could say python contributor on their resume or something um so i you know it seems like hacktoberfest in general is more the latter than the former and the former is more of what we want to see i think that if someone's really committed to contributing to python they won't do it because of oktoberfest they'll do it because they want to right and i mean it's not to say that learning you know uh by fixing a doc thing i mean don't pep ate the whole code base and submit it as a pr that will get rejected um you know there should be a human benefit to whatever change is made i think is a good way of looking at it and i think one of the things hacktoberfest does is it creates a spike and you know whereas some of those steady state useful typo bug fix whatever thing smaller fixes are a good way if you're going to be a sustained contributor to get started um but you know you're not going to break anything by submitting a pr so you might as well chew on something a little more meaty yeah those are really good points and um python discord participated in hacktoberfest uh a couple years ago where we encouraged users to come and open pull requests to us and we didn't have so much the problem of um of low value pull requests rather it was more or less the opposite were 126 fairly high value pull requests that were open and we did not have the capacity to review that many in that in a reasonable time uh so it ended up with you know burnout among the reviewers we ended up with some pull requests that were neglected for a very long time which upset the author and there are definite downsides to a big organization taking on an event like this well and oftentimes i mean historically it's been you ha if you review prs you don't necessarily get any tangible thing that shows that you've reviewed prs particularly if the prs are rejected or asked to be reworked so i mean it it's sort of in sometimes a thankless thing super important i mean i love reviewing prs but um not everybody does can i ask how many times have people actually submitted pull requests to pep 8 the entire code base of c5 well entire code base like maybe doesn't happen so often but on pull requests that do um like well sort of sweeping changes of some sort like well they happen and there's a lot of trivial changes as well um we would mostly reject those if they don't make sense otherwise um but every now and again even a simple change makes sense right so like even if it's a fixed comment but the comment had a misleading punctuation that made you read it like the wrong way like then yeah like let's just fix the comment it was it was misleading uh but if it's just really like hey like you're missing a space because it looks nicer if it has the space then then now like that that's that's uh that's uh that's too trivial of a change the reason why we think that is that git history is important for us so that we uh in search of actual issues can easily see when our given file was uh was changed and when a given line was changed right so if we kind of you know cover all of this by changes that are cosmetic it's going to be harder for us to find what went wrong when we're looking for actual trouble um and obviously like also just the the comment history becomes larger if there's a large number of change changes that are you know just typos um i would sometimes you know kind of take those in uh if for example they're part of something bigger so you know so somebody made a change you know we just committed it and then we noticed ah there's a big typo somewhere in the dock so yeah like let's just fix it right away because it's so it's close enough like doesn't matter uh but usually um the the way i would for example perceive like contribution is that you know um maybe there's something confusing in the docs where there's a missing sentence or the sentence that is there like you know should be should be different so let's talk about that like any other like typo style stuff like often isn't even that objective um you will see that some people have like style preferences that aren't really you know kind of aren't objectively worse or better than what we already have um so yeah like if if that's that's what you want to do like just look somewhere else uh like a good example is when uh there is a missing paragraph or uh there's a function that doesn't change it doesn't check some uh particular error case um this sort of thing so you don't have to start big like it's actually probably better if you don't start big um but you know just looking for typos is probably not the best use of anybody's time well and i i also feel like um and then i'll let other folks jump in um i tough and when i have the newer developers i encourage them to contribute to a midsize project or a smaller project in conjunction with contributing to see python because we have such a rich ecosystem you can sometimes have higher velocity changes and more opportunities to make pull requests on a smaller project than you can on an older more established project i wanted to kind of emphasize something i kind of mentioned at the end of when i spoke sending pull requests is not necessarily the the how you should start i if you look at um i mean there are two types of of contributors there are those who have an itch to scratch there is a bug you want to fix so you just go and fix that bug that's fine if you're saying i want to be involved with python because i love python and i want to and it's a fantastic team and i and i have a nice hat and you know it's my thing then what you really want to do is ask yourself what where is is the help most needed and the help is is most needed right now we have 1400 open pull requests we have over 7 000 open tickets right so the the bottleneck at the moment is reviewing those pulling requests and resolving those tickets and it's not necessary to create another pull request so we can have 1401 right because we just don't have time to review them so and and another point here is that and i mentioned this before this this is the best way to learn it's the quickest way to learn what's going on and how to be an effective co-developer just learn from other people's mistakes because people are making mistakes all the time yeah yeah that's a good point so um is that what gosh i just have to ask you've never been tempted to run the entire code base through black uh i do this very often like this is this is like one of the ways that we test black like that like the initial alpha version like was tested on the stun library and on a bunch of other projects like so that we know uh like just just like right now when somebody on the on the stream said like hey black doesn't work with python 310 i was like wait i mean it does uh so i just ran it over pi simple gui which is a single py file that is like a meg big just to check like you know yeah like it it does work it's fine uh so yeah like um the the more code you can throw at it the better it's tested so so yeah like the sun library is an obvious candidate um 310 though doesn't pass all right because it has the match statement uh thanks brandt uh yeah sure uh we will uh we will be fixing that uh soon okay and with that i think that we should wind down the stream a little bit we will be we've opened the channel on python discord if you're not already in python discord do join us you can find it on pythondisco.org we will have a channel at the top of the community called 310 stream discussion so if you want to continue the conversation there some of us will be hanging out there maybe answering some questions after the stream thank you all for joining me here it's been an honor to be in this space with the five of you and uh thanks so much to the people watching out there it's been a really really active chat lots of great questions from from all of you we haven't been able to go through all of the questions but since this has been running uh for for quite a while now i think it's time for us uh to end this and um yeah maybe we'll uh see you back uh for 311. who knows now certainly i don't want
Info
Channel: Python Discord
Views: 6,796
Rating: 4.9845858 out of 5
Keywords: python, cpython, python 3.10, release, Pablo Galindo, Leon Sandøy, Python Discord, 4 October 2021, programming, development, computer science, structural pattern matching, pydis
Id: AHT2l3hcIJg
Channel Id: undefined
Length: 186min 45sec (11205 seconds)
Published: Mon Oct 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.