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


Transcript #274: 12 Questions You Should Be Asking of Your Dependencies

Return to episode page view on github
Recorded on Tuesday, Mar 8, 2022.

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

00:05 This is episode 274, recorded March 8th, 2022.

00:10 I'm Michael Kennedy.

00:11 And I'm Brian Okken.

00:12 And I'm Ann Barola.

00:13 Welcome, Ann. It is so great to have you here.

00:16 It's going to be a lot of fun to talk about Python things with you and devices and maybe even space.

00:22 Who knows?

00:22 I'm glad to be here. Thank you very much for inviting me.

00:26 Yeah, absolutely.

00:27 Before we get into our topics, just tell people a quick bit about yourself.

00:30 You've had a varied background and you've done a lot of interesting things.

00:33 I may be known in the Python community as the author of the book, Getting Started with Adafruit Circuit Playground Express, which goes over CircuitPython.

00:43 And I've done numerous tutorials and blog posts for Adafruit Industries, where I've been working for the past four years.

00:52 Prior to that, I had a 30-year career with the U.S. Department of State as a diplomat and security engineer, reaching the level of the Senior Foreign Service.

01:03 Wow.

01:04 Oh, neat.

01:04 Awesome.

01:05 I bet you have some stories to tell that you can't tell.

01:07 I have some I can and some I can't.

01:10 Indeed. Indeed.

01:12 All right. Well, welcome to the show.

01:13 It's nice to have you here.

01:14 Thank you.

01:15 So, Brian, there's that old famous saying, programming is like riding a bike.

01:19 Is that how it goes?

01:20 What is it?

01:20 I've never heard that.

01:21 Oh, yeah.

01:22 Neither have I.

01:23 Tell us about your bike.

01:26 Okay.

01:26 So, I'm not sure what the bike is for, but actually, it's a cool-looking bike.

01:32 But anyway.

01:33 It is.

01:33 What we're talking about is Adam Johnson's article, The Well-Maintained Test, 12 Questions for New Dependencies.

01:41 And he's calling it the Well-Maintained Test, but I'm going to call it the Adam Test.

01:44 I think the Adam Test is better.

01:46 And anyway, he's referencing – do you remember Joel Spolsky's The Joel Test?

01:53 I remember Joel Spolsky.

01:56 Okay.

01:56 I don't remember the test, though.

01:58 Okay.

01:58 So, he has this test, and it's referenced in this blog post, but I'm not going to click over to it.

02:04 But there's a link in here.

02:05 But it's essentially like trying to – it's a 12-question question and answer thing of like yes and no questions about whether or not your software team is healthy.

02:16 It's interesting.

02:18 A little bit dated, but it's an interesting read.

02:22 But that's way back from like the year 2000, so before a lot of you were born.

02:27 But now we've got the Adam Test, and it's about whether or not you should pick up a dependency on your project.

02:35 So, again, there are yes-no questions, and there's 12 questions.

02:41 And it's kind of – let's zoom in a little bit.

02:46 It's just questions about a project.

02:48 So, let's just run through them.

02:49 Is it described as production-ready?

02:53 And is there sufficient documentation?

02:56 Is there a change log?

02:57 Is someone responding to bug reports?

02:59 Are there sufficient tests?

03:01 That's a tough one, actually, to answer if you're from the outside.

03:04 But are the tests running on the latest Python version?

03:07 Are the tests running on the latest integration version?

03:10 So, he says language and integration.

03:12 So, for instance, is it running on the latest – is it running Python 3.10 in CI?

03:18 And is it running the latest Django version if it's a Django utility or pytest version if it's a pytest plugin or something?

03:25 Is there a CI configuration?

03:27 Is it running on CI?

03:29 Is it – is the CI passing?

03:31 Does it seem relatively well-used?

03:34 And there's ways to look for that with PyPI stats.

03:38 And then has there been a commit in the last year?

03:41 And has there been a release in the last year?

03:44 The 12th one is interesting, I think, because sometimes there have been commits.

03:48 There are maintainers that are pushing to the main line.

03:50 But nobody's actually releasing to PyPI because the actual one person that has release privileges hasn't been doing that.

04:00 I'm not sure, I guess.

04:03 What do you think?

04:04 He goes through more detail.

04:05 But do you have any comments on this, either Michael or Ann?

04:08 I'd like this, Miss.

04:10 I mean, obviously, it's directly related to some of the work we've been doing at Adafruit.

04:18 I mean, and we're trying to make sure that we don't have bottlenecks.

04:24 Like, multiple people have authorization to do releases and merges and that type of thing.

04:33 And it would be rather unsettling if there was a package that was several years old and no releases.

04:41 And that's where you start getting into problems.

04:44 Sure.

04:45 I totally agree.

04:46 Things can be done.

04:47 There can be, like, here's the thing that parses CSS styles.

04:51 Like, maybe that just doesn't need to be updated.

04:53 But that's not the case for most things.

04:55 Here's a web framework.

04:56 It hasn't changed in four years.

04:58 That might make you nervous because the web has changed a lot in four years.

05:02 And Python's changed.

05:03 So is it even, it just takes a little bit to, you have to push to kick the CI and test on, I guess you don't have to.

05:11 You can manually kick CI to run it on the latest Python version.

05:14 Yeah.

05:15 One more area, and that might be multiple little additions or it might be grouped into one that people understand as a group of things.

05:23 But does it use modern language ideas and constructs?

05:27 So, for example, does it use Python type hints or no?

05:31 Yeah.

05:32 Does it use async and await?

05:39 Is there an async capability?

05:40 Right.

05:41 Or if I'm like, well, I really want to use FastAPI and I have this database that would be awesome to talk to, but this thing in the middle that does the database part, there's no async version?

05:49 Well, then I've thrown away.

05:50 I cannot access that part of the new Python world.

05:53 Right.

05:54 And so those kinds of, like, group that into, does it use modern Python ideas and features?

05:59 Yeah, that one's a tough one because sometimes a project will want to support older Python versions, so they can't really.

06:05 Yes, exactly.

06:06 One of the things Anne said that I wanted to highlight was, I like these 12 questions to ask of my own projects.

06:13 I mean, yes, it's for dependencies, but I also, these are good questions just to ask for your own project.

06:18 How am I doing?

06:20 How am I doing?

06:21 And I have this package that's kind of used by a handful of people or maybe a thousand people, but if I've not updated in the last couple of years, that's kind of lame.

06:32 I should just take a few hours and go check it out and push something up.

06:35 Yeah, for sure.

06:36 All right.

06:37 Now that I see your list and know what you're talking about, I love it.

06:40 It's great.

06:40 I want to talk about abusing things.

06:42 Let's talk about stack abuse.

06:43 Okay.

06:44 No, stack abuse is just the blog from Stack Overflow.

06:48 But what I want to talk about is validating email addresses.

06:52 So this might sound like a solved problem, right?

06:56 We've talked about Regex 101 and stuff like that.

07:00 And surely you can go, you can get some regular expression and apply it to an email address.

07:06 Now that may or may not be good.

07:08 There are so many little weird domains these days.

07:12 Like I just got a .tech domain.

07:15 That is four letters on the end.

07:17 And if your Regex is like, does it go thing, at sign, something, .3 or two things?

07:25 Well, that fails.

07:26 I've had that email address come up and say, oh, you got to enter a valid email address.

07:29 Like this is a valid email address.

07:30 You crummy Regex from 2000.

07:33 You know what I mean?

07:34 So this one goes a little bit beyond that.

07:38 Like it does validate that kind of stuff that you're thinking about, right?

07:41 It does validate that like there's an at sign and there's a domain at the end and those kinds

07:47 of things.

07:48 But it also does a couple of other things that I think are worth considering.

07:52 That's kind of cool.

07:54 So for example, one of the things that it'll do if I scroll down a little bit is it will

07:59 actually check that the domain is real.

08:02 So if you were to say my email is something at blah, blah, blah, junk, junk, junk, just type

08:09 in junk.

08:09 Like, no, no, no.

08:10 There's no way that could be delivered.

08:12 So it's going to validate, like actually do a DNS lookup on the domain name for that.

08:17 Right?

08:17 So it'll check on the internet that this is a real thing.

08:20 It also does some interesting things about normalization or canonicalization of the email.

08:26 So for example, there's different ways to represent the same thing in Unicode and stuff like that.

08:32 And you'll end up with a, here's the definitive way in which you should express this in your

08:36 database so that you can check, have I seen this before or things like that.

08:40 You could even get ASCII representations of it from what comes back.

08:44 So be cool.

08:45 It'll do the check for deliverability.

08:49 And then it also does that normalization plus the regex.

08:52 Wow.

08:52 Neat, right?

08:53 Yeah.

08:53 You're right.

08:54 Yeah.

08:54 I mean, it's not going to change the world, right?

08:57 We all have to validate email addresses and whatnot.

09:00 But putting just type equals email in an HTML form is not going to tell you that, for example,

09:06 the DNS exists and things like that.

09:09 So I think this is a cool sort of next level version.

09:12 And it's a Python package that runs on the server.

09:14 You just pip install it and then you call validate.

09:17 And of course, it needs to do the DNS lookup and stuff like that.

09:20 I like it.

09:21 Cool.

09:21 Yeah.

09:22 Awesome.

09:22 Yeah.

09:23 It's really easy to use.

09:24 So I think that that's a nice feature.

09:26 So let's...

09:29 And it's production ready and as a fairly recent release.

09:33 Awesome.

09:34 I'm glad you checked on it.

09:37 And before we switch over to Anne's first topic, John Sheehan out in the audience says,

09:41 for phone numbers, I had really good luck with phone numbers, all one word, no spaces,

09:45 Python library.

09:46 Oh, very cool.

09:47 Yeah.

09:48 That has...

09:48 I think phone numbers are more complicated than emails in the sense that like they're different

09:52 links and styles and all sorts of stuff.

09:55 Well, I've lived in many places in the world and so many people do this US-centric phone

10:02 number check and do not parse it for international numbers and it drives people crazy.

10:10 Yeah.

10:11 I bet it does.

10:12 Cool.

10:13 All right.

10:13 Well, tell us about your first item.

10:14 Well, I was going to talk about one of the main things I've been doing with Adafruit that's

10:20 Python related and that's the Python and Microcontrollers newsletter.

10:24 We think this is the only newsletter focusing on Python on very small hardware devices.

10:33 And I started as editor about the time of the pandemic when priorities were switched and

10:41 somebody said, well, I've got to do something else.

10:44 Here, it's yours.

10:44 And I said, okay.

10:45 So we currently have about 9,400 subscribers and it focuses mainly on the two flavors of Python

10:56 that run on small devices on hardware.

10:59 And that's CircuitPython and MicroPython.

11:02 When I say it, it's kind of obvious that the full CPython will not fit on a device with

11:11 limited memory and capabilities.

11:14 So MicroPython was first developed in CircuitPython.

11:18 I'll talk about it later in the show.

11:20 that actually work on very small devices and provide a very Python experience in coding these

11:29 as compared to C or Assembly or some of the other ways in which people do it.

11:35 Yeah.

11:35 So this is obviously free and open source, just like everything else Adafruit does and hopefully

11:43 much of the Python world.

11:46 Yeah.

11:47 One of the real exciting things I've seen going on with you all is working to get CircuitPython

11:52 and MicroPython more close together.

11:54 So it's kind of one world for the small Python things.

11:58 Sure.

11:59 It's, I mean, CircuitPython is a fork, but we bring in the upstream features of MicroPython

12:08 and we provide some compatibility through a library called Blinka.

12:16 So on certain microcontrollers, you can take a MicroPython program and run it in CircuitPython.

12:25 There's some differences that were chosen.

12:30 And again, I'll go over those in a bit.

12:33 But the two programs talk to each other.

12:36 It's a very friendly relationship.

12:38 Adafruit has provided support to MicroPython.

12:42 We consider it kind of a big happy family rather than the Hatfields and the McCoys.

12:48 Nice.

12:50 If anybody's interested in our weekly newsletter, they can go to AdafruitDaily.com.

12:56 And it was specifically chosen to be a different domain than Adafruit because there's no sharing

13:04 of information between, you know, nothing behind the curtain even.

13:09 It's a totally separate website.

13:11 It's none of the data is used for advertising.

13:15 And, you know, all the things that one does when they sign up on the web, it's pure and clean.

13:24 And it's easy to subscribe and unsubscribe.

13:28 There's no pressure to say, oh, do you really want to unsubscribe?

13:33 I've been going through this process of unsubscribing from a tremendous number of old newsletters

13:39 that have just piled up.

13:40 And so many of them are like, type in your email address here and uncheck the four things you

13:45 would like to unsubscribe to.

13:47 I'm like, you know, this is not stopping me.

13:48 We're typing this in and this is happening.

13:50 I'm out of here.

13:51 Yeah, that's good to hear.

13:52 Yeah.

13:52 No one wants to actually go to that much effort.

13:55 I've made, you know, just one click and, you know, you're gone.

13:58 You can come back if you want to.

14:00 But we really encourage community involvement in this.

14:06 It's not Anne writing her own thoughts together and putting them down via GitHub to WordPress.

14:12 It's there are different ways in which people can contribute.

14:17 It's all done on GitHub.

14:20 So people can put an issue if they like or actually a PR on the current document.

14:26 And and I review those.

14:29 You accept PRs for your newsletter?

14:31 Sure.

14:32 That's awesome.

14:33 Why not?

14:34 I mean, I've not had that many issues.

14:38 No, it's great.

14:39 We have some instructions on, OK, if you're going to put an image in, you know, make it a

14:44 certain size and parameters.

14:47 If you can put an animated GIF, you know, kind of do it this way.

14:50 Otherwise, you know, just kind of as long as it's kind of in the same format, I'll take it.

14:57 Again, we try to be very GitHub friend.

14:59 We love GitHub.

15:00 And again, although all our stuff's open source on GitHub.

15:04 So, you know, people can do whatever they wish.

15:07 And we want to encourage communication.

15:11 But, you know, if people don't want to use GitHub, they can email the information to cpnews at

15:18 adafruit.com or they can hashtag CircuitPython or MicroPython on, say, Twitter.

15:24 And I do.

15:25 I go through and pick up things.

15:27 Cool.

15:28 Yeah.

15:29 Yeah.

15:29 Very cool.

15:29 Yeah.

15:30 I subscribe to the newsletter.

15:31 Thank you.

15:32 Yeah.

15:32 You bet.

15:33 I love the idea of a sort of direct community involvement.

15:37 Brian, we should just put our show notes up beforehand and let people do PRs against that.

15:40 Love it.

15:41 We just have like a Trello board.

15:43 Well, I didn't put it up here, but one of the things we do when we tap CircuitPython, the

15:50 phrase is code plus community.

15:52 And we have a pretty broad community on, again, like Twitter, a large Discord server, Reddit,

16:01 Instagram, just wherever you might try to get information.

16:09 We try to target copying it on there.

16:14 And yeah.

16:15 And I think Adafruit and CircuitPython are doing community correctly, or at least doing it a

16:22 good way because it's obvious.

16:23 And like for Discord, we have a code of conduct that's, you know, plain to see.

16:28 For CircuitPython, it's very similar to the Discord one.

16:33 It's kind of the philosophy of, you know, do good things, you know, be good.

16:39 Yeah.

16:39 You know, everybody can get along.

16:42 We welcome good-hearted things to happen.

16:47 And it, for, you know, 99.9% of it, it works.

16:51 Because CircuitPython is not Adafruit.

16:55 We want CircuitPython to be much, much, much bigger than Adafruit as far as adoption and effort.

17:03 And again, that reflects over to MicroPython.

17:06 And the whole thing goes to the bigger Python community.

17:10 I mean, Guido van Rossum has tweeted in various things saying, yes, he supports Python on small

17:19 devices.

17:19 I mean, small devices to supercomputers.

17:23 I mean, it all works.

17:24 Yeah, that's awesome.

17:25 Yeah.

17:25 Very cool.

17:26 All right.

17:26 Well, people should check it out for sure.

17:28 Now, before we move on, I do want to talk about our sponsor for this week, Microsoft for Startups,

17:35 Founders Hub.

17:37 They're doing super cool stuff.

17:38 As someone who has started his own small business, it is a lot of work.

17:43 There's a lot of uncertainty.

17:44 And knowing how to get help and having support of people who have experience is really, really

17:50 valuable.

17:50 So starting business is hard.

17:53 They say that by some estimates, 90% of all the startups will go out of business in the first

17:58 year.

17:58 It's tough, but that's how it is.

18:00 With that in mind, Microsoft for Startups set out to understand what startups need to be

18:04 successful and create a digital platform to help overcome those challenges.

18:08 And that's where they got their Founders Hub.

18:10 So Microsoft for Startups Founders Hub provides all founders at any stage with free resources

18:16 to help them solve startup challenges.

18:18 You get technology benefits, access to expert guidance and skilled resources, mentorship, networking

18:25 connections, and so much more.

18:27 So, and unlike a lot of other similar programs in the industry, it doesn't require startups

18:33 to be investor backed or third party validated to participate.

18:36 Founders Hub is just open to everyone.

18:38 So what do you get?

18:39 You get, you can speed up your development with free access to GitHub and Microsoft cloud resources

18:44 that have a bunch of credits that unlock over time.

18:47 So you can grow without worrying about paying for stuff.

18:49 They also help startups innovate.

18:51 They're partnering with companies like OpenAI, AI research and deployment company.

18:57 to get extra benefits through their partners as well.

18:59 So with the Founders Hub, it's not really about who you know.

19:02 You have this access to this mentorship network.

19:05 So you get access to a pool of hundreds of mentors across a range of disciplines, areas

19:10 like idea validation, fundraising, management and coaching, sales and marketing, and specific

19:16 technical stress points.

19:17 I think that might be the most valuable, honestly, is, hey, I need to talk to this person or somebody.

19:21 Is this a good idea?

19:22 Is this how I should be doing?

19:23 So you can book a one-on-one meeting with mentors, many of whom are founders themselves.

19:28 So make your idea a reality today with critical support that you'll get from Microsoft for Startups Founders Hub.

19:35 During the program, visit pythonbytes.fm/founders hub.

19:38 Click the link in your show notes.

19:40 And yeah, thanks to Microsoft for supporting the show.

19:43 Nice.

19:43 Indeed.

19:44 All right, Brian, you got the next one, right?

19:45 Yeah.

19:46 So I want to talk about Git a little bit.

19:49 And so I've been using, I mean, I've been using Git personally for a long time and professionally

19:56 for many years at work for version control, of course.

19:59 But I've used others as well.

20:00 And it's one of the interesting things about Git is you can do it, you can use it a lot of different

20:07 ways.

20:07 And it trips people up, actually, to start with.

20:10 And so this was interesting.

20:12 There's an article called Get Organized, a Better Git Workflow.

20:16 I actually learned about it by listening to episode 480 of the Change Log, which was talking

20:22 about this workflow.

20:24 And the idea, it really appeals to me.

20:27 So I haven't tried it, but I'm going to try it out.

20:30 So I'm going to kind of go through the idea.

20:32 The idea is when you're working on a new project instead or some new code, you create a branch

20:42 off of the master or main or whatever.

20:44 And then you just push up your work with simple comments for yourself or just work in progress

20:52 comments is all.

20:54 And then when you're ready, all of that, when you're ready to do a PR or something, all

21:01 of those commits are going to be in a sloppy format.

21:03 It's hard to review those.

21:05 But you, so what the proposal for this, and this is, oh, who's the author of this?

21:11 Annie Sexton.

21:12 Annie's workflow is once you're at that point, you're ready to do a PR, go ahead and do a

21:17 get reset against origin main.

21:20 And what that does is it keeps all of your changes that you've done, but it kind of forgets

21:26 all the history.

21:27 And then, and then you can recommit in a logical order that makes sense for reviewing.

21:33 So you can do, you know, I, I did clean up here.

21:38 I did, I added this feature over here.

21:40 I fixed this bug over here.

21:41 And it, and there's a comment in the, the article, which I totally agree with is you can say,

21:47 I'm going to separate those into different PRs, but often that's disruptive to your workflow.

21:53 Often there's, there's a few things you're doing.

21:55 You're cleaning up while you're coding.

21:57 You know, Brian, when I do that, I'm like, oh, I'm going to check this in separately.

22:01 So I know that this is a special task that I'm going to like isolate.

22:04 And then I'm like, oh no, I just checked in part of it.

22:07 You know what I mean?

22:07 Like it's, it's so easy to go, oh darn, I was doing these two things at the same time.

22:11 And yeah, so yeah, I feel that.

22:13 So some of the benefits of this are that it's, it's helps for big PRs.

22:18 So once you're, once you're done, you've got a pull request that, that if somebody looks at

22:22 the individual commits in the PR, they're broken up into easy to review bits.

22:28 And I think that's lovely.

22:31 I, and I, you know, I definitely wouldn't do something like this for, you know, a one line

22:35 change or a small change.

22:37 That's kind of overkill, but for things that you're working on for a while, this is sort

22:42 of a cool workflow to play with.

22:45 And I think I'm going to try it out.

22:46 Looks neat.

22:47 Yeah, this looks great.

22:48 I'm definitely going to explore it as well, because I was just listening to a podcast where

22:52 somebody was talking about like, oh yeah, I issued a PR to myself and then I accepted

22:56 it.

22:56 And, and other people laughed.

22:58 They're like, that's so weird.

22:59 Why would you do a PR to yourself?

23:00 But like these, these organizing ways of like, this is the whole feature or this is the whole

23:06 thing that I did.

23:07 Like there's real value in having that as a, oh no, what changed across this?

23:11 I need to go back and compare or like know the totality of it and stuff.

23:14 I really like these organizing ideas.

23:16 So I'm definitely going to look into it.

23:18 What do you think, Ian?

23:18 I like it too.

23:20 My, my workflow flow and that of a couple of colleagues I, I can think of would, would benefit

23:29 from that because some things get chaotic.

23:31 Oftentimes with data fruit you're working on something, you kind of get blocked and then

23:37 you go to something else.

23:38 It's very easy to say, okay, where am I?

23:42 And where did I leave off?

23:44 I think anything to help that.

23:47 Wonderful.

23:47 Yeah.

23:48 Very cool.

23:49 I definitely use the feature branch, do a bunch of changes over there, PR these days,

23:53 even if it's just, I'm the only one who's going to see it because it's, it just helps

23:56 me organize for sure.

23:57 All right.

23:58 Speaking of Git and organizing on all that thing, all those things.

24:02 Traditionally, if you want to issue a bug or track changes to CPython, you'd have to go

24:10 over to bugs.python.org.

24:12 I think it was.

24:13 And yet a long time ago, they moved the CPython source code to GitHub.

24:18 So it would be natural.

24:19 Like, well, if you're already there and you want to do a PR against GitHub, wouldn't it

24:23 be awesome if like the issue was there?

24:26 So you could say at issue 1,226,000, whatever it is, this solves that, or this addresses that

24:32 or something like that.

24:33 And so that's starting to happen.

24:34 And I believe that this is really one of the things that's being made possible by Lucas

24:38 Shalanga becoming the CPython core developer in residence because he can take the time

24:43 and actually focus on getting this done.

24:45 It might sound like, oh, you just copy the stuff from over in that system and then you

24:50 just create them over here.

24:51 But there's stuff going on that like makes this a little bit tricky.

24:55 So if you look at the article I'm linking to by Lucas, GitHub issues, migration is coming

25:00 soon.

25:00 There is a bunch of stuff going on about testing and how long it takes.

25:06 Let me see if I wrote that down, like one of the actual durations.

25:11 So it was pretty mind-blowing.

25:13 It was like, yeah, the migration is estimated to take anywhere from three to seven days of

25:18 continuous tight loop import this over to there next, next, next.

25:23 And so some of the things they got to deal with is like, well, if it's a seven day gap

25:28 and the issue appears over there, but we haven't yet closed it out on the other side.

25:33 People could be commenting on both ones and you could get like effectively merge conflicts,

25:38 I guess you would think of them as in GitHub.

25:40 So pretty wild to think about how they're doing this.

25:44 Should they start with the newest one so people have immediate access to that?

25:47 Or should they start with the oldest ones because they're least likely to change?

25:51 And it's pretty interesting.

25:53 They've compared it to some other really, really large platforms that have made a similar change.

25:58 Like the LLVM project made a similar migration from Bugzilla, Gasp.

26:03 And it took them 21 days to do the import.

26:07 So yeah, there's a lot of stuff going on to get the CPython issues and conversation fully over to GitHub.

26:15 But thank you, Lukash and team for doing this because yeah, there's a lot.

26:20 And if you look at the comments below, there's a ton of comments that have like some pretty interesting stuff.

26:24 If you want to look deeper.

26:25 And to be fair, some of the complexity here is because they're trying to do it without shutting people out.

26:31 Because one of the things you could do is you could just turn off submissions or comments for a week and then just convert it all.

26:39 Yeah, exactly.

26:40 Yeah.

26:41 But then that stops conversation for a week.

26:44 So anyway.

26:45 I think the real challenge is it's difficult to turn off partial.

26:49 It's hard to go like this older quarter of issues.

26:53 We're going to turn them off and then import them.

26:56 Yeah, but you can like turn everything off.

26:57 You could just say.

26:57 Yeah, that's the problem.

26:58 I think they don't want to turn it all off, right?

27:00 If they could do it in a more fine grained way, I think that they would already be on it.

27:03 But yeah, there's a lot of conversation.

27:06 That's a good point though.

27:07 They kind of held off.

27:07 And are you excited to see GitHub issues for CPython over here where they belong next to the code?

27:14 I am.

27:15 I already read this and put it on the newsletter.

27:18 It's all good to have it in one place.

27:21 You know, I don't know if there's any nexus between Guido working for Microsoft who owns GitHub.

27:27 But it's definite that, you know, where the code is and you have your discussion process integrated.

27:37 And that actually gives the GitHub developers a way in which to look at which a large project, the workflow goes as far as things.

27:51 And they can make more modern optimizations to say, hey, you know, this is kind of hard.

27:59 It was maybe hard in bugs.python.org.

28:03 We can make it a lot easier on GitHub with maybe not today, but with a couple tweaks in the next release.

28:10 Yeah, absolutely.

28:12 Definitely going to do a stress test sort of thing for them.

28:15 All right.

28:16 And you got the final one, the final one of our main topics.

28:19 Sure.

28:19 I was going to talk a little bit about MicroPython, CircuitPython, and GitHub, as we were just talking about, is an important parcel in all of this.

28:31 That CPython just will not work currently.

28:36 I mean, somebody might someday say, okay, we'll slim down CPython.

28:40 But for now, MicroPython, which was started as a Kickstarter by Damian George back in 2013, does a very good job of providing Python on small microcontroller boards, like a Raspberry Pi single board computer or a microcontroller board.

29:02 And microcontroller boards, like a Raspberry Pi single board, which is a very good job of providing Python.

29:11 Yeah.

29:12 And microcontrollers are all around us.

29:13 You know, there's one in this microphone, and they're everywhere.

29:13 Yeah.

29:14 And that's kind of a great job of providing Python.

29:26 And that's kind of a great job of providing Python.

29:27 I mean, I think it's a great job of providing Python and software, but it's a great job of providing Python, and it's a great job of providing Python.

29:39 And that's kind of a great job of providing Python, which is a great job of providing Python, and it's a great job of providing Python, and it's a great job of providing Python, and it's a great job of providing Python.

29:53 Why the fork?

29:54 Well, three things.

29:57 Circuit Python boards are specifically made such that they have a USB port, and they work just like a thumb drive.

30:05 And you plug it into a computer, PC, Mac, Linux, whatever, and it should show up as a thumb drive.

30:12 Very small one, you know, but you can drag a text file with your source code onto it or off of it, and it just runs.

30:24 Immediately, once there's a change in the file system, it picks it up.

30:28 Yeah.

30:28 The programming model is super interesting, right?

30:31 Like, if there's a file called a certain thing in a certain location, it just boots and runs it top to bottom.

30:36 And if that file changes, it just reboots, right?

30:39 That's right.

30:39 The equivalent of reboot for a $5 microcontroller.

30:42 We recommend code.py.

30:45 And, yeah, if it detects a change, then it just says, okay, I'm going to restart and do things over.

30:53 And it provides instant feedback, which a lot of people like.

30:57 The tried and true code in a framework compile, fix it errors, and then upload it to some piece of hardware is not something that a lot of people understand in 2022.

31:16 Whereas anybody can copy a file from one place to another, and they light up when they say, hey, it worked.

31:22 Or, oh, I got an error message.

31:24 I need to, yeah, a little syntax.

31:26 I'm learning Python or something.

31:28 So.

31:29 Brandon out in the audience, former guest here, said, I flashed my ESP32S to run MicroPython and have a look back.

31:38 Especially on ESP32 processors, there's a framework by the company that makes it, and it's rather daunting what you might have to do.

31:51 CircuitPython or MicroPython makes it very easy to think of it just as another piece of hardware rather than a specialized way in which one might have to code it previously.

32:03 Nice.

32:04 Let's see what else we got.

32:05 Oh, CircuitPython specifically wants to use CPython syntax whenever possible, because, again, MicroPython has deviated a bit.

32:18 But we want as much CPython code to be mirrored over as possible.

32:26 Finally, make it easy to use and understand for beginners, yet, you know, pretty much most of the hooks are there, so power users can dig right in.

32:35 We recently added a SyncIO.

32:38 You were talking about it.

32:40 Yeah.

32:40 MicroPython actually does asynchronous work a little better than CircuitPython.

32:46 It exposes some of the lower levels.

32:49 And, again, we recommend if the power users use that, but CircuitPython wants to come into that world also.

32:59 Nice.

33:01 Yeah.

33:01 It also provides a lot of equipment abstraction.

33:06 There are currently 283 boards that are compatible with CircuitPython and 87 single-board computers.

33:15 Now, Raspberry Pi lineup everybody knows about, but what about Orange Pi and Banana Pi, the Sony's presence?

33:24 There are...

33:25 Pyboard and all those things, yeah.

33:27 They run CPython just fine, but if you want to hook up a specific sensor, you don't want to have to code down to the register level on shifting bits around.

33:40 Adafruit's already done that for a lot of hardware.

33:43 So you throw on some software called the Blinka abstraction layer, and that interfaces between CPython on those small boards and CircuitPython code in the library.

33:54 And for the most part, it just works.

33:56 Nice.

33:57 Yeah.

33:57 CircuitPython is great.

33:59 People who want to get started with small devices should definitely, definitely check that out.

34:03 And there's a lot of tutorials on the Adafruit learning system and various websites around the internet of people who have tackled some of these interface changes.

34:15 And we encourage people to check things out, the tires.

34:20 Cool.

34:21 Very nice.

34:21 All right.

34:22 Well, that's it for our main items, Brian.

34:24 Oh, I just wanted a quick shout out.

34:26 We've got 30 minutes for this next one.

34:27 Let's do it.

34:27 30 minutes.

34:28 No, I just thought this is a really easy, quick blog post by Daniel Roy Greenfield that I wanted to plug because it's a good idea.

34:35 30-minute rule.

34:37 So if you're working on a problem at work or especially at work, if you have colleagues and you get stuck on the same problem for the half an hour, half an hour is the mark, you should ask for help.

34:49 Yeah.

34:50 Maybe you're just spinning.

34:50 Maybe you're just spinning your wheels.

34:50 Maybe you're just spinning your wheels or wasting time.

34:52 I would also add in maybe that's time to just get up and go get some coffee.

34:57 Yes.

34:57 Go have some lunch.

34:58 Absolutely.

34:58 Walk around.

34:59 Maybe you don't have the problem.

35:01 But yeah, it's a different number for different people.

35:06 But just remember, don't get stuck for too long.

35:08 It's probably not you.

35:09 It's you're just thinking about it wrong or something.

35:12 There's Twitter.

35:13 There's Discords.

35:15 There's places you can go and ask for help or even coworkers.

35:18 So I got two quick extras.

35:21 One, James wrote in to us.

35:23 Remember I said, when you say Python 3, do you really need to go back and say, well, Python 3.7.2 and beyond is this thing I am talking about?

35:32 Or just like if it's an expired version of Python, do we really, you know, a non-supported out-of-date Python 3.2 or something, do you really need to explicitly not talk about it?

35:40 Well, James wrote in.

35:42 He said, you guys were discussing Python 3 to mean any current supported version rather than, say, 3.7 plus or similar.

35:50 In my world, that's a really bad idea.

35:52 There's still tons of people using unsupported versions of Python, and they're not all invalid use cases.

35:57 For example, I'm one of the upstream maintainers at CloudInit.

36:00 Now, I was only recently able to remove Python 3.5 in order to make 3.6 our minimum supported version, which will continue for a year.

36:07 The reason is that our main customers are downstream distro packages like Ubuntu and Red Hat and so on.

36:12 And it's not uncommon for software released into long-term support.

36:17 LTS OS is to be supported for five to 10 years.

36:20 So that's a world that I don't live in.

36:24 But I didn't really think about the LTS story of like, yeah, we're going to support this for 10 years.

36:28 And it comes with this.

36:29 So it's got to keep getting that.

36:31 So, yeah, that's a very valid point, James.

36:33 And thanks for sharing your experience.

36:35 Top of the list of jobs I don't want.

36:37 Is it 10 years old and I can't change it?

36:41 Okay.

36:41 And then I was going to talk about Paul Cutler's new podcast, The Circuit Python Show.

36:47 If you're into Circuit Python, check it out.

36:49 He's really into Circuit Python.

36:51 And he and I have talked a lot about getting him set up on this podcast.

36:54 So congrats.

36:55 Happy to see that out there.

36:56 And I hear you're going to be on the show.

36:57 Is that right?

36:58 Yes.

36:59 In an upcoming episode, I will be on it.

37:04 You know, Paul is not affiliated with Adafruit.

37:07 No paid.

37:08 No.

37:08 He has independent control.

37:10 It's his baby.

37:11 But we love the fact that he's doing it.

37:14 We've recommended people in the community that he might want to chat with.

37:20 And again, he's interviewing, you know, the odd Adafruit person.

37:24 And I mean odd, that there are many other people.

37:30 And I like what he's doing a lot.

37:34 Yeah.

37:35 This is the first episode.

37:36 He's also got like a preview thing of like, what is this thing I'm doing?

37:39 And yeah, it's good so far.

37:42 So today, it's speaking of it's less pounder.

37:45 He works.

37:45 He's done a lot in the UK.

37:48 He's working for Tom's Hardware.

37:50 And he's done a lot with Circuit Python.

37:53 So it's wonderful.

37:54 Speaking of podcasts, I just want to give a quick announcement, Brian, that we traditionally

37:59 have not been on Spotify.

38:00 I now moved our stuff over to Spotify.

38:02 So if people want to listen on Spotify for Python Bytes, it is not there.

38:05 Join the dark side.

38:06 We have joined the dark side.

38:08 All right.

38:08 That's it for all of our stuff, right?

38:10 Are we ready for a joke?

38:11 Yeah, sure.

38:12 You know, we're recording Tuesday, March 8th.

38:16 Imagine that it is Friday and coming to work.

38:20 Has this ever happened to you?

38:22 Me on Friday.

38:23 I'll just stop here and pick up where I left off.

38:25 Me on Monday.

38:26 This is developer just staring, like holding their head.

38:29 Like, what?

38:30 What was I doing?

38:32 Why did I not make a better note of this?

38:34 Why did I not write this down?

38:36 What is happening?

38:37 Yeah, that's good.

38:39 We can all relate.

38:40 Right?

38:41 Right, Ian?

38:41 Oh, definitely.

38:42 Been there.

38:43 That's why you got to give good whip comments to yourself when you commit last on Friday.

38:49 But Friday, you're trying to get out.

38:52 You know, you're trying to, you know, start your weekend.

38:54 I mean, notes.

38:56 I mean.

38:57 Exactly.

38:57 Exactly.

38:57 Exactly.

38:58 This is the hangover, though.

39:00 This is what you get.

39:00 Love it.

39:01 I do, too.

39:02 All right.

39:03 Well, I love that Ian came to join.

39:04 And I love being here with you, Brian, every week.

39:06 So thank you both.

39:07 Yeah.

39:07 And thanks, everybody, that was on the stream watching.

39:11 Yep.

39:12 Thank you.

39:12 Thank you.

39:13 Thank you.

39:13 It's been a lot of fun.

39:14 I enjoyed it.

39:15 Yeah.

39:15 Same.

39:16 Bye.

39:16 Thanks for listening to Python Bytes.

39:18 Follow the show on Twitter via at Python Bytes.

39:20 That's Python Bytes as in B-Y-T-E-S.

39:24 Get the full show notes over at Pythonbytes.fm.

39:26 If you have a news item we should cover, just visit Pythonbytes.fm and click Submit in the

39:31 nav bar.

39:32 We're always on the lookout for sharing something cool.

39:34 If you want to join us for the live recording, just visit the website and click Livestream to get

39:39 notified of when our next episode goes live.

39:41 That's usually happening at noon Pacific on Wednesdays over at YouTube.

39:46 On behalf of myself and Brian Okken, this is Michael Kennedy.

39:49 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page