Commit Graph

105 Commits

Author SHA1 Message Date
Jeong YunWon
c1306726c4 Fix clippy warnings 2019-12-21 18:49:48 +09:00
coolreader18
edb84896bf Make PyObject.dict an Option<RefCell<PyDictRef>> 2019-11-16 22:50:58 -06:00
coolreader18
6d681a4d59 Implement object.__reduce__ 2019-10-11 15:48:56 -05:00
Jeong YunWon
6c0f852b62 Refactor pymethod return types to be smaller as possible 2019-10-11 03:27:23 +09:00
coolreader18
78069284a8 Only have type_new on object 2019-09-29 23:22:59 -05:00
Noah
2bb04f4836 Don't try to put __new__ on every type 2019-09-29 23:14:37 -05:00
coolreader18
c46b5b50bd Fix weirdness with type.__new__()/type()/metaclass.__new__() 2019-09-29 23:14:31 -05:00
Noah
0def37d78e Make PyString.value private 2019-09-19 17:45:48 -05:00
Windel Bouwman
b6f522d917 Allow &str to be used a dictionary key. 2019-08-17 17:11:23 +02:00
coolreader18
5499d81d7a Address feedback, simplify compilation code 2019-08-15 15:52:30 -05:00
coolreader18
b6e061b652 Add nice message for no attribute on module 2019-08-15 15:30:02 -05:00
Windel Bouwman
bbe2f72c04 Merge pull request #1268 from youknowone/subclasshook
object.__subclasshook__
2019-08-15 19:45:00 +02: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
Jeong YunWon
70fe087566 object.__subclasshook__ empty classmethod 2019-08-15 17:40:46 +09: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
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