Skip to content

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

Merged
vsajip merged 1 commit into
python:3.8from
miss-islington:backport-46abfc1-3.8
Jan 1, 2020
Merged

[3.8] bpo-39142: Avoid converting namedtuple instances to ConvertingTuple. (GH-17773)#17785
vsajip merged 1 commit into
python:3.8from
miss-islington:backport-46abfc1-3.8

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor

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 vinay_sajip@yahoo.co.uk

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 <vinay_sajip@yahoo.co.uk>
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

1 similar comment
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@vsajip
vsajip merged commit 1d5a7e5 into python:3.8 Jan 1, 2020
@miss-islington
miss-islington deleted the backport-46abfc1-3.8 branch January 1, 2020 20:06
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

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