Commit Graph

10121 Commits

Author SHA1 Message Date
Jeong YunWon
4f2d70f915 Merge pull request #3475 from hrchu/pep604
Allow writing union types as X | Y
2021-11-29 03:10:01 +09:00
hrchu
b0dabd6087 Allow writing union types as X | Y 2021-11-28 19:42:33 +08:00
Jeong YunWon
e740de697b Merge pull request #3472 from qingshi163/fix-slice-overflow
fix #3468 SaturatedSliceIter overflow
2021-11-28 20:04:29 +09:00
Kangzhi Shi
296afbc315 fix #3468 SaturatedSliceIter overflow 2021-11-28 11:15:49 +02:00
Jeong YunWon
9fb70707c4 Merge pull request #3469 from youknowone/dis-py
rename native dis to _dis and add python module
2021-11-28 17:52:15 +09:00
Jeong YunWon
d622ceb9dc rename native dis to _dis and add python module 2021-11-28 15:50:24 +09:00
Jeong YunWon
c65130c221 Merge pull request #3466 from hrchu/add-test-uuid
Add test UUID
2021-11-28 14:52:57 +09:00
hrchu
bd67e7d927 Mark failing tests in test_unid 2021-11-28 10:25:22 +08:00
hrchu
34ac2f73d1 Add test_uuid from CPython 3.9.9 2021-11-28 10:16:24 +08:00
Jeong YunWon
e2b5abf70c Merge pull request #3459 from TeamTamoad/maketrans
Fix maketrans not thrown ValueError when length of the arguments are …
2021-11-27 15:05:48 +09:00
Narawit Rakket
cf7c8154bf Fix maketrans not thrown ValueError when length of the arguments are not the same 2021-11-27 12:12:18 +07: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