Conversation
Contributor
Author
|
Code size report: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19737 +/- ##
==========================================
+ Coverage 98.55% 98.59% +0.03%
==========================================
Files 182 182
Lines 23342 23342
Branches 5 5
==========================================
+ Hits 23005 23013 +8
+ Misses 336 328 -8
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Thanks for the analysis. How about we remove ECONNREFUSED from the list to get back the bytes? That's never used anywhere. Also please update |
EBUSY is raised in 13 places across 10 files (extmod/btstack, extmod/nimble, extmod/machine_usb_device, extmod/vfs_fat_file, and the nrf, renesas-ra, rp2, samd and stm32 ports), which is more than most of the codes already in the list: EALREADY 12, EBADF 8, EINPROGRESS 7, ENOBUFS 4, ECONNRESET 4, EHOSTUNREACH 3, ECONNABORTED 3, EADDRINUSE 3, EISDIR 2, EEXIST 2, EACCES 1, ECONNREFUSED 0. Without it the exception prints as a bare "[Errno 16]" and errno.EBUSY does not exist. Signed-off-by: Kwabena W. Agyeman <kwagyeman@live.com>
MP_ECONNREFUSED is not raised anywhere in the code base, so remove it from the default list to recover the code size added by EBUSY. Signed-off-by: Kwabena W. Agyeman <kwagyeman@live.com>
kwagyeman
force-pushed
the
kwabena/errno_ebusy
branch
from
October 1, 2026 22:47
f570cca to
cc5ca2e
Compare
Contributor
Author
|
@dpgeorge Done |
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.
Summary
Adds
EBUSYto the defaultMICROPY_PY_ERRNO_LIST, soerrno.EBUSYexists andOSError(EBUSY)prints as[Errno 16] EBUSYinstead of a bare number. Came up in #19617.EBUSY is raised in 13 places across 10 files (extmod/btstack, extmod/nimble, extmod/machine_usb_device, extmod/vfs_fat_file, and the nrf, renesas-ra, rp2, samd and stm32 ports). That is more than most codes already in the list:
Counted as
MP_Exxxoccurrences in*.c/*.houtsidepy/mperrno.h,py/moderrno.candlib/.Testing
basics/errno1.pypasses on the unix port.str(OSError(errno.EBUSY))gives[Errno 16] EBUSY. Code size: +56 bytes on an stm32 build.Trade-offs and Alternatives
+56 bytes of flash on every port with the errno module, for a string on an error that currently prints as
[Errno 16].