Skip to content

micropython: hardcode _PACKAGE_INDEX value for robust patching#126

Open
AJMansfield wants to merge 1 commit intocompiler-explorer:mainfrom
AJMansfield:mpy-hermetic
Open

micropython: hardcode _PACKAGE_INDEX value for robust patching#126
AJMansfield wants to merge 1 commit intocompiler-explorer:mainfrom
AJMansfield:mpy-hermetic

Conversation

@AJMansfield
Copy link
Contributor

@AJMansfield AJMansfield commented Feb 17, 2026

MicroPython has a concept of "parser constants", i.e. values that aren't real variables but just substitutions made while parsing the python source. _PACKAGE_INDEX is, in some versions that this mip patch needs to apply to, a parser constant that's only defined after the import statement it's patching against, leading to an error when attempting to use the patch package manager.

Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
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.

1 participant