Commit Graph

3297 Commits

Author SHA1 Message Date
Aviv Palivoda
fbb96c5494 Fix os.symlink on windows 2020-01-25 19:25:56 +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
Jeong YunWon
7f9a8c1921 Fix clippy error 2020-01-16 00:29:32 +09:00
coolreader18
538e492dda Add #[pyimpl(with(...))] 2020-01-14 23:56:21 -06:00
coolreader18
8a71c7e45d Allow applying pyimpl to a trait 2020-01-14 23:22:50 -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
e5b91c25a8 Reduce &String usage 2020-01-15 11:51:29 +09:00
Jeong YunWon
582e5dfca9 cleanup tuple 2020-01-15 11:51:29 +09:00
Jeong YunWon
1fe526bb66 hide member of classmethod 2020-01-15 11:51:29 +09:00
Jeong YunWon
d31d0c6510 Merge pull request #1685 from youknowone/slot-name
pyslot guess slot name from function name
2020-01-15 11:51:16 +09:00
Jeong YunWon
3ade61a641 Merge pull request #1686 from RustPython/coolreader18/redox-fix
Fix compilation on Redox
2020-01-15 11:08:02 +09:00
Jeong YunWon
8c7e01b4f6 pyslot guess slot name from function name 2020-01-15 10:28:39 +09:00
coolreader18
ddf5c9aade Compile for redox 2020-01-14 19:07:05 -06: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
9bad20716f Merge pull request #1670 from youknowone/bytes
Refactor bytes/bytearray/byteinner
2020-01-14 14:09:08 +09:00
Noah
e10a8b282d Use new_function for nextafter to fix CI 2020-01-13 11:01:44 -06:00
Jeong YunWon
c4d1ad346b Merge pull request #1679 from corona10/math_nextafter
math: Implement math.nextafter
2020-01-13 20:18:16 +09:00
Jeong YunWon
0b9bee9973 use Vec::with_capaciity for bytes methods 2020-01-13 11:20:42 +09:00
Jeong YunWon
eb4904b4ae cleanup bytes with Into<Vec<u8>> 2020-01-13 11:20:42 +09:00
Jeong YunWon
a11ccc462a refactor byteinner cmp 2020-01-13 11:20:42 +09:00
Jeong YunWon
1077744ed2 cleanup memoryview 2020-01-13 11:20:42 +09:00
Jeong YunWon
36ebb048ef cleanup bytes 2020-01-13 11:20:42 +09:00
Jeong YunWon
c6e148efcf cleanup bytearray 2020-01-13 11:20:42 +09:00
Dong-hee Na
1de9b1a41d math: Implement math.nextafter 2020-01-13 02:03:02 +09:00
Jeong YunWon
b74d5e01ee Add PyBuiltinMethod 2020-01-12 18:39:48 +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
5c87571863 Remove public field from PyBuiltinFunction 2020-01-12 18:34:44 +09:00
Jeong YunWon
81d36a1f1d __eq__ and __ne__ compatibility 2020-01-12 18:33:58 +09:00
Jeong YunWon
24289964d3 Merge pull request #1649 from youknowone/func-vm
Allow to skip VM param for IntoPyNativeFunc functions
2020-01-12 18:24:01 +09:00
coolreader18
8f036b3269 quickfix Lib/test list test_extend 2020-01-12 00:06:51 -06:00
Noah
bb456963e4 Merge pull request #1668 from RustPython/coolreader18/exc-ser
Make PyBaseExceptionRef serializable and use it to improve WASM errors
2020-01-11 17:14:43 -06:00
Noah
bc0baa484a Merge pull request #1669 from RustPython/coolreader18/no-proc-macro-hack
Don't use proc-macro-hack; use our own slightly-less-hacky hack
2020-01-10 14:14:20 -06:00
coolreader18
a26e5f23f8 Add dict iterator __length_hint__ 2020-01-10 18:24:23 +00:00
coolreader18
098393d4d6 Add __length_hint__ to a bunch of iterators 2020-01-10 18:24:23 +00:00
coolreader18
c65dc336f5 Add _operator module 2020-01-10 18:24:22 +00:00
coolreader18
fc3ac169d0 Add length_hint functionality 2020-01-10 18:24:22 +00:00
coolreader18
6b537f15e5 Add objsequence::{opt_,}len 2020-01-10 18:24:22 +00:00
coolreader18
098532b283 Remove proc-macro-hack and use our own slightly-less-hacky hack 2020-01-10 11:29:27 -06:00
Aviv Palivoda
abedbfdce8 Merge pull request #1660 from palaviv/run-unittests
Run Cpython tests suite in travis CI
2020-01-10 17:19:38 +02:00
Noah
156e6e1555 Merge pull request #1654 from youknowone/clone-value
objstr::get_value -> objstr::clone_value
2020-01-08 18:24:38 -06:00
coolreader18
d3b2fa6e02 Allow serializing PyBaseExceptionRef 2020-01-08 17:42:38 -06:00