tests/cpydiff: Document 3-arg pow() rejecting bool on MPZ builds.#19155
Open
jseop-lim wants to merge 1 commit into
Open
tests/cpydiff: Document 3-arg pow() rejecting bool on MPZ builds.#19155jseop-lim wants to merge 1 commit into
pow() rejecting bool on MPZ builds.#19155jseop-lim wants to merge 1 commit into
Conversation
Signed-off-by: Jeongseop Lim <jseoplim@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19155 +/- ##
=======================================
Coverage 98.46% 98.46%
=======================================
Files 176 176
Lines 22811 22811
=======================================
Hits 22460 22460
Misses 351 351 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Documents the CPython divergence reported in #19144 as a
cpydiff/entry, instead of the code fix proposed in #19148.On builds configured with
MICROPY_LONGINT_IMPL_MPZ(the default forunixand most ports), the 3-argumentpow()requires its operands to pass a strict integer type check, which excludesbool:Trade-offs and Alternatives
pow(x, y, bool)usage. Closing that PR in favour of this documentation.py/modbuiltins.c) already acceptsboolviamp_binary_op, so it is not a divergence and is intentionally not mentioned in the entry to keep the user-facing description tight. Thecausefield namesMICROPY_LONGINT_IMPL_MPZso readers on non-MPZ builds know the entry does not apply to them.Types,intto match the existingtypes_int_*entries (to_bytes,bit_length,subclassconv);Core,Functionswas considered but its existing entries cover function-call mechanics, not per-builtin input-domain quirks. Suggestions for a better category are welcome.Generative AI
I used generative AI tools when creating this PR, but a human has checked the code and is responsible for the code and the description above.
Fix #19144.