Skip to content

[3.7] bpo-39142: Avoid converting namedtuple instances to ConvertingTuple. (GH-17773) #17786

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

Merged
merged 1 commit into from
Jan 1, 2020

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 1, 2020

This uses the heuristic of assuming a named tuple is a subclass of
tuple with a _fields attribute. This change means that contents of
a named tuple wouldn't be converted - if a user wants to have
ConvertingTuple functionality from a namedtuple, they will have to
implement it themselves.
(cherry picked from commit 46abfc1)

Co-authored-by: Vinay Sajip [email protected]

https://bugs.python.org/issue39142

…ythonGH-17773)

This uses the heuristic of assuming a named tuple is a subclass of
tuple with a _fields attribute. This change means that contents of
a named tuple wouldn't be converted - if a user wants to have
ConvertingTuple functionality from a namedtuple, they will have to
implement it themselves.
(cherry picked from commit 46abfc1)

Co-authored-by: Vinay Sajip <[email protected]>
@miss-islington
Copy link
Contributor Author

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

1 similar comment
@miss-islington
Copy link
Contributor Author

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

@vsajip vsajip merged commit 0e0e4ac into python:3.7 Jan 1, 2020
@miss-islington miss-islington deleted the backport-46abfc1-3.7 branch January 1, 2020 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants