◐ Shell
reader mode source ↗
Skip to content

bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list#3840

Merged
serhiy-storchaka merged 13 commits into
python:masterfrom
orenmn:bpo28280
Oct 8, 2017
Merged

bpo-28280: Make PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() always return a list#3840
serhiy-storchaka merged 13 commits into
python:masterfrom
orenmn:bpo28280

Conversation

@orenmn

@orenmn orenmn commented Sep 30, 2017

Copy link
Copy Markdown
Contributor

In addition:

  • Add get_mapping_keys(), get_mapping_values() and get_mapping_items() to _testcapi, so that we would be able to test PyMapping_Keys(), PyMapping_Values() and PyMapping_Items().
  • Add tests to test_capi to verify that each of these functions returns the appropriate list, and that it raises the appropriate error in case of a bad argument.
  • Update the docs accordingly.

https://bugs.python.org/issue28280

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Add also an entry in What's New. This will help people to revise their code and fix errors in old versions of Python.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

I'm approving this PR, but since I have proposed this change I can miss flaws of it. I want to get the approve from other core developers.

@serhiy-storchaka serhiy-storchaka merged commit 0ccc0f6 into python:master Oct 8, 2017
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.

5 participants