Łukasz Langa
Appearances
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Yes, well, like, it depends. It depends, yes. It's a factor. Tell me why. Right. So first of all, the speed of Python is mostly affected by the fact that it does a ton of indirection. The thing that costs the most in computer science, say for bad algorithms, is indirection.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So every time where some language can just point at memory, read a value, and it's done, it's going to be faster than a language that, well, actually everything is dynamic. So you point at a value, but then that value has another value. So you have to go somewhere else in memory to read another value, then decide what to do. and read yet another value.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So every time in Python that you're accessing an attribute, you're executing a ton of code compared to accessing a field in a struct in C. So that's going to be the main factor of it being slow. But the way where Gale is hampering us is scalability, which means simply for things that you could parallelize, you cannot do that effectively.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So this is where the reputation of not really scalable comes in. But ironically, the GIL also makes Python faster than it would be without it. The reason why is because reference counting is a major reason for the global interpreter lock's existence. But it's not the only reason you need a lock in your interpreter.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
There's going to be internal data structures like dictionaries where if you insert another key that wasn't there before, maybe there's going to be some rehashing that happens, right? So suddenly the simple operation is going to take a little more time than usual. So there's going to be a time, a split second where the internal structure of the dictionary is inconsistent, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
For example, you would be able to see that it has more elements in terms of count than you actually are able to access or you're going to be trying to access an element that is there. It claims it's there, but you cannot get it yet because the dictionary is being mutated, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So for all those things, and there's plenty of cases like that, the global rapid log is very convenient because we are already holding it because we care about the reference counts to be always correct. So there's no other lock we need to care about. And this is actually making matters cheaper because we only have this one. And once you hold it, you can just run and it's great.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
And plenty of authors of C extensions like NumPy and so on can also depend on the fact that as soon as you have the golden number lock, you have a lock that you can yourself depend on for your own synchronization needs. So now, without that, you're going to have to have fine-grained locking. So for every of those use cases that require synchronization, you're going to have to have a smaller lock.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
And it turns out that if you do this, then you gain scalability, but you pay the price of single-threaded performance, since catching, you know, being able to acquire multiple locks is necessarily slower than just doing it once, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
This has been many years in the making.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
slower for now or slower for good right for now great question so let's maybe take a step back and explain the kind of strategy that we took with this particular project which is a huge undertaking but at the same time we have a release cadence that releases pythons every year predictably in october you're gonna get a new version of python
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So there's no way you can shove a big transition like this within 12 months. So what we're doing instead, essentially what you're getting is a state of the project as we are in right now. So there are things that we still need to do that are still not done.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
most importantly this split for the main interpreter still having the global interpreter lock and so on and an experimental one that you have to build yourself and then you can run without a governor block that is deliberate because with all those costs that we described um we really need to reach out to the community saying like look this is now not an idea you can actually grab this python
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
and check whether this helps you is it better is it worthwhile the scalability for this extra complexity within the implementation and maybe this cognitive complexity that is going to be sort of passed on to the user is that worth it so the community will have to now step in and try out this new python and see okay this is slower than the non-sorted version but that's hopefully temporary but
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
the question to answer is, does the scalability that this enables help? So we really need them to give us two thumbs up, like, okay, keep actually working on this. Since this specialization that Pablo described and the JIT compilation that follows from that and so on and so on are obviously features that we really want to have, including in the free-threaded version.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
And there are ways to go around it, but they are very complex. It is in fact like on the bleeding edge of computer science as we know it. There are plenty of known strategies for improving performance of interpreted languages. that are single-threaded. For free-threaded interpreted languages, this is really where the science sort of is still unclear, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Because JavaScript, there has been so much investment in that, like making that fast with V8, right? Like in Chrome and so on and so on. Well, that is single-threaded for the intents and purposes of our understanding of the interpreter. With a free-threaded Python, how to make that fast is more of a challenge.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Literally, members of our team are going to be the people writing papers about this later. So this is going to take time, no longer than one release, longer than two releases. But at the same time, we want to release what we already have so that it's no longer just a pipe dream. It's no longer just a plan or idea. Users can actually experiment with this and tell us, okay, this is actually awesome.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
This enables a use case we couldn't even try before. Because that's our chicken and egg problem. Before we actually enable this, we don't see... use cases that are now impossible. So we cannot tell whether there's an untapped area of Python usage that would be now enabled with free threading. So this is what we're doing with 3.13. This is essentially this current state of the project.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Now you can experiment with it. You can see whether you're web framework is going to be faster now, whether now you're going to be able to process data in parallel and so on and so on. This is essentially, you know, one step of a longer project.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
now who is working on making this for 3.13 and forwards, is being helped by other engineers who are like really into this and are able to find threat safety issues and data races and so on. We were able to set up threat sanitizer, which is very complex to set up in an interpreter environment like Python. Turns out it does help us with finding those issues.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Some of them are pretty funny, like figuring out that for this entire time, the thread handle in Python was not thread safe itself. Or the threading lock was not thread safe itself. So once you actually did the operations of locking, yes, those were thread safe. But the Python object that you used was not because it didn't have to be. And now all of those things have to be actually fixed.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So they are probably formally correct now. So yeah, there's been a lot of work, and a lot of work is still to be done. But our hearts are warmed by how little terrible and unsolvable issues we've seen so far. Some of them are complex to debug and complex to diagnose, but we've been successful in improving the situation so far as we go.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Yeah, production environments. However, I would be a little more optimistic about this, saying that if you are an end user, probably the kind of the amusement park is still being built for you. So like this is this is not like something that is ready for end consumption. unless you are really just trying to just see how pure Python works without all the libraries that you depend on.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
However, if you are a maintainer of a library that a lot of people depend on, you might be interested in checking it right now. So we already see plenty of interest from the data science libraries and web frameworks and so on and so on. And that's exactly the right moment for them to,
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Every now and again, we would invite a guest, but mostly it's just the two of us.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
to identify whether there's any blocking issues or whether the gains are not enough for us to justify the change, or maybe the opposite, or maybe they're amazed at how better things are right now. And like, funnily enough, even things that were not ever designed with free threading in mind, like asyncio.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
You run the test suite of asyncio and it's just faster on free threading because it just can magically utilize the fact that it is now truly parallel. So there is promise there. Definitely we expect that once the library authors actually go through some of those hoops that are required for their things to be supported by the free threaded version,
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
we're going to see uptake on more libraries and then more users and so on. So now's the time for the library maintainers to check it out. But for end users, it is a little soon.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Right. So the JIT is still one of those other topics that I remember being this big pipe dream of CPython for as long as I can remember. We grew a few attempts to have a JIT in forks of Python or entirely new Python interpreters. Most of those efforts failed. There's one holdout that is actually doing very well. That's PyPy.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
And that is actually JITed, which proves that this language can successfully use this performance strategy for good results.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Yes, it is an entirely separate technological stack. It is attempting to be bug-to-bug compatible with CPython. People adopting it have seen, your mileage may vary sort of results where it might be really a drop-in replacement in some cases. It might be more tricky to actually adopt it otherwise.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Plus the approach of Jiting they're using has some characteristics with memory usage being larger and so on. So it depends on your use case. But obviously the most popular version of Python is CPython is the version that we are working on. So this is an idea that just comes back and comes back and comes back. Like when will... Python have a just-in-time compiler.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So to a large approximation, if you squint really hard, this specialization that Pablo already mentioned is sort of slowly becoming a form of what digits are doing, which is to remove all this indirection.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
But the last step that they did not take so far, those optimizations, is to actually replace running this C code with this C code with an actual compilation to machine code as we go dynamically, which is what the JIT is doing. And Brandt Bucher, one of our core team members, found out this paper about how you can automatically generate a JIT
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
for the Lua interpreter and how it is slower than a handwritten JIT, but not by that much as you would expect, and it is much more maintainable. And using this approach with this additional machinery that is needed for the just-time compiler that tries to compile during our build time, like the simple opcodes that are later glued together to this JIT,
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
optimize machine code and so on and to discover whether that trace that we're running is still correct or maybe we need to throw it away because we thought this thing that we're running is like adding two integers, right? But now we're seeing, oh, there's a float that we did not expect. So we need to throw out this optimized code and actually go back to the interpreter again
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So all this infrastructure is already in 3.13. And so far, we can proudly say that with all this added, Python is not slower. 0% faster. Yes, it is 0% faster because, again, with the release cadence that we're having, 12 months of work. is a lot, right, obviously, but it is not enough to like just say we started from zero JIT and ended up with a mature JIT like V8, we are done.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
It is just simply impossible, especially that our team is much smaller than the V8 teams, much smaller than the Java hotspot team and so on and so on. So yeah, so far there is another experimental feature in Python 3.13, which is the JIT. You have to compile with that and you have to enable it when you're running Python.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So it does not have most of the optimizations that you would expect from the just-in-time compiler. Because that entire technology of just-in-time compilation is essentially a framework on top of which you can now make optimizations that make things faster. For example, if within the trace that you're building, connecting all those machine code blocks that are now faster and removing
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
indirection, you have multiple checks whether something is none or something is an integer, you can move that check of that same piece of data to the front of the trace and just do that check once and you don't have to repeat it in different parts of the code and so on. and to make sure that the traces are as long as possible. Those are different levels of optimization.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
You want to JIT relatively quickly so that people can see the uplift very quickly, but you don't want to JIT every code that is being executed because that would make the memory usage, crazy. So there's things that you need to dial in there and implement. So it is very much an in-progress project.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
It looks very promising, but so far Python 3.13 is a snapshot of the current stage of that effort as well.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Yes. So, like, we can make this, like, good cop, bad cop, or, like, you know, actually, like, devil's advocate, and, you know, like, this guy who's trying to buy this, this is good. So, I'm also the release manager of some ancient Python versions. In fact, when Python 3.13 comes out, the first version I released, which is Python 3.8, is going end of life.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So, you know, we're going to say goodbye to that. It was a very, very... you know, nice release, I really enjoyed Python 3.8, but it's time to move on. So if your use case, if your production is still running on 3.8, well, now it's high time to move since it's not going to receive any security updates anymore.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Right, so at the time I joined as the release manager, the release process was a little bit hand-wavy in terms of when are we releasing Python. So the theory said we're releasing it every 18 month-ish. But it could be anywhere between 18 and two years, and you couldn't really tell. And definitely what you could not expect was which time of the year is this gonna happen in.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
And the consequence of this was that Linux distributions in particular, but also other operating systems and users, were lagging behind adoption of Python 3 versions a lot. People are like, well, Python 2, no, because Python 2.7, right? But Python 2.7 was out and then essentially frozen for... a long, long time.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So people forgot how this thing looked like before in times of Python 2.3, 2.4, 2.5, 2.6, and then 2.7. That unstable release cadence was problematic. And that cost, for example, for Fedora, which later is source for what is happening in Red Hat, was lagging behind with the releases that we had.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
And it turns out that the infrastructure that the big Linux distributions have, like Ubuntu and like Red Hat, is extremely useful for us to early find bugs in a new version that we are developing in the betas, in the release candidates, and so on.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So it would be worthwhile if we could actually ship the newest version of Python with those Linux distributions as they are also developed and go through their respective betas and so on. That's also great for the end user, right? Because then by your autumn release of Fedora, you are released with the newest version of Python that was just released. That is a great experience for the end user.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So I... wrote a Python enhancement proposal document arguing those things that I'm just telling you, that it would be amazing to have a fixed release cadence that we can trust and share with the Linux distributions such that they can essentially rely on us having certain milestones in the release, like reaching beta one, like reaching release candidate one.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
so that they can use the latest version as soon as possible. And we switched to the release cadence in Python 3.9, and we've been using it ever since. So yeah, Your Honor, that's my position on this issue.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
I guess for compiled languages that might in fact work better, for us the difference is that we're interpreted. So there's a lot of code that is lying next to your interpreter and then you're trying to run it with whatever is available to you. With a lot of the libraries that we're supporting, they're a particular issue. So now I'm going to be the devil's advocate because Pablo was too apologetic.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Wow, wow. Sounds right. Yeah, let me just say like, hey, this is all a compromise, you know, and there's obviously going to be things that are better and things that are worse. The price to be paid for shorter release cadences is that the matrix of tests of CI that a library maintainer has to now kind of suffer with, has to run, is larger, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Because the number of versions that is out there that people are using, there's just more versions than there were before, right? You had 2.7 and 3.6 maybe, and then 3.7 appeared some 18 or 19 months later, so... then the growth of this matrix was sort of spread out in time. Now that matrix is bigger.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
I would claim that, okay, it's good that we're testing with every particular version to identify where an incompatibility arose or something. However, I always like to say that it's still the same sausage. We're still the same sort of team that is developing the thing. We still have the same velocity, only we slice it thinner now.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So every release is easier to migrate to compared to the last release because necessarily there were fewer changes.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
I want to add one thing. So NumPy is not doing as well as Pablo is claiming. They're doing way better. There are already wheels for Python 3.13. Before the release of Python 3.13, those wheels are going to work on the final version of Python 3.13 released October 1st. We're releasing this like mid-September. They're already there. Moreover, they're also already there for the specific version
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
that is this experimental interpreter that does not have the GIL.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
It's this binary package that lives on the Python package index on PyPI that people download NumPy from when they say pip install NumPy. So if you say pip install NumPy from Python 3.13, on day one, you're going to be using wheels that are already there before the release of Python 3.0.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Yes, one of the episodes of the Flying Circus has a skit about the cheese shop, and that's where that comes from.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
But you just need to have some file extension for those things and some name for those things. We used to have a more primitive, early format for this sort of thing, and those were called eggs. Eggs were because, you know, snakes lay eggs, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So that made this other sort of reference, because Python and the name comes from Monty Python, but a lot of people just see the name Python and they're like, yes, snakes are cool, so snakes. We accept both sort of ways of interpreting this because snakes are indeed cool, yes, sure.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
But yeah, now that we knew that eggs are not enough for what we need for proper binary packages, we were like, where to go now with names? And naming is hard, let me tell you this much. Naming is very hard.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
But yeah, they're very obscure these days. It's an increasingly old and hard to get.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Probably cannot. Maybe let's start from the very beginning there. So the goal that we have with this iOS support, for the time being at least, is not to have an application on the App Store called Python. That's not what we're doing.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
What we are doing right now is to have the Python distribution, the source distribution, ready entirely for being embedded within another application that somebody wants to release on the App Store for iOS, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
This was theoretically possible in the past with already a ton of hacks that Russell Keith-Magee historically made for a project called Beware that is just running Python on mobile on both Android and iOS. But the Python source code, our source distribution was not making this easy.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
There are plenty of changes that you have to make because the phone platform that Apple came up with is very limited. It is limited by design such that it's more secure and it doesn't waste your battery too much and it does a bunch of other things that make it easier for applications to be just swiped up to kill them and they don't run any runaway processes and whatnot.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So there are APIs there that are not allowed. There are others that are just not implemented, so they're not available. So you cannot run threads and so on. So this sort of thing causes embedding Python to be complex. Then there's the new and increasingly strict rules around when you're packaging some sort of binary blob and want to put it on the official app store for Apple,
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
They have this automated and sometimes in person, but mostly automated review process, whether what you're publishing is safe. So there's plenty of things that interpreted language like Python would do that would be flagged by those automated systems as unsafe, that this code is doing something fishy.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Experience. It's just a matter of just doing this for long enough. We've known each other for a few years before that. So I was prepared for the Spanish 2x, you know, speaking speed. Yeah, built in 2x. Right.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So there are changes needed for those things to just pass review so that your application that embeds Python can successfully actually appear on the App Store. Like including until very recently, you couldn't really have just dynamic libraries lying around in your bundle that you're publishing on the app store.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Everything had to be statically compiled, which puts, depending on libraries like NumPy, into jeopardy because it is very hard for external C extensions to be built in a way that they are both all part of a single binary. Now this extension is lifted, however, you have to sign everything that you're publishing to the App Store separately.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So it has to be notarized by Apple, it has to be signed with your application developer certificate and so on. So you know when you're sending out this code to Apple that, okay, this is the code I built, nobody meddled with it. And then Apple notarizes it that, okay, this one is safe to be run by users' phones and so on. So all this infrastructure, it seems like
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
something that shouldn't really be our concern. But all of this was making it hard for Python to just be embedded. And now with Russell's hard work, this is a platform that we support. So if you want to have a text editor that has automation in Python, if you do want to have an editor for Python source code, there's a few of those, like Pythonista, Pyto, and so on.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Now it's going to be much easier for the authors of those to upgrade to a newer version of Python. This is why all those apps lagged behind and they were still on Python 3.8 or 3.10 because it was a ton of work to upgrade and redo all those hacks in the newer Python versions. So now, unnecessary, we support it.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
What were you thinking about? Yeah, what were you thinking about?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Right, so this is kind of step two for the Beware project that Russell Keith-Magee is part of and which is now being essentially sponsored by Anaconda where, yeah, you're going to be able to build Python applications from scratch and end up with an app on the iPhone that you can put on the app store and it's fine, right?
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
But the first step of this is that all this additional tooling that BWare is building on top of Python needs to rely on Python being embeddable.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Like we were joking, you know, about this like many times because people who are listening to our podcast, which for the most part is Python enthusiasts, but really the Python core team itself, you know, so they're saying, yes, like this is the one podcast that they cannot listen to us at 2x because Paolo is speaking quickly. I am not speaking so fast.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
But really, it's like, you know, it's again, incremental steps. So the important thing here is as well that like, this is now part of our CI. We are building Python on iOS every time you make a change.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So it's going to be much less probable for us to introduce changes without knowing that they break support for running this on the phone, which should be great news for anybody that actually wants to see Python on mobile devices, because now we are going to care to keep this running.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Oh, okay. So my dreams are simple. I want everything. I like that. So honestly, I sponsored the, you know, making the optional PEP. So this is very close to my heart. What I would like to see is for this to pay off, for the library developers to step in, try it out and say like, hey, actually this is helping us.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
What is related to this, to see that the performance, you know, efforts that we are having separately from the global lock removal actually converge and, you know, kind of do work with this free-threaded version. And also, finally, again, free-threading.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
We don't expect people to actually start new threads randomly and end up in this crazy world of free-threading where you can just easily just write bad applications by writing on top of your variables and accessing data you shouldn't. We don't want to reintroduce models that already we know failed in other languages. We want tooling to be more high level.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So I want this more high level tooling to start popping up slowly. We deliberately didn't suggest any so far. We want to see what the community actually wants to use. There's kind of things that happened in other more younger programming languages. You know, you have
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
go routines right like you have channels in different programming languages and so on so I'm very excited to see where this goes so this free threading evolution is what I would like to be able to tell you next year that you know has done great leaps and it's now way more usable and it's literally the future so yeah
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So maybe, you know, with this development of AI and everything, we should have some adaptive playback speed where it recognizes who is talking. And for me, it would be 2x. For Pablo, it would be like, whoa, whoa, whoa, no.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
But yeah, she kept up. She was really good. Yeah, the closed captioning at PyCon is a magical thing. It turns out that it does help people with hearing disabilities to participate in the conference. But it's also helpful even for other participants, right? So just as subtitles are being turned on by most people watching now like TV shows and other programs at home,
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
the closed captions happen to be helpful for regular attendees as well. So this is something that has become a staple of PyCon US. I'm very happy that this is there. Definitely some people present more of a challenge to the persons actually doing the closed captioning.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
I'm always amazed not just at how fast they go, but how much they can express the different TLAs and Python-specific terms that we're using. You would think, okay, this is very industry-specific, and if you talk to your dad or to some of your friends that are not in tech... some of the words, verbs, and so on that we're using might be mystifying. You don't even know how to spell this.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
And yet the people doing the closed captioning are excellent at this. You would be surprised how obscure project names and so on, they are just perfectly able to spell just correctly. And it always touches my heart when I see my own name spelled correctly, which also does happen. They added me to their alphabet. So I'm like, ah, this is awesome.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
Right, so there were a few ways in which we worked around this obviously huge design limitation. So there are plenty of cases in which we are confident we can drop the global interpreter lock for what is happening on a particular thread.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
So if your particular thread is doing some big NumPy computation that is only on the sides of numbers that are not shared as Python objects, you can drop the global interpret lock in the time that this computation happens so you can let other threads execute Python in that time.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
If your thread is waiting on a blocking network connection, it also does not need to hold the lock because that particular moment in time, there is not going to be any Python code executing. So you can give that gill to somebody else. So there are special cases in which we were already sort of parallel more than not. But it is very implicit.
The Changelog: Software Development, Open Source
Free-threaded Python (Interview)
It depends on us carefully finding all those special cases and enabling them. And in the end, it does not scale for regular user applications. So if you just write Python code that loops over things and just executes some string concatenations, all these regular things that you expect from a Python program, most of the time you're not going to be seeing any parallelism there.