Conversation
Change imports from relative to absolute. Quick fix tools in the IDE will automatically generate absolute imports so if we stick with that we can use the tools without having to manually fix the imports. Also absolute imports can be easier to understand if you don't know the folder structure by heart.
Fix failing on newer versions of Python which are more strict about
empty enums.
Fixes the following error:
TypeError: <flag 'IODeviceCapabilities'> has no members; specify `names=()` if you meant to create a new, empty, enum
The recommended way to handle this is to have an empty names attribute rather than having a fake member.
It appears that Python has changed how repr works for enums in some cases. This fixes tests that were failing on Python 3.12.
mpy-cross saves the file path as part of the binary file. To keep things small and not leak host computer details, we want to only include the portion of the path that is relative to the project directory. Previously, this could only be done by changing the current working directory to the project directory before calling compile_file(). Now, that is no longer necessary and the project directory is passed as a separate argument. This fixes not being able to compile files piped from stdin when using the cli tool.
Fix warnings about moved imports in cryptography dependency.
Fix failing on Python 3.13.
These were scattered about and repeated or hard-coded in various places.
1ea0905 to
8b0cccf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main purpose is fixing
pybricksdev run ble -(piping python file from stdin) which regressed due to a change in v1.0.0-alpha.49.Cleaned up and fixed some other stuff along the way.