Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .cspell.dict/python-more.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fnctl
frombytes
fromhex
fromunicode
frozensets
fset
fspath
fstring
Expand Down
4 changes: 2 additions & 2 deletions Lib/copyreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def pickle_complex(c):
pickle(complex, pickle_complex, complex)

def pickle_union(obj):
import functools, operator
return functools.reduce, (operator.or_, obj.__args__)
import typing, operator
return operator.getitem, (typing.Union, obj.__args__)

pickle(type(int | str), pickle_union)

Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_dataclasses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,7 @@ class C:

self.assertDocStrEqual(C.__doc__, "C(x:int=3)")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_docstring_one_field_with_default_none(self):
@dataclass
class C:
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_functools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2922,6 +2922,7 @@ def decorated_classmethod(cls, arg: int) -> str:
'decorated_classmethod'
)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_invalid_registrations(self):
msg_prefix = "Invalid first argument to `register()`: "
msg_suffix = (
Expand Down
2 changes: 2 additions & 0 deletions Lib/test/test_inspect/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,7 @@ def test_pep_695_generics_with_future_annotations_nested_in_function(self):


class TestFormatAnnotation(unittest.TestCase):
@unittest.expectedFailure # TODO: RUSTPYTHON
def test_typing_replacement(self):
from test.typinganndata.ann_module9 import A, ann, ann1
self.assertEqual(inspect.formatannotation(ann), 'Union[List[str], int]')
Expand All @@ -2040,6 +2041,7 @@ def test_typing_replacement(self):
'Union[List[testModule.typing.A], int]',
)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_formatannotationrelativeto(self):
from test.typinganndata.ann_module9 import A, ann1

Expand Down
Loading
Loading