Commit Graph

89 Commits

Author SHA1 Message Date
Windel Bouwman
310f89ec21 Remove bytecode compilation. Add feature to enable verbose logging in vm. 2019-07-07 15:23:43 +02:00
Jeong YunWon
c768b25673 Refine hash types and refactor hash impl 2019-05-13 01:10:52 +09:00
Adam Kelly
dd0c70f289 Fix typo in objobject. 2019-05-02 16:36:35 +01:00
ben
d24dd170e9 Changes to RustPython to support importing and running unittest 2019-04-14 12:09:54 +12:00
Adam Kelly
80ec464d84 Use dict.update to combine class and object attrs in object_dir. 2019-04-12 12:25:19 +01:00
Adam Kelly
664554bc5e Fix dir bug - not including object attributes correctly. 2019-04-11 15:35:01 +01:00
Adam Kelly
8f840d5376 Pick code review nits. 2019-04-10 09:28:54 +01:00
Adam Kelly
ec5fd550de Implement IntoIterator for PyDictRef. 2019-04-09 11:30:52 +01:00
Adam Kelly
7b2d92f495 Delete DictProtocol. impl ItemProtocol for PyDictRef. 2019-04-06 10:15:29 +01:00
Windel Bouwman
59d8612cfa Merge pull request #782 from skinny121/abc_module
Add abc module from CPython
2019-04-05 17:05:45 +02:00
Adam Kelly
b943f4a4bb Historic real proper dictionary support. 2019-04-05 09:50:31 +01:00
Adam Kelly
c8eda3733d Eliminate ctx.set_attr. 2019-04-05 09:50:31 +01:00
Adam Kelly
bce4f1e483 Simplify/shrink the dict interface. 2019-04-05 09:39:59 +01:00
ben
ea872521d6 Make object by default hashable 2019-04-04 20:11:53 +13:00
Adrian Wielgosik
89f63e4c9a Convert objobject.rs to new args style 2019-03-27 23:25:09 +01:00
Joey Hain
8bdc766bed Use name field directly 2019-03-25 19:32:58 -07:00
Joey Hain
6474a4a6ef Remove objtype::get_type_name() 2019-03-25 19:18:07 -07:00
Joey Hain
cc4f3fdb40 Clean up TypeProtocol 2019-03-25 19:18:01 -07:00
Adam Kelly
bbb7162472 Various dictionary changes.
* vm.ctx.new_dict returns a PyDictRef
* Special case for module goes away.
* Instances get a real dictionary.
2019-03-25 16:37:20 +00:00
Adrian Wielgosik
9a6f7aa8a1 Make PyRef::clone not require T implementing Clone
It seems to be a weird consequence of using PhantomData,
so I just rolled a custom Clone.
2019-03-24 11:56:15 +01:00
ben
6fa059fd6c Make PyObject.typ a PyClassRef 2019-03-24 10:51:52 +13:00
Windel Bouwman
fa8d3524bf Use extend_class macro even more 2019-03-23 17:49:49 +01: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
ben
5c7812734d Use more specific ref type than PyObjectRef in PyContext 2019-03-23 13:00:12 +13:00
Adam Kelly
909b38e774 Adapt objobject to avoid AttributeProtocol. 2019-03-22 19:49:09 +00:00
coolreader18
a9051ab462 Convert all &mut VirtualMachine to &VirtualMachine 2019-03-22 01:48:14 -05:00
ben
a5f6a7b10d Implement calling __set__ and __delete__ 2019-03-21 19:34:47 +13:00
ben
48dd507cad Remove dict from object 2019-03-20 19:58:46 +13:00
ben
c77b1f3cf5 Fix bug with __getattr__ 2019-03-20 19:56:25 +13:00
ben
4e42bd077c Implement __setattr__ based on @nhynes(#540) PR 2019-03-20 19:53:50 +13:00
Adam Kelly
6b3f61f3ca Merge branch 'master' into objdict_refactor 2019-03-19 10:19:03 +00:00
Adam Kelly
9eeeeeae48 Change return type of vm.to_repr and vm.to_str to PyStringRef. 2019-03-16 09:42:54 +00: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
Joey
737ec12fa5 Rename PyValue::{required_type => class} 2019-03-14 20:08:41 -07:00
coolreader18
d305d4f74b Clean up a bit 2019-03-12 19:06:12 -05:00
coolreader18
070f5aa322 Merge master into pyvaluepayload 2019-03-12 18:36:10 -05:00
coolreader18
e49d7146a0 Add PyValuePayload trait and use it for PyObject.payload 2019-03-12 18:31:59 -05:00
Adrian Wielgosik
b334689e55 Remove Option from PyObject.typ; Refactor type hierarchy initialization. 2019-03-12 21:58:03 +01:00
Adam Kelly
1e39512e74 Convert _mro to iterator. 2019-03-11 18:58:15 +00:00
Windel Bouwman
b8aa38db1a Merge pull request #653 from RustPython/joey/pyobject-2.0-prep
Remove PyObjectPayload enum
2019-03-11 17:33:51 +01:00
ben
65c26a1f1b Use new_attribute_error in more places 2019-03-11 17:38:19 +13:00
Joey Hain
e2e13af7ea Remove PyObjectPayload 2019-03-10 13:45:38 -07:00
Joey Hain
45bc8c8f7a Move PyRef to pyobject module 2019-03-10 13:01:46 -07:00
ben
0ec034df51 Change property.__new__ to use new style function and construct
PyProperty
2019-03-09 14:07:42 +13:00
ben
2edfe4c7be Migrate usage of member_descriptor and data_descriptor to
new_property/PropertyBuilder
2019-03-09 13:00:54 +13:00
Adam
21382fadbd Merge branch 'master' into py_class 2019-03-08 08:04:23 +00:00
ben
4b1cd72355 Add todo for using PyClassRef when that lands 2019-03-08 17:04:32 +13:00
Adam Kelly
e220f0a571 Add PyClass and remove old Class payload 2019-03-07 20:42:10 +00:00
Adam Kelly
995212040a Use PyInstance as the payload rather than (). 2019-03-07 18:42:46 +00:00