Jeong Yunwon
d05645ea58
update syn-ext
2022-05-28 01:41:55 +09:00
Jeong Yunwon
9b2a9d2377
TypeZoo uses &'static Py<PyType>
2022-05-27 10:35:01 +09:00
Jeong YunWon
0b01e04271
Merge pull request #3638 from youknowone/derive
...
rustpython-doc as external module
2022-05-27 08:57:31 +09:00
Jeong Yunwon
fb52694e41
PyAttributes key is PyStrInterned
2022-05-23 09:03:13 +09:00
Alexander Scharinger
1c734b0626
object.__sizeof__()
2022-05-20 08:49:16 +02:00
Jeong Yunwon
e609aca7ea
rustpython-doc as external module
...
not to archive every version of them to repository
2022-05-11 21:43:12 +09:00
Jeong YunWon
88080505e4
Add PyTypSlot::init
2022-04-27 02:22:05 +09:00
Jeong Yunwon
a7135024a5
&PyTuple and &PyTupleRef works like &[PyObjectRef]
2022-04-24 12:26:48 +09:00
Jeong Yunwon
f220394ce9
vm::{pyclass => class}
2022-04-23 09:47:53 +09:00
Jeong Yunwon
a63ad27cd4
PyContext is not a python object
2022-04-23 07:56:21 +09:00
Jeong YunWon
c103fe1310
Merge pull request #3630 from youknowone/rename-pyobjectview
...
Rename PyObjectView -> Py and PyValue -> PyPayload
2022-04-23 05:51:20 +09:00
Jeong Yunwon
66b6a06997
PyValue -> PyPayload
2022-04-23 05:20:31 +09:00
Noa
a821750e87
Stop depending on serde_json
2022-04-22 14:42:42 -05:00
Jeong Yunwon
fa22a4471d
support use for #[pyclass]
2022-04-20 03:17:56 +09:00
Jeong Yunwon
9f2540bb91
Remove manual make_class
2022-04-20 02:07:42 +09:00
Jeong Yunwon
24ea51bf71
sort order for nursery
2022-04-20 01:48:16 +09:00
Jeong Yunwon
3582eb2e19
new name collition detection
2022-04-20 01:17:33 +09:00
Jeong Yunwon
95bd172278
Run make_class always regardless it has pyattr or not
2022-04-20 00:32:15 +09:00
Jeong Yunwon
eb1f78dc0b
fix infinite-loop in derive
2022-04-19 23:30:56 +09:00
Jeong YunWon
16cedb1624
Merge pull request #3613 from youknowone/pystructseq-fromobj
...
derive(TryIntoPyStructSequence)
2022-04-19 16:20:35 +09:00
Jeong Yunwon
c35b3a653b
hide PyStructSequence from crate root
2022-04-19 15:31:33 +09:00
Jeong Yunwon
6de62d937e
module for PyStructSequence
2022-04-19 15:31:30 +09:00
Jeong Yunwon
4f531d1c6b
remove FIELD_LEN
2022-04-19 15:14:17 +09:00
Jeong Yunwon
bf18e281ed
derive macro for TryFromObject for PyStructSequence
2022-04-19 15:08:42 +09:00
Jeong Yunwon
9cbb3b4a2d
more fine-controlled #[pyattr]
2022-04-19 15:07:04 +09:00
Jeong Yunwon
fb5a66f8ad
Allow #[pyattr] on #[pyfunction]
2022-04-19 15:07:04 +09:00
Jeong Yunwon
dc19de6121
AttrName for pymodule
2022-04-19 05:10:05 +09:00
Jeong Yunwon
d5167ed890
adapt AttrName to derive pyclass
2022-04-19 05:10:05 +09:00
Jeong Yunwon
52a8cb329f
AttrName for derive
2022-04-19 04:00:00 +09:00
Jeong Yunwon
e356d51af1
move ToPy* to convert
2022-04-18 07:17:24 +09:00
Jeong Yunwon
f6d70c8176
Into{PyObject,PyException,Pyresult} -> To{..}
...
The naming convention was wrong
2022-04-18 06:04:47 +09:00
Jeong Yunwon
965c3157c8
Upgrade libraries
2022-04-18 00:09:22 +09:00
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
0abcd4c0aa
Fix unwrap_or_else_default Clippy warning
2022-02-25 19:33:52 -05: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
1188369956
Fix clippy warnings with 1.58 & convert some format strings to capture-args
2022-01-13 23:53:25 -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
e42a3ca48e
Big overhaul part 1 - replace PyRc with manual RefCount + WeakRefList
2021-11-15 16:08:45 -06:00
snowapril
97f3434c0a
Add AttrItemMeta for handling attribute item attathced with once
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-11-12 21:40:26 +09:00
snowapril
733d544802
Wrap ItemFn and #[pyattr] with static_cell!
...
When we have to add #[pyattr] with function, that function must be
called only once when module is imported.
In previous, we did it with add static_cell for each function or skip
it(undesired).
I thought these static_cell stmt for all of each function in modules are
quite duplicated.
Thus, I add wrapping code when the given item is `ItemFn` and have `#[pyattr]`.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-11-12 21:40:26 +09:00
Noa
2c70bf26c3
Move the cfg(debug_assertions) inside the quote!}
2021-11-03 13:29:52 -05:00
Noa
358ce09b5c
Run cargo upgrade
2021-10-30 19:42:35 -05:00
Noa
ee8b11f5d2
Migrate to 2021 edition
2021-10-21 11:46:24 -05:00
Jeong YunWon
b759808736
PyObj -> PyObject
2021-10-21 17:55:29 +09:00
Jeong YunWon
4e5f897f74
PyObject -> PyGenericObject
2021-10-21 17:42:56 +09:00
Noa
8dd18d97be
PyObjectRef -> &PyObj, &PyRef<T> -> &Py<T>
2021-10-21 16:49:01 +09:00