Commit Graph

100 Commits

Author SHA1 Message Date
Jeong Yunwon
9b2a9d2377 TypeZoo uses &'static Py<PyType> 2022-05-27 10:35:01 +09:00
Jeong Yunwon
9db69d628f {Type,Exception}Zoo holds static ref 2022-05-27 10:23:33 +09:00
Jeong Yunwon
fb52694e41 PyAttributes key is PyStrInterned 2022-05-23 09:03:13 +09:00
Jeong Yunwon
c6b33aab02 Refactor DictKey - remove PyStrRef 2022-05-16 18:14:19 +09:00
Jeong Yunwon
8a2cd2ba08 Refactor DictKey - Remove &PyObject / PyObjectRef 2022-05-16 18:14:19 +09:00
Noa
ec266c43e4 Merge pull request #3641 from coolreader18/mini-fixes
Small fixes
2022-04-28 17:06:58 -05:00
Noa
117c3db558 Use hashing hacks to get the value of a ThreadId 2022-04-28 16:24:44 -05:00
Jeong Yunwon
f8234aee84 GetAttro take reference 2022-04-26 21:56:27 +09:00
snowapril
09f7d92cb9 Relocate generic_getattr/opt from vm to object protocol
According to cpython docs, generic_getattr/opt is object protocol.
It is more appropriate to locate in protocol/object.rs than vm

Signed-off-by: snowapril <sinjihng@gmail.com>
2022-04-26 20:51:02 +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
e52a5f99f3 remove PyPayload::into_pyresult_with_type 2022-04-23 09:47:53 +09:00
Jeong Yunwon
ca84d728c2 sys.unraisablehook 2022-04-23 08:06:17 +09:00
Jeong Yunwon
5a606647c0 PyObjectView -> Py 2022-04-23 05:21:57 +09:00
Jeong Yunwon
66b6a06997 PyValue -> PyPayload 2022-04-23 05:20:31 +09:00
Jeong Yunwon
f8f4392cf3 Fix wasm32 build 2022-04-18 21:14:38 +09:00
Jeong Yunwon
fee3bf2722 AsPyObject -> AsObject because fn as_object 2022-04-18 07:19:35 +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
75e589cbc1 isinstance -> fast_isinstance 2022-04-17 20:32:34 +09:00
Jeong Yunwon
aa76a34963 merge TypeProtocol in AsPyObject 2022-04-17 19:26:10 +09:00
Jeong Yunwon
625f8675ae Introduce AsPyObject to replace IdProtocol 2022-04-17 10:32:01 +09:00
Jeong Yunwon
6357a1acbe clean up imports and useless allow attributes 2022-04-15 23:58:20 +09:00
Kangzhi Shi
ca4e8f50e8 refactor ItemProtocol -> Object Protocol 2021-11-27 13:00:37 +02:00
jfh
a3771518de Fix warnings for wasi check. 2021-10-27 21:06:48 +03:00
Moreal
bc05b98ca6 Relocate vm.to_repr to object.repr 2021-10-23 21:16:28 +09:00
Jeong YunWon
f76877347a Py -> PyObjectView 2021-10-21 18:04:13 +09:00
Noa
8dd18d97be PyObjectRef -> &PyObj, &PyRef<T> -> &Py<T> 2021-10-21 16:49:01 +09:00
Jeong YunWon
8cdde9150e Rename slot traits to drop Slot prefix 2021-10-14 13:44:22 +09:00
Jeong YunWon
7cae6d24fe Refactor PyType creation 2021-10-14 13:37:45 +09:00
Jeong YunWon
256de1eb46 Move free functions in vm::exceptions to vm methods 2021-10-13 05:53:43 +09:00
Jeong YunWon
aff0d47090 _thread uses #[pymodule] 2021-10-12 06:19:56 +09:00
Jeong YunWon
4fb1cdb316 PyObjectWrap 2021-10-08 01:56:00 +09:00
Jeong YunWon
92de3619fa move IntoPy{Object, Exception, Result} to vm::function
which are used to define function arguments - those functions are mostly placed in the crate
2021-10-06 19:10:16 +09:00
Jeong YunWon
2ca3dc4468 _therad.LockType.__new__ 2021-10-05 19:37:07 +09:00
Jeong YunWon
c3d8e792b7 tp_ -> slot_ 2021-09-30 02:51:44 +09:00
Jeong YunWon
0d09bc7285 derive(PyValue) not to depend on local context 2021-09-24 20:41:11 +09:00
Jeong YunWon
ffef73c1d7 split Arg{Callble,Iterable} from pyobject.rs 2021-09-22 21:01:44 +09:00
Jeong YunWon
a5309a7888 Rename Py{Callable, Iterable} to Arg{..}
which were not a python object but just argument helper
2021-09-22 20:58:26 +09:00
Jeong YunWon
137a543ca7 regroup use items for bulitin stdlibs 2021-09-22 12:08:17 +09:00
Dean Li
88e869a4da impl #[derive(PyValue)] for static_type 2021-09-21 21:35:48 +08:00
Lee Dogeon
63b1696458 Derive name from tp_name 2021-09-09 00:07:36 +09:00
eldpswp99
55709b71b6 implement SlotConstructor for every class 2021-09-04 20:18:13 +09:00
Jeong YunWon
ff4efd0f60 Fix unnessessary borrow 2021-07-30 02:32:16 +09:00
Noah
46e94b5720 Replace PyTuple.borrow_value() with .as_slice() 2021-05-20 10:29:49 -05:00
Noah
516eead348 Replace PyStr.borrow_value() with .as_str() 2021-05-20 10:29:48 -05:00
Noah
376ce87b76 Move Either to crate::utils 2021-05-20 10:29:48 -05:00
Noah
99104faaf7 Re-export pyobject::* from the root of the crate 2021-05-20 10:24:07 -05:00
Noah
e9984c3829 Add a bunch of stuff to the socket module 2021-05-03 12:26:54 -05:00
Noah
2e33b227b3 Impl py_io::Write for String 2021-04-25 18:03:28 -05:00