138 Commits

Author SHA1 Message Date
Noa
3fd0382a51 Use RPITIT where applicable 2024-05-21 14:47:10 +09:00
Steve Shi
de0d323ad3 change dependency from num-bigint to malachite-bigint (#4952) 2023-06-08 14:28:39 +09:00
Jeong YunWon
4c2ab63185 Fix repr(bytearray) in debug 2023-05-12 06:52:11 +09:00
Jeong YunWon
ff5076b12c rustpython-literal 2023-05-05 21:49:12 +09:00
Jeong YunWon
cfbdf7f924 Refactor common::bytes::repr using common::escape 2023-05-03 16:08:48 +09:00
Jeong YunWon
2080cc2067 Refactor common::str::repr using common::escape 2023-05-03 13:47:04 +09:00
Jeong YunWon
9cc8f2dfa9 repr as single quote default 2023-05-01 03:30:34 +09:00
Yongjin
f7eb51204a Returns new string when (str|bytes).replace get empty original string 2023-03-27 15:05:45 +09:00
Jeong YunWon
7b99df6c48 PyPayload::class takes ctx instead of vm 2023-03-20 21:03:40 +09:00
Jeong YunWon
f314328294 lifetime bounded TryFromBorrwoedObject 2023-03-19 04:57:06 +09:00
Tomer Chachamu
8bfbfe3e46 Fix str.splitlines to recognise unicode line terminators 2023-03-18 01:10:59 +00:00
Jeong YunWon
b35861005e more cspell (#4702) 2023-03-17 14:02:24 +09:00
Jeong YunWon
b60271a6cf deprecate vm.invoke 2023-03-08 01:35:30 +09:00
Noa
58ac82b0a7 Switch hacky GAT-workarounds to use actual GATs 2023-03-01 20:48:12 -06:00
John Pham
8b7158f169 Make common::repr throw error instead of panic (#4520) 2023-02-19 22:09:54 +09:00
Jeong YunWon
aaa364da54 narrow publicity of BytesInner::elements 2023-02-17 22:00:51 +09:00
Dan Näsman
a0c34dab54 Optimize bytes-like (l|r)strip (#4500) 2023-02-17 21:31:12 +09:00
Jeong YunWon
f9f665be62 PyObjectRef::downcast_exact returns PyRefExact 2023-02-16 22:20:16 +09:00
Jeong YunWon
23c7b92aff Move (c)format basic implementations to rustpython-common 2023-01-02 20:21:36 +09:00
Jeong YunWon
d935fbc445 Fix nightly clippy warnings 2022-12-05 12:18:16 +09:00
Jeong YunWon
2bb9aee5d3 Remove Display impl for PyObject 2022-08-12 10:55:23 +09:00
Dennis Zhuang
396812d66c Refactor byte operations 2022-06-14 16:37:35 +09:00
Jeong Yunwon
4f272eea85 PyExactSizeIterator 2022-06-13 22:19:24 +09:00
Jeong Yunwon
9db69d628f {Type,Exception}Zoo holds static ref 2022-05-27 10:23:33 +09:00
Jeong YunWon
c44843fa1e Merge pull request #3700 from youknowone/attr-intern
PyStrInterned for PyAttributes/Constants
2022-05-27 08:56:28 +09:00
Jeong Yunwon
fb52694e41 PyAttributes key is PyStrInterned 2022-05-23 09:03:13 +09:00
Lithium
94240f1846 Fixed bytes_from_object (#3739) 2022-05-22 20:39:50 +09:00
Lithium
53185cdfb8 Fixed test_bytearray_translate Error (#3730) 2022-05-22 10:57:12 +09:00
Jeong Yunwon
c9f1f61bae fix clippy warnings 2022-05-07 20:00:57 +09:00
Jeong Yunwon
a7135024a5 &PyTuple and &PyTupleRef works like &[PyObjectRef] 2022-04-24 12:26:48 +09:00
Jeong Yunwon
0535077631 either is a function utility 2022-04-23 20:49:31 +09:00
Jeong Yunwon
66b6a06997 PyValue -> PyPayload 2022-04-23 05:20:31 +09:00
Jeong Yunwon
fee3bf2722 AsPyObject -> AsObject because fn as_object 2022-04-18 07:19:35 +09:00
Jeong Yunwon
625f8675ae Introduce AsPyObject to replace IdProtocol 2022-04-17 10:32:01 +09:00
Jeong Yunwon
86a8831124 vm::funciton::arithmetic 2022-04-16 00:49:05 +09:00
Kangzhi Shi
7b8c4091b5 fix hang on __index__ 2022-03-12 16:12:34 +09:00
Kangzhi Shi
6b17fa1d3d fix rebase 2022-03-12 16:12:12 +09:00
Kangzhi Shi
01a8e01ec8 refactor BufferResizeGuard 2022-03-12 16:12:12 +09:00
Kangzhi Shi
4be3c4f598 refactor PySliceableSequence -> SlicableSequenceOp 2022-03-12 16:12:12 +09:00
Kangzhi Shi
dd5774c8b4 fix rebase 2022-03-12 16:12:12 +09:00
Kangzhi Shi
6e4ecd6cf2 Impl sequence protocol for bytearray 2022-03-12 16:12:12 +09:00
Kangzhi Shi
25af549495 Impl squence protocol for bytes 2022-03-12 16:12:12 +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
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
Jeong YunWon
b759808736 PyObj -> PyObject 2021-10-21 17:55:29 +09:00
Noa
8dd18d97be PyObjectRef -> &PyObj, &PyRef<T> -> &Py<T> 2021-10-21 16:49:01 +09:00
Noa
27540e1d35 Add unparse feature to ast 2021-10-17 21:55:27 -05:00
Jeong YunWon
79e951b630 Object protocol 2021-10-15 17:54:30 +09:00
Jeong YunWon
7cae6d24fe Refactor PyType creation 2021-10-14 13:37:45 +09:00
Jeong YunWon
05dca7a7c8 ctx.new_list returns PyLsitRef 2021-10-12 01:22:36 +09:00