-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Make chosen features consistent across all boards and ports atmel-samd, esp8266, and nrf. #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d, esp8266, and nrf. 1. Turn off MICROPY_CPYTHON_COMPAT, which includes a number of minor CPython compatibility features, most of which have workarounds, but uses up significant flash. 2. Turn on MICROPY_PY_SYS_MAXSIZE, which implements sys.maxsize. 3. Turn on MICROPY_CAN_OVERRIDE_BUILTINS, which implements "_" as the most recent value in the REPL, and also enables redefining builtins.
Do you also want to enable |
@jerryneedell Good idea. I didn't do any kind of comprehensive look at what's different in nrf. If you know of anything else let me know. |
That is the one I usually add along with uncommenting out the BLE_MODULE and UBLUEPY_MODULE but I think Kevin wants this tested more before they are mainstreamed. I have been playing with them a little but happy to deal with them myself for now. |
Do the workarounds for CPython compat still work in CPython? I don't want us teaching bad habits that break when moving to CPython. |
@jerryneedell I'm hoping to put in a PR this week with BLE support enabled out of the box, but we migrated to a different version of the SD so I need to make sure there aren't any gotchas or breaking changes that aren't immediately visible. |
@microbuilder Thanks. So far, I have tried enabling BLE with the current version and executed the ubluepy_scan and the ubluepy_eddystone examples. |
I added the 2 proposed changes to the feather52 mpconfigport.h ( with PR #528 as well) #define MICROPY_ENABLE_SOURCE_LINE (1) The build compiles OK and I have not seen any adverse impact. Are there specific things to try to test turning off the CPYTHON_COMPAT ? |
As you can see most of these are edge cases for language consistency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sounds like things will be a subset which is good.
MICROPY_CPYTHON_COMPAT
, which includes a number of minor CPython compatibility features, most of which have workarounds, but uses up significant flash.MICROPY_PY_SYS_MAXSIZE
, which implementssys.maxsize
.MICROPY_CAN_OVERRIDE_BUILTINS
, which implements "_" as the most recent value in the REPL, and also enables redefining builtins.Fixes #384, #442, #480, respectively.