Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
4c4c701
Add new type object for union types
maggiemoss Jul 10, 2020
07b5c29
Add test.
maggiemoss Jul 10, 2020
32c207b
Add basic tp_* fields to union object
maggiemoss Jul 15, 2020
50b33c2
Squash this commit.
maggiemoss Jul 15, 2020
8901145
Squash this commit.
maggiemoss Jul 15, 2020
6450321
Add union_traverse method.
maggiemoss Jul 15, 2020
8a09a92
Handle Py_None in union.
maggiemoss Jul 16, 2020
e3c80e9
Clean up syntax with Py_None
maggiemoss Jul 16, 2020
165c323
Update getattro method.
maggiemoss Jul 16, 2020
7f0018e
Reduce code duplication when adding union types together.
maggiemoss Jul 17, 2020
cd584d5
Add __or__ method to _SpecialGenericAlias
maggiemoss Jul 17, 2020
ba031c1
Add support for NewType with unions.
maggiemoss Jul 17, 2020
e62de73
Remove old code from abstract.c
maggiemoss Jul 17, 2020
f6ab05b
Fix warning for incompatible pointer type.
maggiemoss Jul 17, 2020
9c20fbc
Add support for union use in subclasses.
maggiemoss Jul 19, 2020
9f48989
Fix code style inconsistencies.
maggiemoss Jul 22, 2020
a0cd651
Change is_not_union -> is_union
maggiemoss Jul 22, 2020
a5c6850
Implement dedup and flatten.
maggiemoss Jul 24, 2020
5255f4f
Add basic tp_repr to unionobject.
maggiemoss Jul 24, 2020
1732fad
Update is_unionable.
maggiemoss Jul 24, 2020
31653dc
Clean up whitespace.
maggiemoss Jul 25, 2020
2ffb050
Update test_types.
maggiemoss Jul 25, 2020
3fed944
Fix style and grammar issues.
maggiemoss Jul 27, 2020
a1c703b
Implement NE for union richcompare.
maggiemoss Jul 27, 2020
c4acc73
Remove is_generic_alias helper method.
maggiemoss Jul 27, 2020
6a8dfe9
Fix negative ref count.
maggiemoss Jul 27, 2020
af59751
Small code style fixes.
maggiemoss Jul 27, 2020
cae1a38
Add unionobject to pythoncore.vcxproj.filters
maggiemoss Jul 27, 2020
0cb47c1
Remove semicolon after PyObject_HEAD
maggiemoss Jul 27, 2020
265be78
Use _PyTuple_Resize instead of variable length array.
maggiemoss Jul 28, 2020
6fddcd6
Add error handling.
maggiemoss Jul 28, 2020
60f023a
Add additional tests for union_richcompare.
maggiemoss Jul 28, 2020
99ba1fd
📜🤖 Added by blurb_it.
blurb-it[bot] Jul 28, 2020
ad945fd
Update error check for PySet_New call.
maggiemoss Jul 30, 2020
0586c41
Allow Any and other _SpecialForm
maggiemoss Jul 30, 2020
e44a657
Update repr to handle NoneType properly.
maggiemoss Jul 30, 2020
ba3110c
Add Union to types.py
maggiemoss Jul 30, 2020
7bec987
Merge branch 'PEP605-implementation' of github.com:MaggieMoss/cpython…
maggiemoss Jul 30, 2020
e052c53
Remove commented out code.
maggiemoss Jul 31, 2020
15e0d29
Update test with nested unions.
maggiemoss Jul 31, 2020
2e31288
Add additional tests for optionals.
maggiemoss Jul 31, 2020
2a12a43
Add support for int | int == int
maggiemoss Jul 31, 2020
7116cd9
Add more error handling to unionobject
maggiemoss Jul 31, 2020
2c0befb
Handle NoneType vs. None
maggiemoss Aug 3, 2020
8d59e44
Don't allow generics in isinstance calls.
maggiemoss Aug 4, 2020
9f014e2
Add errors for union subclass.
maggiemoss Aug 5, 2020
30bb872
Implement code review suggestions.
maggiemoss Aug 12, 2020
6fe4956
Increase code sharing between is_typing_name and is_new_type
maggiemoss Aug 12, 2020
bae3d2a
Add tests, fix reference leaks.
maggiemoss Aug 12, 2020
17a7277
Update tp_flags for unionobject.
maggiemoss Aug 12, 2020
f47bce0
Return int.
maggiemoss Aug 13, 2020
0735352
Fix NoneType comparison side effect.
maggiemoss Aug 13, 2020
b2910f0
Merge branch 'PEP605-implementation' of github.com:MaggieMoss/cpython…
maggiemoss Aug 14, 2020
e9e5a5e
Remove GC flag from unionobject.
maggiemoss Aug 14, 2020
385a338
Implement code review suggestions
maggiemoss Aug 18, 2020
dddc598
Refactor and remove PyUnion_New
maggiemoss Aug 18, 2020
8c06c1d
General cleanup, fix reference leaks, add new test for possible crashes
pablogsal Sep 8, 2020
37699f1
Add newline
pablogsal Sep 8, 2020
47a4cb3
Make unionobject APIs private
pablogsal Sep 9, 2020
7f89abd
Add minor test for GenericAlias
pablogsal Sep 9, 2020
d0be56f
Remove ellipsis from repr.
maggiemoss Sep 9, 2020
59f06f7
Remove commented out test code.
maggiemoss Sep 9, 2020
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
Add minor test for GenericAlias
  • Loading branch information
pablogsal committed Sep 9, 2020
commit 7f89abdf2530232184f87fc8c570b366b7194b09
1 change: 1 addition & 0 deletions Lib/test/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ def test_or_type_operator_with_SpecialForm(self):

def test_or_type_repr(self):
assert repr(int | None) == "int | None"
assert repr(int | typing.GenericAlias(list, int)) == "int | list[int]"

class Forward: ...
# T = typing.TypeVar('T')
Expand Down