Podcast Lookup

27 - Python Formatters

The Python Show

  • January 25, 2024
  • 59 min
Episode page
About this episodeEpisode 27 of The Python Show Podcast welcomes Łukasz Langa as our guest. Łukasz is a CPython Developer in Residence, which means he works…

Episode 27 of The Python Show Podcast welcomes Łukasz Langa as our guest.

Łukasz is a CPython Developer in Residence, which means he works full-time on the core CPython language. He is also the creator of Black, a super popular Python code formatter.

In this episode, we talked about the following topics:

* Core python development

* The origin of Black

* YAPF and Ruff

* Python, Python, Python

* and more!

Links

You can follow or connect with Łukasz at the following sites:

* X / Twitter

* Personal website



Get full access to The Python Show at www.pythonshow.com/subscribe

Transcript

From the publisher

This transcript comes from the podcast’s own feed, shown as the publisher wrote it.

27 - Python Formatters

00:00—
  1. Speaker 3

    Welcome to a brand new episode Mike Driscoll The Python Show Welcome to The Python Show with your host, Mike Driscoll. Today, I have the honor of having Lukas on my podcast. Lukas is a core Python programmer, and he also created the Black Formatter, which is a pretty popular code formatter for Python. Anyway, welcome to the show.

  2. Speaker 2

    Hi, happy to be here.

  3. Speaker 3

    It's so great to have you. I've been looking forward to our chat for quite a while. Could you tell us a little bit about yourself and your journey to programming?

  4. Speaker 2

    Right. These days I work for the Python Social Foundation as the CPython developer in residence. Although I probably shouldn't say the anymore since there is three of us right now. Very recently, Sierhuis Torczaka and Petr Viktorin. joined me so now there's a three-person team. I just had a meeting with the steering council just yesterday talking about all the possible new things that we can do now that we have a larger staff of core developers essentially on board for So I've been doing this since June 2021. Before that, I had a short stint at HDB, a company co-founded by Yuri Solovanov, also one of the core developers of Python. a person who added async and await to the language so like a very important contribution that is dear to my heart. Before that I spent five years at Facebook first in Vancouver British Columbia then in California I enjoyed working in Silicon Valley. It was very easy to meet people who have tremendous experience and a lot of, you know, kind of interesting thoughts about anything tech related. So you could meet anybody from Kent Beck to Guido van Rossum who actually lived not far from where I used to live. That was a fantastic place. I did move back to Poland in 2018 for family reasons, and this is where I reside now. I don't know what else you want to know. I started using Python in 2004. Initially, it was almost like a slapstick comedy sort of thing. I got a script from a friend who said this is going to help me with linear algebra classes. The script was in Ruby. So I tried to download Ruby to my computer and install that but the installer kept crashing like regardless of the version of Ruby I tried to install that that was still a desktop computer on a you know running Windows XP. So I literally typed into Google Ruby alternative and Python popped up and you know using that and looking at the Ruby script I The Python Show is brought to you by The Python Show. previous experience with the Java and you know there for stuff to be actually very performant you had to do a lot of work and be careful about how you are crunching numbers and with numeric and later with NumPy the kind of vector based programming allowed you to move a lot of the computation to be extremely efficient like on the CPU and these days on the GPU so fantastic Right. What else is there? I mean, yeah, like I'm essentially in tech since, you know, high school and later I did programming at university. So I graduated computer science at the Poznan University of Technology, half a million people city in Poland where I reside now.

  5. Speaker 3

    Cool. That's a pretty big town, at least from where I'm from anyway.

  6. Speaker 2

    Right. So it's essentially a good size because it is big enough that it does have a regional airport. I cannot really go way further. There may be The Python Show close to Berlin, close to Warsaw, the capital of Poland. But, you know, it's itself not a touristy place. So it's boring, but in a good way, you know. So I do enjoy living here.

  7. Speaker 3

    That's really cool. I lived in Dallas for like two years, and that was fun because it was a big place. It was still kind of flat like Iowa is, which is where I'm from. Right. But very different too.

  8. Speaker 2

    I did visit Dallas this year after the conference. Oh, this year, no. I'm still in 2023 mentally. So yeah, after PyCon 2023, we took a car, my family joined me. and we drove from Salt Lake City all the way to Austin and then Dallas, where we flew from, to just see a bunch of things in between. So, you know, we saw Monument Valley, we saw Roswell, and so on and so on. But yeah, we did see Austin and we did see Dallas. It was my first time in Texas, so I was very curious about how it is like.

  9. Speaker 3

    Yeah, the cool thing about Texas is that Well, one, it's huge, so you can see all kinds of different things. And I mean, you can even have the coast if you're going to go south far enough. But yeah, there's just a ton of things to do there.

  10. Speaker 2

    Right. We didn't quite get to Houston. We flew out of Dallas, but it was incredible anyway. And we saw the cattle call, you know, and yeah, I liked it.

  11. Speaker 3

    Yeah, there's a lot of fun things to do, and I was actually surprised at the variety of things you could just do right there in Dallas, but there's lots of things to do in Austin and San Antonio and some of the other big cities there. Anyway, let's get back to Python. I'm curious, how did Black come about, and why did you create that versus using one of the pre-existing tools like YAPF?

  12. Speaker 2

    Right. Yes, back in 2018 when I started Black, Yap was definitely already a mature product and it was fairly popular. In fact, you can still dig out some of the comments I contributed to Yap since I didn't start with the idea to write a new automatic formatter in 2018. I did try to make Yap even more configurable than it already was, with the intent that I could adopt it at Facebook where I worked at the time. I was part of a team called Python Foundation internally that was essentially responsible for developer efficiency around any Python usage at the company, which you can imagine is a lot of different users and it summarizes to some 20-something million lines of code. Most of those lines of code were in fact configuration, where at Facebook there is this system that instead of writing a configuration in some more machine-ready format like JSON, the configuration is written in Python, and then some sort of compiler is compiling this Python DSL into JSON, which then can be read by anything, right? You can read it in your particular C++, Python, whatever processes, like even networking equipment can read JSON, even your fridge can probably these days. So this sort of two-pronged approach where you had user visible Python that people edited and then JSON as output was pretty powerful because you could do things that Python allows you to do, right? So you could define classes, you could The Python Show is brought to you by So obviously a lot of this configuration was also formatted in sometimes very weird ways. You know, it was essentially free for all. So at first we tried to adopt the app as it was. And to be clear, like it's a, it's a, It's a pretty impressive piece of engineering. The way it works is it uses dynamic programming to calculate a number, and the number it calculates is your dissatisfaction with how a line got formatted, right? So a line will essentially be kind of unwrapped, so to a form that would be used if there would be no limits to how long a line should be, and then it will be combined back into narrower lines in, you know, certain ways, right? So the effects of such programming, like of such wrapping will end up having some visible artifacts and you can assign penalties to some of those forms. Like you don't want to have a hanging closing parentheses because it's like, you know, 10 points of dissatisfaction and so on and so on. so this entire configuration of the app is in fact numbers that allow you to define what you feel is the least satisfactory and what is the most satisfactory outcome for you as the output of your formatting and being this mature project with some fiddling of a style that already was growing at Facebook We tried to adopt it internally. However, we always faced this issue where At some point, there would be an edge case that would be very hard to explain. The formatting would be suboptimal, but we wouldn't really know how it came about. We would try to explain, but because of the dynamic programming approach and all those knobs that you had in configuration to dial in formatting one way or another, it wasn't really easy for us to explain why a given line was formatted as it was. So whoever was dissatisfied with this formatting wouldn't be easily swayed to just let it go, to just keep it as is. People wanted answers and if they didn't get answers, they wanted us to fix the problem, so to improve the formatting. So the way you would do this with the app is you would take the configuration file, and just change some numbers from, I don't know, 46 to 47. And you would observe that this one line that you didn't like now is formatting in a more sensible way. So victory. Unfortunately, with that one change, other lines that you were previously happy with would start formatting differently. So it was this sort of, you know, spaghetti configuration that in the end was impossible to curb, to produce a formatting that would be, I don't know, like on average, the least dissatisfaction, which ironically is what essentially the tool tries to do, but you know, isolated to profile, I guess. So we had an intern on our team to just do a simple formatter for the configuration that we have of which there are some, you know, like almost 20 million lines of code at the time. and you know kind of over the course of I don't know what how much it was like eight weeks or so that person wasn't able to produce anything that we could use and you know at some point I had to write this kind of summary like this write-up I'm like you know like this this project essentially failed and the question arose like oh maybe Łukasz maybe you are too The features that you can have like extra on top of the basic reflowing of the file. So I just started tinkering with this sort of idea myself after hours since even from the beginning I thought like I would want this to kind of live externally and be kind of independent of my employer. So in California you can do this, right? You can work on your own time with your own equipment and in such a way essentially kind of still leave the copyright belonging to you on whatever you work on. And so I did. After I released the first alpha version which was heavily testing, formatting on a bunch of open source projects and the standard library of Python and whatever, It very immediately got, you know, popular for whatever reason. I don't know, maybe it was just like this kind of this snarky readme that I wrote at the time. I kind of resonated with people. There was also the effect of, you know, at the time, Kenneth Wright just saying, like, I like this, you should look at it. So people did, you know, so back in 2018, this started kind of very quickly growing. And we quickly also added this as a project that was also usable at Facebook if somebody wanted, but at that point, it was very early on, it was It was nowhere near, you know, the stability that you would require for a larger company. But what I could do when it was already running there, I could run tests with all those tens of millions of lines of code. And with that, like very quickly, I identified like ways in which we needed to also, you know, kind of change the formatter like that way or What also helped, which I only discovered at that point, was that one of the maintainers of the prettier formatter for JavaScript and other file formats was working on the same floor as me, at Facebook. So I just had a bunch of conversations with them and they were tremendously useful about how you grow a project, you know, kind of what you should be doing, what you should be avoiding, which is why, for example, I for the longest time essentially didn't want to even have a configuration file for Black because, you know, like Chris told me that one of the things that he is not too happy about is how if you have multiple formats of configuration that you adopted too quickly then you're stuck with them and the precedence rules for them are hard to figure out and even if they are clear and well documented there's always going to be somebody who is surprised by what they got and so on and so on. So, you know, the rest is history, like, thanks to my, I guess, lucky positioning, like, you know, both at Facebook and within Python, like, very many projects started adopting black, you know, gradually, right? Obviously, it wasn't like all on day one, but over the course of the next two years, the development kind of, you know, brought us to a point where Even the large projects like Django were able to adopt black. Interestingly, I was sure that they would be the users of the one option that I had from day one, which is the ability to specify line length. And they didn't. They just kept the default and said, okay, whatever, like, you know, let's just use that. And that was amazing. Yeah, I thought they would be fighting for, you know, just retaining their 120, which they were The Python Show a formatter that produces consistent results. So even if they are not beautiful as your manual formatting would be, at least you can kind of explain why the formatter did what it did. You know, so that would be easy to explain the primitive tool. But also since it's consistent, you can also, when you're writing code, you can factor it in such a way to avoid the I'm If you're trying to cram too much in a single expression, you're going to have, you know, very complicated line wrappings, right? It's very hard to come up with something that's going to be objectively good looking. So splitting lines in ways that, you know, avoid this issue is something that, you know, kind of you intuitively start doing. But most of all, you just start not caring about formatting as you type, because you can just type quickly and then save, and as you save, it's going to reformat to a nice form. And I'm doing this right now to all of my projects except for CPython, where I can't, I can't, like, you know, and it's very handy not to have to think about code formatting.

  13. Speaker 3

    Yeah, I agree. I've been actually trying to explain that to some junior developers that once we adopt a formatter, you don't have to think about it anymore. And that's really nice. Some people really like the way they've hand formatted something. It's going to take a little bit of work to help them understand that that's not always the best way.

  14. Speaker 2

    Right. So there is a safety hatch, right? There are and no format comments, like format off and format on comments that you can use to preserve formatting for, I don't know, some literals that you really need to align kind of in a special way. But usually I don't think it's essentially something that can be in any way automated to always have some magical alignment for, I don't know, like kind of multi-dimensional, you know, Tables or whatever else that you're trying to express as literals in code. It's We'll just always have some edge case that is gonna ruin the automatic ability for us to do this So, you know kind of black as a simple tool at least at the start it was just bails on the idea of trying to be overly clever and and just formats everything regularly, as if it was just data structures, right? This is why even function signatures are being formatted in the same way, where the closing bracket is de-dented, right? So it has an outer level of indentation.

  15. Speaker 3

    Yeah, that makes sense to me. So, I mean, I wanted to ask you what you think about RUF, since it's kind of a competitor or a side project.

  16. Speaker 2

    Right, so interesting. Raph is an example of a project that also grew very quickly. It's, I think at this point, not even two years old. So, you know, very quick adoption, like I kind of like to see it. It's had explosive growth. It originally started as a linter. And funnily enough, like that linter started with duplicating some of the work that I did, which I was very happy to see. So what happened was a lot of people who use pylint, like didn't really see rough as the, you know, kind of replacement that they want. Since Ruft didn't do full program analysis, it only looked at the file that you had open at any given time. But when you did, that was very quick and it did show you a bunch of warnings. So it was like Flake 8. And in fact, it did originate with essentially re-implementations of a bunch of Flake 8 warnings. Mike Driscoll just ended up finding similar issues with many of my co-workers' pull requests. We called them diffs at Facebook, doesn't matter, different terminology. So you know. Right, so seeing that Raph is essentially implementing all of those warnings as well, I tried it on a bunch of my projects of my own and, you know, it worked fine. It just did what it said on the tin. Doing it very quickly says, you know, unlike Flake 8, it didn't really read and reparse your source files for every plugin that you had enabled. And, you know, using seven different technologies to parse the tree and whatever, including some of them that are just regular expressions, which I think the a talk whenever it originated. So I was very happy to see this. And at some point, Charlie did kind of publish interest on Twitter about adding auto-formatting to this. So it was obviously very interesting to see, especially when I just saw him just randomly subtweeting parts of Black's code base, including some of, you know, kind of Easter eggs that I placed in the source code early on, and they're still there. So I knew that something is coming up and then he did have an issue open about like, hey, we're going to be doing all the formatting and I had a bunch of interactions with him and, you know, other people on the team during that phase when it was first, you know, announced, but not ready yet. So ultimately, what I think about RUF is like, it is essentially an improvement over what Flake 8 was. As far as Black is going, like, you know, I never wanted to be like the lord of Python formatting. Like I was never the point, like I just made it. where the main point of it was some level of consistency and output that was good enough that you could really just adopt it to stop the bickering that was just endlessly fighting for pieces of essentially white space on pull requests, right? Like, which is, you know, the biggest, I think, kind of productivity multiplier that you can have, just focusing on the semantics and just leaving the, you know, kind of the Aesthetics aside, there's already a lot of aesthetics coming from the fact that you're using Python. So you can have, you know, kind of more design-grade discussions and not just bicker about, you know, whether there should be two spaces before a comment or you should align it somewhere else, whatever, right? So that was my ultimate goal. And since Raph wants to be a drop-in replacement for existing tooling, It really only could be one for Black. It couldn't, you know, easily replace Yap since there is so many configuration toggles there that it would be very hard for a new tool to reproduce the output close enough that it wouldn't be disruptive. So obviously, even in the case of Black, there are differences between what Raph is producing and what Black is producing, especially that now in January, what is happening is Black is going to have a new version that is going to have a new edition of a style that has a bunch of tweaks that we worked on over the past year. And, you know, the formatting is going to shift a little. It shouldn't be a big difference, but there is always some difference between the years. So if Raph so far was very close to Black, it might diverge a little. This is not intentional, you know, to essentially make Raph's job harder, but it's just how Black was functioning before Raph came around. But still, since it's so close, I find it as a net positive for Python. I do want to see more people use automatic formatting. To be clear, and people who are close to me know this, the style that Black is enforcing is not 100% my personal favorite The Python Show early on discussions about, you know, edge cases of the formatting and some still controversial decisions like adopting double quotes for all strings and so on and so on. So those things didn't always go the way I would intuitively think about them. And some of the decisions that I kind of made in Alpha 1, the first ever release of Black, were later reverted because people were not agreeing with them. So the end result is sort of, I would want to think, like a consensus between a very large amount of Python Developers. Some of the earliest Python developers, so some of the most senior ones, including core developers, have very strong opinions on how code should be formatted and therefore on the Python team there is still like quite a bit of a controversy whether black is a good choice for formatting like internally in Python or not, you know, and yeah, there's nothing objectively I can do to fight this well fight this to essentially to convince anybody of anything like if you were Formatting your code in a certain way for 30 years like good luck bringing a tool that is doing something else and you know convincing people that this is all right, you know, so um I'm fine with some level of differing opinions there, but ultimately I do feel like, and I think this is justified given the rough format now, that the code style kind of defended itself. proved successful since like, if there is more than one tool, essentially enforcing the same line of thinking, even if the edge cases differ, I would think that essentially validates the initial goal and the initial approach. So I'm happy to see a rough.

  17. Speaker 3

    That's cool. I think it's cool. There's so many new tools that I can use to make my code better and make my, you know, my design and experience better in general.

  18. Speaker 2

    Right, yes, so there is plenty of other tooling that we are using for, you know, different sorts of communication and, you know, kind of improvement of code review and collaboration and so on and so on. So, like, I'm very happy to see improvements there too. What was, until recently, like, kind of not very, kind of, I don't know, like, Well, we didn't really have like great choices for those tools like was debuggers and profilers. And this is also changing pretty rapidly right now. So I'm very happy to see improvements in that kind of core area of Python since The Python Show is would be Welcome to felt like science fiction just a few years back where you can debug on your Mac a process that is running on a container somewhere else. It might be a different CPU architecture, it might The Python Show is You can now with VS Code just use kind of the remote debugging and everything that it provides. And I find that amazing. The tooling there really is growing for the past two, three years. I love to see it.

  19. Speaker 3

    That's really cool. I agree wholeheartedly. Oh, I was going to ask you, I saw you had started a podcast of your own. Do you care to tell us a little bit about that?

  20. Speaker 2

    Sure, well that was a bit of an unexpected development so what happened was after PyCon this year a bunch of us were talking about kind of The Python Show Mike Driscoll Mike Driscoll It is a bit dated right now because Python sees unprecedented growth like in the internal. So, you know, probably ironically for like Anthony, like just the kind of a lot of the pieces that he covered where he literally in the book says that some of those things didn't change for decades, like a lot of those changed just in the past two, three years. So I thought, you know, a book format, you know, kind of probably know what we want, because we want something that is more, you know, immediate, like tracks closer to the actual development. So I thought, you know, maybe some YouTube or whatever. But this is always something that, you know, even if I enjoy doing it, It takes a ton of work to deliver well enough because, you know, kind of the expectation of quality from a casual viewer is now extremely high. What people want is, you know, kind of fleshed, like well-fleshed, like polished videos that look super professional since there are high profile full-time YouTubers that, you know, kind of do those things. So, you know, kind of, I was somewhat shy on actually starting on this. And then what was it? Either in September or early October, I think, I think actually it was September still, Pablo approached me, Pablo Galindo, the core developer who is also the release manager of Python 3.10 and 3.11, works at Bloomberg, contributes to the Faster Python team, also, you know, kind of a physicist that specializes in black holes, you know, and a good friend. He lives in London. So he approached me and he said like, hey, I would want to do a podcast about those things that we talked about. But, you know, I think The Python What we really want is to let people know, in our own words, where we are going and what the things that we have now, how they came about. Since a lot of the discussions around, for example, why doesn't Python just do this, they stem from the fact that people don't understand the sometimes complicated history that caused, for example, exceptions to look as they are today, right? So we started doing, you know, episodes, episode by episode, this kind of format where we explore a bunch of details on Python, just one at a time. So I don't know, say the import system or exceptions that I already mentioned, or what does it really mean to remove the gill? And like, you know, kind of we read PEP 703, so you don't have to, and so on and so on. We actually started with just summarizing the core developer sprint that we had at Red Hat this year, not this year, in 2023, in October, in Brno, in Czechia. So yeah, like so far at this point, we released six episodes, so we still say at the start that this is a new podcast, since the sixth episode is still on single digits. But so far, we got a lot of encouraging feedback that, you know, people like the approach that we are taking. There is also some critical feedback, especially from other core developers who say you're explaining it wrong. So, you know, kind of, obviously, there are, you know, personal opinions, but we value any feedback, including critical feedback. You know, we can take it and especially from people we already know and trust. There's nothing wrong about saying like, hey, you know, just focus on this one thing like you might have missed it or last episode you said, say, which is actually true that, you know, MyPy has this, you know, exhaustive check for match statements that will ensure that you always have cases that cover the entire enum. Mike Driscoll The Python Show is in a kind of raw environment where you just have a simple text editor and so on and so on. So yes, we accept critical feedback, especially when it's very concrete about a particular thing like this. But yes, so far we have this bi-weekly cadence, six episodes down. Right, so I don't know. I invite you to check it out if you like to hear two non-native English speakers try to speak English while explaining Python to, I don't know, kind of regular, seasoned Python users, since what we are not doing is This is not a course for Python. We're not being, you know, kind of in the teaching Python space. We think that there are plenty of other resources that are better suited for this. And especially, I don't know, like maybe your experience is different, but I feel like it is sort of hard when you're trying to explain something in voice only and you're just waving your hands like, you know, kind of at the computer, but there's, there's no visuals that you can support your explanations with. So the discussions of internals, I think, are suited well enough, but teaching something totally new, teaching somebody to program, that would be, I think, a bit, you know, too much to ask from the listeners.

  21. Speaker 3

    Yeah, I agree. Yeah, it's more, I think theory type stuff is a lot easier to explain in just words rather than needing visual aids. So I wanted to ask you, which parts of the Python core have you worked on or consider yourself to be really knowledgeable about?

  22. Speaker 2

    Right, so the pieces that I work with the most, so as a user, definitely typing and I do enjoy a lot of async.io, so I know a lot of the internals of it well as well. Just from the fact that like I've been there when it was first released and when it was evolving. So I just, you know, it's easier to learn a bunch of things about the kind of internals of something when you are seeing it evolve kind of essentially in real time. Mike Driscoll and So I started fixing those and the fixes that I made landed in Python 3.2 and that was in 2010. What that means is for a good four or five years most people using Python never saw any of the changes I made because at the time Python 2 was still essentially ruling the land. Python 3 transition is a topic that we could spend an entire episode on. It was definitely very rocky. There were times where we were really second guessing whether Python will survive as a language, this kind of rift between Python 2 and Python 3. You know, so it really was only until Python 3.4 and in earnest 3.5 with the arrival of Async 08 and typing where I felt like, okay, actually there is enough adoption now of Python 3 that this will probably be a success. Like we can essentially, you know, kind of still keep going. At the time I worked on moving Instagram to Python 3, which originally when we were still working on it was with Python 3.5 that was released at the time. And then quickly after it got released with Python 3.6. So 3.6 and that following PyCon where you know the lead engineers behind the transition of Instagram to Python 3 had a keynote, an opening keynote at PyCon about like hey Python is, Python 3 is fine, you know, kind of the water is warm, you know, you can come in, it's fine. Obviously, like the entire point of the keynote was also, it's also a ton of work to move to Python 3, so nobody denied that. But you know, there were definitely wins that you could have from transitioning. But yeah, so the reason I'm saying all this is that When features are formed from the start, like typing, that I observed, like, you know, being a contributor, and asyncio, same thing. Like, it's easier to follow where they are moving compared to stuff like, you know, just frame evaluation that happens in C, Eval, C in Python. And, you know, kind of, it's something where this file was there, like, All along, from the first tarball that Nguido published on some news group in 1989 to this day, that was already a file that did essentially what it does today, only in a much more primitive form. So those sort of features are harder to understand and really kind of, you know, for a person that is new to dive deep into it, which is why I very often like to encourage people to still download old tarball, you know, some old version of Python. Mike Driscoll is the co-founder and co-founder and co-founder and co-founder and co-founder a talk Ask people about it. Obviously, that's the quickest way. But since I'm employed and they're volunteers, I don't want to waste their time. So I would spend more time actually doing sleuthing of my own and testing things on my own. You know, the simplest thing I can do is download this ancient Python, try to build it, which you can't not on, you know, on the Mac, since, you know, all of the tooling that you have locally is extremely modern and Python 2 will not build with that easily. But you can build inside a container and then you can learn to kind of understand the internals. So like say, you know, kind of frame evaluation I just named, but that's definitely not a place that I feel very comfortable with editing. But there's plenty of others like, you know, kind of the Cool.

  23. Speaker 3

    I've really enjoyed watching how the Python has changed, especially since 3.6. It's fun to see how it's growing, the type hinting has gotten easier to use. Async has also gotten easier to use.

  24. Speaker 2

    Oh yeah, definitely.

  25. Speaker 3

    And it's just fun to see how it's evolved.

  26. Speaker 2

    Yeah. Now that we have an annual release cadency, right? So you have a predictable calendar for when a new Python version comes out. You know, I got some feedback that that probably means that Python now is changing faster, right? But those things are kind of independent. Since if you're just slicing the sausage in thinner slices, you're going to have more of them, but essentially it's still the same sausage, right? So the kind of acceleration of development of Core Python, which is an observable fact. You can definitely see that there is more happening now that was happening in 3, 4 and 3, 5 days. So that acceleration stems from the fact that there is a ton of investment in Core Python right now. So the faster Python team working on the JIT and the specialized interpreter, you know, and all of those things is being sponsored by Microsoft and partially by Bloomberg as well. The removal of the global interpreter lock is sponsored by Meta, right? That was originally where the proof of concept Python 3.9 version and later on Python 3.12 versions were. produced by Sam Gross. Right. So a lot of that investment, you know, kind of sees through it through its like of the larger scale changes that we can now attempt. In fact, my own work is sponsored by Meta, whereas Petters is sponsored by Bloomberg and the PSF is sponsoring Sierhei. So, you know, kind of there is plenty of a very tangible results from just having our corporate sponsors just, you know, give money directly towards development of new features of Python and also for, you know, making sure that it is more secure, right? Like for example, Amazon is sponsoring a PyPI engineer, like that is Mike Driscoll As a user who never publishes anything, you can still get away with no second-factor authentication. But you probably shouldn't either. You should also just spend this minute or two that would be necessary for you to be able to secure your account. But if you're publishing things that maybe thousands or millions of downloads later on are going to consume Like, you should be more, you know, or like the most diligent you can be, right? You should be the most responsible. So second factor, authentication, definitely a factor there, like definitely something that we wanted to have. So yeah, now, thanks for, you know, thanks to the efforts of Mike, we have this. So I'm very happy to see this. And we have a core developer, not core developer, The Python Show featuring Mike Driscoll Now, he is working directly on making CPython better and more secure in terms of the entire ecosystem and how the general Industry perceives Python and the surrounding projects. One great example is Python became a numbering authority for CVEs. So now we actually have, for the first time in history, the ability to assign CVE numbers to vulnerabilities we identify, but also more importantly, to assign what severity they have. because sometimes, you know, well-meaning researchers would assign a kind of higher than reasonable severity just so that their discovery would be, I don't know, more important, right? And like kind of reach more people. There's always some controversy behind this because on the one side, if something is brought to light more, it's going to be fixed sooner and people are going to update quicker. The Python Yeah, I agree.

  27. Speaker 3

    Well, I think it's time for something completely different. So I'm going to ask you about music. I see that you're a music lover and musician. You've posted about that on your website. So what kind of music do you enjoy listening or playing?

  28. Speaker 2

    Well, there was a time, early high school, where I needed to decide whether I wanted to go into computers, you know, like hand-waving, what that means at the time, or into professional music. I was doing both at the time and it was clearly not working, since being like a professional piano player, a professional pianist, like essentially requires you to practice for multiple hours a day, every day. and that would mean I wouldn't be able to do all the practice that you just require to learn the skills to program, to do like all of those other things that was also interesting to me. And ultimately it was, to be honest, almost a coin toss to me because I felt very strongly about both of those things. So the fact that one of those ended up being likely right like more kind of like a nicer career path for me right like it was both more visible to me and something that was more accessible to somebody without any kind of background in computer science like from you know my family and the you know surroundings that I had I didn't plan for any of this, right? I didn't know that I was going into something that is more reasonable than becoming a professional musician. Like that was honestly not something that I was thinking of at the time. I just knew that I just needed to focus on one or the other. But I, you know, always say that I believe everybody should stand on two legs. So, you know, kind of if you do have just one of Python. But the danger of this is that now, kind of necessarily, you're treating everything very personally because it really defines you. It's everything to you. I find that this is very risky, right? For multiple reasons, like if there would be anything that would make it impossible for you to continue where you're going, it would be probably like a very, you know, kind of Very hard moment in your life if you realize you cannot continue on the path that you chose before. So standing on two legs having two vaguely or not at all related interests like is something that I just naturally gravitated towards and the piano stays with me and I still like play on it essentially pretty much daily These days more like, you know, kind of roadsy, e-piano, kind of jazz standards sort of thing. I do more of that. I do produce some electronic music, but I don't really spend too much time on this. But every day I will play some piano. That kind of calms me down and it's something that, you know, kind of to be able to have this three minutes of fame where, oh, there's a piano and you can play when you're meeting your Python friends for once a year in some random city in the United States. You need to practice so that, you know, when that moment comes, you will not just say, oh, I wish I had my, you know, sheet music because I don't remember anything. Right. So I just do practice, but you know, it's a, It's a thing that ironically is fun the more you do it because when you first read music and try to figure out how to play a piece there is effort there and there's this kind of focus that you need to put in consciously just so that you are able to play what you are supposed to play but after enough repetition you no longer have to consciously think about the kind of the rhythm, the melody, the positioning of your hands and whatnot like that takes care of itself so now you can essentially think of expression and with enough you know repetition of that too you end up having you know kind of the piece evolve a little so that it becomes more yours and at some point you just play it as if I don't know like it it was The Python Show is So yeah, music, it's important to me, like if you have something else, like that's amazing, but I highly recommend you having, you know, at least one other thing that you can kind of, you know, find the joy in besides your day job.

  29. Speaker 3

    Yeah, having a hobby or some other creative outlet is definitely recommended. All right. Well, I think we've reached the end of the show, but I wanted to thank you so much for coming on and being with me. It's been an honor to chat with you about Python. My pleasure. Yeah. Thank you so much. And we'll see you all next time.

  30. Speaker 1

    Make sure to leave a review.

  31. Speaker 3

    This makes our day and fuels future episodes.

  32. Speaker 1

    Mike Driscoll, The Python Show.