#circuitpython-dev

1 messages · Page 389 of 1

slender iron
#

just pushed a bit more

atomic summit
#
 ❯ pre-commit --version                    
pre-commit 2.10.1

 seon@iMac  ~/c/p/espressif   s3_support ⁝ ✱ ? 
 ❯ pre-commit install                      
pre-commit installed at .git/hooks/pre-commit
#

I have it installed. Maybe I need to update it ?

slender iron
#

¯_(ツ)_/¯

#

I did pre-commit run -a manually

atomic summit
#

woah, when I run that I get a stack of errors

#

After walls of errors, I get this FileNotFoundError: [Errno 2] No such file or directory: 'uncrustify'

#

also ModuleNotFoundError: No module named 'polib'

slender iron
#

ya, I have those installed

atomic summit
#

Do I have to build uncrustify ?

slender iron
#

I think it's commonly in a package manager

atomic summit
#

ahh, no pip, but brew

slender iron
#

pip for polib

#

brew for uncrustify

atomic summit
#

yup, have polib installed now and am brewing a cup of uncrustify atm

slender iron
#

atomic summit
#

❯ pre-commit run -a
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
Translations.............................................................Passed
Formatting...............................................................Passed

elapsed time 14s

#

all set now I hope

slender iron
#

👍

manic glacierBOT
#

Updating a macropad to RC2 from the site made the board not mount (and make the mouse stutter).
When I plug the board or reset, the safe mode blink happens, then nothing. Not even the screen shows anything.
Putting RC1 back, and power cycling restored it to normal.

Trying recent builds, I narrowed it down to #5341. Reverting it in RC2 fixed the issue.

On a Raspberry pico, RC2 does not show or run the code when plugged in, but comes back and seems to run ok after pressing reset. The fi...

tulip sleet
#

@jaunty juniper I did do a smoke test of a Feather RP2040, but perhaps did end up press reset.

jaunty juniper
#

I wonder if the screen init makes it different on the macropad ?

#

or whatever else is different

tulip sleet
#

well it doesn't work right on the Feather either. If I power-cycle the board, it does not come up until I press reset

#

my smoke test did not involve power-cycling

#

If I had to guess, I would say that a USB interrupt is not getting serviced on initial power up

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-rc.2 on 2021-09-15; S2Mini with ESP32S2-S2FN4R2

Code/REPL

import board
import digitalio
from adafruit_debouncer import Debouncer
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode

pin = digitalio.DigitalInOut(board.D2)
pin.direction = digitalio.Direction.INPUT
pin.pull = digitalio.Pull.UP
switch = Debouncer(pin)

led = digitalio.DigitalInOut(board...
manic glacierBOT
#

I tried reproducing this on a Metro ESP32-S2, using board.IO5 for the button and board.LED for the LED. Otherwise everything is the same. Libraries are all the latest versions. There is no boot.py, and keeb.py and code.py are as described above.

I do not see this problem with rc.2, including when restarting from a power-cycle or a ctrl-C, ctrl-D in the REPL.

manic glacierBOT
manic glacierBOT
#
[adafruit/circuitpython] New branch created: revert\-5341\-patch\-1
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Thanks for the PR @mscreations. I have one suggestion, I think it might be better if autoreload_enabled is done as a property.

We don't have module properties, so it would need to be moved to supervisor.runtime (the sole instance of Runtime). We could then have a single autoreload property to query or set. But it would be a breaking change. We might consider moving other things to there as well if we made this change.

slender iron
#

@tulip sleet do you think we should do an rc.3?

tulip sleet
#

I am all set with rc.3 release notes and posts. Just waiting for my merge and then the label.

slender iron
#

great! thank you

tulip sleet
#

I did test it 🙂

slender iron
#

I'll be out for a bit in an hour-ish but around generally

tulip sleet
#

I am out early for a while, 1pm your time.

#

I just need to push some buttons in a couple hours.

slender iron
#

kk, let me know if you need me to do anything

tulip sleet
#

sure, np

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 7\.0\.0\-rc\.3
orchid basinBOT
manic glacierBOT
#

Nice work! Sounds like you are ready to make a PR.

Generally we don't pre-initialize any individual pins. The one exception I could see is the power enable pin that you may want to turn on in board_init and off in board_deinit. However, this will prevent code.py control of it which some people usually want.

For I2C, SPI and UART we usually have default busses that are available as board.I2C etc. This requires entries in the board table and definition of the DEFAULT_* macros like here:...

manic glacierBOT
crimson ferry
#

Is it worth implementing something in the core, perhaps in board, that indicates the polarity of the on-board user LED? Some convention perhaps like the NeoPixel power control pin. Most are active-high (True turns it on), but there are some active-low in the field. Or should this fall to user code?

onyx hinge
#

@tulip sleet it just came to my attention that the "paralleldisplay" module isn't actually importable due to mistakes I made 😕 not sure how I missed it. It doesn't affect boards that activate a parallel display in their board file, or old code that uses displayio.ParallelBus, so the impact is low .. nothing that should stop an RC from becoming 7.0.0. PR incoming.

tulip sleet
#

or 7.1

onyx hinge
#

it might have worked by accident before the conversion to MP_REGISTER_MODULE, if it wasn't that way in the first place(?)

manic glacierBOT
tulip sleet
idle owl
#

Thanks for handling the releases, Dan!

tulip sleet
#

yw! lotta waiting around

onyx hinge
#

I'm working on trying to convert the espressif ParallelBus to use the i2s peripheral. Their nomenclature for the pins seems different than ours, I wonder if it's just naming or is actually incompatible .. can anyone help me translate? They have "cs", "wr", and "rs", while we have command, chip_select, write, read, and reset. a compatble (with circuitpython) silk has rd (circuitpython read), wr (circuitpython write), c/d (circuitpython command) and cs (circuitpython chip_select).

#

"rs" seems to be "c/d", because i2s_lcd_write_cmd switches its level

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Please verify that the handling of ulab is correct. ulab is a submodule, so I am not sure that it works to name files within the submodule.

This also misses other files that influence how the docs build, such as (top directory) conf.py, the "*.inc" files in docs/templates, tools/extract_pyi.py (which influences how source files are extracted into pyi files which feed into the docs), requirements_doc.txt, etc. Those are just the ones I thought of off the top of my head.

(The extreme di...

onyx hinge
#

anybody else get this in a PR run?

#

the CHANGED_FILES environment variable has a VERY LENGTHY value, and apparently runs up against a Linux limitation

#

(on my desktop system, it seems that a single environment variable setting NAME=value must not exceed 131071 bytes)

manic glacierBOT
onyx hinge
#

I looked briefly into adding timestamps to keypad events, but I'd have to go mess with the low-level ringbuf code as the ringbuf elements would have to be >16 bits.

#

and of course code space

tulip sleet
onyx hinge
#

.. I had it all implemented, but then realized I was just using the timestamp for when the event was taken out of the queue

#

the other stumbling block I hit was whether timestamp was taken into account by == (I decided it would not be)

tulip sleet
#

the ringbuf code could be made better

#

we inherited the 16-bit stuff from MPy. I think it would make more sense to parameterize it by type, but not so easy to do in C vs C++

onyx hinge
#

I'm thinking if we did do it, I'd do a 32 bit packed type -- 16 bits of timestamp, which can be extended to the 28 bits as long as you manage not to go 30s between keyboard polls.

#

(29 bits? whatever. just a bit of slightly tricky math)

tulip sleet
#

or I was going to use two integers, using a time_ms() directly and then the event info

#

The buffer is not all that big. As you mentioned, reducing the code size is more important

onyx hinge
#
<Event: key_number 1 released> queued at 321635, dequeued at 322220 [+585ms]
<Event: key_number 2 released> queued at 321635, dequeued at 322230 [+595ms]
``` when mashing a bunch of keys at once
manic glacierBOT
onyx hinge
#

well let's see what CI says 😕

#

you can get the macropad pretty far behind when it's e.g., typing in the digikey URL but that's no surprise. otherwise, when you press just one key at a time it's almost always dequeued within 2ms and often in <1ms (prints 0ms)

onyx hinge
#

of course if the scanning loop is 32ms then the 1ms time it spends on the queue is small potatoes

tulip sleet
#

are you using get() or getinto()?

onyx hinge
#

get(), it's just the basic macropad program

#

(I'm sure it generates all kinds of heap garbage too, so there'll be gc pauses as well)

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-rc.2 on 2021-09-15; Adafruit Metro ESP32S2 with ESP32S2

Code/REPL

No known minimum reproducible example.

Behavior

Spurious microcontroller.ResetReason.SOFTWARE during operation, but there is no microcontroller.reset() in either boot.py or code.py.

No unusual serial activity prior to rebooting. No tracebacks detected after restart.

I can't reproduce it on demand, only observed once i...

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-rc.1-65-gcddbfffb3-dirty on 2021-09-13; Adafruit PyPortal with samd51j20

Code/REPL

import board
import displayio
import array

display = board.DISPLAY
width = display.width
height = display.height
scale = 20
g = displayio.Group(scale=scale)
display.show(g)

bufsize = 2 * (width if display.rotation in (0,180) else height)
for y in range(0, height, scale):
    
    # buffer = bytearray(bufsize)
...
manic glacierBOT
analog bridge
#

any ideas on how to resolve this?

espidf/__init__.pyi:30: error: Cannot resolve name "MemoryError" (possible cyclic definition)
espidf/__init__.pyi:30: error: Class cannot subclass "MemoryError" (has type "Any")
//| class MemoryError(MemoryError):
//|     """Raised when an ESP IDF memory allocation fails."""
//|     ...
//|
onyx hinge
#

import builtins; class MemoryError(builtins.MemoryError): ... ?

#

which analysis tool shows that error? It (the diagnostic) seems incorrect to me.

>>> class MemoryError(MemoryError): pass
... 
>>> MemoryError is originalMemoryError
False
>>> issubclass(MemoryError, originalMemoryError)
True
``` this is perfectly good Python, it refers first to the built in MemoryError, but then stores a new MemoryError in the module level, so after that the name refers to the subclass.
analog bridge
onyx hinge
#

OK I'd raise the issue with mypy then and see if they really intend to error on this valid python code in a pyi file

#

errrr maybe it's mypy

#

yeah it's from the invocation of mypy --strict right?

analog bridge
#

trying without the --strict now

onyx hinge
#

without cyclic one of the two diagnostics still occurs

#

.. verified that my proposed workaround is accepted by mypy (the import builtins one)

analog bridge
#

is re-naming it to IDFMemoryError(MemoryError) a better option?

onyx hinge
#

not right this second, as it's an incompatible API change.

analog bridge
#

okay... will leave it for 8.0.0 then, thanks 🙂

manic glacierBOT
manic glacierBOT
lone axle
#

Is there a way to search across all the libraries for issues with the good first issue label? Or does it need to be searched individually on each library?

lone axle
#

Ah, I overlooked the sort dropdown. Yep that is perfect. Thank you 🙂

idle owl
#

Ah Neradoc got it.

#

Yeah that's how to do it.

jaunty juniper
#

it's only updated once a week right ?

idle owl
#

No it's updated daily.

jaunty juniper
#

ah 👍

manic glacierBOT
lone axle
#

@idle owl would it make sense to make an effort to sweep through the libraries and find any public functions that are missing type hints and / or parameter and return types in their docstring comments and open "good first issue"s for them? I don't know how many will turn up but I figure it might make good fodder for hacktoberfest.

idle owl
#

@lone axle That would be excellent. That's exactly what I was hoping for.

#

I bet there's enough to make it worthwhile. That's the kind of thing I was hoping we could find and get issues filed.

lone axle
#

I will tinker with it a bit this weekend. I'm thinking there may be a way to run a script against the whole bundle and find them.

idle owl
#

That would be great. Thanks for looking into it.

manic glacierBOT
#

I'll leave it to @tannewt to perform the final review. Thanks for addressing my specific low level concerns by changing the patterns, but I remain pessimistic about techniques like this being "right" and the initial round of changes are also causing me pain in my fork (#5359) and probably in others' forks, to the extent that actions is not useful anymore but just always errors.

manic glacierBOT
woeful shoal
#

I'm trying to change the advertised name of a BLE Keyboard but it keeps showing up as "CIRUCUITPY8728". When connecting to Windows10, the "Complete" and "Test" names (see code below) flash once before showing the "CIRCUITPY" name. In iOS 14 not even those appear, only the "CIRCUITPY". I'm running CircuitPython 6.3 on a Feather nRF52840 Express. Thanks!

import adafruit_ble
from adafruit_ble.advertising import Advertisement
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.services.standard.hid import HIDService
from adafruit_ble.services.standard.device_info import DeviceInfoService

import usb_hid
hid = HIDService()
from adafruit_hid.keyboard import Keyboard
from keyboard_layout_win_sp import KeyboardLayout
from keycode_win_sp import Keycode
k = Keyboard(hid.devices)
kl = KeyboardLayout(k)

device_info = DeviceInfoService(software_revision=adafruit_ble.version,manufacturer="Adafruit Industries")
advertisement = ProvideServicesAdvertisement(hid)
advertisement.appearance = 961
scan_response = Advertisement()
scan_response.complete_name = "Complete Name"
advertisement.complete_name = "This is a Test"

ble = adafruit_ble.BLERadio()
if not ble.connected:
print("advertising")
advertisement.complete_name = "This is a Test"
ble.start_advertising(advertisement, scan_response)
else:
print("already connected")
print(ble.connections)

tulip sleet
orchid basinBOT
woeful shoal
woeful shoal
jaunty juniper
#

if I understand correctly the advertisement name will be set to it, unless you override it with something else, in which case the advertisement is used by the host before pairing, and the ble.name is used once the device si connected

tulip sleet
manic glacierBOT
analog bridge
#

@slender iron @atomic summit I made some modifications to your S3 work.

#

I started porting C3 on top of your work but ran into problems as idf master is unstable and is changing actively which makes building something on top of it difficult.

#

So, instead I split the refactoring and switch to IDF_TARGET changes from S3 and idf master update.

atomic summit
atomic summit
#

Is 4.3.1 stable enough for you?

analog bridge
#

With this split there shouldn't be any merge conflicts in the future

#

I'll PR with the refactoring and switch to IDF_TARGET changes to main. You can pull the S3 and idf master update changes from a separate branch.

#

You will have to reset your local branch to the nearest common commit between your local branch and adafruit/circuitpython/main due to changes to commit history.

#

Moving forward there shouldn't be any merge conflicts.

manic glacierBOT
ornate breach
#

so, I was rebasing my branch for BREAD 2040 locally with latest main branch but when i did git add -A I get:

warning: adding embedded git repository: ports/esp32s2/certificates/nina-fw
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint: 
hint:     git submodule add <url> ports/esp32s2/certificates/nina-fw
hint: 
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint:     git rm --cached ports/esp32s2/certificates/nina-fw
hint: 
hint: See "git help submodule" for more information.
#

should I be concerned?

#

perhaps I need to init the submodules

#

that was it

jaunty juniper
#

ah well maybe the submodules were not moved (or whatever git something something)

ornate breach
#

removed the esp32s2 subdirectory

#

hopefully that doesn't break anything

#

do we not need to update build.yml anymore with new board names?

ornate breach
#

nice

#

that's a nice change 🙂

manic glacierBOT
ornate breach
#

darn my mac and git adding things to commits that don't belong.. ugh..

manic glacierBOT
analog bridge
# manic glacier

@ornate breach regarding your PR, a rebase should fix things up

ornate breach
#

it was rebased against main

#

for some reason when i rebase it just... messes everything up. happens basically every time I add a board 😛

analog bridge
#

do git reset --hard HEAD~2

ornate breach
#

i already deleted and reforked lol, not a big deal. I saved a copy local of the files I need to add

#

i'm just lazy, don't worry. xD

analog bridge
#

np...🙂

orchid basinBOT
manic glacierBOT
ornate breach
#

Alright, much better

analog bridge
manic glacierBOT
lime trellis
#

Can anyone explain to me how callbacks work on the SAMD port in CP? All the callback examples online eventually throw their interrupt handler into a function named RTC_Handler. Now the CP port also has a RTC_Handler function, I just don't understand when it's being called?? Is it something to do with the RTOS?

tulip sleet
lime trellis
tulip sleet
lime trellis
tulip sleet
#

I don't think you will get an RTC interrupt. I think you will get a reset where the reason for resetting is that you're waking up from BACKUP.

#

deep sleep starts from a reset. You look and see why the reset happened, and then continue from there

#

It says "interrupt", but you will check this register to see that the reason was an RTC wakeup

lime trellis
# tulip sleet I don't think you will get an RTC interrupt. I think you will get a reset where ...

I see your point. But examples I've found put that check+callback into the RTC_Handler function. Like this ex: https://forum.arduino.cc/t/understanding-the-mode-0-and-mode-1-timer-on-the-samd51/662655/2

tulip sleet
#

it won't go into the RTC_Handler

#

that example is going into STANDBY mode

#

not BACKUP. Standby preserves the RAM. BACKUP does not. It starts from a reset.

#

Their definition of "deep" is not our definition

lime trellis
#

But still: "Hibernate and Backup modes will do a system reset once the exit interrupt is triggered. "

tulip sleet
#

no, our definition of deep sleep is that your program restarts, so no reason to retain RAM. It's as if you pressed the reset button, but you get this extra little piece of information that the RTC caused the reset.

#

we might need to retain a little state; typically there are a few registers in the RTC that can be used for that

lime trellis
pearl hare
#

@maholli the handler may be there to satisfy coding rules, but it does reset. You can stash away some information for the next run though

tulip sleet
#

The STM and SAMD are pretty different on how they do this, I think, so it may not be a very good example. Pin alarms are fairly different, for instance, I think.

lime trellis
tulip sleet
#

yeah, so with BACKUP, you can specify "tamper pins"

lime trellis
tulip sleet
#

that is what we expected to use for deep sleep. Only a few pins are possible.

#

nRF may also be a source of examples, but it's different in other ways. It has very good low-power RAM retention. So I'm not sure we used the no-RAM sleep there.

lime trellis
tulip sleet
#

YOu don't really need to do anythng after the reset. It's up to the user program to query the wake_alarm, and that will look at the RTC registers and the wakeup reason at that point.

lime trellis
lime trellis
#

I think I get it now & have a path forward. THANK YOU @tulip sleet ♥

lone axle
#

@tulip sleet If I understand the git history correctly I think you may have originally added the bootloaders.json file for circuitpython.org. I'm curious if you have any insight about whether it would be harmful to remove the trailing commas from that file in order to bring it in line with the JSON spec. A user has submitted a PR here with that change: https://github.com/adafruit/circuitpython-org/pull/763 I can test it out and leave a review, but wanted to see if there is any reason off the top of your head that it would be undesirable to make that change.

tulip sleet
#

(I am sorry to hear that the JSON spec does not allow trailing commas.)

jaunty juniper
#

yeah turns out it's old and clunky 🤷

lone axle
#

agreed 🥲

stuck elbow
#

json follows the "be loose in what you generate, but strict in what you accept" philosophy

jaunty juniper
#

ok I removed "disable=undefined-variable" from adafruit_tlc59711, but I have unrelated :

adafruit_tlc59711.py:337:17: E1101: Module 'struct' has no 'unpack_from' member (no-member)
adafruit_tlc59711.py:346:8: E1101: Module 'struct' has no 'pack_into' member (no-member)
adafruit_tlc59711.py:635:15: E1101: Module 'struct' has no 'unpack_from' member (no-member)
adafruit_tlc59711.py:868:12: E1101: Module 'struct' has no 'pack_into' member (no-member)
#

how do you deal with that ?

tulip sleet
#

maybe pylint is set up to use a very old python version

#

it is using pylama, which we don't use

#

anymore

#

I can't remember that we ever did in general

#

I'd rip all that out and make the setup.py and .github stuff consistent with a modern library

lone axle
#

it's possible that the person who worked on the longstanding PR may have used it and not removed it from the PR. This library is the one that had the PR open for a very long time.

jaunty juniper
#

ah that's over my head

lone axle
#

may be easiest to run cookiecutter to generate a new repo and then copy setup.py and pre-commit / pylint configs from it into this repo.

I can give it a try a bit later if you are stuck.

#

Also if you want to PR the change to add self. to fix the undefined-variables by itself I can review that and we can get it merged in order to get the version on PyPi working. Then we can get the infrastructure stuff in a follow up.

tulip sleet
#

or the constants could be moved out of the class. The advantage of that is that the _constants with const() will then be substituted at compile time and not take up room in the dictionary

#

that was the whole reason to use const(). It's not really useful inside the class

lone axle
#

Ah, that is good to know.

jaunty juniper
#

I was wondering about that, const() doesn't work on class properties then

tulip sleet
#

actually, I'm not sure it has to be at the global level. The MPy documentation is not that clear

#

checking on it

#

easy enough to try

#

I have to be afk for dad taxi duty, back later 🙂

jaunty juniper
#

by the way, the original code:

adafruit_tlc59711.py:292:33: E0602: Undefined variable '_CHIP_BUFFER_BYTE_COUNT' (undefined-variable)
adafruit_tlc59711.py:335:36: E0602: Undefined variable '_CHIP_BUFFER_BYTE_COUNT' (undefined-variable)
adafruit_tlc59711.py:362:28: E0602: Undefined variable '_BC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:368:28: E0602: Undefined variable '_BC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:374:28: E0602: Undefined variable '_BC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:399:28: E0602: Undefined variable '_FC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:405:28: E0602: Undefined variable '_FC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:411:28: E0602: Undefined variable '_FC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:417:28: E0602: Undefined variable '_FC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:423:28: E0602: Undefined variable '_FC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:443:28: E0602: Undefined variable '_WC_CHIP_BUFFER_BIT_OFFSET' (undefined-variable)
adafruit_tlc59711.py:450:28: E0602: Undefined variable '_CHIP_BUFFER_BYTE_COUNT' (undefined-variable)
adafruit_tlc59711.py:450:55: E0602: Undefined variable '_BUFFER_BYTES_PER_COLOR' (undefined-variable)
adafruit_tlc59711.py:453:28: E0602: Undefined variable '_BUFFER_BYTES_PER_COLOR' (undefined-variable)
adafruit_tlc59711.py:454:28: E0602: Undefined variable '_CHIP_BUFFER_HEADER_BYTE_COUNT' (undefined-variable)
lone axle
#

Eeek. The pylint disable was hiding a bunch of them.

#

It's weird to me that the class worked on microcontrollers. I did some of the testing for that PR and I am pretty certain that it worked on the microcontrollers I tested on.

jaunty juniper
#

I don't know, class properties do require self

#

testing with mpy-cross on a 5-lines class, global const takes 30 bytes less than global no const, class properties have 2 bytes of difference

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 6.3.0 on 2021-06-01; Adafruit Feather RP2040 with rp2040

Code/REPL

"""minimal working example of bug"""

import json

x = 5e6  # 5e5 works

old_d = {"number":x}

print("old_d", old_d)

jstring = json.dumps(old_d)

print("json string: ", jstring)

new_d = json.loads(jstring)

print("new_d", new_d)

Behavior

code.py output:
old_d {'number': 5e+06}
json string: {"number": 5e+06}
Traceba...

jaunty juniper
#

so I was somehow running pylint 2.6, but now that I updated to latest it didn't solve the struct issue but I get 20 "consider-using-f-string" 🤦

lone axle
#

Oooooh, that one is going to be rough for me. I still auto-pilot to .format() instead of f-strings.

jaunty juniper
#

I disabled it 😛

jaunty juniper
#

ok, so pre-commit uses pylint 2.7.1 which solves my f-strings issue, but still complains about struct, except not when running the CI on my fork, so... I think I'll PR that for a start.

manic glacierBOT
#

If possible, please test with the latest 7.0.0 release candidate.

If possible, please test again with the latest version, 7.0.0-rc.3 or newer. It appears it was fixed somewhere along the line.

Adafruit CircuitPython 7.0.0-rc.3-dirty on 2021-09-16; Adafruit Macropad RP2040 with rp2040
>>> import json
>>> json.loads('{"number": 5e+06}')
{'number': 5e+06}
spiral elk
#

@tulip sleet I finally tracked down the problem with #5355 to hosed windows usb drivers. Still mysterious why it only happens when code is run from code.py and not manually, but its definitely an issue on my machine.

tulip sleet
#

Thanks, that's really strange. What version of Windows are you running?

spiral elk
#

10

#

Really sorry for the waste of time

tulip sleet
#

So these are non-Adafruit drivers?? You don't need any drivers for CPy.

spiral elk
#

I think it was only autoinstalled drivers. Never did anything manually

tulip sleet
#

Do you happen to have a Cura driver?

#

Which drivers did you fix or remove? What was the fix?

spiral elk
#

Not fixed, but its something specific on my machine.

#

I suspect its something to do with the ST drivers that I needed for stlink

tulip sleet
#

Why do you think it's drivers?

spiral elk
#

Same machine fine on linux and also on my windows 10 notebook. And I have had issues with usb on this box before

#

This one has had several different winusb versions installed at various times in order to get stlink working.

tulip sleet
#

It may be utility programs like a backup program or a disk utility of some kind. It could be some kind of timing-related issue. We have seen various problems with that kind of thing. But if you figure it out let us know. Also if you have ever installed some HID drivers for unusual devices that might be an issue. Still, it's quite oddd.

spiral elk
#

Well, this machine is due for a bigger SSD anyhow, might do a fresh OS install.

manic glacierBOT
#
[adafruit/circuitpython] New branch created: 7\.0\.x
tulip sleet
#

@slender iron I made draft release notes for 7.0.0 final, for release soon. This is a re-tagging of 7.0.0-rc.3. The GitHub release page would not let me specify the 7.0.0-rc.3 commit as the commit for this release (it only lets you do "recent commits"), so I created a 7.0.x branch, which it will let me tag as 7.0.0.

manic glacierBOT
orchid basinBOT
lime trellis
#

So I can successfully deep sleep a samd from within circuitpython but only with the RTC in MODE1 and using PER (counter period). When trying to use MODE0 with CMP (compare) the interrupt never seems to fire? Not really sure atm

#

@tulip sleet Lucian refers to a sleep(PM_SLEEPCFG_SLEEPMODE_BACKUP_Val); function within his roughed-in atmel-samd/common-hal/alarm/__init__.c. Do you know what sleep function he's thinking of? I can't find it anywhere, so I'm doing all the register twiddling manually.

tulip sleet
orchid basinBOT
manic glacierBOT
#

Closes #5362

Tested on PyPortal with the following code:

import board
import displayio
import array
import ulab

display = board.DISPLAY
width = display.width
height = display.height
scale = max(width, height)

g = displayio.Group(scale=scale)
bitmap = displayio.Bitmap(10, 10, 1)
palette = displayio.Palette(1)
palette[0] = 0xFF7F00
tilegrid = displayio.TileGrid(bitmap, pixel_shader=palette)
g.append(tilegrid)
display.show(g)

bufsize = 2 * (width if display.ro...
tulip sleet
#

@slender iron so basically I am ready to make the 7.0.0 final release We talked about possibly doing it today (Sunday) or tonight, but I could also do it Monday.

slender iron
#

@tulip sleet thanks for getting is setup! I'm fine with today or tomorrow. I won't be around to support it until tomorrow

#

@lime trellis I know the samd51 has 8k backup ram that should be usable for sleep memory

lime trellis
slender iron
#

@analog bridge @atomic summit igrr told me that they are close to branching 4.4 and that master shouldn't change much before then. I'd prefer to work directly towards that but not merge it into our main until 4.4 is branched upstream.

tulip sleet
slender iron
#

sounds good! it'll be nice to have it stable

analog bridge
#
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
ninja: Entering directory `build-microdev_micro_c3/esp-idf'
[1/1] Performing build step for 'bootloader'
ninja: no work to do.
QSTR updated
esptool.py v3.1-dev
Merged 1 ELF section

1476864 bytes used,  620288 bytes free in flash firmware space out of 2097152 bytes (2048.0kB).
      0 bytes used,    8192 bytes free in 'RTC Fast Memory' out of 8192 bytes (8.0kB).
     16 bytes used,    8176 bytes free in 'RTC Slow Memory' out of 8192 bytes (8.0kB).
      0 bytes used,   32768 bytes free in 'Internal SRAM 0' out of 32768 bytes (32.0kB).
      0 bytes used,  294912 bytes free in 'Internal SRAM 1' out of 294912 bytes (288.0kB).
#

Also, I finally got CircuiPython blinka building for esp32c3 🚀

#

time to test if it actually boots or not 🤞

orchid basinBOT
orchid basinBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0-rc.2 on 2021-09-15; FeatherS2 with ESP32S2
Adafruit CircuitPython 7.0.0-rc.2 on 2021-09-15; Adafruit MagTag with ESP32S2
Adafruit CircuitPython 7.0.0-rc.2 on 2021-09-15; LILYGO TTGO T8 ESP32-S2 w/Display with ESP32S2

Code/REPL

No minimum reproducible example at this time.

Behavior

This is more of a placeholder issue since it's not reproducible on demand.

These are intermittent hardfaults tha...

orchid basinBOT
orchid basinBOT
manic glacierBOT
#

I think it's worth discussing some design goals here. Monitor will potentially be subjected to a firehose of wifi frames, even with filtering by channel, type (mgmt, data, etc), subtype (Beacon, Probe Request), etc. Limitations of RAM and processor speed will both probably come into play.

Espressif's esp-idf example allows saving to SD or I think somehow viewing over JTAG, but I think this may not be a common use case for CircuitPython users, who may want to see what's happening now an...

manic glacierBOT
manic glacierBOT
daring surge
#

socket – TCP, UDP and RAW socket support

Warning

This module is disabled in 6.x and will removed in 7.x. Please use networking libraries instead. (Native networking will provide a socket compatible class.)

#

where is the new socket compatible class located?

daring surge
#

I think I am supposed to just use "import socketpool"

manic glacierBOT
#

OK finally got around to working on this.

I've made progress and can put a SAMD into deep sleep from circuitpython. However, I'm stuck getting fake deep sleep playing nice.

Since https://github.com/adafruit/circuitpython/pull/5048 is closed, I've attached the relevant files so others can potentially help from here: common-hal.zip

crimson ferry
#

@daring surge yes, #help-with-circuitpython is the best place for questions of usage. For Airlift (ESP32 as wifi co-processor), use the adafruit_esp32spi library. For ESP32-S2 boards, use the built-in modules: socketpool, wifi, ssl, and ipaddress. Some examples here: https://github.com/anecdata/Socket

daring surge
#

@crimson ferry Thank you! your examples are excellent

manic glacierBOT
#
[adafruit/circuitpython] New tag created: 7\.0\.0
stuck elbow
#

\o/

orchid basinBOT
tulip sleet
#

on its way 🙂

solar whale
#

Congratulations!!!

tulip sleet
#

6.3.0 was released June 1, 2021; 6.0.0 was released Nov 16, 2020.

ornate breach
#

Super excited for 7 🙂

onyx hinge
#

It's the first prime-numbered release of CircuitPython since 5!

ornate breach
#

Lucky we’ve had so many prime number releases 🙂

#

1,2,3,5

#

Now 7! 🙂

stuck elbow
#

1 is not a prime number

onyx hinge
stuck elbow
#

if 1 was prime, factorizations wouldn't be unique

#

of course you can always come up with a system that is different, it's math, after all, nothing is set in stone

tulip sleet
prime flower
#

yay, downloading!

lone axle
#

@idle owl when you have a moment sometime check out this issue: https://github.com/FoamyGuy/missing_type_issue_maker/issues/2 and let me know if there are any changes that would be good to make before running a script to make similar ones on all libraries that contain function definitions with missing type information. It was created from a template so I can make any necessary modifications to the template before any "real" ones get created.

orchid basinBOT
onyx hinge
#

@lone axle It's worth noting that type annotations are not quite zero cost. They enlarge mpy files, because the bytecode for try/import/except is included, and because the strings typing, List, etc., are included.

Using the style try: import typing except: pass and then writing out the type annotation as typing.List[int] reduces the overhead, because then the string List is not included in the mpy-compiled file.

The difference is 50 bytes [no annotation, no import typing], 86 bytes [import typing], 108 bytes [from typing import List, Tuple].

To my surprise, attempting to measure extra RAM usage at runtime didn't show any. All variants (including the one with no typing) increased RAM usage after a gc.collect() by 224 bytes.

#

If a built in typing module were available [with no content], the un-guarded import typing variant is 63 bytes. but we can't provide a typing module in 7.0.0 anymore so that would have to wait to be viable.

#

None of that is to say NOT to do this, but maybe concentrate on modules that people are probably not using on non-express boards where they don't have much storage space available

lone axle
#

Interesting! thanks for the heads up, I had not considered any of that. I can amend the example code in the issue to use the import typing variant to reduce it as much as we can.

I wonder if it would be worthwhile in the long run to move to having .pyi files that are for documentation only distributed along side the library code instead of intermixed within it. If I understand correctly that could result in the same benefits from IDEs without adding any overhead to the libraries themselves.

onyx hinge
#

I don't know which is the right trade-off, but after I checked into what the costs were I wanted to share that info.

#

having to say typing.List everywhere feels like a drag

lone axle
#

I could also incorporate some sort of "exclude list" logic to the scripts to be able to skip libraries that we think the benefit of typing does not outweigh the cost of the extra size.

onyx hinge
#

having to maintain a parallel .pyi file feels like a drag

lone axle
#

Do you know if doc string comments in library code add any overhead? perhaps there would be a way to derive the .pyi files from docstrings similarly to how the core works if I understand that mechanism correctly.

onyx hinge
#

from typing import * ?

#

from typing import * with exception guard is 89 bytes and eliminates the need to say typing.List but probably gets you a pylint diagnostic

#

having to put extra infrastructure in place before we invite people to contribute type stubs seems like a drag

lone axle
#

true and probably not possible to pull off before hacktoberfest which was my original inspiration for trying to get these created as "good first issues"

onyx hinge
#

Make sure not to do the circuitplayground lib and call it good?

lone axle
#

I'll add a topic for in the weeds as well and we can see if anyone else has concerns for any other libraries. It will take me another few days to finish up the scripts that I intend to use to create them anyhow so we do still have a bit of time to get input from folks.

onyx hinge
#

Once typing is "in", can we add code to the repos to check it like we check pylint, to make sure it stays complete?

lone axle
#

Yeah I think we could. I'm using a tool called mypy to find instances that are missing it. I haven't tried it but I suspect it could be used from an actions task.

onyx hinge
#

@mental nexus hey long shot question -- when you implemented parallelbus for esp32s2, did you investigate using the i2s peripheral for lcd interfacing? I have been trying to do that, but it's not working for me...

#

@lone axle I think that's what we do in the core

#

I feel like I haven't heard from kmatch in awhile, hope it's OK to ping

lone axle
#

iirc kmatch mentioned getting into a new job and having a bit less free time to devote toward circuitpython. Still around to some extent though, they helped me out with some documentation for something a few weeks back.

onyx hinge
#

ah, i hope the new job is good for them!

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Channel Categories

8

Text Channels

59

Voice Channels

6

Members

30892

Roles

35

orchid basinBOT
#

I re-tested locally with the latest commits and everything looks and functions good to me.

@makermelissa adding info to bootloaders.json is a "soft requirement" perhaps. If it's omitted I believe it doesn't cause any serious errors that prevent the device page from working correctly. But it would cause the device not to show up under the appropriate MCU family filter / search that this PR adds and it would cause the bootloader section of the downloads page not to get included so it may b...

mental nexus
orchid basinBOT
#

bootloaders.json is a manually edited file, so far as I know; the only way to match up CircuitPython build board_id with the UF2 build board identifier is manually, that is, with build directories found in /adafruit/uf2-samdx1, /adafruit/Adafruit_nRF52_Bootloader, and /adafruit/tinyuf2 (stm, esp32s2, etc.).

Many boards that have UF2 bootloaders built for them however do not have bootloader_id entries ...

mental nexus
# onyx hinge ah, i hope the new job is good for them!

I’m working helping someone grow their vintage audio repair business so I’m heading up the learning curve as an audio repair tech. Luckily have a good mentor to nudge me up the learning hills and over the bumps!

manic glacierBOT
onyx hinge
#

@mental nexus I either missed that news or forgot it when it was fresh, that sounds like a really interesting line of work!

mental nexus
#

Thanks, doing software development has been fun but I had missed some of the hardware aspects. This audio business is a lot of variety, with a lot of hands on electronics and some mechanical work. But I’m always keeping my eyes on the widget work for CP.

orchid basinBOT
#

@makermelissa adding info to bootloaders.json is a "soft requirement" perhaps. If it's omitted I believe it doesn't cause any serious errors that prevent the device page from working correctly. But it would cause the device not to show up under the appropriate MCU family filter / search that this PR adds and it would cause the bootloader section of the downloads page not to get included so it may be a bit tougher for folks to find information about updating the bootloader.

I'm not ...

orchid basinBOT
#

I did the bootloader PR in #446. I made it a separate file because it was not easy to generate the bootloader info automatically from the various bootloader repos, which don't have board names consistent with the CircuitPython names. Moving to some per-board data files would make sense, but it was more work at the time than a single file.

Also at the time there was also some urgency to provide a spot to download bootloaders because of some significant bootloader bugs.

idle owl
modern wing
#

Happily lurking today, enjoy 🙂

errant grail
#

Is there a list of supported baudrates for busio.I2C in v7.0.0? Having trouble finding one that works with the SC-30 sensor that needs 50kHz or lower (25kHz on the CLUE board).

onyx hinge
#

@errant grail we discovered that basically the samd hardware didn't ACTUALLY furnish those low baudrates, and turned it into an error instead of giving a random, much higher baudrate

#

(without changing more about how the serial peripherals are clocked)

errant grail
#

It made a big difference on the CLUE board.

#

What's the minimum for the SAMD?

onyx hinge
#

oh, that's nrf52840 so those rates may work there

errant grail
#

Thanks @onyx hinge !

onyx hinge
#
    if (frequency >= 1000000) {
        config.frequency = NRF_TWIM_FREQ_1000K;
    } else
    #endif
    if (frequency >= 400000) {
        config.frequency = NRF_TWIM_FREQ_400K;
    } else if (frequency >= 250000) {
        config.frequency = NRF_TWIM_FREQ_250K;
    } else {
        config.frequency = NRF_TWIM_FREQ_100K;
    }
``` clue supports just these ~~4~~ 3 baud rates
errant grail
turbid radish
#

lurking

lone axle
onyx hinge
#
>>> import 😼
hello 😼😼😼😼😼
``` wow really?
lone axle
#
onyx hinge
lone axle
#

brings new meaning to descriptively named variables

turbid radish
#

Thanks

#

I thought the Amazon van was here

solar whale
#

my dog is barking at the truck!

onyx hinge
#

@idle wharf you can see both sides, you just need to buy a 2nd macro pad:)

#

(Kattni is under the weather and eventually took our advice to take a nap)

ember iris
#

Self care for the win!

solar whale
#

🐴

turbid radish
#

That is good

#

Harder features, more boards

onyx hinge
#

I answer to jepf

#

@gilded cradle do you want scott to read your status report too?

solar whale
#

@onyx hinge In my experience, when it works in debug, but not normal optimization, it is due to an uninitialized variable -- your mileage nay vary 😉

gilded cradle
#

@onyx hinge I can try reading

#

I grabbed some water, so hopefully that helps

onyx hinge
lone axle
#

I'm not sure if I understand all the way, but I wonder if it would be possible to pass that information from one step to another by writing it into a file in one and reading it in another?

jaunty juniper
#

when running on a fork, can we make it compare the branch with adafruit/circuitpython main ?

solar whale
#

Have to run -- have a good week, 👋

gilded cradle
#

I need to get going 👋

modern wing
#

Thanks everyone 🙂

onyx hinge
#

Thanks Scott!

ember iris
#

Thanks all!

slender iron
#

Here is the notes document for Monday’s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1rS5p7xF_UUpumitnW2mV-B3IL7vB6e7V2HIAkk7Zo9E/edit?usp=sharing

ornate breach
#

Hey @tulip sleet that bit you added, was that a new addition with 7?

tulip sleet
#

yes, very recent, maybe between the time you copied the files and submitted the PR

#

Alll boards now have that

ornate breach
#

Oh cool, I’ll note that on my next PR. I’m open sourcing some RP2040 boards I won’t get to manufacture with my company but I still want the availability of circuitpython 🙂

manic glacierBOT
onyx hinge
#

@tulip sleet looks like readthedocs should probably have something done for version 7

#

so that 7.0.x is a version that can be chosen, and maybe the default

slender iron
#

@onyx hinge I can do it

#

building 7.0.x now

onyx hinge
#

nice, thank you !

tulip sleet
#

oh yes, I forgot to do that. I should add a "Stable" release checklist to the internal build page

devout jolt
#

Congrats on the CP7 release everyone!

manic glacierBOT
orchid basinBOT
#

A cleaned-up version of #756 (supersedes that PR), including discussed migration of family & bootloader_id to board.md files per @makermelissa's suggestion.

bootloaders.json now contains only bootloader port (family) & version information, and no longer contains board information.

Tested locally such that _includes/download/board.html points to the correct downloads for CircuitPython & UF2 bootloader, and search/filter works as in #756.

manic glacierBOT
iron bloom
#

I was referred here from help-with-circuitpython. I’d like to add the keypad module to a feather M0 express. I am in the process of building CP following Dan’s guide. I’m building on a Mac. I downloaded and installed the ARM tool chain. I made a disk image. I changed the .mk file to include the keypad module. I ran the make command and I’m getting the error: no such file or directory: ‘arm-none-eabi-gcc’ Empty preprocessor output. What did I miss?

ornate breach
#

Did you install directly from ARM or through homebrew?

jaunty juniper
#

you are likely missing "/path/to/gcc-arm-none-eabi-10/bin/" in your $PATH

ornate breach
#

I found when installing through downloading from ARM didn’t yield the same result as using brew

iron bloom
#

Directly from ARM following the link from the guide. I installed the version that was in the guide

ornate breach
#

Try using the brew install. usually it sets up your paths that way

#

Not always but I’ve had better luck installing through brew

iron bloom
#

In the back of my mind I knew it had to do with PATH

jaunty juniper
#

yeah just add wherever you unzipped the bin to your PATH

#

oh well if you used the installer, find where it put it I guess

ornate breach
#

sudo ln -sl <download for> <path_dir>

jaunty juniper
#

I just prefer to know where the files are, inside my "build-circuitpython" directory, and add the path

ornate breach
#

Apple developer docs recommend using brew last I looked but either way works fine. I think brew adds it to your paths by default

iron bloom
#

I’ll try the brew way because I still get the error when I tried the other way

ornate breach
#

I’m not 100% sure, it was almost a month ago the last time I installed a tool chain on Mac

#

But last time I installed arm tool chain was brew

#

I probably should update my arm tool chain at some point

iron bloom
#

Got it to build. Thanks for help. @ornate breach @jaunty juniper

ornate breach
#

Nice! 🙂

#

Happy hacking! 🙂

manic glacierBOT
#

Providing a means to generate a simple list of "device X was present for Y seconds" is probably enough to get started. By passing in filters of channel, mgmt packet type and optionally (?) a minimum signal strength or minimum packet count found before storing is enough. This would further minimize the amount of data passed back to the CircuitPython level can be minimized.

Example : [A:72,B:12,C:99,D:2 ... ]

What do you think?

manic glacierBOT
manic glacierBOT
#

Makes sense to me. I'm still trying to get my arms around the idf example, and how to translate that to common-hal. Seems to me that:

  • sniffer start sets up a work queue, creates the sniffer task, sets up the sniffer callback for incoming frames, sets up the filters (frame type and channel in this case), and enables monitor mode
  • the sniffer callback receives one frame at a time and adds it to the work queue, if enough memory is available (I don't know what happens if the callback can't...
manic glacierBOT
onyx hinge
manic glacierBOT
tulip sleet
#

There are several errors in the doc there. I forgot to change the :param int ... to a Sequence. I should PR some doc fixes

#

thanks for noticing it's unclear

manic glacierBOT
tulip sleet
onyx hinge
#

@tulip sleet oh yeah, thanks for merging that

tulip sleet
#

that merge should get the timestamps in

onyx hinge
#

yay! I'm looking forward to using it as a way to timestamp the WWVB (time broadcast) signal in my clock. with it maybe I can use just one microcontroller instead of two.

timber mango
#

Can anyone tell me what reason there would be to use supervisor.ticks_ms() over time.monotonic_ns() ?

#

Does time.monotonic_ns() decrease in accuracy over time like time.monotonic() does?

jaunty juniper
#

mostly because long ints are required for it, and they are not available on all ports

#

and since there is no C-python API for a ms int counter that wraps, that's how we deal with that

timber mango
#

Ok, so on platforms where the time.monotonic_ns() command is available, it works just as well as supervisor.ticks_ms() ?

onyx hinge
#

supervisor.ticks_ms() is available on all boards, and creates no run-time allocations. however, because it wraps around you have to use wrap-aware routines to add or subtract with ticks. (this is in the library adafruit_ticks) If monotonic_ns works for you, no need to change. but if you were on a board without monotonic_ns, you should now have ticks_ms.

#

(and if you need to work with circuitpython 6.3, adafruit_ticks provides a compatible version of ticks_ms)

#

(but with precision limitations on boards that didn't have monotonic_ns)

mortal mica
solar whale
#

Hos something changed in audiocore? I am trying to play a .wav file and I get this error ```>>> f = open("/sounds/water-high.wav","rb")

audiocore.WaveFile(f)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Data chunk must follow fmt chunk

tulip sleet
#

Here's one^

solar whale
#

Thanks -- that works -- must be a bad file...

analog bridge
#

How to obtain CIRCUITPY_CREATOR_ID & CIRCUITPY_CREATION_ID for a BLE-only board?

tulip sleet
tidal kiln
#

C0209: Formatting a regular string which could be a f-string (consider-using-f-string)

#

new lint gripe

#

i'm gonna shush it unless it actually needs attention?

#

it's a PR to a repo that hasn't been touched in a while. but the .pylintrc looks inline with others.

tulip sleet
#

we should probably turn that off in general, since f-strings are not turned on for the smallest boards, due to space (they are enabled by MICROPY_CPYTHON_COMPAT right now)

tidal kiln
#

seems like a good idea

#

maybe it's just the repo?

#

pre-commit is failing on existing examples that aren't part of the PR

timber mango
#

@jaunty juniper and @onyx hinge Thanks for clarifying!

tulip sleet
jaunty juniper
#

in 2.11.0 even

tidal kiln
#

the warning equates to a fail though, for the ci

#

pylint (examples code)...................................................Failed

jaunty juniper
#

oh yeah the version is not pinned in the examples

tulip sleet
#

are we missing some flag-setting file? I thought we had a way to customize some of this

tidal kiln
#

maybe? and i can add if needed as part of this PR.

#

i have other commits to push

tulip sleet
#

You can edit .pre-commit-config.yaml

#

args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name $example; done)']

tidal kiln
#

@tulip sleet edit to add new disable?

tulip sleet
#

yes, though, I don't know whether we want to do a sweep for all of these at some point.

#

that file is from cookie-cutter, I assume

jaunty juniper
#

wasn't that there something about the version in the CI that is not pinned ?

tulip sleet
#

i think pre-commit doesn't allow us to pin the version??

#

there is something pre-commit won't do...

tidal kiln
#

am i just the lucky first person to run into this?

tulip sleet
#

we can't pin latest, we have to pin a specific version

tidal kiln
#

the precommit yaml is inline with other repos

slender iron
#

then creation id is up to you

tulip sleet
#

@onyx hinge I thought had a PR you closed that was experimenting with more argument types (UINT, etc.), but I cannot find it. I was interested in possibly reviving part of it. Do you have a pointer? Tnx.

onyx hinge
#

@tulip sleet let me look ..

#

The first time I added a bunch of stuff to mp_arg_parse_all, all untested. that's this branch

#

and never got around to using it

#

the intention was that something like MP_ARG_UINT, {.u_ulo=0, .u_uhi=65535} would set the inclusive range of the value. what to do about optional values was unclear.

tulip sleet
#

@onyx hinge Even if there are no savings, I think it saves writing boilerplate. it could be simplified to not have low/high, etc. Thanks, I will look at these in more detail.

onyx hinge
#

Thanks! I feel like there must be savings to be had ... but I wasn't finding it, so I went on to other things.

manic glacierBOT
orchid basinBOT
analog bridge
tulip sleet
#

239a is Adafruit's VID, so it looks CREATOR comes second

analog bridge
#

I see PR#3 requesting creator id and there scott suggests to use the first part for creator id

tulip sleet
#

😕 I cannot explain the inconsistency, so we'll leave it to @slender iron 🙂

orchid basinBOT
slender iron
#

creation ids and creator ids are 32 bits

#
  • each
#

the top two bytes set to zero is reserved for usb vids

orchid basinBOT
analog bridge
#

hmm... so something like 0x6d44_0000 is a creation id

slender iron
#

it could be either part

#

a full one would be 0x0000239a:0x00008021 is for metro m4

#

because creation ids are a superset of usb ids

analog bridge
#

okay now I get it

slender iron
#

I named it confusingly because I use "creation"

#

for the overall and for the "creator" administered piece

#

so all 0x0000xxxx are reserved for usb vids

#

and 0x00xxxxxx is for any other ids we may subset

#

(ble has assigned numbers for example)

analog bridge
#

👍

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Saola 1 w/Wrover with ESP32S2
Board ID:espressif_saola_1_wrover

Code/REPL

import wifi

Behavior

If the code.py tries to import the wifi module, the device will go to safe mode

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Crash into the HardFault_Handler.
Please file an is...
#

I did a clean install of 7.0.0 on the MagTag and the FeatherS2 yesterday. Install sequence: command line erase_flash, command line install TinyUF2, install (drag) CircuitPython UF2, install libraries and .py files, ctrl-C & return in console to enter REPL, EJECT Volume, hard reset, then let it run.

Saw 1st hardfault on one of these devices this morning.

#

Yes, I have a USB breakout connected to D19, D20, 5V and GND. The initial update to 7.0.0 was done by using the process described in https://circuitpython.org/board/espressif_saola_1_wrover/ to Install/Update the UF2 bootloader with the Adafruit WebSerial ESPTool. First the Erase, then writing the combined.bin and once the USB drive SAOLA1BOOT shows up, copied the adafruit-circuitpython-espressif_saola_1_wrover-en_US-7.0.0.uf2 on it and once it's back up the "Hello World" prints normally, but...

orchid basinBOT
manic glacierBOT
#

This is working for me, not using the WebSerial tool. (I am not having a lot of luck with the WebSerial tool for some reason.)

$ esptool.py --chip esp32s2 -p /dev/ttyACM0 -b 460800 erase_flash
esptool.py v3.1
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S2
Features: WiFi, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:00:7d:cc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Erasing f...
orchid basinBOT
manic glacierBOT
#

This enables non-consecutive pins and higher effective clock rates. It successfully drives the 2.8" TFT LCD in parallel mode (but so did the previous code).

My testing board is an Espressif Kaluga and the code is

import board
import displayio
import paralleldisplay
    
    
_DISPLAY_D0 = board.IO8
_DISPLAY_CS = board.IO2
_DISPLAY_CD = board.IO3  
_DISPLAY_WR = board.IO4
_DISPLAY_RD = board.IO5
_DISPLAY_RESET = board.IO6
_DISP...
idle owl
#

@lone axle Oh! I only just now figured out that what you sent me is an example issue that would be filed on a repo. I thought I was going to be going through your script. 😄

#

So, I don't understand the typing thing, if I'm being honest. So I'm not sure whether anything needs to be added to it or not from a technical standpoint. I think it's worth including in the section about reading out to us via Discord, that folks can also comment on the issue, but we would have to put in a more concerted effort to keep track of issue comments if we suggest that.

#

I wonder whether newbies can tag circuitpythonlibrarians or not?

ember iris
#

Need me to try and find out?

idle owl
#

@ember iris Yeah, please do. Find any open issue on a library, and try to tag CircuitPythonLibrarians in a reply (you don't need to send the reply).

#

Needs to be a reply to an existing issue for proof of concept, though I assume being able to there means it would work in a new issue as well.

ember iris
idle owl
#

Ok, yeah, that's what I figured.

ember iris
#

No problem, it seemed like something nice and quick to check. Glad I could help!

idle owl
#

I know even when it doesn't autocomplete individuals, it tags them when sending. But I'm unsure of how it works with groups.

idle owl
# ember iris No problem, it seemed like something nice and quick to check. Glad I could help!

Please tag the group, as you typed it out above, in a reply to this issue, and send the reply: https://github.com/adafruit/Adafruit_CircuitPython_TestRepo/issues/37

GitHub

This issue exists solely to find out whether someone outside the org/CPLibians group can tag CPLibians in a reply to an issue and have it work properly. Please ignore it, it will be closed as soon ...

#

I always forget about the TestRepo I made until I need it. Such a good move on my part.

#

Huzzah!

#

My inbox has been flagged.

ember iris
#

Now has it been flagged because you opened the issue and the text was present, or was it flagged because of the tag?

idle owl
#

Hmm.

#

You make a good point.

#

I need another person to tell me if it showed up to them.

#

@onyx hinge Are you around to check something?

#

Kind of late for jepler to be around. Should have tagged someone else. Apologies.

onyx hinge
#

@idle owl hi!

idle owl
#

oh

#

Hello!

onyx hinge
#

I was just wrapping up but I can give you some time

idle owl
#

Please check your email to see if you got tagged on the TestRepo issue.

#

That Keith just replied to

#

I need to make sure that someone outside the org tagging CircuitPythonLibrarians works.

onyx hinge
#

I don't see anything that says TestRepo in my recent email

idle owl
#

You're in that group?

#

I assume?

onyx hinge
#

I'm in CircuitPythonLibrarians yes

idle owl
#

Do you have it setup to email you when that group gets tagged?

onyx hinge
#

not sure. I do see review requests.

idle owl
#

Because Keith is right, it emailed me because I generated the thread.

#

Ok, then I think the tagging of the group doesn't work.

#

Maybe it's a setting. Looking.

#

A visible team can be seen and @mentioned by every member of this organization. So, it's built into it to not be taggable from outside the org. Ok.

manic glacierBOT
#

I still have the same crash when writing with esptool.py

# hold BOOT, click RST, release BOOT
PS C:\circuitpython7\firmware> esptool.py --chip esp32s2 --port COM12 -b 460800 erase_flash
esptool.py v3.0
Serial port COM12
Connecting...
Chip is ESP32-S2
Features: WiFi, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:0e:e1:3c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Erasing flash (this may ta...
idle owl
#

So that was a dead end anyway.

#

That's vaguely disappointing.

onyx hinge
#

@idle owl I was just looking for the current details about that .. I found a lot of people complaining back in 2014/2015 when the team mention feature was first introduced!

idle owl
#

So it's by design.

idle owl
#

Hmm.

onyx hinge
idle owl
#

"About Teams" gets more into it.

onyx hinge
#

yeah that matches what you found

idle owl
#

Alright, welp. Thank you @ember iris and @onyx hinge for the assistance there, but if I had researched it, I would have found out eventually that it won't work.

orchid basinBOT
ember iris
#

It's vague enough that I wasn't sure exactly how it would work, a test was a nice and quick proof of concept

orchid basinBOT
idle owl
#

@lone axle I'm tempted to say folks can reply to the issue and tag you and me on it, and one of us can tag CircuitPythonLibrarians to get more folks involved with assisting new folks. But if one or both of us ends up out for some reason, things will languish. So I guess Discord is the best option. I do wonder whether suggesting the #circuitpython-dev channel makes more sense than the help-with channel. But I'll leave that up to you.

manic glacierBOT
#

I then found out that I had wired two input pins into GPIO4 and 5 from a 5V device(measured 4.0 V and 4.8 V on the pins ). When I moved that external component from 5V to a 3.3V source, everything started working again. So problem solved! Unless someone wants to dig deeper into why it actually crashes starting from a certain CircuitPython version.

I don't know why, but the pin voltage ratings are no more than 0.3V above Vdd, and operation is undefined above those. It could that there was...

orchid basinBOT
lone axle
# idle owl <@!382939733107408897> I'm tempted to say folks can reply to the issue and tag y...

I do think #circuitpython-dev does make more sense. I'll swap that over. And good thought as well about letting them know they can respond to the issue directly. I do think that's a good thing to add. I can mention to tag both you and me. I'll keep an eye on my github inbox and anything that I'm not able to respond to within a day or so I'll follow up and tag librarians so a larger team can see and offer help.

Issue comment chains may be nicer in some cases anyhow because it will be easier to follow the full context of the discussion if it has more than one back and forth.

lone axle
#

I just had another thought as well, I'll add a link to the contributing with git and github learn guide to the template as well so if they are brand new they have some resources to learn how to do it.

orchid basinBOT
orchid basinBOT
manic glacierBOT
slender iron
#

we could fit all of circuitpython in the 1mb L2 cache on the raspberry pi 😄

blissful pollen
#

no one even have to jump up and down on it to make it fit? 🙂

analog bridge
#

@slender iron are you around?

slender iron
#

ya, for a little while longer

analog bridge
#

need to ask about ble workflow

slender iron
#

cats are hungry 🙂

analog bridge
#

okay I'll keep it short

#

Does ble workflow require the whole _bleio module to be implemented completely?

#

Can I get away with implementing a subset of _bleio features to achieve file transfer?

manic glacierBOT
spiral elk
#

Which IDF were the esp32-s2 final images built against just for clarity?

#

for 7.0

spiral elk
#

Thanks

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@dhalbert tud_remote_wakeup() is API to do this, however there is a few requirements, all is implemented by hid example for your reference https://github.com/hathach/tinyusb/tree/master/examples/device/hid_composite

  1. TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP bit must be set in the configuration descriptor https://github.com/hathach/tinyusb/blob/master/examples/device/hid_composite/src/usb_descriptors.c#L111
  2. MCU DCD port remote wakeup and suspend detection must be implemented, which is tru...
idle owl
#

So now that 7 is stable, do we need to continue supporting 6.x in the Project Bundle?

#

Nevermind, we're going to continue.

idle owl
#

@onyx hinge I am in need of your git fu. I had typed this all up to say that everything might be fine and I would waste your time, but it is not fine, and I am now stuck in a rebase that I'm basically ready to delete the branch and start over fresh.

onyx hinge
#

@idle owl give me a second to switch gears!

idle owl
#

You know what? Looking at this, I'm not going to fight with it.

#

sigh.

onyx hinge
#

ok, if you're certain

idle owl
#

I hate rebase.

#

I don't even know what I changed before this. It's for the rainbowio update.

#

But apparently the Great Rename caught some of those files, and now it's borked.

onyx hinge
#

is there still a way I can help out?

idle owl
#

I need to face my rebase demons.

#

So yeah.

#

(Sorry, also helping Trevor with a wiring situation on Slack)

#

Do you want to see what it says, or..?

onyx hinge
#

@idle owl sure, starting with the error messages you're seeing would be handy

#

or if not error messages, inscrutable git messages 🙂

idle owl
#

@onyx hinge ```From github.com:adafruit/Adafruit_Learning_System_Guides

  • branch main -> FETCH_HEAD
    CONFLICT (rename/rename): Rename NeoKey_Trinkey/CircuitPython_NeoPixel_Example/code.py->CircuitPython_Templates/status_led_one_neopixel_rainbow/code.py in HEAD. Rename CircuitPython_Templates/status_led_one_neopixel_rainbow.py->CircuitPython_Templates/status_led_one_neopixel_rainbow/code.py in f91018fd (Initial rainbowio update.)
    Auto-merging CircuitPython_Templates/status_led_one_neopixel_rainbow/code.py
    error: could not apply f91018fd... Initial rainbowio update.
    Resolve all conflicts manually, mark them as resolved with
    "git add/rm <conflicted_files>", then run "git rebase --continue".
    You can instead skip this commit: run "git rebase --skip".
    To abort and get back to the state before "git rebase", run "git rebase --abort".
    Recorded preimage for 'CircuitPython_Templates/status_led_one_neopixel_rainbow/code.py'
    Could not apply f91018fd... Initial rainbowio update.```
onyx hinge
#

@idle owl yeah it looks like git is confused, because it thinks that adafruit's main branch has renamed a file one way, and your branch has renamed it another

#

I think that may be incorrect, but git doesn't actually know what files are moved, it just tries to infer it based on having similar file content

idle owl
#

erp.

#

Oki.

#

So..... burn it to the ground and start over?

onyx hinge
#

ummm

#

is your branch somewhere that I can look at?

onyx hinge
#

I don't recall dealing with this kind of situation before so I don't have canned advice to parrot for you

idle owl
#

Doubt it. I don't think I ever pushed it.

#

And now I'm trapped in this rebase so I don't think I can push.

onyx hinge
#

git rebase --abort should put you back

idle owl
#

oh!

#

Fancy.

#

It's old. Because we had to wait.

onyx hinge
#

I think you may be best off just re-doing it 😕

idle owl
#

Ouch. If that's your assessment, it must be bad.

#

Oki.

#

Thanks for looking into it with me.

onyx hinge
#

the other alternative I'd try ...

#

mmm

idle owl
#

This is fine.

onyx hinge
#

I think the content of all your files is right, so you may just want to copy them out, start a fresh branch, and copy them back in

#

like, don't make yourself perform the edits again

idle owl
#

um

#

I mean...

#

That's what I was going to do....

onyx hinge
#

OK

#

that's good!

manic glacierBOT
stuck elbow
#

@onyx hinge I'm looking through the learn articles for the OV2640, but I can't find a wiring diagram anywhere, do you know one that has it by any chance?

onyx hinge
stuck elbow
#

oh, there is wiring for the pi pico, I can work from that, thanks

onyx hinge
#

which microcontroller are you using?

stuck elbow
#

hmm, but that's OV7670

#

I want to use esp32-s2

onyx hinge
#

also make sure to check out the section "Adapting to other <microcontroller family> boards" section

#

the wiring is the same for both

stuck elbow
#

I can't see that section?

slender iron
#

@analog bridge it is all "peripheral" so you can ignore scanning

idle owl
#

Unrelated, is it possible to have 2 I2C board objects?

#

so board.I2C() and board.I2C1() ?

#

Or is the way it's done under the hood make that impossible.

jaunty juniper
#

it's possible

#

I did a test implementation of board.STEMMA_I2C for the QT PY 2040, but shelved it because I had too many other things

idle owl
#

That's what I'm referring to 😄

jaunty juniper
manic glacierBOT
analog bridge
mental nexus
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Raspberry Pi Pico with rp2040

Code/REPL

code.py
import usb_hid
from adafruit_hid.keyboard import Keyboard

kbd = Keyboard(usb_hid.devices)

boot.py
import storage

storage.disable_usb_drive()

Behavior

Traceback (most recent call last):
File "", line 4, in
File "adafruit_hid/keyboard.py", line 65, in init
File "adafruit_hid/keyboard.py", line 113, in release_a...

onyx hinge
#

@mental nexus it has been a pleasure to build on your work

manic glacierBOT
manic glacierBOT
supple gale
#

Now I'm thinking of The Mandalorian.

manic glacierBOT
manic glacierBOT
manic glacierBOT
lone sandalBOT
edgy drum
#

General Q: for an issue that's been closed on a CP library, is a preferred to start a conversation on the same topic on the closed issue or to open a new issue?

idle owl
edgy drum
#

Whoops, I'm on it, thanks!

onyx hinge
#

@lone axle do you know there was ever documentation written about using the stubs with pycharm?

idle owl
lone axle
edgy drum
idle owl
lone axle
#

if you are looking to use the stubs though I do know how. Now that they are deployed on pypi it's much easier.

pip install circuitpython-stubs --pre

should install them and then pycharm should automatically start using them.

#

looks like maybe we need to look into how to get a release version deployed to pypi, it's showing pre-release on the latest ones still even though 7.0.0 is has a release now. This would have been the first real release since they got properly deployed to pypi.

orchid basinBOT
manic glacierBOT
#

The esp32-s2's i2s mode (#5378) can use 16 bit displays (it takes a large number of pins!) but some changes seem to be needed to how commands are sent out (at least for rm68120 in the espressif hmi devkit)

  1. Commands have to be sent as 2 bytes instead of 1 byte
  2. non-image-data is mostly sent 8 bits at a time, so it needs to be padded or whatever

It feels like this has to be known at the Display level, since the ParallelBus shouldn't be putting any interpretation on e.g., the 0...

lone axle
#

Is there no separate release action that runs for the core circuitpython project like there is for the libraries?

onyx hinge
#

@lone axle I think @tulip sleet would know best about that..

lone axle
#

it looks like no to me. There is no release.yml like there are on the libraries.

I think the if statement for the pypi upload action is preventing it from uploading a release version: https://github.com/adafruit/circuitpython/blob/bb2dbf4aa3c88616e03d34f630d98730e6547e51/.github/workflows/build.yml#L245

if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit'

If I understand correctly it will be false because the branch is not refs/heads/main for releases.

idle owl
#

What would I run on a freshly cloned CircuitPython library bundle repo to initiate every library to download every repo? That's a thing, right?

#

I need to be able to grep over the library and example code.

lone axle
idle owl
#

Ok I knew it was submod something, wasn't sure what specifically. Thanks!

#

SO MUCH SCROLLING. 😂

idle owl
lone axle
idle owl
lone axle
#

yep for replacing search_term. you mean a string with spaces or quotes or something like that?

idle owl
#

Yeah

#

Something that would normally go in ""

#

since the git grep is in ".

lone axle
#

for spaces this works:

git submodule foreach "git grep 'esp32_cs = DigitalInOut(board.ESP_CS)'; true"

I'll see if I can figure out double quotes

idle owl
#

oh!

#

No I think that covers my use case.

orchid basinBOT
lone axle
#

ah, incase you end up needing to do quotes it looks like they can be escaped with slashes:

git submodule foreach "git grep '\"\"\"Use below for Most Boards\"\"\"'; true"
idle owl
#

ahhh excellent.

manic glacierBOT
jaunty juniper
lone axle
#

I have a branch that uploads the stubs to pypi under a name prepended with "foamyguy" that I was using to test out the actions when we were working on them. I'll get it updated to current and test out that change.

jaunty juniper
#

I was also looking into not running the build for the tag push action, since it also runs a build for the realease part (each release causes 2 builds), a push to create a tag has a github.ref value like "refs/tag/7.0.0" (instead of "refs/heads/main" or "refs/head/some_branch"), so I'm thinking that adding the same list of conditions on builds themselves could work, minus github.repository_owner so forks can run CI, but I'm not sure at all

tulip sleet
lone axle
#

neradoc pointed me to a condition that runs on the release event. I've just pushed a test to my fork to see if it will upload release versions to pypi (under my own name, not the official one) waiting for the actions to run now.

lone axle
#

okay, that worked. I have a stable version on PyPi now. I'll PR the change.

#

I don't know how common it is for other peoples fork to make releases (I suspect not very) but I noticed the stubs S3 upload doesn't have the condition for adafruit github user. So my fork attempted to upload, and doesn't seem to have printed any sort of error but I don't have AWS keys so It would have had to fail I assume.

manic glacierBOT
#

The 7.0.0 release actions skipped the step to upload the stubs to PyPi so we've ended up with only pre-release versions that are on PyPi.

This changes the condition for PyPi stubs upload to match the ones used for the S3 stubs upload so that it will upload a stable version when the next release is made.

I tested these conditions in a branch on my fork. The actions run that did complete the upload suc...

tulip sleet
#

it's the same commit, just with a new tag

lone axle
tulip sleet
#

i have pypi credentials to do this, hold on a second while I try to build

#

ok, I did make stubs, but not sure how to make the package

#

@lone axle what is equivalent to python setup.py sdist for this?

lone axle
tulip sleet
#

I did check-stubs and I got a minor error:

string>:1: error: Argument 2 to "readfrom_into" of "I2C" has incompatible type "bytes"; expected "Union[bytearray, memoryview, array[Any], ndarray, RGBMatrix]"
Found 1 error in 1 file (checked 1 source file)
<string>:1: error: "I2C" has no attribute "write"; maybe "writeto"?
Found 1 error in 1 file (checked 1 source file)
#

(The above two tests are expected to show type errors)

#

not sure about the last message?!

lone axle
#

I'm not certain what those are about but I think the actions in github show those as well.

tulip sleet
#

ok, we'll just ignore that, hold one while I try a twine upload

#

I think we are home free

#

I don't know how test that

lone axle
#

I think pip install circuitpython-stubs but I do think it also takes a moment to actually make it there.

#

ah, it does show in the release history, but it's down a little bit in the timeline (which makes sense)

tulip sleet
#

I just mean when I install it, how do It test it?

lone axle
#

Inside of pycharm and look at a script that uses something from circuitpython to see if it recognizes the classes and offers up type hints and things like that is the only way that I know how

manic glacierBOT
#

One more trade-off to consider. Processing is faster in C than Python, which argues for doing more packet parsing in C and returning more fields as opposed to a raw packet. But that reduce the duty cycle of packet capture.

On the other hand, doing more packet parsing in Python will make the capture more "chunky" in that we'd be grabbing some packets quickly, then processing that chunk more slowly while we miss capturing more packets.

I don't know, maybe it's a parameter and the code can...

lone axle
#

verifying the files that ended up in site-packages may be a different way, but there will be a lot of them (one for each built-in module) and I'm not sure there how to tell that 7.0.0 is specifically what you have.

tulip sleet
#

I don't use pycharm, though I did install it once or twice. Do you? That's all I mean, does it work with an editor.

#

Anyway, there is now a non-pre-release package there. It did install successfully, though I had to uninstall the very old 2019 version first

jaunty juniper
#

I see them in BBEdit too, since it uses LSP

tulip sleet
#

can you try the latest release I just uploaded? That would be great, thanks.

#

There are some very strange releases listed there:

#

we never tagged anything even close to that way, it must be some generated version number

lone axle
tulip sleet
#

yay, terrific

#

I don't see any way of getting rid of the junky pre-releases

jaunty juniper
#

it did "Successfully installed circuitpython-stubs-7.0.0" after I first uninstalled as it was talking about some "circuitpython-stubs-7.0.1.dev64" version ("circuitpython-stubs-2019.5.26.tar.gz") and the completion and stuff works, no idea how one would test that it's 7.0.0 specifically

lone axle
#

somehow they can be "Yanked" I believe there is a much older one that shows that status. I'm not sure how to do that though, I've never done it.

tulip sleet
#

I built it at the 7.0.0 tag, so it should be correct

lone axle
#

I do think the versions are generated automatically somehow (not certain where or how) were there any commits after rc3? perhaps it assumed those belonged to a (not actually existing) rc4 until the 7.0.0 release was made and then it started doing the 7.0.1dev ones.

tulip sleet
#

it does not use semver, it uses python's idiosyncratic numbering

#

there is no longer any way to remove a release; they say it's a bad idea, just publish a new good release. So we did that, so no cleanup to do. Thanks for figuring this out and glad we got a good version out

lone axle
#

Thank you for doing the manual release! I'm stoked to have a stable build up before 7.0.1 whenever it may come.

tulip sleet
#

I haven't used twine in absolute ages

#

you're welcome

manic glacierBOT
manic glacierBOT
#

@gamblor21 One translation (Japanese) failed for one board (pyb_nano_v2) - Too little flash!!! - does this mean that there should be an exclusion for this language on this board (I can see some others are already skipped: Note: Not building languages {'cs', 'el', 'hi', 'ko'})?

The build was short of space. This module does not have to be in the core so add the line:
CIRCUITPY_BUSDEVICE = 0
to the file ports/stm/boards/pyb_nano_v2/mpconfigboard.mk right at the end. This will rem...

onyx hinge
lime trellis
#

@slender iron I've pulled my hair out for two days trying to get a samd RTC compare interrupt to fire for pretend_deep_sleep. I can get CMP to interrupt during deep sleep, so I can't figure out what I'm doing wrong.

Can you give me a sanity check on the code below?

void common_hal_alarm_pretending_deep_sleep(void) {
    if (!SAMD_ALARM_FLAG) {
        SAMD_ALARM_FLAG=0x01;
        RTC->MODE0.COMP[1].reg = (uint32_t)port_get_raw_ticks(NULL) + (3*32)<<4; //3 seconds in the future
        while ((RTC->MODE0.SYNCBUSY.reg & (RTC_MODE0_SYNCBUSY_COMP1)) != 0);
        RTC->MODE0.INTFLAG.reg = RTC_MODE0_INTFLAG_CMP1;
        RTC->MODE0.INTENSET.reg = RTC_MODE0_INTENSET_CMP1;
    } else {
        if (RTC->MODE0.INTFLAG.reg & RTC_MODE0_INTFLAG_CMP1){
            timer_callback();
        }
    }
}

I've confirmed common_hal_alarm_pretending_deep_sleep is being repeatedly called (and the REPL says it's in fake sleep), it just never wakes up. I've tried everything I can think of so any insight would be a huge help

neat epoch
#

Hello, is this also a place for discussing problems with Micropython porting?

onyx hinge
#

@neat epoch it depends on the specific question, so just go ahead and ask and we'll either answer you here or direct you to take it over to #help-with-circuitpython. (or tell you we don't know but we hope you'll figure it out 😉)

neat epoch
#

Ok 🙂
I currently try to port MP to a MCU we use at work. I got it to compile and run, and implemented the utime functions.

I now don't understand how to make the utime module importable. If I import utime I get an error.
I can compile it as a built-in module, but that just means that it's "imported from the start"

onyx hinge
#

ah if you're literally asking about micropython, then you're better off asking in a place for micropython, like their forum.

#

but to try to answer, I'm pretty sure that "utime" is designed to be a "built in" module only, not one importable from the filesystem. There are some modules in micropython that are designed to be either way (I think framebuf is one of them?) but that option only exists for a few specific C-coded modules.

neat epoch
#

Ok. I just saw that e.g. examples for esp32 showed import time in their code listing

manic glacierBOT
grave ledge
#

Great news from Ladyada in the 'Python on Hardware weekly video 150' (https://youtu.be/PoHNOxbInqw) about hardware interrupts and/or threading and/or asyncio improvements potentially coming to CircuitPython 8!

The wonderful world of Python on hardware! Episode 150 (September 22, 2021). This is our weekly Python video-newsletter-podcast! Ladyada and PT review the Python on hardware news & highlights of the week.

The news comes from the Python community, Discord, Adafruit communities and more. It’s part of the comprehensive newsletter we do each week. ...

▶ Play video
neat epoch
#

I put the module into the BUILTINS instead of BUILTIN_MODULES

manic glacierBOT
blissful pollen
#

Can someone with more pylint experience take a look at https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/pull/72 for me. There was a failure unrelated to the PR in the examples. I'm not sure if the fix the author put in is the proper way or not.
The rest of the change itself is fine - just was waiting to approve until this is resolved.

tidal kiln
#

i ran into that

#

i got around it by ignoring

#

which may not be the correct approach

#

not sure if this is a new check due to pre-commit using a new version of pylint and as a result the CP config needs updating?

blissful pollen
#

I'm not sure myself. Do you recall the ignore command? I can pass that on.

tidal kiln
#

i tweaked the pre-commit config yaml

#

which i wouldn't recommend for them

#

let me read through the discussion a bit more....

#

^^ for ref. and scroll back above that.

blissful pollen
#

hmm thanks may be worthwhile to just suggest that change, doesn't seem too bad. My python level is low so I'm not sure

jaunty juniper
#

the code in the test files is completely wrong

tidal kiln
#

which py file?

jaunty juniper
#

*test files

tidal kiln
#

the examples?

jaunty juniper
#

yeah sorry simpletest I mean

tidal kiln
#

yah, that's their hack to get around the pre-commit gripe.

jaunty juniper
#
print("".join([f"{x:02x} for x in result"]))

should be

print("".join([f"{x:02x}" for x in result]))
tidal kiln
#

yep

#

their original code was probably fine. and they got to that by trying to get around the pre-commit thing.

blissful pollen
#

yup the examples were not even part of the PR but was causing the checks to fail

tidal kiln
#

that's what happened to me too

#

we should fix the CI

#

this PR doesn't look urgent?

blissful pollen
tidal kiln
#

ok. want to reply saying it's on our end? and just wait and we'll get back to them.

#

@tulip sleet who maintains the CI stuff?

jaunty juniper
#

I believe I remember seeing conversations a while ago about pinning the pylint version in the examples check to avoid that kind of things ? or maybe there was an problem doing it ? I don't know where it went

tulip sleet
tidal kiln
#

it went no where. convo was around same time i was asking about this.

blissful pollen
#

I'll reply to the PR saying the CI is being looked at related to this.

tidal kiln
#

@tulip sleet i think it's pre-commit in this case. it's the same "hey! you should consider using this really cool f string thing" gripe i ran into. which causes CI runs to fail.

jaunty juniper
#

(I'm talking weeks ago)

tidal kiln
#

affects all libs i think?

tulip sleet
#

it's a nuisance, since some builds of CPy don't accept f-strings

#

we might fix that in the long run, but not at the moment. I would just put in a # pylint: disable= for this particular thing right now. Yes, we can pin pylint to a particular version, but we don't want to do that in the long run.

tidal kiln
#

or your suggestion of adding it to .pre-commit-config.yaml

#
         args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name,consider-using-f-string $example; done)']
#

but that would require pushing the update to all repos

tulip sleet
#

we can make that change one at a time to the repos, as necessary, or we can have Dylan do them all, as usual

#

I think this is a @idle owl library manager q

tidal kiln
#

ok. yah. if possible, i think better to fix it globally, instead of adding yet more # pylint: disable= sprinkles to code

tulip sleet
#

let's undo the most recent change, and add the consider-using-f-string as you suggested above

tidal kiln
#

to .pre-commit-config.yaml ?

tulip sleet
#

yah

blissful pollen
#

I'll summarize that all in the PR for the author

tidal kiln
#

@blissful pollen can you make the change to .pre-commit-config.yaml also?

#

actually...could just have them make the changes and let it be part of the PR

blissful pollen
#

That was my thought, if they're uncomfortable with it I can take a look

tidal kiln
#

and that way it's also pass their local checks

#

you can link to the file i changed...one sec...

#

have them just copy-pasta that in to their local version and commit changes as part of PR

#

and also revert the example .py's back

blissful pollen
#

Commented and let them know. If they have issues I can help out with the change.

tidal kiln
#

cool. thanks.

blissful pollen
#

Thanks everyone for the assistance. A lot of python/pylint is still an area I am not strong in so I wanted to ensure I wasn't giving bad advice myself.

tidal kiln
#

@idle owl ping me if you want more background info about this new pre-commit CI thing. i wrangled with it on a PR a few days ago and now someone else is also.

idle owl
#

We either need to make a decision about everything, or fix the issue on the failing libs.

tidal kiln
#

@idle owl yep. that's just happening near term to get people through.

#

i think the problem is basically just a new check that's shown up in the latest pylint

#

related to print statements, string formatting, and a "consideration" to use f-strings

#

the answer could be as simple as adding a new ignore for this?

idle owl
#

We don't support f-strings, do we.

tidal kiln
idle owl
#

Yeah I have that pulled up

tidal kiln
#

yah. not fully.

idle owl
#

Ok, Bleh. I hate to say it, but I think we should add it to the libs until we support f-strings completely. At which point, I genuinely think we should remove the disable and fix the issues.

#

We can't really fully fix the issues as it is.