Commit Graph

10112 Commits

Author SHA1 Message Date
24seconds
290f91cd5e Use Either type for OptionalArg in CastArgs
Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
2021-11-28 18:25:44 +09:00
Young
dd773b3413 Support tuple type also for memoryview shape arg 2021-11-27 23:39:01 +09:00
Jeong YunWon
3f2bab6dfe Merge pull request #3457 from youknowone/remove-todo
Remove TODO from RustPython-invalid test_cmd_line.test_version
2021-11-27 12:17:45 +09:00
Jeong YunWon
448f7e46cc test_bigrepeat is fixed
probably by #3445
2021-11-27 01:46:44 +09:00
Jeong YunWon
0ad3a29cac Remove TODO from RustPython-invalid test_cmd_line.test_version 2021-11-27 01:34:39 +09:00
Jeong YunWon
18427ecc5f Merge pull request #3447 from waroad/printArrowSymbol
arrow crash in windows
2021-11-27 01:00:15 +09:00
Noa
7cc5e0b5cc Merge pull request #3434 from chrismoradi/unimplemented-abstract-methods-raise-error
Check that all abstract methods are implemented prior to instantiation
2021-11-22 18:17:02 -06:00
Chris Moradi
a685b236f9 Merge branch 'main' of github.com:chrismoradi/RustPython into unimplemented-abstract-methods-raise-error 2021-11-22 14:58:17 -08:00
Steve Shi
908b239572 Refactor and new sequence traits, generic sequence operation (#3445)
* refactor sequence generic mutable sequence item equal op

* sequence generic for pydeque

* replace usize::MAX with Optioned

* sequence op for array

* fix overflow error instead memory error for  index overflow

* fixup

* optimize reserve vec for imul
2021-11-22 09:21:23 +02:00
Noa
a53451bd10 Merge pull request #3386 from coolreader18/no-arc
Big overhaul part 1 - replace PyRc with manual RefCount + WeakRefList
2021-11-21 17:43:50 -06:00
Jeong YunWon
b8624c617b Merge pull request #3454 from YYun-D/doc_modify
Fix `bytearray` and `bytes` docs
2021-11-21 13:58:34 +09:00
YYun-D
7de142fcd1 remove bytearray and byte docs
Signed-off-by: YYun-D <yeo1998@naver.com>
2021-11-21 12:37:01 +09:00
Jeong YunWon
7305be893a Merge pull request #3451 from waroad/enumerate_add_reduce
add reduce in enumerate
2021-11-21 09:42:34 +09:00
Jeong YunWon
d42ab184a1 Merge pull request #3450 from YYun-D/slice_reduce
implement `reduce` method to `PySlice`
2021-11-21 04:58:56 +09:00
Jeong YunWon
a96b8fc7fe Merge pull request #3452 from moreal/bugfix/correct-whats-left
Remove staled comments
2021-11-21 04:58:28 +09:00
Moreal
a41d7c5d29 Remove staled comments 2021-11-21 01:19:10 +09:00
waroad
51e1d7607c add reduce in enumerate 2021-11-20 20:56:26 +09:00
yyun-d
e49d7118b8 fix test_pickle in test_slice
Signed-off-by: yyun-d <yeo1998@naver.com>
2021-11-20 18:59:59 +09:00
yyun-d
fd3a0f6d86 implement reduce method to PySlice
Signed-off-by: yyun-d <yeo1998@naver.com>
2021-11-20 18:59:18 +09:00
Jeong YunWon
69491800e1 Merge pull request #3448 from YYun-D/test_math_modify
Update test_math.py to cpython 3.10
2021-11-20 17:33:42 +09:00
yyun-d
3070b19b36 Update test_math.py to cpython 3.10 2021-11-20 16:27:20 +09:00
BongYang
7b79c09c3c pystr.rs isdecimal() checks not only ASCII but also Unicode decimals 2021-11-20 16:08:27 +09:00
waroad
5a8d15def6 arrow crash in windows
in windows, arrow is not shown
and crahsed.
changed to another arrow that's
compatible
2021-11-20 14:08:09 +09:00
rvsampson94
0fe8a06d65 Dict keys isdisjoint 2021-11-20 12:30:22 +09:00
Noa
790090df62 Apply review comments 2021-11-18 12:33:44 -06:00
Jeong YunWon
c7e1742d47 Merge pull request #3444 from youknowone/revert-3433
Revert "Merge pull request #3433 from deantvv/test-update"
2021-11-17 19:46:22 +09:00
Jeong YunWon
913b78ca44 Revert "Merge pull request #3433 from deantvv/test-update"
This reverts commit 9fa5c5ac66, reversing
changes made to e7fa32c687.
2021-11-17 17:06:51 +09:00
Noa
af7ec416f9 Prevent edge case race condition, hopefully 2021-11-15 16:08:47 -06:00
Noa
229a9c8578 Make PyRef<T> wrap a NonNull<PyObjectView<T>>
This makes debuggers (or rust-gdb, at least) more pleasant to use, since
you don't have to manually cast `PyRef<T>.obj.ptr as `*const PyObjectView<T>`
Also get rid of PyGenericObject, since it's vestigial
2021-11-15 16:08:47 -06:00
Noa
8c7def00ec Address review 2021-11-15 16:08:47 -06:00
Noa
1da239ac08 Fix clippy 2021-11-15 16:08:47 -06:00
Noa
2a87b893fb Reuse standard no-cb weakref 2021-11-15 16:08:47 -06:00
Noa
f9d9a1e15e Implement weakref._remove_dead_weakref 2021-11-15 16:08:47 -06:00
Noa
ec0a658d20 Implement weakref.getweakrefs 2021-11-15 16:08:47 -06:00
Noa
c6871166d1 Make WeakListInner a sidetable 2021-11-15 16:08:47 -06:00
Noa
0b7c0fab61 Add miri test for dropping objects 2021-11-15 16:08:47 -06:00
Noa
86edc72c7e Fix miri UB 2021-11-15 16:08:46 -06:00
Noa
65cde9a0d6 Optimize size of WeakRefList
The outer struct is only 1 word now, and inside the box it's a byte for
the mutex (which gets padded to a word) + a word for the linked list (we
don't use the tail) + a word for the pointer to the object.
2021-11-15 16:08:46 -06:00
Noa
e51cb82ff0 Unskip tests 2021-11-15 16:08:46 -06:00
Noa
baf581c11b Update weakref.py and _weakrefset.py to Python 3.9 2021-11-15 16:08:46 -06:00
Noa
e42a3ca48e Big overhaul part 1 - replace PyRc with manual RefCount + WeakRefList 2021-11-15 16:08:45 -06:00
Chris Moradi
b0fd51f5de address PR feedback 2021-11-15 10:09:45 -08:00
Jeong YunWon
9fa5c5ac66 Merge pull request #3433 from deantvv/test-update
Update test for `support/os_helper.py`
2021-11-16 02:47:22 +09:00
Jeong YunWon
e7fa32c687 Merge pull request #3402 from Snowapril/refactor_exceptions
Refactor duplicated codes in exception creations
2021-11-16 02:45:30 +09:00
Jeong YunWon
15d8eec001 Merge pull request #3439 from youknowone/relocate-sys-test
relocate wrongly placed sys test in snippets/stdlib_os.py
2021-11-16 02:43:28 +09:00
Jeong Yunwon
93a7d59bbb relocate wrongly placed sys test in snippets/stdlib_os.py 2021-11-16 01:23:53 +09:00
Chris Moradi
868b680305 more tests passing 2021-11-13 19:26:10 -08:00
Chris Moradi
0500aa1e59 fix formatting 2021-11-13 17:35:28 -08:00
Chris Moradi
ab58885734 Check that all abstract methods are implemented prior to instantiation 2021-11-13 17:09:26 -08:00
Dean Li
a1202f5602 test: update importlib 2021-11-13 14:21:59 +08:00