Skip to content
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

Test fixes for changes in recent upstream Python (#581) #582

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

AdamWill
Copy link
Contributor

This includes a couple of fixes for changes in recent Python: 3.13 deindents docstrings, and a fix for inspecting wrappers was landed in 3.13 and backported to 3.12.3 and 3.11.9, which breaks the expectations of the test_inspect_wrapped_property test.

Note a couple of tests still fail against current Python 3.13 due to python/cpython#120526 . I did not want to upstream a workaround for that to toolz, since the correct fix is for the map signature to be corrected in Python: python/cpython#120528 fixes that.

Python upstream recently fixed the behavior of inspect with
wrappers: python/cpython#112006 . The
assertion here relies on the broken behavior, we only get None
if `inspect(Wrapped)` fails and raises `ValueError`. Now it
works, we actually get the correct answer, 1. This changes it so
we assert the correct thing depending on the Python version (the
fix was backported to 3.11.9 and 3.12.3, so the check has to be a
bit complicated).

Signed-off-by: Adam Williamson <[email protected]>
@mgorny
Copy link

mgorny commented Jun 18, 2024

Thanks for doing this, and for investigating the other test failure cause.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AdamWill -- this is in

@jrbourbeau jrbourbeau merged commit 0c2b43a into pytoolz:master Sep 27, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants