Commit Graph

143 Commits

Author SHA1 Message Date
Jeong Yunwon
a5b36e1937 split pyobject.rs 2022-04-16 00:45:19 +09:00
Jeong Yunwon
49016b6a94 Fix nightly build error (issue #3614)
suggested by @petrochenkov
in https://github.com/RustPython/RustPython/issues/3614#issuecomment-1099980599
2022-04-15 18:52:26 +09:00
Jeong YunWon
09d057243e Revert "Fix clippy warning for derive"
This reverts commit 45015dfedc.
2022-03-12 16:43:44 +09:00
Jeong YunWon
45015dfedc Fix clippy warning for derive 2022-03-12 05:13:29 +09:00
Padraic Fanning
88e0f13993 Fix unnecessary_lazy_evaluations Clippy warning 2022-02-25 19:33:52 -05:00
Hackerwins
494fc43711 Use staticmethod in macros 2022-01-22 17:32:26 +09: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
2c70bf26c3 Move the cfg(debug_assertions) inside the quote!} 2021-11-03 13:29:52 -05:00
Jeong YunWon
4e5f897f74 PyObject -> PyGenericObject 2021-10-21 17:42:56 +09:00
Jeong YunWon
7cae6d24fe Refactor PyType creation 2021-10-14 13:37:45 +09:00
Jeong YunWon
741cfea565 vm.ctx.new_int returns PyInt 2021-10-11 01:05:38 +09:00
Jeong YunWon
7dd6891c6b clean up imports 2021-10-04 13:49:58 +09:00
Jeong YunWon
5b073154c3 Defer conversion to Diagnostic as much as possible 2021-10-04 13:49:58 +09:00
Jeong YunWon
c3d8e792b7 tp_ -> slot_ 2021-09-30 02:51:44 +09:00
Jeong YunWon
c3f46c773e Expose exception types under vm::builtins 2021-09-30 01:12:45 +09:00
Jeong YunWon
063f0def1f Fix define_exception macro not to depend on local context 2021-09-25 16:43:19 +09:00
Jeong YunWon
a723f7761b derive show type name when with trait fails 2021-09-24 13:03:52 +09:00
Jeong YunWon
064bfc5a9d cpython docs database for class 2021-09-22 10:32:23 +09:00
Jeong YunWon
ee995a9ca8 better error for pyimpl(with) 2021-09-16 03:29:37 +09:00
Jeong YunWon
458c4d4870 Better error messages for pymethod and pyproperty 2021-09-16 03:29:37 +09:00
Jeong YunWon
60fddd1553 little bit better error message for signature error 2021-09-16 03:29:33 +09:00
Nikita Sobolev
b723bbfbb5 All exceptions are now modified with extend_exception! macro 2021-09-16 03:17:19 +09:00
Jeong YunWon
76bb68a2d0 Merge pull request #3062 from youknowone/fix-derive-pyclass-err
better error for wrong py* attributes in pyclass
2021-09-15 07:34:38 +09:00
jfh
e846b82bf5 Add 'module' at start of function signature. 2021-09-15 01:05:39 +03:00
Jeong YunWon
d8e43b292d better error for wrong py* attributes in pyclass 2021-09-15 04:41:06 +09:00
jfh
c063fc3d64 Try and generate a text signature template for both methods and functions. 2021-09-13 22:10:02 +03:00
eldpswp99
55709b71b6 implement SlotConstructor for every class 2021-09-04 20:18:13 +09:00
Jeong YunWon
407cc7aae2 trait SlotConstructor for tp_new blueprint 2021-09-04 20:15:49 +09:00
Jeong YunWon
67b338863e Merge pull request #2897 from sobolevn/better-exceptions
Adds better exception macro
2021-08-25 03:22:14 +09:00
Jeong YunWon
da166186de derive __text_signature__ from definition 2021-08-22 17:37:42 +09:00
sobolevn
c8e13d4b58 Typos 2021-08-19 10:46:49 +03:00
sobolevn
aa814ca181 Format 2021-08-19 10:43:29 +03:00
sobolevn
b5c03c6804 Adds pyexception macro 2021-08-19 10:40:15 +03:00
Jim Fasarakis-Hilliard
a21ad9e390 Merge pull request #2804 from youknowone/static-metaclass
metaclass support for #[pyclass] macro
2021-08-13 22:04:13 +03:00
Jeong YunWon
03a9d6058b Refactor Buffer Protocol (mostly namings) (#2849)
* Refactor Buffer protocol into RustPython convention
2021-08-11 20:11:31 +03:00
Jeong YunWon
8d14cf53c5 Merge pull request #2824 from DimitrisJim/use_vm_common
Use rustpython_common via public name.
2021-08-10 04:58:29 +09:00
jfh
91022f5808 Use rustpython_common via exported name. 2021-08-09 22:02:00 +03:00
sobolevn
e939346850 Adds class field to PyGetSet to fix __qualname__ and (in future) repr, refs #2790 2021-08-08 18:53:57 +03:00
Jeong YunWon
3c649f4878 metaclass support for #[pyclass] macro 2021-08-08 04:23:13 +09:00
Nikita Sobolev
73ae7a6116 Adds __qualname__ to PyBuiltinMethod 2021-08-01 09:16:27 +09:00
Jeong YunWon
ff4efd0f60 Fix unnessessary borrow 2021-07-30 02:32:16 +09:00
Noah
99104faaf7 Re-export pyobject::* from the root of the crate 2021-05-20 10:24:07 -05:00
Noah
a4aef93327 Make all builtin functions have names 2020-12-17 16:29:43 -06:00
Noah
34bb5f0d7a Apply review suggestions 2020-12-05 16:36:38 -06:00
Noah
2c29a33d00 Add support for deleter on getsets 2020-12-05 16:36:00 -06:00
Noah
6d7eae98b8 Add iter, iternext slots & Allow deleting slot magic methods 2020-11-17 23:47:48 +09:00
Noah
275919694d Make StaticCell less complex to use 2020-10-22 14:06:05 -05:00
Jeong YunWon
5b32064cd6 trait StaticType 2020-10-20 01:43:39 +09:00
Noah
79d5872942 Expose PyGetSet in builtins 2020-10-16 20:49:20 -05:00
Jeong YunWon
ca9326f95d expose bulitins items on builtins module and hide submodules 2020-10-12 11:43:24 +09:00