Skip to content

[3.7] bpo-36929: Modify io/re tests to allow for missing mod name (GH-13392)#13466

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-ccb7ca7-3.7
May 21, 2019
Merged

[3.7] bpo-36929: Modify io/re tests to allow for missing mod name (GH-13392)#13466
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-ccb7ca7-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented May 21, 2019

Copy link
Copy Markdown
Contributor
  • bpo-36929: Modify io/re tests to allow for missing mod name

For a vanishingly small number of internal types, CPython sets the
tp_name slot to mod_name.type_name, either in the PyTypeObject or the
PyType_Spec. There are a few minor places where this surfaces:

  • Custom repr functions for those types (some of which ignore the
    tp_name in favor of using a string literal, such as _io.TextIOWrapper)
  • Pickling error messages

The test suite only tests the former. This commit modifies the test
suite to allow Python implementations to omit the module prefix.

https://bugs.python.org/issue36929
(cherry picked from commit ccb7ca7)

Co-authored-by: Max Bernstein tekknolagi@users.noreply.github.com

…-13392)

* bpo-36929: Modify io/re tests to allow for missing mod name

For a vanishingly small number of internal types, CPython sets the
tp_name slot to mod_name.type_name, either in the PyTypeObject or the
PyType_Spec. There are a few minor places where this surfaces:

* Custom repr functions for those types (some of which ignore the
  tp_name in favor of using a string literal, such as _io.TextIOWrapper)
* Pickling error messages

The test suite only tests the former. This commit modifies the test
suite to allow Python implementations to omit the module prefix.

https://bugs.python.org/issue36929
(cherry picked from commit ccb7ca7)

Co-authored-by: Max Bernstein <tekknolagi@users.noreply.github.com>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@tekknolagi and @DinoV: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington

Copy link
Copy Markdown
Contributor Author

@tekknolagi and @DinoV: Status check is done, and it's a success ✅ .

@DinoV DinoV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested locally, merge looks good

@miss-islington miss-islington merged commit 6b48e65 into python:3.7 May 21, 2019
@miss-islington miss-islington deleted the backport-ccb7ca7-3.7 branch May 21, 2019 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants