Commit Graph

78 Commits

Author SHA1 Message Date
Ben Lewis
16bd28ae18 Cleanup usage of lease_class() 2020-07-12 09:12:42 +12:00
Ben Lewis
f4876fc104 Replace ArcSwap by RwLock. 2020-07-12 09:12:42 +12:00
Ben Lewis
4f34825333 Move has_attr/get_attr to PyClass to avoid some cloning of Arcs. 2020-07-12 09:12:41 +12:00
Aviv Palivoda
fb5862da91 Remove ThreadSafe trait 2020-05-16 13:58:10 +03:00
Noah
0d1c6c3ddd Forward __module__ on bound methods 2020-05-05 12:22:19 -05:00
Aviv Palivoda
cef268916b Mark PyBoundMethod, PyFunction as ThreadSafe 2020-04-28 20:36:24 +03:00
Noah
f5de59a4bd Merge pull request #1834 from RustPython/coolreader18/jsontests
Add json output for CPython tests
2020-04-04 11:52:04 -05:00
Noah
f33e2d3b39 Remove incognito from vm 2020-04-03 12:34:00 -05:00
Noah
be565d30ae Make incognito a CodeFlag bit 2020-04-03 12:34:00 -05:00
Noah
80f11466b3 Add "incognito" compilation 2020-04-03 12:34:00 -05:00
Noah
652231a683 Error on positional-only parameters passed as keywords 2020-04-03 00:24:30 -05:00
Noah
53a6bc3f58 Add method.__func__ property 2020-04-02 17:41:52 -05:00
Noah
6553bf72d4 Move varargs information into CodeFlags 2020-04-02 09:02:18 -05:00
Jeong YunWon
d148bdd46c Basic bound method repr 2020-03-28 02:05:58 +09:00
coolreader18
b83443cea9 Partially implement async generators 2020-03-21 00:33:46 -05:00
Jeong YunWon
6ddb690e09 Remove _vm parameter when it is not required 2020-02-06 11:07:51 +09:00
Jeong YunWon
0aee78de18 pyproperty generates PyGetSet instead of PyProperty 2020-02-06 03:42:05 +09:00
Jeong YunWon
23381b9937 compatiibility for CPytthon descr_check 2020-02-06 03:42:01 +09:00
Jeong YunWon
80f3da92ee vm/src/slots.rs 2020-01-26 14:05:05 +09:00
Jeong YunWon
e2e5c7ab00 Add PyBuiltinCallable and call slot 2020-01-26 14:04:44 +09:00
Jeong YunWon
d5367d1761 #[pymethod(magic)]: pyname as __{sig.ident}__ form 2020-01-26 02:48:43 +09:00
coolreader18
538e492dda Add #[pyimpl(with(...))] 2020-01-14 23:56:21 -06:00
Jeong YunWon
bf0b4dcfdd Hide PyFunction members by moving methods to objfunction 2020-01-15 11:51:59 +09:00
Jeong YunWon
30fc460136 PyClassImpl for PyFunction 2020-01-15 11:51:59 +09:00
Jeong YunWon
0b1050e8c1 cleanup PyFunction a little bit 2020-01-15 11:51:29 +09:00
Jeong YunWon
4c2e34a523 Use slot descriptor get if it exists 2020-01-14 15:37:26 +09:00
Jeong YunWon
cdc39701d8 Add PyBuiltinDescriptor for descriptors 2020-01-14 15:37:15 +09:00
Jeong YunWon
70b63eb758 new_rustfunc -> new_function & new_method to distinguish bindable functions 2020-01-12 18:39:16 +09:00
Jeong YunWon
78b268ae0b Remove unbound methods from modules 2020-01-12 18:34:44 +09:00
Jeong YunWon
c1306726c4 Fix clippy warnings 2019-12-21 18:49:48 +09:00
coolreader18
f7831491c5 Add stub implementation of atexit 2019-11-17 17:09:38 -06:00
Aviv Palivoda
841e22434a Return function attributs in method 2019-11-02 19:34:10 +02:00
coolreader18
c08f11ad1b Change FunctionOpArg to CodeFlags, stored in CodeObject 2019-10-14 20:20:52 +00:00
Jeong YunWon
6c0f852b62 Refactor pymethod return types to be smaller as possible 2019-10-11 03:27:23 +09:00
Noah
904959b0b7 Add builtinfunc.__call__ 2019-10-01 19:15:29 -05:00
Noah
499bf146bd Only overwrite the locals in __build_class__ if it's a class 2019-09-28 00:41:41 -05:00
Windel Bouwman
589c431c8c Merge master branch 2019-08-15 18:59:29 +02:00
Marcin Pajkowski
e65e9ff7c3 Make func_ref an &PyObjectRef 2019-08-15 13:45:47 +02:00
Windel Bouwman
d06dec77ea Attempt to reduce the size of the pyobject.rs files by splitting out builtin types. 2019-08-14 19:08:47 +02:00
Windel Bouwman
f7320cf545 Move Scope struct to its own file, making the frame module private in the process. 2019-07-23 20:39:47 +02:00
ben
d24dd170e9 Changes to RustPython to support importing and running unittest 2019-04-14 12:09:54 +12:00
ben
d5a9d96d62 Expose function.__defaults__ and function.__kwdefaults__(only getters) 2019-04-07 07:38:42 +12:00
ben
5fd3cf2bcd Implemented keyword only defaults 2019-04-07 07:38:42 +12:00
Adrian Wielgosik
89f63e4c9a Convert objobject.rs to new args style 2019-03-27 23:25:09 +01:00
Joey Hain
cc4f3fdb40 Clean up TypeProtocol 2019-03-25 19:18:01 -07:00
ben
db8e648646 Make PyFunction.code a PyCodeRef, PyGenerator.frame a FrameRef, and
other improvements to increase use of specific ref types.
2019-03-24 13:41:37 +13:00
ben
c1d5ce715f Change isinstance/issubclass to accept PyClassRef instead of PyCObject.
Also changed PyValue::class to return a PyClassRef.
2019-03-23 19:32:31 +13:00
coolreader18
a9051ab462 Convert all &mut VirtualMachine to &VirtualMachine 2019-03-22 01:48:14 -05:00
Joey
7bfd2e6e84 Move function items out of pyobject module 2019-03-15 21:27:11 -07:00
Joey
fa9e48a5b3 Take &mut VirtualMachine insteadof &PyContext 2019-03-14 21:43:19 -07:00