Skip to content
/ cpython Public
  • Rate limit · GitHub

    Access has been restricted

    You have triggered a rate limit.

    Please wait a few minutes before you try again;
    in some cases this may take up to an hour.

  • Notifications You must be signed in to change notification settings
  • Fork 31.3k
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

gh-101688: Implement types.get_original_bases #101827

Merged
merged 45 commits into from
Apr 23, 2023
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
50707ba
Implement typing.get_orig_class and get_orig_bases
Gobot1234 Feb 11, 2023
4fef9f8
📜🤖 Added by blurb_it.
blurb-it[bot] Feb 11, 2023
4cb193d
Apparently my lsp wasn't working
Gobot1234 Feb 11, 2023
44d3ae9
Removing trailing whitespace
Gobot1234 Feb 11, 2023
59e9ac2
Fix test failure
Gobot1234 Feb 11, 2023
20024e9
Merge branch 'main' into orig_class-and-bases
Gobot1234 Feb 11, 2023
769fdbd
Fix typo
Gobot1234 Feb 11, 2023
7194d3e
Respond to initial review
Gobot1234 Feb 12, 2023
eeb4475
Remove trailing ws
Gobot1234 Feb 17, 2023
198dc08
Respond to second round of review
Gobot1234 Feb 25, 2023
695cf93
Fix typo
Gobot1234 Feb 25, 2023
cc11033
Fix last few comments
Gobot1234 Apr 5, 2023
a66282b
Merge remote-tracking branch 'upstream/main' into orig_class-and-bases
Gobot1234 Apr 5, 2023
d3768ba
Merge branch 'main' into orig_class-and-bases
Gobot1234 Apr 5, 2023
581a91a
Apply suggestions from code review
Gobot1234 Apr 6, 2023
fb15427
Remove typing.get_orig_class
Gobot1234 Apr 6, 2023
96b9536
Merge remote-tracking branch 'origin/orig_class-and-bases' into orig_…
Gobot1234 Apr 6, 2023
6c38e4d
Remove old test
Gobot1234 Apr 6, 2023
372bd6b
Rename to get_original_bases
Gobot1234 Apr 6, 2023
a6fe8ac
Autoformatting is fun
Gobot1234 Apr 6, 2023
2b71b74
Fix more suggestions
Gobot1234 Apr 6, 2023
e7635c6
Remove rawstring
Gobot1234 Apr 6, 2023
42e1668
Apply suggestions from code review
Gobot1234 Apr 7, 2023
1040478
Fix `test_types` failures
AlexWaygood Apr 8, 2023
8085258
Apply suggestions from code review
Gobot1234 Apr 8, 2023
b9bf4fd
Add a whatsnew entry
Gobot1234 Apr 8, 2023
ee59cbd
Update Lib/types.py
Gobot1234 Apr 8, 2023
e5a91a5
Update Doc/library/types.rst
Gobot1234 Apr 8, 2023
7bad429
Merge branch 'main' into orig_class-and-bases
AlexWaygood Apr 8, 2023
2a39055
Merge branch 'main' into orig_class-and-bases
Gobot1234 Apr 9, 2023
1ea82be
Remove trailing WS
Gobot1234 Apr 9, 2023
1cb14c2
Fix more trailing WS
Gobot1234 Apr 9, 2023
6f06c52
Fallback to __bases__
Gobot1234 Apr 9, 2023
689267a
Update missing docs
Gobot1234 Apr 9, 2023
1ae16ea
Apply suggestions from code review
Gobot1234 Apr 9, 2023
3a8619a
Update Doc/library/types.rst
Gobot1234 Apr 9, 2023
e1d55d6
Merge remote-tracking branch 'upstream/main' into orig_class-and-bases
AlexWaygood Apr 11, 2023
bab8cb3
Small tweaks to docs
AlexWaygood Apr 11, 2023
fb9ef70
Use `assert` in docs examples
AlexWaygood Apr 12, 2023
dc433c4
Document type.__orig_bases__
Gobot1234 Apr 12, 2023
4268b74
Revert "Document type.__orig_bases__"
Gobot1234 Apr 12, 2023
9f54ac1
Update Doc/library/types.rst
Gobot1234 Apr 19, 2023
c122b23
Hone docs more
AlexWaygood Apr 22, 2023
2134053
Merge remote-tracking branch 'upstream/main' into orig_class-and-bases
AlexWaygood Apr 23, 2023
cb21a65
More tests and docs following #103698
AlexWaygood Apr 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test failure
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

Gobot1234 committed Feb 11, 2023
commit 59e9ac263c253f44e12292d8c372f77fcc329198
2 changes: 1 addition & 1 deletion Lib/test/test_typing.py
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
from typing import Generic, ClassVar, Final, final, Protocol
from typing import cast, runtime_checkable
from typing import get_type_hints
from typing import get_origin, get_args
from typing import get_origin, get_args, get_orig_bases, get_orig_class
from typing import is_typeddict
from typing import reveal_type
from typing import no_type_check, no_type_check_decorator
2 changes: 2 additions & 0 deletions Lib/typing.py
Original file line number Diff line number Diff line change
@@ -123,6 +123,8 @@ def _idfunc(_, x):
'final',
'get_args',
'get_origin',
'get_orig_bases',
'get_orig_class',
'get_type_hints',
'is_typeddict',
'Never',