4.1.x increase cpx stack update frozen#2407
Merged
dhalbert merged 8 commits intoDec 18, 2019
Merged
Conversation
Update 4.x to 4.1.0 so that ReadTheDocs has the latest
Fix status DotStar writes: fixes DotStar issues on PyRulers
merge 4.1.x into 4.x
kattni
previously approved these changes
Dec 18, 2019
kattni
left a comment
There was a problem hiding this comment.
Successfully tested build on CPX with every available example in the Circuit Playground library repo.
kattni
approved these changes
Dec 18, 2019
kattni
left a comment
There was a problem hiding this comment.
Tested again successfully with change. Thanks for putting this together!
tyomitch
pushed a commit
to tyomitch/circuitpython
that referenced
this pull request
Apr 28, 2021
This commit adds the errno attribute to exceptions, so code can retrieve errno codes from an OSError using exc.errno. The implementation here simply lets `errno` (and the existing `value`) attributes work on any exception instance (they both alias args[0]). This is for efficiency and to keep code size down. The pros and cons of this are: Pros: - more compatible with CPython, less difference to document and learn - OSError().errno will correctly return None, whereas the current way of doing it via OSError().args[0] will raise an IndexError - it reduces code size on most bare-metal ports (because they already have the errno qstr) - for Python code that uses exc.errno the generated bytecode is 2 bytes smaller and more efficient to execute (compared with exc.args[0]); so bytecode loaded to RAM saves 2 bytes RAM for each use of this attribute, and bytecode that is frozen saves 2 bytes flash/ROM for each use - it's easier/shorter to type, and saves 2 bytes of space in .py files that use it (for each use) Cons: - increases code size by 4-8 bytes on minimal ports that don't already have the `errno` qstr - all exceptions now have .errno and .value attributes (a cpydiff test is added to address this) See also adafruit#2407. Signed-off-by: Damien George <damien@micropython.org>
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.
from adafruit_circuitplayground import cp. Must be tested fromcode.py, which adds additional stack depth over testing from REPL.