Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #359: gil--;

Return to episode page view on github
Recorded on Thursday, Nov 2, 2023.

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to

00:04 your earbuds. This is episode 359, recorded November 2nd. And I am Brian Okken.

00:09 And I'm Michael Kennedy.

00:11 This episode is sponsored by Scout APM. Listen to more about them a little later in the show.

00:16 Also, you can connect with us, Michael, Brian, and Python, Python Bytes. So we're at mkennedy,

00:24 at brianauken, and at pythonbytes, all on fostadon.org. And if you're listening in just

00:31 your earbuds, you can join us live at pythonbytes.fm/live, and you can be part of the

00:36 audience. So, Michael, what do you got for us?

00:39 Well, I have a quick follow-up to your fostadon-mastadon statement real quick before we dive into the first

00:45 item, which is very exciting. I know a lot of people will be excited to hear about it. But

00:50 fostadon.org, the instance of mastadon that many of us Python people are on, has gone invite only.

00:58 Of course, you don't need to be on fostadon to participate in talking with us or interact.

01:03 That's the whole point of mastadon. However, a couple of people have said, hey, I'd really like

01:07 to be on fostadon and around you guys in that community, but it's invite only. I have a short-lived

01:14 invite code for the listeners who promptly listen to our show if they want to join that later.

01:19 Cool.

01:20 Yeah, because it's invite only now.

01:22 Okay.

01:22 All right. On to the first item. PyCon. Woo-hoo. We all love PyCon, right?

01:26 Yeah.

01:26 And this is one of the things I look forward to most in the year in terms of events. More

01:32 on that in a minute. But this is going to be, it's time for it to be in Pittsburgh, Pennsylvania.

01:38 So you can see there's a little airplane with a banner flying by on the website that's saying

01:43 it's going to be in Pittsburgh. So, and there's a snake on a building. Only once it's not really the

01:47 Python snake though. It's eye is like more, you're droppy, not circular. Anyway, it's, there's a snake there by the community for the community. All excellent.

01:55 And it's going to be a little later this year. I think it was April last year. It's going to be May 15th to 23rd in Pittsburgh, Pennsylvania tutorials. What was really nice this year is they actually have.

02:06 the sub schedule time, like prominently listed. I think the last time it was like, if you dug in, you could find what days the actual main constant conference was, but I'm not really sure if I want to do the sprints. When are they that you sort, you know, like it just had the whole broad range. So this is like the main conferences, May 17 to 19. Two days before that are tutorials and so on. Okay. So it was in, Salt Lake Sydney, the last two years previous prior to that, it was in Cleveland, Ohio.

02:35 I do have a minor beef with the location here, like nothing against Pittsburgh. Pittsburgh is awesome. You know, I would love to go to Pittsburgh and meet people, but, the, the goal of kind of moving PyCon around.

02:46 So that different people, at least within the, within North America, I've had a chance to have PyCon sometimes near them seems like, well, it's been two years in Cleveland.

02:55 You know, Pittsburgh is only a two hour drive from Cleveland. So it feels like it's kind of back in the same place again for, you know, now four years.

03:04 And I would love to see it move more, more locations, right? Like maybe, maybe it could be in Mississippi or in somewhere like really, you know, different than, a sort of, short mid upper Midwest, you know, like just outside of the East coast there.

03:19 On the other hand, East coast, that's kind of the densest part of the U S so it does give a lot of people a chance to go to it.

03:25 Are you calling people on the East coast dense?

03:29 Yes. They like to live in dense places.

03:31 Okay.

03:32 There's just, if you look at like light maps of the U S or just population maps, like there's way more people on the Eastern half than the Western half.

03:40 And that's how we like it. All of us in Oregon. Don't, don't, don't move to Oregon. It's horrible here.

03:45 Yeah. It's horrible. It's rain. It's really cold and rainy. I haven't seen the sun for six years, Brian. So people shouldn't come here.

03:51 Terrible. Yeah.

03:52 Okay. But the super excited, the call for proposals is open. There's like a bunch of instructions under this little permanent, collapse menu, but you can go to speaking and it says,

04:01 proposing a talk, proposing a tutorial, a Sharla posters, et cetera. All this is good. One other thing I did want to highlight. And this, this makes me honestly really disappointed. So I hope people don't take this the wrong way.

04:14 health and safety guidelines. Okay. So we're nice people, it says, but us nice people are sick and diseased. Many of us, and masks are going to be 100% required and 100% enforced.

04:29 And I don't know, you and I, we were both there last year, Brian. I kind of felt like, you know, from the CDC guidelines and from just the general society, like kind of people have vaccines, at least as options. I've had, I just talked two weeks ago last week about how I got my fifth COVID vaccine and I had kind of a crappy weekend from it, but right.

04:51 I, I, I, I, I've seen other conferences, like I think, the European ones often do whatever the local, the local rules are. and I think that's what it ought to be. If you, if the local rules are open, then I mean, I, I guess my thoughts are if people are really concerned about it.

05:18 And I, I legitimately understand if you're caring for somebody that's, immunocompromised or if you are, you're going to be concerned, but your entire route to this place, like the airplane and everything, there's going to be full, a bunch of people not wearing masks. And so, I think max mass optional seems to make sense to me, but I, I think it, yeah, I agree with you a hundred percent. And I think this, so let me just take a step back last year.

05:46 I feel like the experience of PyCon was quite degraded. I had a great time. I really appreciated the spending the time with people I got to and meeting the people that I got to, but the ability to meet people, people and have conversations on like loud expo floor halls.

06:01 It's hard to hear them.

06:02 Cause they were talking like this, you know?

06:06 okay.

06:07 And so, you want to interview people there?

06:10 Like people are like, why are you taking your mask off?

06:12 Like, well, I can't do a podcast with a mask on.

06:14 It's not going to come out.

06:15 Right.

06:15 And so for me, 80% of the reason I go to PyCon is to meet people, to network, to record podcasts.

06:22 I did like the, the seven different company series of, the startup row and the awesome episode with Sebastian Ramirez and Samuel Colvin.

06:32 And, and those types of things like, that's why I go.

06:34 And I feel like the mass stuff takes away a lot of it.

06:37 I'm a hundred percent supportive.

06:38 If people want to wear a mask, it doesn't bother me.

06:41 I think it would even be totally good to say there's a section of the conference where if you feel uncomfortable and you want to get away from all those non-mass people, like you can go over there.

06:52 But I think, I know there's a bunch of people.

06:54 I know there are people who are, are very still freaked out about COVID, very freaked out about traveling.

06:59 But I think for every one of them, there's 10 people that are like, we can't live this way for the rest of our lives.

07:05 We just got to get back to it.

07:06 So yeah, I, the reason I care more than it just bothers me personally is I think this is not going to be healthy for Python, the PSF in the longterm.

07:18 I think it's going to cut a lot of people I spoke to are like, I don't want to last year.

07:22 They're like, I, I, I'm not sure if I'm going next year.

07:24 I, if it's like this again, I'm, this is not great.

07:26 The attendance I looked, do I have it pulled up here?

07:29 No.

07:29 but you can look on Wikipedia and I linked to it in the show notes.

07:33 The prior years, it was like 3000 something, you know, 3,200 year over year, over year was the attendance.

07:42 And it was 2000 last year.

07:44 Right.

07:45 Yeah.

07:45 And I think this is going to discourage more people from coming more than it will encourage the people who are really nervous about coming.

07:52 And if it, you know, PyCon is the vast majority of income and revenue for the PSF, like not a little bit, almost all of it.

08:02 And so when policies affect who's going, who's not that also, yeah, you found it right there.

08:08 Yeah.

08:08 I think people have to really consider like, okay, is there some sort of middle ground?

08:13 So I don't know the way it is right now, I'm probably not going to PyCon, which makes me a little bummed out, but it was just, I was so wiped out and worn out trying to have all those conversations, loud spaces through masks, et cetera.

08:27 So we'll see, I'm not a hundred percent sure, but, if you look at the, if you look at the final thing here, it says there will be no rolling back.

08:35 this is the, the most lenient version of the health and safety standards we're going to have.

08:42 The only possibility is that we will have more restrictions potentially by the time the conference comes up.

08:48 And for me, I don't know, it's makes me sad.

08:51 I'm not, I'm not anti-mask.

08:53 I'm not anti-vax as I already pointed out.

08:55 I wore mask happily when there was an emergency, but you know, COVID is not going away.

09:00 Like is PyCon for the rest of our lives going to be this restrictive?

09:05 Seems not like the best path, but I'm not in charge and no one asked me, Brian.

09:09 well, so anyway, this is, this is my thoughts.

09:14 I'm excited that PyCon's here.

09:16 I hope people who want to go.

09:17 submit their talks.

09:19 There's an online option, but there's a very small chance with this level of you must wear a mask.

09:26 You must stay away from people that it's going to be valuable for me to go.

09:29 And I'm probably not going to.

09:30 Okay.

09:31 I haven't decided myself yet.

09:33 So yeah.

09:34 All right.

09:34 Well, I'm sure this will come back.

09:36 It's in, eight months from now, seven months from now.

09:39 Okay.

09:39 for people wanting to, to submit a talk, the, again, the call for proposals is open

09:45 and it is open until the, end of the day anywhere.

09:49 So, on December 18th.

09:51 So you got from now or December 18th, but don't wait until the 17th submit early because, these

09:57 poor people that are reviewing, reviewing all of the proposals.

10:01 I think it's good to get feedback early and start getting things in early.

10:05 So yeah, I think they even, they have traditionally had like submission meant as a mentor, the right

10:11 word, but people to help you, if you were doing your first time submission to work with you, I

10:15 don't know.

10:15 I didn't see that this time, but I haven't dug into all the details.

10:18 So.

10:18 Okay.

10:19 Yeah.

10:19 Yep.

10:20 Cool.

10:20 Awesome.

10:20 Over to you.

10:21 Well, we covered, the Ruff formatter in September, I believe.

10:26 And it's only been a month later, a month and a half.

10:29 but, the Ruff formatter is now we, we covered it when it was alpha.

10:35 It was like, you can play with it.

10:36 and now, it is, I'll scroll to the bottom.

10:40 they say, it is, production ready.

10:44 So, the formatter is, is in a, is still beta released, but they consider it production

10:50 ready and I've played with it enough.

10:52 It's pretty awesome.

10:53 So, what are some of the highlights?

10:55 it is.

10:56 So the black form or black formatter, the Ruff formatter is mostly like black, but faster.

11:02 So it's how much faster.

11:04 It's like 30 times faster.

11:06 and then there's other, and blacks already pretty darn fast.

11:10 There's like a YAPF, which I never use, but apparently it's a hundred times faster than

11:15 YAPF.

11:16 and, very compatible.

11:19 It's very compatible with black, but also they list some of the differences.

11:22 So we've got, was it, oh, this is a different, different one.

11:26 So there's a link it's on this, this document also of, of what is different.

11:31 So there's, differences from black and, and it's so it, it's very thoughtful to go through.

11:37 And none of these I would disagree with.

11:40 so, some, some reasonable changes from black, but how just having a formatter for your

11:46 entire team is what was really important.

11:48 I think.

11:48 so I also really liked that least recently, rough has, supported.

11:54 So this is not part of the formatter, but that rough is built, brought in a lot more flake

11:58 eight support and, and, and flake eight extensions.

12:02 And then also I sort and PI upgrade are part of rough now also, but the Ruff format is just

12:08 kind of like black, but faster.

12:09 So why not?

12:11 anyway, there, there's some, some cool stuff about it.

12:14 It's more, a little more configurable.

12:16 There's a couple extra configurations you can do.

12:18 I think that you covered that, not too long ago.

12:22 yeah, I covered just the string side of things, which is nice, but yeah, there's,

12:28 it's not a massively configurable, but yeah, there's a few areas that people seem to really,

12:33 really care about changing.

12:34 Yeah.

12:34 We're not changing.

12:35 I also, since it's been wide, widely adopted, we also have extensions for VS Code

12:41 and, and, and PyCharm that you can end IntelliJ PyCharm that you can, you can add on

12:48 so that you can have the formatting done just right in your editor, which is great.

12:51 So, yeah.

12:53 And you can do things like when you, I think in the PyCharm one, if you just hit the reformat

12:57 code, I think it might even use Ruff format.

13:00 Not entirely sure, but I think you can make Ruff format be the, you know, format my code for me.

13:05 Yeah.

13:06 so I'm, I'm pretty excited about this.

13:08 I wasn't going to roll it out to the team with when it is in alpha, but I'm,

13:13 if they, if they say it's good, I'm, I'm good with it.

13:17 we, I trust Charlie, and the end team to Charlie and team now.

13:21 So it's pretty exciting.

13:23 also kind of in this, the, the, the, the article we're linking to, he talks about,

13:28 why they, they wanted to do a formatter, but also, it's kind of cool.

13:34 He talks about the Astral tools tool chain.

13:36 So the company is called Astral now, and they talk about, how this is the first non linting,

13:43 you know, application that they've done.

13:45 So they are, they were planning on branching out and doing more things around Python tool

13:51 chains, but, faster with building it with the rest.

13:55 So, this is, this is the first, so I I'm excited to see where they go with this.

14:01 Mm-hmm.

14:02 So excellent.

14:02 Yeah.

14:03 So, you know, they go on and on about how much faster it is.

14:06 And that's, it's, it's interesting to me because the faster aspect is kind of, it's like

14:13 a sideshow amazing, but not necessarily why I would pick it.

14:18 I know if you had 5 million lines of Python.

14:20 Yeah.

14:21 It's super, super matters, but most people don't.

14:24 Right.

14:24 like running across 350 Python files that make up talk by then training, for example,

14:31 website and APIs and stuff.

14:33 And it literally is instant, which is like mind boggling.

14:36 You say format this, that applies all these rules, all these changes.

14:39 And it's just like done 27 files changed 324 not changed or whatever it says.

14:45 So it's awesome that it's fast.

14:46 I mean, if it were too slow, I would maybe not use it, but to me, it's the configurability,

14:50 right?

14:51 The, like you can set the line length, you can set the string style if it really matters

14:55 to you.

14:56 yeah, I think like for me, that's why I'm so excited about the Ruff formatter more

15:01 than, the actual speed because I have a 32 inch 4k monitor.

15:06 Do I want like a little thin column of code because you know, I want 80 columns.

15:11 No, like I've, I've got it set to 120 and it still is only two thirds of the screen on a

15:15 large font.

15:16 You know, it's, it just makes me more productive.

15:19 Right.

15:19 And, I think I, the last time I talked about this, I talked about how using the single quote

15:24 is, you know, significantly fewer characters potentially when you're, you're typing.

15:30 And if you have RSI, like you always think about like keystrokes and all that kind of

15:34 stuff.

15:35 So, yeah.

15:36 So for me, that's, that's, that's what counts.

15:38 Yeah.

15:38 I, for the, the string side, I haven't talked about this for a while, but there are,

15:43 there are some applications where you're using a lot of double quotes and you cannot use single

15:47 quotes in, in the thing that you're using in the string that you're passing.

15:51 So, if you're using a lot of double quotes and stuff and I have a, so I have an application

15:56 where the API itself uses a lot of, a lot of, we have to pass in double quotes into

16:02 the, the API.

16:03 So all of the strings that were passed setting up is single quoting makes way more sense.

16:09 So, yeah.

16:10 And I also double checked one of the, one of the reasons I use double quotes is if I'm going

16:15 to say, and it's the way it should be in your code where you needed an apostrophe, right.

16:20 Or possessiveness or whatever.

16:21 so then you could have a single quote, but then backslash escape the single quote.

16:26 But if you put double quotes, there's no need to escape it.

16:28 And I check that if that, if it would go from double quotes and a back to a quote, what over

16:34 to needing the escaped backslash rough, won't change it.

16:38 So it'll be single quote, single quote, double quotes.

16:40 It's fun.

16:41 Double quote and keep going.

16:42 I think that black does the same thing.

16:44 I don't think that I'll have to check, but I don't think black will change it if there's

16:48 an embedded one.

16:48 So yeah.

16:49 Yeah.

16:49 Yeah.

16:50 I'm not sure I wasn't necessarily, I don't know at all whether it will, but just thinking

16:53 like if you, if you say, please use single quotes, it's not like it starts putting escapes everywhere.

16:58 Yeah.

16:59 It was always getting that.

17:00 Yeah.

17:00 whereas you can't do that in black.

17:01 Marco out there also points out that rough has a plugin to help upgrade from numpy one

17:07 to two, which is pretty awesome.

17:09 Okay.

17:09 Didn't know that.

17:10 Oh yeah.

17:10 That's cool.

17:11 Yeah.

17:11 That's really cool.

17:12 That's pretty, pretty great actually.

17:13 So cool.

17:14 Sure is.

17:15 All right.

17:15 Well, what's next, Brian?

17:16 Well, we'd like to thank our sponsor.

17:18 So this episode is brought to you by scout APM.

17:22 Are you tired of spending hours trying to find the root cause of issues impacting performance?

17:27 Then you owe it to yourself to check out our sponsor this week.

17:30 Scout APM.

17:31 Scout APM is a leading application performance monitoring tool that helps you identify and

17:36 solve performance abnormalities faster and easier.

17:40 Scout APM ties bottlenecks such as memory leaks, slow database queries, background jobs, the dreaded

17:46 N plus one queries problem common with ORMs and more directly to source code so that you

17:51 can spend less time debugging and more time building.

17:53 You'll love scout because it's built for developers by developers.

17:57 Scout makes it easy to get set up and deliver insights in less than four minutes.

18:02 Seriously, you could pause this episode, set up scout and be back at it without missing a beat.

18:07 And the best part, scout's pricing is affordable and straightforward.

18:10 Only pay for the data you use.

18:12 No hidden overage fees or per seat pricing.

18:15 Start your free trial and get in instant insights today.

18:19 Visit pythonbytes.fm/scout.

18:21 Please use our link because that truly supports the show.

18:25 Thank you to scout APM for supporting Python bytes.

18:28 Yeah, that's awesome.

18:29 Thank you, scout.

18:29 And being able to look at your code and see like, okay, here's, these are the parts of my API or

18:36 wherever else you're running that are slow or fast.

18:39 And it's in the data layer right now, like awesome stuff.

18:41 So very, very cool service.

18:42 Now, a couple of bits of feedback from Kim here.

18:47 One is having been on the talk reviewing side several times of smaller regional conferences,

18:52 picons, indeed, please submit your stuff as early as possible.

18:57 It makes it better for the reviewers as well as you can get feedback sooner.

19:02 And confirmation black will leave strings alone that have one type of quote inside of the other,

19:07 which is cool as it should.

19:08 Yeah.

19:09 Thanks, Kim.

19:09 All right.

19:10 What have we got for the next one?

19:12 This is so big, Brian.

19:14 Is it really big?

19:15 It's really big.

19:17 This is what I'm, I'm, the title I put, I know where is it written, but in our show notes,

19:23 the title of the section will be Gil minus minus semicolon.

19:27 Because it's CPython and Python has the Gil, but the Python Steering Council has now formally

19:34 accepted the removal of the Gil in Python.

19:37 Oh, cool.

19:38 That is massive, right?

19:39 Well, I thought it was, I guess it is massive, but I thought it was already decided.

19:43 But was it, oh, it was kind of like tentative that maybe or something?

19:47 I don't know.

19:47 There was, I think pretty, I think there was some pretty serious opposition to doing it

19:51 because it has massive effects on all the C extensions, which, you know, why did we have

19:58 this whole two to three drama?

19:59 We had it because a bunch of the libraries that people use, right?

20:04 When you say Python, you might mean the language or you might mean plus the 400, 500,000 other

20:09 libraries you can use the ecosystem and the ecosystem would say, well, this thing that

20:14 my library depends on doesn't support Python three.

20:18 So I have to stay on Python two.

20:19 And that went on insanely long.

20:21 The same similar type of deal would be here on anything that has like a C layer that has

20:28 any form of concern of concurrency or being used in a library that might now use it concurrently

20:33 when it wasn't designed for it.

20:35 So it's, it is pretty significant knock on effects.

20:38 Yeah.

20:38 Okay.

20:39 So this is PEP 703.

20:40 It has officially been accepted.

20:42 Sort of.

20:43 Sort of.

20:45 In short, this comes from, comes from Hugo on Mastodon.

20:49 So again, follows on Mastodon.

20:52 That's where a lot of the action is.

20:53 But quotes the discussion over on discuss.python.org says, in short, the steering council accepts

20:59 PEP 703, but with clear provisio that the rollout will be gradual and break as little as possible.

21:06 And that we can roll back any change that turns out to be too disruptive, which includes

21:12 potentially a hundred percent rollback of PEP 703.

21:15 So a hundred percent rejection and reversal if necessary, however unlikely or desirable,

21:21 undesirable we expect that to be.

21:23 Okay.

21:24 Okay.

21:24 So there's a couple of things to note, like go over to the discuss here.

21:29 Actually, I had it already pulled up, didn't I?

21:30 Go to the, we'll just go to the PEP.

21:32 Now, this is by Sam Gross.

21:34 And I've talked several times about how excellent, I think, some of the work that he's been doing,

21:38 because it's not just the GIL stuff, but a lot of the kind of sender and speed stuff

21:43 has been inspired by Sam Gross and the folks over there.

21:47 So it says CPython's global interpreter lock, the GIL prevents multiple threads from executing

21:53 Python code at the same time.

21:54 You can have all the threads you like in Python.

21:56 Only one of them will execute a Python instruction, instruction code, like what you get out from

22:04 when you say disassemble thing, right?

22:06 Like load adder or add to list, that kind of thing.

22:10 So this PEP, to be very clear, this is a very small subset that only affects people that ask it to affect them.

22:19 This, it proposes that adding a build, not runtime, but a compilation for the CPython runtime

22:26 that will let Python code run without the global interpreter lock and the necessary changes to make this possible.

22:33 So when you compile it, if you pass --disable GIL, then you'll get a special output of Python

22:41 that doesn't have the GIL.

22:42 That's pretty wild, isn't it?

22:43 Yeah.

22:44 I'm hoping that we'll like mere humans that don't want to recompile it can get a distro somewhere with it.

22:51 Yeah.

22:51 I'm sure there'll be a like click here to alternative downloads, get the concurrent Python or something like that.

22:58 Right.

22:58 But the fact that it's not a, not even a runtime flag, but a com, a compile time flag, it's pretty wild.

23:04 So let's see, there's a couple of things worth covering here.

23:08 It's a really long, it's a really long PEP.

23:10 So let's see.

23:11 So the GIL effects Python library usability.

23:14 And this is one of the things that's pretty interesting.

23:16 It says, look, there's a lot of libraries.

23:18 Like they, they just go on and on about machine learning libraries and the concurrency machine learning libraries need.

23:24 Get the strong sense that Sam Gill and people he's working with do stuff with machine learning libraries and Python.

23:30 And that's their main motivation here.

23:31 But obviously it has broader implications.

23:33 But the example here is PyTorch exposes a multi-processing based API called DataLower for building data input pipelines.

23:43 It uses fork on Linux because it's better, et cetera, et cetera.

23:47 And basically, if you're going to do the weird tricks, you got to do underneath the covers in Python to make the async stuff truly parallel.

23:55 As in, I have 10 cores on my machine.

23:58 I want to use them all with threads or something like that.

24:01 Or however, it, the, the top level API that you interact with is kind of janky.

24:07 It has to take into account in certain things like objects can't be shared across multi-processing processes, right?

24:13 If it was threads, they could be, but they're not.

24:15 So they can't be, et cetera.

24:17 It says accessing GPUs within a data loader or worker quickly leads out of memory errors because context, like unlike threads within a process and all these different things.

24:28 Right.

24:28 So basically one of the motivations is allow people building libraries to build cleaner, more self-contained, i.e. like sharing objects within a process better.

24:38 Right.

24:38 Not just, I want better performance, which is obvious.

24:40 More stuff about, about this.

24:43 So yeah, you can look through it.

24:44 Like I said, it's, it's quite the, quite the deal.

24:46 But one of the things that's interesting, like I, as I touched on a lot of the things in Cinder actually makes sense here.

24:52 So this immortalization stuff about objects that have to have reference counting.

24:57 Because remember the reference counting is what the GIL is about.

25:00 The GIL is all about memory, not concurrency.

25:03 It doesn't care about concurrency.

25:04 It just needs the memory management to not be concurrent.

25:08 So, well, that's a bit of a problem if you have more than one thread.

25:12 So it's about limiting, it's about managing memory stuff, but not making that not concurrent to make that better.

25:19 So a lot of the changes here are like, well, how can we allow the memory stuff to be concurrent basically?

25:25 So one of them is immortalized objects.

25:27 So for example, true, false, none, seven, none of those need to have a reference count because they just get created at the start of the process.

25:37 There's only one of them, right?

25:38 There's no reason to like, oh, true's gone now.

25:40 No one's using true.

25:41 Oh, true's back.

25:42 There's just the one true.

25:43 There's just one true.

25:44 It's a singleton.

25:45 And so all of those are what are now going to become what are called immortal objects.

25:50 And pi increment and pi decrement, so basically adding and removing the number of users of that variable or object is a no op now, right?

25:58 Okay.

25:58 And that's good for you and me when we pass true and false around, even if we're not doing it concurrently, it's just less instructions to like use these structures, right?

26:08 And it's more shared memory, all those kinds of things.

26:10 They also are adding this thing called biased reference counting, which allows basically it says, look, we, the problem before was we had like one number that said number of references to this object.

26:22 And when somebody wants to change it, you could either lock the thread, take a lock and lock it every time per object, which is kind of crazy.

26:29 Or you just don't allow anybody to change it more than one at a time.

26:33 Hence the GIL.

26:33 So this one says, well, let's change it so that on the thread that created the object, it behaves the same, right?

26:41 There's no locks, none of that kind of stuff.

26:43 It just works on it, references it directly.

26:45 But if it's shared, there's like a secondary count, like others, other references or something called bias reference counting, where those are managed in a thread safe way.

26:57 Because most of the time objects and things are not shared across threads, even in a multi-threaded app, the little temporary variables and loop variables, those are still just on the one thread, right?

27:06 Stuff that shares way less.

27:08 So the reference counting is changing to make that work.

27:11 And what else?

27:12 There's a bunch of pseudocode telling you this is some intense stuff.

27:16 A bunch of things about memory management, how that works, garbage collection, et cetera, et cetera.

27:21 So I'm going to stop.

27:23 People can dive into it.

27:24 But this is the big deal.

27:25 I think some of these changes will find their way just into Python, period, like the immortal objects.

27:31 Yeah.

27:31 There's no reason for that not to be in there.

27:34 That would just be useful for everyone.

27:35 But other ones like this bias reference counting, maybe be slower, maybe take more memory.

27:39 So maybe you don't want that, for example.

27:41 Yeah, maybe.

27:42 What do you think?

27:43 Oh, I think that removing the GIL will be a sea change in Python.

27:47 Sorry.

27:48 You're right.

27:51 I think you're right.

27:52 I think it's exciting.

27:53 I think, you know, I've said this a bunch of times.

27:56 Like, I haven't even looked recently.

27:58 I'm pretty sure this computer here has, I think, 10 cores that I'm on right now.

28:05 And if I run Python code, as hard as it can possibly go, it's 10%.

28:09 Right?

28:10 And that's just, it would be better if that wasn't completely baked into the runtime.

28:14 I actually hope that it's just kind of a non-event.

28:17 Like, it's a just, we just don't have a GIL anymore.

28:20 People can stop complaining about that.

28:22 And I don't care if things get a little, I mean, I like things to go faster.

28:26 I don't care if it goes a little slower because of this.

28:29 It's going to go faster eventually anyway.

28:31 Wait till the next round of CPUs coming out.

28:33 Right.

28:34 It's the next faster CPython release.

28:37 Yeah.

28:38 Yeah, as well.

28:38 Yeah.

28:38 And then also just having people in Python being able to get used to doing more asynchronous and threaded things.

28:48 I think that's a good thing for the language.

28:51 So, yeah, I'm excited.

28:52 But a big part of me, I understand the going slow and we don't want to break everybody.

28:58 But part of me was like, just, oh, just do it.

29:01 And we'll clean up the mess afterwards.

29:02 Yeah.

29:04 Yeah.

29:04 I understand the caution.

29:06 Well, if they get it as a compilation flag, it's nothing there to say that, oh, you couldn't possibly make that the way we compile Python that gets distributed in a few versions.

29:17 Right.

29:18 Right.

29:18 But eventually that won't be the case.

29:22 Eventually we're going to try to get rid of that.

29:24 If it all goes well in a couple of versions later or something, the default will be the no-gil version or something with my guess.

29:33 And there'll be a flag to say to add the GIL if you really need it still for a while.

29:38 And then they'll work.

29:39 Yep.

29:39 Excellent.

29:40 Anyway.

29:40 I agree.

29:42 We'll see where it goes.

29:43 There was just this thread on Mastodon, which you were copied on.

29:46 I don't know if you saw it today.

29:48 But asking, what is Python 3.14 going to be called?

29:53 Of course.

29:55 It's going to be the symbol Python because it's 3.14, right?

29:59 It's so incredible.

30:00 So maybe in Python, it'll be the default.

30:04 You never know.

30:05 Yeah.

30:07 You have to pause and do the I thing.

30:10 Python.

30:10 Exactly.

30:13 Yeah.

30:14 It's going to be fun to have.

30:15 That episode is going to be nonstop when it's time to talk about the upcoming release of Python.

30:22 Yeah.

30:23 Yeah.

30:24 The other follow-on is like trying to guess when the release of 3.14.15 will come out.

30:34 Like that'll be maybe a couple years after.

30:37 It'll be like a security release or something.

30:40 Yeah.

30:40 So.

30:41 Oh, well.

30:42 It'll be good.

30:44 Speaking of.

30:45 I don't know.

30:46 Know what I was speaking of.

30:47 But I want to cover why the why the Django admin is so ugly.

30:52 I didn't say it was ugly.

30:55 Vince Salvino says it's ugly.

30:57 So you're going to get mail.

30:58 No, Vince will.

31:01 Anyway, I've noticed this before and kind of I understand it now, but I remember trying.

31:07 So I'm doing a Django project now.

31:09 I remember jumping into Django like years ago.

31:13 And I was surprised when I jumped in again and saw that the admin kind of looks the same as it did a long time ago.

31:20 And it was kind of, you know, there's been some minor changes and stuff.

31:24 But, okay, this is actually a great article.

31:26 Why is the Django admin ugly?

31:28 There's some great quotes in here.

31:31 I'm going to jump down to them.

31:32 The Django admin is not ugly.

31:35 Rather, no effort was made to make it beautiful.

31:37 A beautiful end user tool.

31:39 It looks like a developer made it.

31:41 Oh, okay.

31:41 I understand.

31:42 And that's from Ken Whitesell.

31:44 Another one, the admin's recommended use is limited to an organization's internal management tool.

31:52 It's not intended for building your entire front end around.

31:55 So that's basically the gist of this.

31:59 Also, the Django admin was built for Phil, one of my favorite quotes.

32:02 This is from Jacob Kaplan Moss.

32:05 Phil being the, what?

32:07 Phil was the Phil Cothen?

32:09 Then editor of Lawrence.com.

32:12 Yeah.

32:12 Because the history of Django is it's around like newspaper publishing.

32:17 And so it's for, basically it's a database front end for people that are adminning a site.

32:27 It's not intended for end user stuff.

32:30 So I'm going to jump down.

32:32 There was apparently a quote from 0.9 days of admin.

32:36 It's not your app.

32:37 And the gist of it, where am I going to find it?

32:41 It's from, comes from Curtis Maloney.

32:43 It says, encouraging people to build their own management interface and treat the admin as a DB admin tool has saved a lot of people pain.

32:51 The effort to customize it grows far faster than the payoffs.

32:55 So the gist of it is, it's intentionally not that pretty because they don't want you to intentionally try to make it pretty to expose it to end users.

33:05 It's supposed to be ugly.

33:06 It's not ugly.

33:08 It's just not supposed to be pretty.

33:10 Chris also says, it's meant to be ugly.

33:12 Yeah.

33:13 Anyway, I appreciate the honesty of like, yeah, we know it looks like that, but it works.

33:21 It's like the Craigslist of admin interfaces.

33:25 Oh, it's fancy for Craigslist.

33:27 Yeah.

33:28 Anyway, good write-up, Vince.

33:32 So thanks.

33:32 It is.

33:33 And I think it's also pretty interesting to remind people like, you know, really, it's meant for people running the website, not something that should be user-facing.

33:41 Well, yeah, and even that, like if you're, you wouldn't, you'd have another interface for like the writers writing stuff.

33:47 But if there was like a quick like typo or something like that, somebody can just hop in and change the database.

33:54 So, yeah.

33:55 And I've appreciated it.

33:57 There's been a lot of things that I've put together that having the admin interface there is better than going right into the database, you know, using SQL to change stuff.

34:07 And often I don't have any user-facing admin.

34:11 It's just showing the data that's stored in there.

34:16 So, anyway, it's fine.

34:18 Yeah.

34:18 Blaze out there suggests maybe like using Textual to create a TUI admin.

34:23 That'll do it.

34:24 Yeah, let's replace it with something.

34:26 Yeah.

34:27 I'm not going to say ugly.

34:29 You definitely won't get regular users to fire up an SSH session and TUI and do it.

34:35 No, yeah.

34:36 But I'm waiting for somebody to build like, because Textual can build, Textual can have web interfaces now too.

34:43 Actually, yeah.

34:44 So, you could do like a skin on top of the Django admin and have it be a Textual-based thing.

34:52 That'd be fun.

34:53 Yeah.

34:53 Indeed.

34:54 Waiting for that.

34:55 All right.

34:55 That's our items.

34:57 Do you have any extras for us?

34:59 I'm feeling extra today.

35:01 I do.

35:02 Okay.

35:02 Let's see.

35:03 First of all, this is a two points in time sort of thing.

35:07 Andy McKay on Mastodon says, what was it before?

35:11 It said the PSF, as in at the PSF, no longer is going to use X Twitter.

35:19 I've, you know, so many places are saying X.

35:22 The place, you know, formerly known as Twitter.

35:25 Like, what an insanely big fumble with branding, like after six months that people can't just say the name.

35:30 Like, people say Meta.

35:31 People know what they're talking about.

35:33 They don't have, they don't say X, you know, the thing that used to be Twitter.

35:36 So, I propose we just call it X Twitter.

35:38 Because a lot of us are not on X Twitter as much.

35:40 And it has X, and it also tells you it's Twitter.

35:43 So, anyway.

35:44 How about Zitter?

35:45 Like, just take off the TW, just be a Zitter.

35:48 Yeah, there you go.

35:49 So, the big news, really the reason I bring this up is the, at the PSF is now on Facedon.org.

35:56 So, therefore on Mastodon in general.

35:58 Nice.

35:59 And I encourage you to go follow them.

36:01 They have a lot of followers, I believe, already right away.

36:03 Let's see.

36:04 Yeah, 9,000 followers.

36:05 Which, that might not sound like a lot.

36:07 But for Mastodon, that's a lot.

36:09 So, we can get them a few more today.

36:11 Check that out.

36:12 Yeah.

36:12 That's like dark years.

36:13 Yes, exactly.

36:15 So, now the post is updated saying, oh, they might actually come back.

36:20 Because they originally said they're leaving Twitter.

36:22 They're leaving X Twitter.

36:23 But they actually might still use it.

36:25 Nobody's really sure anymore.

36:26 But at least they are on Facedon.

36:28 So, that's cool.

36:28 Check them out.

36:29 Yeah?

36:30 I have a feeling that there's a lot of, like, Twitter people that are, it's write-only.

36:34 Like, I'm a write-only.

36:35 I've got a Twitter account, but it's write-only.

36:37 I don't, I check it, like, once a month or something.

36:39 Yeah, mine's kind of like regular expressions as well.

36:42 Write-only.

36:42 Yeah.

36:45 So, I will, I do, people do send me messages there.

36:48 And I appreciate that.

36:49 And I go check them out.

36:50 But in terms of, like, having conversations.

36:52 Yeah.

36:53 Okay.

36:53 So, that's one.

36:55 I have others.

36:56 Big new announcement for a new course.

36:58 Data Science Jumpstart with 10 Projects.

37:00 Ooh.

37:01 This is awesome.

37:02 Yeah.

37:02 A little over three hours put together by Matt Harrison, who knows his data science things.

37:08 So, a lot of cool stuff that you can learn through here.

37:10 Basically exploring 10 different data sets.

37:13 Like working with student CSV information.

37:15 Excel integration.

37:17 Merging.

37:19 Merging data across different data sets.

37:22 Like an Airbnb data set example.

37:23 And so on and so on.

37:25 So, if people want to check that out, they can see the link in the show notes.

37:29 So, that's a really, really fun one.

37:31 Definitely encourage you to check it out.

37:32 All right.

37:33 We've talked a lot about AIs, chat AIs, ChatGPT, et cetera, et cetera.

37:37 Have you played with GPT for all?

37:40 No.

37:40 I believe this might even be some Python going strong here.

37:45 Let me double check really quick.

37:46 Yeah.

37:46 13% at least.

37:47 So, GPT for all is kind of a ChatGPT interface, but it's open source.

37:54 It's free.

37:54 It runs on the three main platforms.

37:56 Windows OS.

37:57 It says OS X or OS X.

37:59 No, it's macOS, but whatever.

38:01 And Ubuntu.

38:02 So, you can get for those three platforms.

38:06 And basically, it gives you a list of maybe eight or nine different models that you can download

38:12 and run locally without sharing your data with anyone else.

38:16 Just run them locally.

38:17 And you could also try out the different, like, the LLAMA models versus the open AI type models

38:23 and others.

38:23 So, if you want, like, a local and free and pretty good, actually.

38:28 I tried it out and it gave me some really good answers for a couple of questions.

38:31 I use the wizard model, which it gives you the, like, it says, hey, give me some bullet

38:36 points about this or give me some ideas on this.

38:38 And it will, like, give you the thing.

38:40 Then it gives you, like, says hash.

38:41 Here's why I suggested that.

38:42 It highlights this and it features this aspect.

38:45 This other thing does it in this way.

38:47 And here's why I chose that one.

38:48 And it's pretty interesting.

38:50 Nice.

38:51 And open source and free.

38:52 So, you know, easy to try.

38:53 Cool.

38:54 Let's see.

38:55 That's the same one.

38:56 Finally, Brian, my last extra is in.

38:59 I already hinted at this at the beginning.

39:01 But in the show notes, I have an invite.

39:03 If you want to be on Fostadon.

39:05 Again, there's like a thousand instances on Mastodon.

39:07 Go crazy.

39:08 Pick the one that's for you.

39:09 But if Fostadon, like the at PSF folks, they're on Fostadon.

39:13 It's requiring an invite now.

39:15 So, I have an invite that is good until November 7th.

39:18 And you can go and click it and accept this.

39:22 As long as you like the policies.

39:24 Don't make us look bad.

39:25 Be nice.

39:26 That's what it's about.

39:27 That's why it's invite only.

39:28 Yeah.

39:29 And when you take advantage of that, be sure to subscribe or follow all of us.

39:34 Yeah, absolutely.

39:35 Follow us.

39:36 Cool.

39:36 Nice.

39:37 Are you done with your extras?

39:39 I'm done with my extras.

39:40 You got anything?

39:41 Okay.

39:41 We're talking about PyCon and I want to plug local conferences.

39:45 So, when people are thinking about the footprint of traveling across the country or traveling to a different country, I like the idea of more local conferences.

39:54 And I like that PyCascades is great and it travels between Vancouver and Seattle and in Portland.

40:04 It's going to be in Seattle next.

40:05 This article I'm highlighting is talking about Copenhagen, Django Day Copenhagen, which has already passed.

40:12 So, don't try to go there.

40:14 But it's just basically talking about how maybe it's better.

40:17 Maybe it would be better to instead of shipping the people around to see speakers, maybe we could just ship the speakers around to the people and doing that.

40:26 I actually think it'd be great to have more local conferences that have more sponsorships that actually help out with the travel for speakers.

40:34 That'd be great.

40:35 So, that's one of my extras.

40:36 Yay, local conferences.

40:37 I wanted to highlight what I was doing at 11 o'clock on Tuesday.

40:41 I was getting ready for Halloween.

40:43 Oh, that's spooky.

40:44 On Fostadon, I've got some pictures of our decorations.

40:48 So, we're getting ready for that.

40:50 Speaking of Fostadon, something I saw today was this awesome crossword puzzle.

40:58 Wow.

40:59 Hints in regular expression.

41:00 No way.

41:02 This is great.

41:04 Well, I got a link to this person, refreshing apathy.

41:10 Got it from a MIT Mystery Hunt Puzzle Index, which includes both the puzzle, a puzzle link, but also the answer sheet is there.

41:20 So, this is just insane as far as a crossword puzzle goes.

41:25 And it's not words.

41:27 So, in seven or eight years when you solve it, you can check and see if you got it right.

41:29 Yeah, but it's not words.

41:30 It's just random.

41:31 I'd like to see it have actual words be fun to do that.

41:35 So, those are my extras.

41:37 Excellent.

41:38 That crossword puzzle is nuts.

41:40 It reminds me of 25-way rock, paper, scissor.

41:43 Yeah.

41:45 Have you seen that?

41:46 It's amazing.

41:47 Yeah, it's pretty good.

41:48 Yeah.

41:48 All right.

41:49 You ready for a joke?

41:50 I am.

41:51 So, this one says, when you search YouTube for days to fix a specific bug.

41:57 Okay.

41:58 You know, my, my slogan is you're never hardcore enough for YouTube.

42:02 Like if you search, if you watch three videos on something like 50% of what it's going to show

42:07 you the rest of the time is just that.

42:08 And like, I was just trying to assemble my furniture.

42:11 I'm not the world's biggest fan of like furniture construction.

42:15 Like all YouTube things you are now.

42:16 So, this is kind of that version.

42:18 Like when you search YouTube for days to fix a specific bug.

42:21 Once it starts, the video it suggests.

42:24 Not everyone should code.

42:26 I recommend it for you.

42:27 That's good.

42:33 So bad.

42:34 You don't want me to code?

42:36 In eight minutes and 47 seconds, you should abandon all hope.

42:39 Says the video.

42:40 It's how long it is.

42:41 I kind of want to watch that video now though.

42:43 Just trying to find out.

42:44 I know.

42:44 I do too.

42:45 It's not everyone should code by polymatter apparently is what it says in the screenshot.

42:49 Yeah.

42:50 And they've got a black check mark.

42:52 Yeah.

42:52 Awesome.

42:53 Well, thanks again for a wonderful episode and thanks Scout APM for sponsoring.

42:59 And thanks everybody for showing up and watching the show.

43:02 Yeah.

43:02 You bet.

Back to show page