Commit Graph
135 Commits
Author SHA1 Message Date
Jeong, YunWon 6a3dff63bb Downcastable (#5986)
* simplify int power

* downcastasble

* deprecate payload*
2025-07-16 18:00:18 +09:00
Shahar Naveh 694fe50241 Use const fn where possible (#5894) 2025-07-04 22:26:20 +09:00
Shahar Naveh 69545c0798 Use Self where possible (#5892) 2025-07-04 10:08:43 +09:00
Jeong, YunWon fffa735868 __class_getitem__ (#5888) 2025-07-03 11:01:53 +09:00
Jeong YunWon 993ea8923c Rename members 2025-06-27 12:32:59 +09:00
Jeong, YunWon fe2c9bf361 Fix stable clippy (#5843) 2025-06-27 12:12:21 +09:00
Shahar Naveh 1ae07813ee Remove redundent to_owned() and to_string() calls (#5836)
* Remove redundent String conversion for errors

* cargo fmt
2025-06-25 23:42:26 +09:00
Shahar Naveh ab09de8542 Remove unnecessary string conversions in error message construction (#5826)
* Make `new_X_error` recv `impl Into<String>`

* Maks the rest of the methods to be generic

* Remove `.to_owned()` from more files
2025-06-25 01:43:41 +09:00
Jeong YunWon 7ac61f3840 fix cspell warnings 2025-04-04 16:15:54 +09:00
Noa 7d05f881c4 Have rustpython_literal::escape support wtf8 2025-03-28 11:26:29 +09:00
Ashwin Naren b870b0e1b5 2024 edition formatting
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
2025-02-26 11:48:22 -08:00
Noa b7db23bbae Fix warnings for Rust 1.84 2025-01-11 18:48:27 +09:00
Jeong, YunWon 6eed8f42c7 split vm.import and vm.import_from (#5212) 2024-04-08 00:07:38 +09:00
Jeong, YunWon d4d362a9ca Update to Rust 1.72.0 2023-08-27 00:38:10 +09:00
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 DogeonandJim Fasarakis-Hilliard 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 DogeonandJim Fasarakis-Hilliard 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