jfh
3e656c0b6e
Use inner dict methods during iteration.
2021-08-30 17:44:51 +03:00
Jeong YunWon
4ddd1d3ee3
Merge pull request #2989 from DimitrisJim/repeat_overflow_checks
...
Check for MemoryErrors when repeating sequences.
2021-08-30 16:12:37 +09:00
Jeong YunWon
f4d40bc0c9
Merge pull request #2988 from DimitrisJim/isinstance_subclass_edges
...
Clean up edge cases in `isinstance`/`issubclass`.
2021-08-30 12:05:51 +09:00
jfh
97b8d7ca7b
Add checking for repeat on sequences.
2021-08-29 17:43:47 +03:00
Myunghoon Park
e4953efac1
add __new__ method to deque iterator and reverse iterator ( #2987 )
...
* add __new__ method to deque iterator and reverse iterator
2021-08-29 17:13:19 +03:00
jfh
d42d048c70
Clean up edge cases in isinstance and issubclass.
2021-08-29 15:12:30 +03:00
Snowapril
2aa58cc551
implement complex.__complex__
...
add `complex.__complex__` which will be added in cpython 3.11 for typing
module.
documents:
* https://docs.python.org/3.11/whatsnew/3.11.html#other-cpython-implementation-changes
* https://bugs.python.org/issue24234
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-29 11:33:56 +09:00
Jeong YunWon
30faf19987
Implement bytes.__bytes__
...
This commit implement `bytes.__bytes__` in cpython 3.11 for typing
module.
* https://docs.python.org/3.11/whatsnew/3.11.html#other-cpython-implementation-changes
* https://bugs.python.org/issue24234
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-29 11:33:23 +09:00
snowapril
abbcc7f322
add skip test__bytes__ before cpython 3.11
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-29 09:05:15 +09:00
snowapril
cb4df01aca
Implement bytes.__bytes__
...
This commit implement `bytes.__bytes__` in cpython 3.11 for typing
module.
* https://docs.python.org/3.11/whatsnew/3.11.html#other-cpython-implementation-changes
* https://bugs.python.org/issue24234
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-29 07:32:21 +09:00
Jim Fasarakis-Hilliard
e44cb9c5cf
Merge pull request #2982 from fanninpm/fix-typing
...
Add test_typing from CPython 3.8
2021-08-28 21:10:36 +03:00
Padraic Fanning
a43979bb62
Skip stack overflow on Windows
2021-08-28 12:48:13 -04:00
Padraic Fanning
71a4934bc1
Unmark passing test in test_grammar
2021-08-28 12:03:33 -04:00
Jeong YunWon
7d964815cb
Merge pull request #2983 from youknowone/pyref-int-ref
...
PyValue::_into_ref
2021-08-28 15:06:38 +09:00
Jeong YunWon
e1afef106a
PyValue::_into_ref
2021-08-28 14:18:55 +09:00
Padraic Fanning
b8df8c3a6c
Mark erroring/failing tests
2021-08-27 22:54:31 -04:00
Jeong YunWon
2dade2978d
Merge pull request #2981 from DimitrisJim/deque_subclass_copy
...
Return subclass on deque copy.
2021-08-28 11:02:15 +09:00
Padraic Fanning
80a0effd22
Reenable SupportsAbs and SupportsRound
2021-08-27 21:41:50 -04:00
Padraic Fanning
cd9078e5f4
Add support files for test_typing
2021-08-27 21:41:49 -04:00
Padraic Fanning
73d18fd7de
Add test_typing from CPython 3.8
2021-08-27 21:41:49 -04:00
jfh
2b5251a4ec
Return subclass on copy.
2021-08-27 20:47:41 +03:00
Jim Fasarakis-Hilliard
d6dc0957df
Merge pull request #2978 from youknowone/cleanup-compiler
...
Fix Compiler::qualified_path to be human friendly
2021-08-27 18:42:48 +03:00
Jeong YunWon
93b91bab2d
Compiler::qualified_name as vec
2021-08-27 23:45:47 +09:00
Jeong YunWon
390005f9a8
clean up Compiler::create_qualified_name
2021-08-27 23:29:34 +09:00
Lee Dogeon
abdfe3222b
Fix __repr__, __qualname__ ( #2977 )
2021-08-27 17:07:10 +03:00
Jeong YunWon
cc77ebe6ae
Merge pull request #2962 from Snowapril/fix-issubclass
...
Fix `issubclass` method work for general types
2021-08-27 22:30:29 +09:00
snowapril
e208138d62
skip test_infinite_recursion_in_bases test in win32
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-27 21:04:33 +09:00
snowapril
535f0734a0
remove expected_failure annotation
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-27 19:28:01 +09:00
snowapril
323b5f7c22
add extra test test issubclass on general type
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-27 19:28:01 +09:00
snowapril
1ddeb67ad0
builtins: fix issubclass method miswork
...
This commit fix issue #2943 .
In cpython, both first and second argument can be value (not type).
As second parameter `cls` is defined as PyTypeRef,
`vm.call_special_method` use `subclasscheck` method in `PyTuple`, never could reach
to user defined `subclasscheck` method.
In general, first argument of `issubclass` must be `<class Type>`, but
if second argument define `__subclasscheck__`, rustpython must test it
first. Therefore, for first argument enable to have different type, I
switch it's type as `PyObjectRef`.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-27 19:28:01 +09:00
Jeong YunWon
3a861e47c6
Merge pull request #2976 from DimitrisJim/bump_recursion_limit
...
Bump recursion limit to match CPython's
2021-08-27 16:44:58 +09:00
jfh
01e5b12290
Bump recursion limit to match CPython's
2021-08-27 09:29:52 +03:00
Jeong YunWon
f1c3935f27
Merge pull request #2961 from qingshi163/main
...
fix pattern for construct the bytes and bytearray
2021-08-27 10:02:02 +09:00
Noa
3836580de0
Merge pull request #2975 from youknowone/isinstance
...
hide builtins::isinstance from rust interface
2021-08-26 17:05:47 -05:00
Jeong YunWon
6269d7eb00
hide builtins::isinstance from rust interface
2021-08-27 03:20:14 +09:00
Jeong YunWon
d387399587
simplify ByteInnerNewOptions::get_bytes()
2021-08-27 03:15:23 +09:00
Jeong YunWon
fbea3f072e
Merge pull request #2952 from Snowapril/fix-isinstance
...
Fix `isinstance` to support Generic type object
2021-08-27 02:16:53 +09:00
Jim Fasarakis-Hilliard
48f0eb2810
Merge pull request #2972 from DimitrisJim/deque_pickle_tests
...
Implement __reduce__ for deque.
2021-08-26 20:03:41 +03:00
Jeong YunWon
23b77b94d5
Merge pull request #2971 from DimitrisJim/rlcompleter
...
Add rlcompleter.py
2021-08-27 01:55:42 +09:00
Jeong YunWon
84dd5b02ce
Merge pull request #2963 from moreal/bugfix/correct-init-method-error-message
...
Fix missing positional argument message
2021-08-27 01:54:25 +09:00
jfh
5e758f07b5
Add deque.__reduce__.
2021-08-26 19:15:32 +03:00
jfh
11349db67b
Update test_deque to CPython 3.8
2021-08-26 19:06:41 +03:00
Moreal
46cbce49c2
Add comma for compatibility
2021-08-27 00:12:38 +09:00
jfh
4911f17ed2
Mark failing test.
2021-08-26 17:52:29 +03:00
jfh
27c0ff849b
Add test_rlcompleter.py from CPython 3.8.
2021-08-26 17:51:55 +03:00
jfh
5cefa72dd4
Add rlcompleter.py from CPython 3.8.
2021-08-26 17:51:16 +03:00
Jim Fasarakis-Hilliard
9203cb3bb2
Merge pull request #2949 from stromberger/main
...
added __add__ method to collections.deque
2021-08-26 17:43:43 +03:00
Alexander Stromberger
4e733c450b
added __add__ method to collections.deque
2021-08-26 22:50:22 +09:00
Jim Fasarakis-Hilliard
c57285bd83
Merge pull request #2969 from eldpswp99/add-mutation-check-logic-in-dict-update
...
Add mutation check in dict.merge.
2021-08-26 16:15:28 +03:00
eldpswp99
9addff5ba9
add mutation check in dict.merge
2021-08-26 21:02:45 +09:00