Menu
Sign In Pricing Add Podcast

Pablo Galindo

Appearances

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1002.493

So even if you are used to it and you can still say, well, maybe I can work with that limitation, it's very difficult to reason about it and to try to adapt it to your needs because it's really up to the OS who gets the kill or not.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1219.312

It also has other consequences apart from this particular aspect, which is correctness. Right now, if you have ever done multi-thread in a language which requires locks, like C or C++ or something like that, when you don't have those locks, then you go into this thing that people call undefined behavior. Unicorns can appear in your program and things can happen.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1242.974

In Python, because it's serial, like, sure, the results can be garbage, but it's not going to crash because, like, you know, it's just one at a time. And this especially happens as well on these C extensions or these native extensions, which can be anything. Like, if you have, you could think about it, like, well, you know, if I add one of these logs per extension,

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1260.92

Sure, I may have these problems that Gukesh is mentioning, but it doesn't sound too bad. But one of the problems, if you have many locks, is that now those locks can interact between themselves.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1269.267

So if one extension just happens to call another for any reason, like there is callbacks scheduled or there is actually direct interaction or something like that, those locks now can do things like deadlocking or livelocking or a reentrancy if you don't have something prepared. And remember that these extensions are made by different people. So now you have bugs that only happen across them.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1291.319

And that is a nightmare. It's a real nightmare, right? And Regil is basically protecting this because there is one single one. So all of them share it. So it's very easy to reason about it compared to not having it.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1668.034

We'll see. We cannot answer that. We cannot answer that. We don't know. So we're in the stage of... So actually, this is an important thing, by the way, which I don't think we have mentioned. This, in 3.13, indeed, there is a build of Python that will not have the Glow interpreted log, but you don't get it by default. You need to manually compile Python.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1685.526

I mean, there is people that are already distributing Python with this, so probably you don't need to manually do it. Like, you can fetch it from your distribution probably.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1692.19

Yes, exactly. But it's not the normal one. Like, if you install Python 3.13, it has the guild.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1700.936

Yes, you need to, it's actually called Python 313T. T. Or 43. Whatever. It's just the way it is. Sure. It's free-threaded. So you need to run that. And with that build, you can actually select a runtime only with that one. You can select a runtime if you want the guild or not.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1719.89

And this is very useful in case you want to try the performance difference or because you want to, like imagine, for instance, you are doing one of these libraries and you want to test if your library works with and without but you don't want to run your CI with two builds or whatever. So you can do it.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1734.202

There are consequences of this because, for instance, in Python over the years, we have added a lot of new optimizations. Like, for instance, one of the things that I think Lucas was missing on the reason Python is slow is that apart from this whole new direction, and it's actually part of the reason, but is that it's dynamic, right? Like, so this is very important.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1751.495

Like, if you are adding two variables, x and y, the interpreter is going to say, what is x? Oh, x is an integer. Okay, let me fix the code for adding integers. Okay, what is y? Oh, it's an integer. Okay, let me fix the code. Okay. And then the next iteration of the loop is going to say the same thing. What is x?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1764.72

So, like, it's very annoying compared to just, like, you know, here's a bunch of bytes, and I'm going to add this to this bunch of bytes because I know what they are, right? So in this particular case, precisely to avoid this dynamism, we have added a lot of optimizations that try to find this pattern. So they say, okay, you're adding these two variables together.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1782.366

But, you know, the last 3,000 times I have seen this addition, they were integer. So, you know, it's kind of a good chance that they are integers the next time. So I'm going to create this like super performance code that is going to just reach into the internals of the integer object in Python. It's going to grab the real integer and it's going to add it at CSP.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1799.253

It's going to get the result without asking all these stupid questions and then it's going to box it again into a Python object. And it's much faster. You can still have a float suddenly and it will de-optimize and whatnot, but that is a good problem. All those optimizations don't work without the GIL because they're not thread-safe.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1816.141

So if you use the single-threaded version or the free-threaded version, which is a bit of a mouthful, so you use Python 3.13 T, but you don't have the GIL activated, you also don't have the optimizations activated because we don't know if they are safe or not. So what does it mean? It means that the free-threaded version is slower in single-threaded.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

1838.496

So you only run one thread and you're using the Python 3.13 T version, it's slower because they don't have those optimizations activated.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2092.623

or no actually that's a very good point so one of the things that actually surprised me a lot because like we didn't knew one of the unknowns here was how the community was going to adopt this the reason being that it's just not that python needs to be multi-threaded that now if you compile uh c extensions which are really really popular in python right that's one of the reasons people still people so many people use python the language because you know all the machine learning doesn't happen in pure python it happens on

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2118.843

compiled code and CUDA and GPUs, but like Python is the driver or the glue. So all that code needs to be changed or adapted at least. Because like, you know, now you don't have that lock protecting you and like who knows what happens now, right?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2132.452

So you need to, which is really challenging because right now you need to go through the entire code base, like the huge thing and sanitize the code base through this particular problem. And there is not a manual for that if you think about it. So you need to reason about the entire thing.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2149.003

And we were a bit scared about how people will approach this or what will happen in the sense that if you don't do this or you don't do this correctly, it's going to crash all the time or it's going to crash just once every blue moon or whatever, right? So we don't know. So one of the things that we have seen, and it's really impressive, is that the community has jumped this incredible.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2168.354

People are building two versions of every of these extensions, one for the normal build, one for the free-threaded build, which is already huge, right? This double your CI time. That was your storage for the extensions. So it's a lot of work, actually.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2184.384

And there's a lot of people that are so excited to jump to these extensions and they try to fix it and reason and try these little locks all around. So all those people have been trying it. And one of the things I have been super, super surprised here is that

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2198.713

once you add like those extensions and you have like a final application like i don't know a machine learning whatever it is right or like an llm or whatever you're thinking that uses a lot of these things right it's just not one like like five six seven really complex one plus the interpreters plus maybe a web server something like that and then you run it through the free thread version it just works i mean again who knows like maybe maybe every saturday just

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2222.479

you know like you need your entire SRE team looking at it but like but right now like it's not mega crashing because what we thought is that this was going to immediately crash like when you add enough complexity to this because it's just a statistics thing right like the chances that there is some bad interaction when you pull out the threads and the amount of code that is here is just is inevitable right and it's still you know from time to time we find

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2246.306

very funky interpreter when like you know you call a method on something sometimes like another method is called because like there was something like a memory reordering problem which is a very technical like deep thing right but like like and debugging that particular thing is just hard but like that is very rare and obviously we fix it immediately

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2262.902

and we are really surprised about first how many people have jumped at this and they're super excited and they want all of those extensions and working and second how quote-unquote stable this is like meaning that how little bags we have seen in the wild like we expected many many many more right and we are seeing very little so so right now it's super super promising yeah like what what does help is that we do have the people behind it like some girls who actually did the prototype of 39 and then 312

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2394.141

It depends, right? If they are paid to make sure that the thing is stable, the recommendation is no. I mean, try it out, sure. You can get very excited, by the way. One of the things that we have seen, me, myself, right? For instance, I'm at the company I work, Bloomberg. is that we have tried to see what will happen.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2413.011

Even if it crashes every three months, whatever it is, but just to see a sense of what is the improvement here. Because if then down the line you're going to justify any effort on your side to adapt your thing to the free-threaded version, it's really good that you know what you're going to gain.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2429.017

So that for sure, trying, we really want people to try and tell us what they see and what doesn't work. Is this a production-ready workload? Absolutely not. Not because we know it's going to crash or anything, but because we don't know the real status of the thing, right? We take stability very, very seriously in the core team, so we are not comfortable right now.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2451.914

That's why the thing is called experimental. Because we are not comfortable right now recommending people, especially when you not only have the interpreter, but all these other things. And still we need to figure out good APIs for those extensions to hook into the interpreter and things like that. And that is not there. right now.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

247.867

Thank you very much for having us. Happy to be here.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2470.039

So the chances that we can look at these things and say, yeah, this can run in production, no problem, is almost zero right now. But as we release Python 3.14 and 15, we will move this experimental into supported, which means that you can run it in production, but it still will be two versions.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2488.15

And eventually, when we gain enough confidence that this is the future we all wanted, it will be only one Python, which will be Python without the free-threaded version. But until we call it stable and, you know, supported as the keyword supported, I wouldn't recommend people to actually use it in production environments.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

260.449

Yeah, when people are fed up of listening to us, and then we reach someone to...

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2702.948

As a clarification also for the people that don't know, PyPy is not a JIT for CPython. It's an entirely different interpreter. So it's like the same language, but it's just a different interpreter written actually in Python, which is JITed then. But it's a separate thing.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

298.247

So we started actually one year ago. We were in the Right now we are in the co-developer sprint at Meta.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2982.113

Well, one of the things that is very exciting with the JIT right now is that the approach itself is quite cool.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

2988.719

Like, for instance, if you're making a JIT for a dynamic language, one of the biggest challenges is not only, you know, adding the infrastructure itself for a particular CPU, but like architecture is that you need to do it for all of them and for every single OS because, you know, at the end you're writing machine code and machine code depends on like, you know, your CPU or

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3005.555

architecture, your platform, you know, so you need one. So the JIT is not the JIT or as we like to know, call it legit. But, you know, you need one for Python, sorry, one for Windows, one for macOS, one for Linux, but also one for AMD64, one for AR64, one for ARMv7. So you can imagine how hard this actually is because You basically are implementing a compiler, right?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3030.58

But this approach that the brand is taking not only has the advantage that is basically leveraging an existing compiler behind, in this particular case, LLVM, but also is doing it at the front. So it doesn't happen at compile time. All that assembly code has been generated before, and the only thing that we need to do at runtime is stitch those things together. So we have these templates.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3052.231

So Clang is basically, or LLVM is not a runtime dependency. It's just a build time dependency. So you build all this assembly code, and it uses the native compiler for your platform. So if you're in some forsaken platform, like, I don't know, AAX or something like that, it will work if you are able to run Clang there. So that's great, but also,

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

306.314

So this is basically a meeting that we do every single year when we try to bring all the co-developers together and, you know, the sparks and conversation in person because, you know, open source is basically based on asynchronous communication, but from time to time it's very good to, you know, not having to discuss and wait like an entire day just to tell the other person, I don't like your proposal.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3070.297

which is really cool, and most JITs need to also implement themselves, is that we are able to leverage an optimizing compiler for this particular workload. So not only that assembly code works for every architecture because someone else actually implemented the backend, but also we can leverage all the optimizations that everybody that's using LLVM is using.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3089.542

It's the same optimizations that Rust is using. Rust is using LLVM these days still. And they are using, I mean, if you program the IR, the intermediate representation correctly, and then you are able to leverage that well, which is not, you know, it's easier said than done.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3102.549

But the idea is that now you can use this set common of very, like these many years of compiler research just to make your code faster. And you can just leverage that immediately as opposed to having to reimplement all those things and have like SSA ourselves and like, you know, dreaming and all that stuff. Like now, you know, you just run Clang and you get some

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3122.623

super cool assembly out we need to just stitch it together and feel like the symbols and whatnot but like it's a much like you can get results much much faster than we need to implement a full-blown git for uh for for python so very excited it's like a jit factory yeah right you guys use factories in python git template factory yeah

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

326.095

So after that, these meetings have a lot of discussions, and they are super rich regarding that. It's fantastic. It's one of my favorite moments of the year. And so I reach to Gukesh, and I say, it would be actually very cool, because what happens here, people don't really know the discussions. They just know the output of them.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3332.925

Well, this guy implemented that idea. So what do you think he's going to say?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

344.918

like there is many of these projects that you know take years or like they only show after a time and there are some of these projects that just die and they never happen and I was telling Gukes like it would be super cool if we have this space when we can talk about like you know how the sausages make right and all these crazy ideas that we're having and how they kind of transform into it because like there is this I mean to some extent it's improving but there is this perception from people that core developers are these alien developers that you know like they go into this room and then

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3530.267

Well, as the other release manager of Antim version now. So I release 3.10 and 3.11. I mean, one of the problems that this thing, I mean, it has worked really well, I think. Like people in general, and just to be clear, like, you know, so Wookas doesn't kill me after we finish the podcast. I think it's a positive change, right? So in general, very good. I think it has been some predictability.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3553.902

People actually now have like, you know, dates and they can, you know, put their lives around.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3559.486

one of the the interesting you know side effects of this is that now people have this this impression that python is releasing too often so every single year is a new version and then the old version is like you know um out of uh support or like first back fix support and then security support so they have this feeling that you know they're going to be uh if they don't move fast enough uh they are going to be able to support super soon which which was always true is that

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3585.134

you get the numbers changing slower. So the impression was that it's happening slower. But right now, this is moving this impression that Python is changing too quickly, right? Or whatever it is.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3594.257

The other downside that this has is that, as you can see, for instance, for Python 3.13, it means that because we need to release every single year, we're releasing these features, maybe like big ones, like the Nogil or the JIT in particular, not being super exciting. So for instance, JIT in particular is 0% faster. Well, it's kind of cool, but why would you use it?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3612.162

If we had a two-year release, maybe it would be a bit better. So you get these weird situations. So planning big projects right now is a bit more challenging. For instance, one of the things that happened in Python 3.9, if I recall, we changed the entire parser of the language. Different parser, which I'd like to describe as changing the wheels of a car that is moving. Not the best feeling.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3637.996

We could have some extra rest if that was a two-year release cadence and we didn't have to finish everything and all the validation in one year. I mean, this doesn't mean that it was rushed. It's just that we have to put more hours just because we wanted to make to the release. But on the other hand, like this, you know, it's humans making it.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3655.122

So even before when the situation was, like Lukasz was describing, the day of beta freeze, which is the moment when no new features can come in and only backfixes from that point on in the release, everybody was rushing their feature on the last day, you know, like, All the new features. Humans are humans, so it doesn't really matter.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3677.011

Certainly the heat has been raised a bit because right now it's released more often and the numbers are changing faster.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

374.741

Python happens. But it's just like, we are just regular people, right? Exactly. So our idea was first kind of demystify the code development thing. So it's not just, you know, we're just regular people, right? Just doing the thing. And the other is that trying to inspire people to join this, right?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3839.628

Yeah, psychologically speaking, that's a very good point, actually. I'm glad that you mentioned it.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3843.79

Because one of the things that happens when you release every two years or more, especially for a language that needs to evolve and needs to change things, and maybe doesn't have... I mean, we can add our backwards compatibility, don't get me wrong, but other languages like C++ clearly care even more. So for a language that changed this much,

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3860.458

changing and adapting your code and all the libraries for a two-year worth of changes is brutal. Which means that, and we saw that before, right? Which means that until new libraries are compatible with the new version, there's a non-trivial amount of time.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3874.367

So as a user or as a company employee that you want to leverage these new features, you probably want to wait a lot because now people talk about scheduling the work and finding even how much it is. And library maintainers say, well, I will fix it later. But when the changes are smaller,

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3890.898

that is like, psychologically speaking, obviously, in reality is more or less the same, modulus and nonlinear interaction. But in general, when the changes are smaller, then it's more enticing because at least you know, okay, maybe this, this, this, and this thing. And sure, maybe you need to wait for another library to do it, but like,

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

390.849

So ideally we can talk about like not only the price that we're doing, but also like how high it is or how we struggle. And And we try to always have some inspirational notes on the episode so people can say, hey, maybe this is something that I want to do. And then, and this was a good idea.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3905.769

Normally, like right now, what we have seen compared with 3.8 when we started doing this, right, is that people jump earlier. Like before, for instance, one of the biggest libraries is NumPy, which is numerical computing in C and Fortran and whatnot. So that library used to take a long time to be compatible with new versions, like months or sometimes even like half a year or something.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3929.046

And right now we are having it almost day one. So this is fantastic because people that want to use the new features in the language, they are not held back by the fact that their own particular dependencies don't have the support for this.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3944.279

Most of these things, I don't think you can approach it from a data-driven kind of, like, perspective because it's very difficult to say what is better, what is worse. But, like, certainly, like, you know, from a psychological point of view, I think it's, again, I think you have a very good point. Like, not too soon, like, not too often, sorry, but, like, also not too, like, lagging behind.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

3962.331

I think it's, earlier is better, maybe not too early, like, every three weeks it will be impossible for a compiled language, like, We will ship a JIT compiler that unoptimizes your code, right? It will be like 6% or something. But one year, yeah, good.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4011.958

I think everyone, a non-trivial amount of listeners probably are saying, what is that wheel? What is this thing?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4036.926

Is this another word for a build? It's like a build? Basically, it's a binary package. So it's a package that doesn't contain Python code only.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4045.832

Well, this is the key, right? Because the Python package index used to, well, I think it still is, it's called a cheese shop because it's all about these Monty Python references and jokes, right? So it's a sketch of Monty Python that goes to this cheese shop. And a wheel is a wheel of cheese.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4063.202

taking that one a bit too far maybe or like pip do you know pip I mean this is a slightly different joke but like do you know pip pip is a package installer for python right so when you install python you do pip install do you know what pip means python install packages pip installs packages Yes.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

407.086

We also try to highlight contributions that people have done because like at the end of the day, you know, people only know the big things, you know, okay. new parser or the JIT or the garbage collector or whatever it is. But there is a lot of very cool contributions for core developers or regular people that are contributing to CPython.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4080.19

Recursive acronym.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4088.954

Right. So, well, you know, I was missing this reference for years and someone pointed it out and I was like, well, I suppose it makes sense.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4099.258

No, I think it's one of the Flying Circus, maybe?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4113.868

I think it's not helping for Python programmers to look like they're in a co-win or something.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4164.55

Someone jumping in the middle of the podcast listening to us talk about eggs and snakes. Wasn't this about tech?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4188.664

For instance, one of the funny ones, one of these attempts at Git compilers from back in the day, I think from Google, was called Unladen Swallow. From the Monty Python Life of Ranger? No, no, no, sorry.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4201.73

Holy Grail, yeah. The speed of the Unladen Swallow.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4237.767

Well, not quite yet, I would say. So see, Python has a very old build system. It's AutoTools, which is this computer make. People that have been doing Linux for a long time probably have run into this. And one of the challenges of this is that And then it's another different for Windows, but both macOS and most Unix platforms use that.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

424.423

So we spend at the end of the episode some time trying to go through the last, we call this section, what's going on in CPython. And we try to highlight the different things that people are doing so people know about them. And hopefully if a name comes again and again, people say, I know that person.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4260.416

So for a long time, that was okay, but there was a lot of platforms that we couldn't support, partially because of the build system and partially because the source required changes. Like many of the things that we're, the efforts that we're trying to do right now to make Python available in the browser.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4276.705

I don't know if you have heard about this, but right now there is a good effort to ensure that Python can run in the browser and it's a good alternative to JavaScript. This is a project, for instance, called PyScript, which allows people to run like Python instead of JavaScript, which is quite cool. So those require changes in these build systems and even in the source of itself.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4298.103

And iOS in particular has quite a lot of challenges. Actually, probably Lucas can chime in to specify those since this is very close to his heart. But one person in particular that has been working for iOS support, which is Russell Kim-McGee. Yeah, he works right now at Anaconda, which is one of these Python companies.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4316.659

So he has been working quite hard to ensure that both the build system and the source itself works on iOS, which has a lot of challenges, right? Because iOS has not only an alien way of doing things, but many APIs are not available there, or other apps are not available, but you need these specific things that you need to upload to

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4335.911

bless you with their power just to be able to use the JIT compiler. How does the JIT compiler write in iOS? Who knows?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4616.067

Right, also conceptually, speaking is not different from the first use case because like you're not going to have one single Python in the app store that everybody can use and you know you need to like have everyone will have a different Python version so it's a trivial embedding so you're not embedding this on a text editor you're embedding it on a binary that is just Python Yes.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4634.709

But you also want to see, like, you know, not only your Python code, you want to see your dependencies as well, right? So now, this is the same. Like, if a text editor, you want a text editor to have Python inside to do some extension, you may want some extensions that Python can do to interact with something else, right? So maybe you want also that on the dependencies.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4653.093

So it's technically, you know, if you screen hard enough, it's really the same case. It's just that for the developer that just wants to put some files and maybe to say, I require this and that, that's a lot of work. You're in the business of compiling Python yourself. What are you talking about? So it's much better if we can offer a specific workflow that says, okay,

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4676.594

If your case is only like this and that, and you only have these dependencies, then you just click this, put this here, and the build process will take that for you so you don't need to. But conceptually speaking, it's just a dev tooling, not really a huge undertaking.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4844.801

Well, in my case, I think, apart from what Kukash just said, I think the key for me is that this pays off, which is not trivial, right? It may pay off for some users, for sure, that are really hungry about this. But what I really want to know is that people, you know, for a lot of time, removing the guild has been almost like a joke about, you know, this is what is missing.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4867.378

This will be the last thing and everything will be so green and fantastic when we remove the guild. Well, no, no, no, prove it. So I want to see everybody saying, now that there is no guild, I finally can do this and this thing, which is not going to happen fully, because people still will reach to other languages for other reasons and performance. But I just want to see a big impact there.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4889.487

And ideally, we talk again for 3.14, we are saying, okay, this makes a difference. So it was cool, sure, and some people really like it, but wow, now it's a different play field. So it's different.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4901.596

The other thing that I would like to see, and this is a bit more personal, so this is a project that I started, I think, in Python 3.10, which is that a lot of people were complaining that the user experience of the language was not really great in terms of messages and things like that. So syntax errors, and you mistype something, or there is some important problem.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4924.193

So that was really bad, to the point that there were some situations that was laughable.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4928.656

And we have worked quite a lot with the new parsers and with many other improvements to improve this to the point that right now I'm super happy to see that many, even papers that are researching error messages are citing Python as one of the, obviously not in the same category as Rust because we can all agree that Rust has fantastic error messages.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4945.956

Different kind because those are compiled time error messages that we're talking about runtime ones, if you don't consider the parser bad. But we are right now quite high in that sense, to the point that I think there was some research about how LLMs can reason about what's wrong about your code from the errors.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4962.346

And you run it in 3.11, it was like a 30% better performance of those LLMs just because it's telling you a bit more, right? So you can fix the code a bit better, which is quite cool.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4974.591

So we continue doing this thing and we are trying to add even bigger changes to the interpreter that help in this regard, which is challenging because those changes sometimes require some non-trivial performance games there. So obviously we don't want to affect performance, but to do that, we need to put a lot of engineering there.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

499.155

I don't think this 1x is enough.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

4992.41

So in 3.14, we are probably going to try some new ones that are quite big. So hopefully when we talk again, those have actually been implemented and they have been successful, which I would love to see.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

5068.865

Yeah, thanks for having us. It's been a pleasure.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

507.422

We, as an anecdote, a small anecdote, we at PyCon, this is this big conference that happens every year. Well, there's several other ones, but the big one is in the US. So I normally just normally give like a talk every year. So especially in PyCon US, there is these people that try to transcribe live. So like people with hearing problems can read. So it's really, really cool.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

527.598

And this year, before giving the talk, I apologized to the person. It's like, I'm really sorry about what is going to happen, but I'm not being able to speak slower. And she was like, yeah, no problem. But like, oof. She really struggled with that.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

704.471

Right. So the GIL is basically a ginormous lock all around Python. So when, like Python is really, you know, is the language, but it really doesn't exist, right? Like it's an abstraction. And really, normally there is a second language behind. In CPython it's C, which is, CPython is the default implementation of Python that normally people use. There are others.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

724.233

But then when this program that is the Python interpreter is executing Python code, it can have multiple threads at the same time. And all these little objects that Python exposes could be mutated at the same time, which is a problem. And Python in particular, Cpython as well, and most of the implementations is reference counted.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

741.916

This means that to decide if an object is still alive or the interpreter can actually get rid of it, we have this little number inside every object that tells how many different structures or fields are using it. When this number reaches zero, we know that we can remove it.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

757.288

But as any person who has done some multi-threading in computer science knows, having a little number being mutated by multiple threads at the same time is not bueno. So the solution is basically to add a ginormous lock all around the interpreter. Because we don't know what the threads are doing, we need to just basically lock the entire thing.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

777.623

So this means that only one thread at a time can be accessing Python code and executing Python code. which means that you can still use threads because those threads can switch from one to the other, which is what we call concurrency. You don't need to wait until one thread finishes to start the other.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

794.239

So they interleave, but there's no parallelism really because only one thread at a time can be executing Python code, which is a big problem in these days when we have... you know, machines with 120-something cores if you have a repair or servers, right? Or even your phone, right? Like, your phone has plenty of cores.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

813.917

And right now, you're running Python on iOS, which is now, I think, by the way, this is something... Python on iOS is a thing as well.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

928.699

And what is worse, one important thing here is that technically a GIL is more than just a lock. It's a condition variable, which is a very specific kind of synchronization primitive. It's a Boolean that tells you if you have it or not, and an actual lock. And the thing is that you cannot select which, like when one thread says, oh, I don't need the GIL, like someone else, you know, pick it up.

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

948.956

You cannot select which one is going to do it. Like this is up to the OS. You are using Linux, so the Linux kernel decides who is the next one. And this can be Not great. Because the Linux guild may not know what you're doing. So you can have one thread, for instance, that is super CPU hungry. It's just crunching numbers. So that thread is all the time wanting this guild, right?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

968.61

And then you have many threads that are doing this IO operation. Maybe they are waiting on a socket or something like that. But because of how condition variables work and the scheduler in Linux works, which you can pick a bit, but not from Python normally, that CPU thread will pick up that condition variable and the guild many more times. So it's almost like a race, right?

The Changelog: Software Development, Open Source

Free-threaded Python (Interview)

986.182

When the guild is released, It's like you have a gun in a race and you fire the gun to signal that the race starts and then all the threats try to grab it at the same time. And the first one that has it, that's the one that wins. But there is nothing preventing that threat to keep it getting it the next time and the next time.