-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
tools/gen-cpydiff: Fail CPython difference generation if output matches. #17060
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #17060 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 169 169
Lines 21890 21890
=======================================
Hits 21571 21571
Misses 319 319 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code size report:
|
How will this affect port-specific differences, e.g. |
Thanks for pointing this out, @AJMansfield. I've left a reply on the linked PR: https://github.com/micropython/micropython/pull/16984/files#r2008260448 |
MicroPython support for this behaviour was added in eb45d97. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Previously this information was recorded in a "status" field of the result, but nothing ever parsed this result which led to non-differences not being removed. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
6e6a0d0
to
74a5bf9
Compare
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.
Thanks, this is a good improvement!
Summary
MicroPython uses a set of automated test cases (
tests/cpydiff
) to generate documentation of differences between CPython and MicroPython. If a MicroPython improvement made something CPython compatible, the generation tool would print a note but would keep running as normal including generating the "difference" (with the docs containing identical generated output for CPython vs MicroPython).This PR adjusts the generation tool to fail if any differences are non-existent (which should also fail CI), and also removes one fixed difference (
str.endswith()
was made compatible as of #16812 🎉).Testing
Trade-offs and Alternatives
gen-cpydiff.py
, but this tool is only ever run to generate this output for the docs and almost all of the other behaviour is hard-coded for this purpose.