Commit Graph

121 Commits

Author SHA1 Message Date
Jeong YunWon
ff5076b12c rustpython-literal 2023-05-05 21:49:12 +09:00
Jeong, YunWon
cea23d2b07 Merge pull request #4951 from youknowone/repr-quote
Port configurable repr quote from Ruff and refactoring
2023-05-05 20:45:40 +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
9f58921a6f Rename IterNextIterable -> SelfIter by following CPython 2023-04-30 03:54:32 +09:00
Jeong YunWon
9b9dd1100a Add missing with(Iterable) 2023-04-30 03:54:32 +09:00
Jeong YunWon
e2ccb48463 Remove Traverse from FromArgs 2023-04-28 13:27:57 +09:00
Jeong, YunWon
ce13fc5f03 Merge pull request #4898 from youknowone/pymodule-expose
module objects' type as PyModule
2023-04-25 04:00:52 +09:00
discord9
94bdb6b97a feature: PyTraverse derive macro for traverse object's childrens(like CPython's tp_traverse) (#4872) 2023-04-23 21:43:49 +09:00
Jeong YunWon
19224505e8 module objects' type as PyModule 2023-04-20 20:48:57 +09:00
Charles Hubain
96a949189d Implemented tp_repr slots for more types 2023-04-06 00:42:01 +09:00
Jeong, YunWon
11aefa3e42 Merge pull request #4735 from youknowone/try_from_borrowed_object
apply TryFromBorrowed more
2023-03-27 15:11:57 +09:00
Kangzhi Shi
ee78527a9e fix internal type slots 2023-03-21 20:27:45 +02:00
Jeong YunWon
80afab57d3 optimization with try_from_borrowed_object 2023-03-22 02:38:18 +09:00
Jeong YunWon
7b99df6c48 PyPayload::class takes ctx instead of vm 2023-03-20 21:03:40 +09:00
Jeong YunWon
47d2e7b658 clean up PyArray 2023-03-19 04:57:07 +09:00
Jeong YunWon
b35861005e more cspell (#4702) 2023-03-17 14:02:24 +09:00
Jeong YunWon
6275435567 <i>::try_from_object with try_index 2023-03-10 06:21:40 +09:00
Jeong YunWon
05317f1664 temporary fill up missing number protocols 2023-03-09 23:43:15 +09:00
John Pham
27233364bc Add init for array.rs (#4667) 2023-03-09 19:45:58 +09:00
Jeong YunWon
b60271a6cf deprecate vm.invoke 2023-03-08 01:35:30 +09:00
Dan Näsman
cdf5634cf2 Implement as_sequence for array (#4585) 2023-03-03 04:29:52 +09:00
Noa
58ac82b0a7 Switch hacky GAT-workarounds to use actual GATs 2023-03-01 20:48:12 -06:00
Alistair Bell
4955f05fa3 Modified fix for #4575 per @youknowone. Thanks, YunWon! 2023-02-26 09:24:01 -08:00
Alistair Bell
910574361c Satisfy safety conditions for std::slice::from_raw_parts. Fixes #4575. 2023-02-25 22:10:57 -08:00
Lee Dogeon
8284a7cb89 Import from collections.abc instead of _collections_abc
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
2023-01-24 15:51:47 +09:00
Lee Dogeon
03f0e717a7 Correct typo
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
2023-01-24 15:37:28 +09:00
Moreal
d0bf163641 Register array.array to collections.abc.MutableSequence 2023-01-24 05:56:34 +09:00
Moreal
0527c4eae6 Implement array.array.__contains__ 2023-01-22 22:32:56 +09:00
Steve Shi
b6c9882e1a Fix bug in Sliceable and rename del_item* to delitem (#4333)
* fix bug in sliceable

* fixup
2023-01-01 17:28:42 +02:00
Jeong YunWon
d935fbc445 Fix nightly clippy warnings 2022-12-05 12:18:16 +09:00
Steve Shi
2c5cacf9f2 Refactor Mapping Protocol (#4222) 2022-10-17 09:51:22 +09:00
Steve Shi
30aeb8bee5 Introduce PyAtomicRef and impl for PyObject.typ (#3828)
* introduce PyAtomicRef

* refactor PyObject.typ use PyAtomicRef

* add documents

* add swap_to_temporary_refs

* replace AtomicCell with PyAtomic

* fix name conflict
2022-10-15 21:53:12 +02:00
Jeong YunWon
e002191a48 pyproperty -> pygetset
Though it actually create a getset descriptor,
we didn't change the name because its concept was a property for writers.
Now we have `pymember`, another property-like descriptor. So naming them under
same level would be less confusing instead of telling everybody
"it is a getset but we call it pyproperty"
2022-09-18 14:18:49 +09:00
Jeong YunWon
27040c01b0 Fix nightly clippy 2022-08-16 09:02:42 +09:00
Jeong Yunwon
055c5cfb97 pyimpl -> pyclass 2022-08-05 01:18:10 +09:00
Jeong Yunwon
84f5aa93b0 Refactor repetive optional range pattern to OptionalRangeArgs 2022-07-22 03:11:38 +09:00
Daeun Lee
e6452d86d0 update array.index for optional range 2022-07-21 21:12:21 +09:00
siontama
2bf61aa60a Refactor: delete unnecessary clones 2022-07-16 17:40:40 +09:00
siontama
cdd937cebb Refactor: convert indent from tab to space 2022-07-16 17:20:13 +09:00
siontama
2417d3e813 Feat: impl PyArrayIter.setstate 2022-07-16 17:19:14 +09:00
Sion Kang
50aebefa4c Update stdlib/src/array.rs
Co-authored-by: Snowapril <sinjihng@gmail.com>
2022-07-16 16:53:52 +09:00
siontama
1a526aff47 Fix: Modify iter next to be implemented only internal 2022-07-16 16:42:00 +09:00
hyezzang
821f3e7aab fix position value to struct value 2022-07-13 18:04:17 +09:00
hyezzang
0f24b18312 Add arrayiter __reduce__
Co-authored-by: Yaminyam <siontama@gmail.com>
2022-07-13 18:04:06 +09:00
siontama
b190a0cbf3 refactor: change PyArrayIter name
* Change `PyArrayIter` struct to `PyArrayIterator`
2022-07-13 14:07:56 +09:00
Noa
4771ab6383 Switch then(|| foo) to then_some(foo) 2022-07-07 11:19:55 -04:00
Jeong Yunwon
38b1f5932c SequenceIndexOp 2022-06-25 01:18:35 +09:00
gogim1
19f3121f88 rename for name consistency 2022-06-19 18:06:18 +08:00
gogim1
9c8ace592d rename for name consistency 2022-06-19 17:11:20 +08:00