Skip to content

Conversation

Eddy114514
Copy link

Modified map_vectorcall in bltinmodule.c, which warn user about behavior change of map in 3.x (return map object)
image

Add a test case in test_builtin.py

.mypy_cache/
.pytest_cache/
.DS_Store
.history/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why?

with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
list(map(lambda x: x, [1, 2, 3]))
self.assertTrue(any("returns map object in 3.x" in
Copy link
Collaborator

Choose a reason for hiding this comment

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

This message doesn't match what is in the warning

Copy link
Collaborator

Choose a reason for hiding this comment

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

Move to test_2x_warnings file and use with check_py2x_warnings() as w: because again the -2 flag has to be used for these warnings to be triggered.

Copy link
Author

Choose a reason for hiding this comment

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

@nanjekyejoannah fixed and moved, thanks for pointing out!

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