This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Other Python _io implementations may not expose _io in their type names
Type: behavior Stage: resolved
Components: IO, SSL, Tests, Tkinter Versions: Python 3.8, Python 3.7, Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, dino.viehland, miss-islington, tekknolagi, vstinner
Priority: normal Keywords: patch

Created on 2019-05-15 18:35 by tekknolagi, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 13347 closed tekknolagi, 2019-05-15 18:38
PR 13392 merged tekknolagi, 2019-05-17 19:12
PR 13466 merged miss-islington, 2019-05-21 17:09
Messages (4)
msg342593 - (view) Author: Maxwell Bernstein (tekknolagi) * Date: 2019-05-15 18:35
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 existing test suite only tests the former.

This makes it tricky for other Python implementations to pass the test suite if
they do not expose the module name (_io, _ssl, _tkinter, etc) in their type
msg342594 - (view) Author: Maxwell Bernstein (tekknolagi) * Date: 2019-05-15 18:36
I have the beginnings of a PR to patch the test suite to make the prefix
optional, if anybody is interested.
msg343073 - (view) Author: Dino Viehland (dino.viehland) * (Python committer) Date: 2019-05-21 17:09
New changeset ccb7ca728e09b307f9e9fd36ec40353137e68a3b by Dino Viehland (Max Bernstein) in branch 'master':
bpo-36929: Modify io/re tests to allow for missing mod name (#13392)
msg343077 - (view) Author: miss-islington (miss-islington) Date: 2019-05-21 17:51
New changeset 6b48e658bf80b0e30fddd9dfe80021313e57fb6a by Miss Islington (bot) in branch '3.7':
bpo-36929: Modify io/re tests to allow for missing mod name (GH-13392)
Date User Action Args
2022-04-11 14:59:15adminsetgithub: 81110
2019-05-22 16:10:01vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-05-21 17:51:59miss-islingtonsetnosy: + miss-islington
messages: + msg343077
2019-05-21 17:09:46dino.viehlandsetnosy: + dino.viehland
messages: + msg343073
2019-05-21 17:09:33miss-islingtonsetpull_requests: + pull_request13377
2019-05-17 19:12:13tekknolagisetpull_requests: + pull_request13302
2019-05-15 18:42:54tekknolagisetnosy: + vstinner
2019-05-15 18:38:18tekknolagisetkeywords: + patch
stage: patch review
pull_requests: + pull_request13258
2019-05-15 18:36:34tekknolagisetmessages: + msg342594
2019-05-15 18:35:30tekknolagicreate