Commit Graph

131 Commits

Author SHA1 Message Date
Jack-R-lantern
aef89ceaec Add __contains__ in dict_items 2021-10-09 17:32:03 +09:00
Jack-R-lantern
d59d5e17e6 remove file 2021-10-09 16:54:32 +09:00
Jack-R-lantern
d925880de8 Add testcase 2021-10-09 16:47:54 +09:00
Jack-R-lantern
ab3145eb1d pull main branch & merge 2021-10-09 16:08:10 +09:00
jfh
eb943a11be Move not_impl to extra_tests. 2021-10-08 00:14:40 +03:00
jfh
2d36e1dc2d Ignore CPython specific testing/template modules. [skip ci] 2021-10-07 22:50:07 +03:00
Jeong YunWon
d49ab19fab Merge pull request #3209 from osman-turan/main
Add missing randbytes method on random
2021-10-07 01:14:22 +09:00
frazar
2c09dd8535 Align test outcomes with Python 3.9.7 (#3230) 2021-10-06 18:23:02 +03:00
Osman Turan
0f6a773187 Merge branch 'RustPython:main' into main 2021-10-06 17:32:18 +03:00
Alex Muscar
cd4216097f fix: __repr__ use collection subclass name
Addresses: https://github.com/RustPython/RustPython/issues/3217

This patch changes the `set`, `frozenset`, `deque` and `bytearray`
collections to use the subclass name in `__repr__`, if they are
subclassed.
2021-10-06 10:01:36 +01:00
Jeong YunWon
0c862f740b disable failing test 2021-10-03 23:24:59 +09:00
Jeong YunWon
68e159e6da disable wrong test suite 2021-10-03 23:24:59 +09:00
Osman Turan
6fc278f19f Add tests for random.randbytes 2021-10-03 14:51:09 +03:00
Kangzhi Shi
87edbfece7 fix str iterator position 2021-10-01 16:53:47 +02:00
Jeong YunWon
ff1129adb7 PyIterReturn for StopIteration
Same as ArithmaticValue for NotImplemented
2021-10-01 22:33:57 +09:00
jfh
8d8e138f0a fix issue 3154 2021-09-27 22:52:35 +03:00
Jeong YunWon
064bfc5a9d cpython docs database for class 2021-09-22 10:32:23 +09:00
Jeong YunWon
c2b4755af4 CPython docs database for module items 2021-09-22 04:25:41 +09:00
Padraic Fanning
0ea56025ec Replace master with main
Fixes #3067
2021-09-15 17:54:54 -04:00
Nikita Sobolev
b723bbfbb5 All exceptions are now modified with extend_exception! macro 2021-09-16 03:17:19 +09:00
Jeong YunWon
24168791af type test for __new__ 2021-09-15 05:20:44 +09:00
jfh
049e9bd41d Add __reduce__ for set iterator. 2021-08-30 19:53:48 +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
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
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
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
ff913baf97 add extra test for check __instancecheck__ work
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-08-25 15:15:36 +09:00
Jeong YunWon
67b338863e Merge pull request #2897 from sobolevn/better-exceptions
Adds better exception macro
2021-08-25 03:22:14 +09:00
Jim Fasarakis-Hilliard
7f946daec4 Merge pull request #2955 from DimitrisJim/fix_empty_array_panic
Fixes panic when empty array is indexed.
2021-08-24 17:13:08 +03:00
jfh
92491906f5 Fixes panic when empty array is indexed. 2021-08-24 16:24:21 +03:00
Kangzhi Shi
1384133636 fix bytes and bytearray fromhex support subclass 2021-08-23 16:43:01 +02:00
Jeong YunWon
60edbdd427 Merge pull request #2938 from DimitrisJim/deque_repr
Fix deque repr hang if element __repr__ mutates.
2021-08-23 00:25:00 +09:00
jfh
fd23e4e917 Fix repr hang if __repr__ is evil. 2021-08-22 16:57:05 +03:00
Snowapril
7a16350605 Fix list entering deadlock in several methods (#2933)
Resolve list deadlock

In current list lock implementation, some methods do not unlock
readguard before entering loop.
2021-08-22 14:49:36 +03:00
sobolevn
a725e2b8cf Adds alternative extend_exception! macro 2021-08-20 00:02:53 +03:00
sobolevn
155da36b73 More progress, adds more exception types and more tests 2021-08-19 15:30:17 +03:00
sobolevn
fc4a948ea9 WIP: adds better exception macro, refs #2771 2021-08-18 22:20:36 +03:00
Jeong YunWon
d2a9316344 Merge pull request #2853 from eldpswp99/support-deque.extend-recursive-call
support deque.extend recursive call
2021-08-12 22:20:56 +09:00
sobolevn
06d33f8f2c id() for str stays the same after * 1, refs #2840 2021-08-12 13:49:00 +03:00
Jeong YunWon
739ca964aa PyDeque with extract_elements & extend 2021-08-12 16:34:38 +09:00
sobolevn
37f66dd998 id() for bytes stays the same after * 1, refs #2840 2021-08-11 21:53:52 +03:00
voidsatisfaction
3500a58138 fix: make dict.{__or__,__ror__,__ior__} with other types should return NotImplemented 2021-08-11 20:23:51 +09:00
Tetramad
d45161939d Enable __floor__, __ceil__ test snippet for float
The test of __floor__ and __ceil__ for float will be activated
when python version is greater then or equal to 3.9
2021-08-11 14:30:10 +09:00
Nikita Sobolev
a4fd0144ad Fixes repr of functions defined in classes 2021-08-11 02:55:05 +09:00
Nikita Sobolev
b33f72eb4d Adds __qualname__ to PyBoundMethod 2021-08-10 05:32:02 +09:00
Jeong YunWon
49ff438278 Merge pull request #2820 from sobolevn/issue-2779
Fixes infinite recursion on `raise e from e`
2021-08-10 04:54:52 +09:00
sobolevn
83914a9f54 Fixes infinite recursion on raise e from e, refs #2779 2021-08-09 20:58:36 +03:00
sobolevn
c0f38e2263 Adds __subclasshook__ to type, refs #2794 2021-08-09 16:33:57 +03:00
sobolevn
e939346850 Adds class field to PyGetSet to fix __qualname__ and (in future) repr, refs #2790 2021-08-08 18:53:57 +03:00