Skip to content

Conversation

@dlech
Copy link
Member

@dlech dlech commented Jun 29, 2025

We've missed a few MicroPython releases, so it is about time we updated.

This passed locally with make all so we'll see what else CI catches. Also, I haven't actually tried running this on a hub yet, so we'll need to do some manual testing to see if anything else broke.

Some key things that changed to be tested are raising SystemExit/pressing stop button and module imports (both builtin and user),

Once we've fixed any regressions, I would like to set MICROPY_QSTR_BYTES_IN_HASH=0 on hubs where we are starting to run out of flash memory to regain some space.

@dlech dlech force-pushed the micropython-v1.25 branch 4 times, most recently from da2c161 to 9fb2e5d Compare June 30, 2025 02:22
@coveralls
Copy link

coveralls commented Jun 30, 2025

Coverage Status

coverage: 57.157% (+0.04%) from 57.122%
when pulling 5d9a88e on dlech:micropython-v1.25
into 88c8c6b on pybricks:master.

@laurensvalk
Copy link
Member

Awesome!

Also, I haven't actually tried running this on a hub yet, so we'll need to do some manual testing to see if anything else broke.

Let me know if you'd like to continue here or would like me to join in.

@dlech
Copy link
Member Author

dlech commented Jun 30, 2025

If you have some ideas already about how you would like to handle imports differently, please go ahead. Otherwise, I will probably get back to it on Friday.

@laurensvalk
Copy link
Member

I haven't looked at how it works yet. Maybe more of it is included in MicroPython now. Or maybe we've freed up enough space to do it the normal way 😄

@dlech
Copy link
Member Author

dlech commented Jun 30, 2025

Well, we didn't free up any space yet. But the virtualhub has been updated to do it the new "normal" way.

dlech added 3 commits July 8, 2025 20:45
Replace `STATIC`` with `static`. The define is being removed in
MicroPython and will cause a compile error in the future.
Upstream MicroPython switched from black to ruff, so we are following
suit. This now includes all non-3rd-party .py files so quite a few files
are reformatted that weren't being checked before.
Update to current MicroPython stable release v1.25.

Includes changes required to compile without errors:

- Handling of PYEXEC_FORCED_EXIT/SystemExit changed
- mp_make_function_from_raw_code() replaced by mp_make_function_from_proto_fun()
- Module import code changed
- mp_lexer_new_from_file() function signature changed
- mp_hal_stdout_tx_strn() function signature changed
- MP_REGISTER_MODULE_DELEGATION() replaces MP_MODULE_ATTR_DELEGATION_ENTRY()
- mp_obj_malloc_var() signature changed
- mp_generic_unary_op was removed
- m_new_obj_var_with_finaliser() replaced by mp_obj_malloc_var_with_finaliser()
- Handling of 'u' prefix on builtin modules has changed
@dlech dlech force-pushed the micropython-v1.25 branch from 9fb2e5d to 5d9a88e Compare July 9, 2025 01:49
@dlech
Copy link
Member Author

dlech commented Jul 9, 2025

The stop button and imports are passing the smoke test, so I'll go ahead an merge this and I'm sure people will let us know if anything unexpected broke.

@dlech dlech merged commit 65d5196 into pybricks:master Jul 9, 2025
17 checks passed
@dlech dlech deleted the micropython-v1.25 branch July 9, 2025 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants