Commit Graph

1616 Commits

Author SHA1 Message Date
Noah
e27fa254fa Improve PyClassRef::iter_mro() 2020-02-16 16:02:43 -06:00
Noah
03c2042bd8 Add generic_getattribute{,_opt} 2020-02-16 16:02:26 -06:00
Do Nhat Minh
0c731e8a9b Add as_integer_ratio to PyInt 2020-02-11 16:01:22 -05:00
Do Nhat Minh
914454e4ba Add __pos__ to PyComplex 2020-02-10 11:23:50 -05:00
Jeong YunWon
8d7be94b03 PyBool 2020-02-07 11:56:31 +09:00
Jeong YunWon
6ddb690e09 Remove _vm parameter when it is not required 2020-02-06 11:07:51 +09:00
Jeong YunWon
c0b235ed66 cleanup property and get descriptor codes 2020-02-06 03:56:40 +09:00
Jeong YunWon
58744df1d5 Revert 08e66b5002
which is not required anymore
2020-02-06 03:56:40 +09:00
Jeong YunWon
facabfee1a Remove PropertyBuilder and add new_getset 2020-02-06 03:45:19 +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
226a2a6cb9 VM polymorphism for getter and setter 2020-02-06 03:36:05 +09:00
Jeong YunWon
d1f9cb4e58 PySetResult and IntoPySetResult 2020-02-06 03:33:34 +09:00
Jeong YunWon
ca557788c8 &self support for getter/setter 2020-02-06 01:47:53 +09:00
Jeong YunWon
c3d5f6c145 IntoPyGetterFunc, IntoPySetterFunc 2020-02-06 01:46:00 +09:00
Jeong YunWon
9f5cd17f2b Add getset_descriptor 2020-02-06 01:23:39 +09:00
Jeong YunWon
7d0d313aa5 &str::to_string -> &str::to_owned for variables 2020-02-05 22:55:34 +09:00
Jeong YunWon
1bac582921 &str::to_string -> &str::to_owned for literals 2020-02-05 22:55:33 +09:00
Noah
3595f4e1a4 Merge pull request #1730 from youknowone/type-error
Fix type() error message and BaseException.__str__
2020-02-03 19:28:25 -06:00
Jeong YunWon
3e56b3f284 PyBaseObject 2020-02-01 16:56:12 +09:00
Jeong YunWon
c366c2074c Fix type() error message and BaseException.__str__ 2020-02-01 13:23:32 +09:00
Jeong YunWon
fc0c8fd59a Fix int.from_bytes type 2020-02-01 02:54:57 +09:00
Aviv Palivoda
acc47ee31c Merge pull request #1717 from palaviv/dict_iterator-repr
Add repr for dict_keys, dict_values and dict_items
2020-01-30 14:45:23 +02:00
Aviv Palivoda
d1b7d658bc Fix clippy warning 2020-01-30 13:35:01 +02:00
Aviv Palivoda
9685b77cf3 Add repr for dict_keys, dict_values and dict_items 2020-01-30 12:28:14 +02:00
Jeong YunWon
7fd92fcc71 Py_TPFLAGS_BASETYPE 2020-01-30 16:32:09 +09:00
Jeong YunWon
869645203d cpython compatible type_new 2020-01-29 21:30:33 +09:00
Jeong YunWon
b2ba6b2013 objtype::class_*_attr into PyClassRef methods 2020-01-29 21:30:33 +09:00
Jeong YunWon
ad2d82c66f cleanup objtype 2020-01-29 21:30:33 +09:00
coolreader18
ff97ac5133 Fix subprocess test and byte{s,array}.{,l,r}strip 2020-01-28 11:33:11 -06:00
Noah
e6a431ad22 Merge pull request #1676 from youknowone/fix-cpytest
Fix test_bool::test_sane_len
2020-01-27 18:24:40 -08:00
Jeong YunWon
eea157c2f0 Refactor PyWeak to use PyBuiltinCallable 2020-01-26 14:39:27 +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
106c8111c1 Fix test_bool::test_sane_len 2020-01-26 02:50:06 +09:00
Jeong YunWon
d5367d1761 #[pymethod(magic)]: pyname as __{sig.ident}__ form 2020-01-26 02:48:43 +09:00
Aviv Palivoda
d2a3ff8096 Fix clippy warning 2020-01-25 10:32:46 +02:00
Aviv Palivoda
8bf0d93bb2 Refactor string.splitlines 2020-01-24 22:53:44 +02:00
Aviv Palivoda
4a9e87b80d Support keepends in Str.splitlines 2020-01-24 12:58:51 +02:00
Jeong YunWon
9e936eb7c5 Merge pull request #1688 from RustPython/coolreader18/pyimpl-trait
Allow #[pyimpl] on traits
2020-01-23 01:01:40 +09:00
Noah
5b02a96192 Merge pull request #1696 from alvinlindstam/string-performance
String performance
2020-01-20 13:06:39 -06:00
Alvin Lindstam
9203eda6c6 Skip string char traversal on each next in python str iterator
Previosly, each call to `__next__` on a str iterator did a `chars().count()`
to find the length of the full string and traversed the chars of the string
until the expected char position from the start.

This approach ignores the char position and only cares about the byte position,
allowing it to only act on the specific part of the string binary it's interested
in.
2020-01-19 15:49:14 +01:00
Jeong YunWon
655834d578 Merge pull request #1678 from youknowone/object-cmp
__eq__ and __ne__ compatibility
2020-01-18 19:26:45 +09:00
Aviv Palivoda
f6e6ef0fe1 objint __pos__ returns Int object
This fixes test_bool.test_math
2020-01-17 19:17:14 +02: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
44a17012d6 PyStaticMethodRef -> PyStaticMethod 2020-01-15 11:51:58 +09:00
Jeong YunWon
0b1050e8c1 cleanup PyFunction a little bit 2020-01-15 11:51:29 +09:00
Jeong YunWon
582e5dfca9 cleanup tuple 2020-01-15 11:51:29 +09:00