 Hello everyone! This is CircuitPython Weekly for Monday, February 5th, 2024. This is the time of the week where we get together to talk about all things CircuitPython. I'm Liz. I'm sponsored by Adafruit to work on CircuitPython. CircuitPython is a version of Python designed to run on tiny computers called microcontrollers. CircuitPython development is primarily sponsored by Adafruit. So if you want to support Adafruit and CircuitPython, consider purchasing hardware from adafruit.com. This meeting is hosted on the Adafruit Discord server. You can join anytime by going to the adafruit.it slash discord. We hold the meeting in the CircuitPython dev text channel and the CircuitPython voice channel. This meeting typically happens on Mondays at 2pm Eastern, 11am Pacific, except when it coincides with a US holiday. In the note stock there's a link to a calendar you can view online or add to your favorite calendar app. We also send notifications about upcoming meetings via Discord. If you would like to receive these notifications, ask us to add you to the CircuitPython Nista's Discord role. There's a notes document that accompanies the meeting and recording. You can contribute to the document beforehand. The file notes document includes timestamps to go along with the video, so you can use the doc or skip around and view the parts of the video that interest you most. Meeting tends to run 30 to 60 minutes. After each meeting, we post a link to the next meeting's notes document in CircuitPython dev channel on the Adafruit Discord. Check the PIN messages to find the latest note stock so you can add your notes for the following meeting. If you wish to participate but cannot attend, you can leave huggerports and stats updates in the document for us to read during the meeting. This meeting is held in five parts. Versus community news. This is a look at all things CircuitPython and Python on hardware in the community. It's a chosen set of items from our Python on microcontrollers newsletter. Second part is the stay of CircuitPython libraries in Bolinka. This is a quantitative overview of the entire project. It's a chance to look at the project by numbers separate from our status updates. Third part is huggerports. Huggerports is an opportunity to highlight the good things folks are doing, taking the time to recognize the awesome folks in our community. Fourth part is status updates. Status updates is an opportunity to report on what we've been up to, take a couple of minutes and talk about what you've been doing in the last week since the last meeting and what you'll be up to over the next week. And the fifth part is in the weeds. In the weeds is an opportunity for more long form discussions. These discussions can come out of status updates or be something you've identified ahead of time as too long for status updates. And that covers how the meeting will go. And with that, we will get started with community news. And big headlines this week. CircuitPython 9.0 beta zero released. CircuitPython 9.0 beta zero, a beta release for 9.0 is now available and is the newest unstable release. This release has known bugs that will be addressed before 9.0 final. And there are quite a few notable changes, new split heap internal dynamic storage mechanism, merge updates from Megapython, expressive update to IDF 5 and many, many more. Next is CircuitPython 2024 responses summarized. Scott Shawcroft shares all of their responses to the CircuitPython 2024 campaign thanks to those who contributed. And interesting project I saw was a video player in a VHS tape, a fun mini project to cram a Raspberry Pi based composite video player recorder inside a VHS cassette. Build uses a Raspberry Pi 3A Plus controlled by Python. That was on Hackster, GitHub, and YouTube. This and more is available in our weekly Python for Microcontrollers newsletter, which goes out via email on Monday mornings. Visit AdafruitDaily.com to subscribe to the newsletter. Thanks to Ann for putting the newsletter together. If you have any Python on hardware projects to share or find content you'd like to see included, please consider contributing to a newsletter. You can open a PR on GitHub, mention Ann Engineer on Twitter with hashtag CircuitPython or Maston, or email cpnews at Adafruit.com with a link. And that is the community news. Next up is the state of CircuitPython libraries and Blinka. So, the state of CircuitPython libraries and Blinka is a quantitative overview of the entire project. It gives us a chance to look at the health of the project separate from our SAS updates. We'll talk about the project overall, then separately discuss the core libraries and Blinka. So, overall, 21 pull requests were merged by 14 authors and they included, Scurrelly, Jephler, Arjaquette, Michael Pacusa, Vladak, I Like Cake, Lady Aida, Fomeguy, Michael Stoops, Tether, Weblate, ADCC, Dan Halbert, and Just Mobile Eyes. Thank you all. There are eight reviewers, Maker Melissa, Carter Nelson, Jephler, Brent Rue, Tanute, Fomeguy, J. Edgar Park, and Dan Halpert. There were 34 closed issues by 13 people and 23 opened by 20 people. And now we'll hear from Scott about the core. Thanks, Liz. Okay. So, for the core, we had nine pull requests merged from four different authors. This is a little bit lower than normal, but we also do have some reviewers out. We had three reviewers of these, nine. And thanks to ADCC as it being a new contributor or new author as well. We have 29 open pull requests. Like I said, we're a bit backlogged, but that's okay. We'll get through those this week. We had 17 closed issues by four people and 10 opened by eight. So, we're still not down seven, which is great for a total of 680 open issues. We have eight active milestones. Milestones are used to know that we've triaged everything and prioritized for Aida Fruit funded development. We have no open issues on A2X, which is our current stable release, and that's excellent. We had 42 open issues for 9.0, which is what we're hoping to make our next stable one. And then we also have one issue that's not aside of the milestones. We have a little bit of triage to do. And that's it for the core. Thank you, Scott. And next we'll hear from Tim for the libraries. Thanks, Liz. This section covers all of the Aida Fruit libraries, which you can find on GitHub under names like Aida Fruit underscore, CircuitPython underscore, and then the name of the library. These are mostly Python level code that allows you to interact with various devices, like drivers, or the other main segment is helper libraries that allow you to work at a higher level without having to micromanage so many of the details in order to achieve some higher level projects and things. Across all of those libraries this week, we had 11 pull requests merged by 10 authors. A couple of the names that were newer or less familiar to me were Skyrally, Arjakwet, and Tether. Those were the ones that I had put in there. So thanks to those folks who might be newer or less frequent contributors. Thanks to all of the other folks as well whose names are a little bit more familiar to me. And for those 11 pull requests, we had seven reviewers this week. So thanks to our reviewers, including JP, Carter, and Brent popping in for reviews this week. Thanks to them as well as our other more regular reviewers. Of those, let's see, we had the 11 pull requests that were merged. And of those 11, the oldest one was 217 days old. So knocking out some of the older ones again this week. And the newest is down at the one day like it normally is. That leaves us with 49 open pull requests. The oldest being 536 days and the newest just one. And let's see, we had 13 closed issues in the past week by seven people. And then 13 new issues opened up as well by 12 people. So same number of issues net. And then that leaves us with 731 open issues. And of those, there are 19 of them that are labeled as good first issues, which you can find over at circuitpython.org slash contributing, which is a great place to look if you want to get involved with the Circuit Python project. Basically, the way that we tend to get folks in when they first want to get involved is helping out with these good first issues. You can find them listed on the page at circuitpython.org slash contributing. That page lists out a couple of different things, including the open PRs and the issues. And on the issues tab, it does have a dropdown for filtering by the labels, including that good first issue label, which are issues that have been identified as less complex or good for folks who might not have as much experience. So head there if you would like to get involved with contributing. The other main thing that I would encourage you to do if that's the case is join us over on Discord, which is where this meeting occurs. There's a circuitpython dev channel and help with circuitpython channel. And there's always folks who are willing to help you out if you are trying to get involved with the project but need help in the realm of GitHub. We can point you towards some guides, and if you need help with any other part of it, we can help you out there on the Discord. In PyPyStats for the week, there were 133,283 downloads of all of these 324 libraries. The top 10 is listed here in the notes if you'd like to take a look at those. And for updated libraries this week, it looks like Po, ASM, and WaveViz are the libraries with some new bits in them. So check those out if you'd like. Thanks. Great. Thank you so much, Tim. And now Scott is going to read Blinka for us since Melissa's out. Thank you, Liz. Okay, so Blinka is the compatibility later layer for MicroPython and Linux single board computers running CPython. Blinka provides the quote-unquote standard circuit Python API so that you can use it in those environments. In Blinka there was one pull request merge from one author, Michael Stoops, thanks to them. We had six open pull requests across a number of repositories. There were four closed issues by three people and zero opened. So Netdown 4, which is great for a total of 181 open issues. Downloads-wise, there was 12,343 API downloads in the last week. And over the last month, for PyWheels, there was 10,414 downloads. And Blinka now supports 129 different boards. That's it for Blinka. Thank you very much. And that was the state of circuit Python, the libraries, and Blinka. Next up is group hugs. Group hugs is a chance to highlight folks in the circuit Python community and beyond for doing awesome things. I'll start and then we'll go down the list alphabetically to give everyone a chance to participate. If you are text-only or are missing the meeting, I'll read your notes when I get to them in the list. So I'm going to kick things off with a group hug. And then next is DJ Devin, who I don't see in the list. So I will read for him. He has hug reports for Thea Flowers, Winter Bloom, for a neat demo of her new Neptune Eurorack module. It's a filter. It's very cool. Foamy Guy, Justin, Alpakenon, Bear, and Deshipoo for a lively discussion about stubs in Discord. It was fun to watch you all go back and forth with ideas. And Tanute for the deep dive this week that covered a wide variety of topics and bugs. And next we'll hear from Foamy Guy. All right. Hug reports for me this week, thanks to Jeff who created and shared a minimal file editor that runs in CircuitPython. This was a little while back, a couple of months back, I think, but I miss it at the time. It is a really neat project that stretches the boundaries of what I thought was possible with CircuitPython Terminal. So I didn't realize it could do something quite like this. And it's really interesting to poke at and build something with. And then hug report for Justin, who made a utility that builds some device-specific Word stub files and for testing out a branch that I made that adds it to the normal CircuitPython stubs build process. And then just a group hug for everybody. Thanks. Great. Thank you. And next we'll hear from Jaren. Oh, my God. I hit the unmute button once. Yeah, so hugged Foamy Guy for this quick fix and then refix of the bitmap tools for the SMS scrolling demo. We're looking into that so fast. And a group hug for everybody else. Awesome. Thank you. And now we'll hear from Justin. Yeah, I just want to do a double hug to Foamy Guy, one for a PR for the request library that he got reviewed and merged in. And just for the huge work he put together to take the script I had made for the CircuitPython stubs and actually make a PR that might actually make that so anybody can use it. Thanks on that. Awesome. And now we'll hear from Scott. Hello. Hugged Report to everybody who did CircuitPython 2024. It's exciting to see the ambition grow. People want to do new things because we can already do so many cool things. Hugged to the LLVM embedded folks for entertaining my ideas in the meeting last week. I'm trying to make a compiler and the linkers that work better for making CircuitPython. Hugged to Jaren for the 9.0 testing. I see your issues and thank you for filing them. And Hugged Report to Foamy Guy for testing USB hosts. I'm very excited to get more people using USB hosts. Great. Thank you. And now we'll hear from Tyeth, who I don't think is on, so I'll read for them. Big hug to Tanute, both generally in life and specifically for the parallel display work on the Lilygo T-Display S3. Not only was it great educationally, you rekindled a tiny CircuitPython flame and that was Hugged Reports. Next is Status Updates. Status Updates is our time to tell folks what we're up to individually. I will start and we'll go through the list alphabetically. When I call on you, take a couple of minutes to talk about what you've been doing since last meeting and what you'll be doing until next meeting. This is also an opportunity to provide tips and tricks relevant to what people are working on. If a discussion becomes too long for status updates, we can move it to in the weeds. And I'll kick things off. I went through learn guides that use SD cards and added warnings about needing a directory for the SD card to mount to as of the CircuitPython9 beta zero. I also wrote up a quick page on the Memento product guide on how to manually add the directory to your CircuitPy drive. And I'm starting a new project with the qualia that required setting up platform IO, which I'd never done before, so at the end of last week I got that sorted out and have been equating myself with the Arduino GFX library. And right now I have tiny little plates of sushi scrolling across a long screen that will hopefully turn into a fun project. And then next is DJ Devon 3, who I will read for. Finished designing a prototype PCB for a featherwing adapter to an ST7796S spy display. I've already written the driver and I've been using it for some display IO testing, tracking down an issue with the driver in its sequence where soft reload causes the board to reload twice. The featherwing adapter and driver should work with any feather and CircuitPython. After watching FOMIGuy use cookie cutter last week, I doubt I have the skills for contributing the driver to the community bundle. I bet you do. Started redesigning an enclosure for the Adafruit TFT featherwing that uses magnets instead of screws to hold it together. Working on ST7796S display enclosure that will work in the same way. Still working on a treasure box project with the ST7796S display, ST7796S featherwing, 3D printing and CircuitPython requests with the Fitbit API. And then next is ADCC, who is text only. Got through the night with no flooding, but the power is out here in Mendocino County. Making progress on BLEIO, albeit slowly. Updated main to the latest CYW43 driver, plus some local patches awaiting integration upstream. And now we will hear from FOMIGuy. Alright, I have been working on the text editor or it's kind of like a little cyber deck project or a little self-contained word processor. I made a makeshift visible cursor that is made out of a label and just layered on top of the existing terminal view. It's a bit kind of clunky and hammered together, so to speak, but it does the job. I inside that editor made a few other tweaks and fixes and things for how the backspace gets handled specifically from the USB host keyboard. And I tried to add line numbers, although I don't have a workable solution. I'm not sure if I will be able to come up with something quick enough to actually be able to show line numbers. But the rest of the kind of core functionality of opening files, editing them and saving them is all working, which is super neat to have it all kind of come together with the host keyboard and everything. I confirmed an issue that was submitted for the SMS scroller project that was stemming from a function inside bitmap tools called Blit, which had some changes to its argument validation. And I made a fix for that. It took me a little while of looking around inside the core and to try to understand what the code in there does. But I think I finally made some progress there and managed to put in a fix, although I also started making a test for that. And as I was writing the test, I realized that the fix was not actually accurate for how we want the behavior as far as I understand it. So I made another change to the behavior, which made it even less complex, which is nice. And then finished up the test, which is cool. I wrote in here a belated hug report as well for Jeff, who pointed me towards those tests inside the core. I hadn't realized those exist where it can have a test and like an expected results. That's kind of a neat functionality in there. I submitted a PR that adds the device specific board def builder that Justin created into the circuit Python stubs build process. And I set up a entry point. I think they call it specifically kind of like a command you can run in your terminal in order to actually set that to whichever device you want so that you can get the more specific details inside your IDE and stuff. And then lastly, I tested a fix in requests, which was around the handling of duplicated headers. There was a change made to that recently, but it caused issues for Adafruit IO. So I was testing out the fix for that. That's what I have got going on. Thanks. Great. Thank you. And now we'll hear from Justin. Yeah, it was some of the random work I've been doing. I've been switching out boards a ton and just realizing the differences for kind of where they need to do things. For example, grabbing time or pins for airlift and whatnot. And so I'm kind of creating two separate projects. One is a handler on get time that you can basically pass in almost anything. It would be so GPS, real-time clock, ESP for its NTP or things like that. And that way you can have just as simple eyes and need the time once that's set up and that way it kind of simplifies code down the real line. And then also kind of a config thing that you can kind of pass in a profile name and it would load different config things. I've been using it a bunch for grabbing the right set of pins for airlift and passing that on a bunch of different boards and whatnot. And again, it allows me to have my code.py be basically the same for everything, but then having this config.json file that gets loaded to be able to change that stuff on the fly. I've been finding it really helpful. So working on some of those things. Also on that did some updates to my connection manager, made sure everything was up to date. We've had a handful of merges into the requests in the mini MQTT. At this point, still just kind of standing still until the other folks here have a chance to kind of look at it and see if that's the way they want to go. So some things do have requests frozen. It would be awesome if they got in by 9.0, but who knows. And then just kind of, I was curious, have heard of some things about improved memory and sockets. So I did a test with 9.0 beta, opening concurrent connections over SSL on 829 on an ESB32S3. I was only able to get three sockets before I ran into issues. And on the 9.0 beta, I was able to get four. So it does seem like some things have started to free up there. Great. Thanks for the go. Thank you. I'd definitely be curious to hear about your time stuff, because I've run into the four of projects. We have pitch out of it. And then next we're going to hear from Scott. Yeah, just following up with what Justin's saying is that we, I did just do a tweak. I don't even know if it's in beta zero, but SSL memory basically is limited by internal memory. And I, you know what, I have, I think it's pending. There's a PR out that hasn't been merged in yet that may actually raise that number further. Because we have a setting where internal malloc for ESPIDF is allowed to use PSRAM, but I switched it so it won't. And that allows us to have more dynamic Wi-Fi transmission buffers that will actually take less static memory. So we might actually have to be able to have more SSL sessions. I don't know. It certainly made an S2 example that was failing work again. So there's some memory free there internally. That is just one of the number of open PRs I have for fixes for 9.0, which is my first bullet point. I'm updating pulse IO, frequency IO, rotary IO, count IO, and neopixel write to their IDF-5 APIs in order to fix some bugs and move to the newer APIs. It actually simplifies our code a lot because the new APIs do resource tracking management, which is what we were having to do manually ourselves before. So that's been great. But it does mean that these modules will basically have new implementations. And so a lot of the work that I have to do this week is fixing or testing those and making sure that they're working as desired. One change I think I'm going to do with 9.0. I thought I was done changing behavior, but this one makes a lot of sense to me. There's an open issue for it. And the current 8.0 behavior doesn't make sense. So in pulse-in, currently, if the buffer is full, when you create a pulse-in, you say how many max pulses you want to capture. And if you happen to capture more pulses than that, it overwrites the oldest one. But because our buffer assumes that you can track which one's high and which one's low, overwriting it actually throws your whole buffer off. So I think it's basically a bug that that's the behavior. So there's an issue that I'm doing and because I'm in here right now, I want to change it so that if you have your pulse-in buffer and you overflow it, you basically get too many pulses in, it will just pause the pulse-in. So the data in the buffer will still be valid, but you'll have to restart it if you want to get more things. So that's my plan with that. Ari, my son has an ear infection and a hurt leg, so I may be out some in the middle of the week here because they're kind of the days that I stay home with him if he has to stay home. I haven't done any progress since last week on the LLVM compiler stuff I've been doing. It's not a high priority, but I did meet and present it kind of to the folks on Thursday morning. They were interested, but not quite head and red. They're head and fully rounded, I don't think. Generally, they're pretty cautious. And then last up, just a link to Circuit Python 2024, although it was up in the community news as well. So that's my update. Great, thank you. And that is going to do it for status updates. Next is in the weeds. In the weeds is an opportunity for long-form discussions that either come out of status updates or that folks have identified ahead of time. If you have any in the weeds topics, please make sure they get added while we're discussing other things. So we're not going around to see if anyone has topics. But today, we do have our first topic from Scott. So this is one that I kind of came up with when I was digging around. We've been having a lot of trouble fitting boards on the same D21, which is something we've had for years. But one thing that crossed my mind is that a lot of our core classes have these enter and exit defines that allows you to use them in a with statement, which is also kind of the context manager. And I kind of wanted to get a feeling about whether people use this at all, because generally I think people don't use it. But then again, I was talking about this on the stream and Tyeth did a search, and it does look like it's used in a few places. So I was kind of wanting to gauge people's thoughts about, like, is it useful for all of our core classes to do this, or could we do an audit and find, like, nobody uses it with digital in-out, so we should just remove it and gain that space back. I just wanted to kind of get a feeling for what folks thought about that. And Jeff and Dan are out, so I might ask the next question as well. Would that cover, like, C Python built-ins and stuff, like open f equals open is one of the things I see replaced most frequently. No, I wasn't planning on doing that. It was mainly just thinking all of the, I think a lot of the native, like, circuit Python APIs have it on all their objects. And, like, there's usually, maybe sometimes there's like a small custom function that goes with it too. I don't know how much memory is actually saved, but maybe that's the thing to figure out is how much memory it actually saves. Personally, I don't know how heavily my opinion weighs, but personally, I don't tend to use the context processors too much, so I certainly would not miss them, but... My two cents would be anything that's really intensive, like, memory-wise. Like, I know, so I've seen it in, like, the request library for responses. I think anything where you're dealing with big buffers or things like that, right? Obviously, like you said, the ones for, like, open things would stay. I think those ones are important. I think if it's something that's smaller, that's not a big deal, that, you know, will really affect garbage collection and whatnot aren't as big of a deal at that point. So I think some of them should definitely stay. Right, and I think that, like, what you're getting at is the reason that I added it in the first place is that these classes tend to claim resources internal to the micro, and if you don't have this ability, then you're kind of, like, you have to manage D&Nit yourself. Another change that I'm kind of trending towards is making the classes, when they get deleted, automatically release stuff, but you can't do that. You can't know when that happens. You have to use D&Nit to be explicit. D&Nit or a context manager like this to be explicit. Keith Ehe says, the use of the WIS statement does help a lot of traditional Python programmers transitioning into CircuitPython has helped me explain a few concepts of what a micro can do and can't do, but that's a different group. Anecdata says, probably worth an audit. Hard to know how much external code will break. Definitely need context managers on files, sockets, and other core core stuff. Yeah, I'm taking all the IO classes. I'm not thinking anything where it's a context manager in CPython, I would not remove. I'm just talking about the CircuitPython APIs. Okay, I guess the conclusion is that we should see how much we can potentially save from it and then decide. I'll try to come back next week with that. Sounds good, and thank you. All right, so that's going to wrap up in the weeds and I think the meeting. So this has been CircuitPython Weekly for Monday, February 5th, 2024. Thank you to everyone who participated. If you would like to support Adafruit and CircuitPython and those of us that work on CircuitPython, consider purchasing from the Adafruit shop at Adafruit.com. The video of this meeting will be released on YouTube at YouTube.com slash Adafruit, and the podcast will be available on major podcast services. It will also be featured in the Python for Microcontrollers newsletter. Visit AdafruitDaily.com to subscribe. Next meeting will be held next Monday as usual at 2 p.m. Eastern and 11 a.m. Pacific. This meeting is held on the Adafruit Discord, which you can join by going to adafruit.it slash discord. To be notified about the meeting and any changes to the time or day, you can ask to be added to CircuitPython.com's role on Discord. And we hope to see you all next week. Thanks, everyone.