Skip to content

gh-101688: Implement types.get_original_bases#101827

Merged
AlexWaygood merged 45 commits into
python:mainfrom
Gobot1234:orig_class-and-bases
Apr 23, 2023
Merged

gh-101688: Implement types.get_original_bases#101827
AlexWaygood merged 45 commits into
python:mainfrom
Gobot1234:orig_class-and-bases

Conversation

@Gobot1234
Copy link
Copy Markdown
Contributor

@Gobot1234 Gobot1234 commented Feb 11, 2023

Implements the methods described.

A couple of questions:

  • Should there be checking of the return types of the functions since they could be anything?
  • Should we add __orig_class__ to the slots of all the types that currently don't have them to provide better introspection support (currently get_orig_class(list[int]()) is None)

@arhadthedev arhadthedev added stdlib Standard Library Python modules in the Lib/ directory topic-typing labels Feb 11, 2023
Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

👍

Comment thread Doc/library/typing.rst Outdated
Comment thread Doc/library/typing.rst Outdated
Comment thread Doc/library/typing.rst Outdated
Comment thread Doc/library/typing.rst Outdated
Comment thread Lib/test/test_typing.py Outdated
Comment thread Lib/test/test_typing.py Outdated
Comment thread Lib/test/test_typing.py Outdated
Comment thread Lib/typing.py Outdated
@Gobot1234
Copy link
Copy Markdown
Contributor Author

Error looks unrelated?

@sobolevn
Copy link
Copy Markdown
Member

Yes, it is.

Comment thread Doc/library/typing.rst Outdated
Comment thread Doc/library/typing.rst Outdated
Comment thread Doc/library/typing.rst Outdated
Comment thread Doc/library/typing.rst Outdated
Comment thread Doc/library/typing.rst Outdated
@Gobot1234 Gobot1234 changed the title gh-101688: Implement typing.get_orig_class and get_orig_bases gh-101688: Implement typing.get_orig_class and types.get_orig_bases Feb 25, 2023
Comment thread Lib/test/test_types.py Outdated
Comment thread Lib/test/test_types.py Outdated
Comment thread Lib/types.py Outdated
Comment thread Misc/NEWS.d/next/Library/2023-02-11-15-01-32.gh-issue-101688.kwXmfM.rst Outdated