jfh
2f3f3f8505
Ignore AttributeError for missing __prepare__.
2021-10-16 20:16:33 +03:00
Steve Shi
723357962a
Refactor list avoid duplicate the vec ( #3241 )
...
* list count bench
* Refactor list count avoid duplicate the vec
* optimize list count with HEAPTYPE flag
* introduce generic safe iter functions for list
* Refactor list functions (contains, index, remove)
* Refactor list iter functions with const generics
* optimize list with richcompare
* optimize list iter_equal
2021-10-16 13:16:45 +09:00
jfh
37ba1b8a87
Mark internal types as not constructible.
2021-10-14 12:09:31 +03:00
jfh
ff67ad445c
Annotate iterators with Unconstructible.
2021-10-14 05:54:26 +03:00
Jim Fasarakis-Hilliard
a81f97dd9e
Merge pull request #3280 from DimitrisJim/bad_indexing
...
Fix deadlocks when slicing mutable sequences.
2021-10-13 08:14:41 +03:00
Aphek
e732669224
Make it possible for rust functions to increase recursion depth ( #3252 )
...
Make it possible for rust functions to increase recursion depth
2021-10-13 08:12:12 +03:00
jfh
0539d33ce4
Export saturated index via slicable, use better naming conventions.
2021-10-13 07:05:26 +03:00
jfh
72ad7120ab
Saturate slice before getting a lock on the underlying collection.
2021-10-12 10:00:50 +03:00
Jack-R-lantern
ab43f91fcb
Add contains in dict_keys
2021-10-12 01:19:31 +09:00
Kangzhi Shi
ea69dc53d2
remove test that fail on CPython
2021-10-10 14:48:30 +02:00
Kangzhi Shi
cbd7c59329
Fix unicode array pickling
2021-10-10 14:43:34 +02:00
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