Commit Graph

3914 Commits

Author SHA1 Message Date
Depasse Arthur
eaa4a3bfd4 fixing clippy lint 2020-07-24 16:18:48 +02:00
Depasse Arthur
308468f1d5 First implementation of chown for the os module 2020-07-24 16:18:48 +02:00
Jeong YunWon
87e500a07b Merge pull request #2021 from RustPython/fix-mingw
Fix compilation on mingw/msys
2020-07-23 02:55:23 +09:00
Jeong YunWon
3f3a83c687 Merge pull request #1883 from youknowone/share-splitlines
Share str.splitlines and bytes.splitlines implementaion
2020-07-22 14:13:18 +09:00
Jeong YunWon
eb25ce6f2c Merge pull request #2016 from youknowone/sequence
Simplify SimpleSeq impls and remove duplicated length check for SeqMul
2020-07-22 14:12:58 +09:00
Noah
d52309255e Fix compilation on mingw/msys 2020-07-21 17:00:12 -05:00
Jeong YunWon
93c80ebe7d Remove redundant clone 2020-07-22 03:36:16 +09:00
Jeong YunWon
7f7e0ac770 unify sequence::cmp 2020-07-22 03:36:09 +09:00
Jeong YunWon
b677b88bdd sequence::cmp take DynPyIter instead of SimpleSeq
to avoid duplicated code generation for Box operation
2020-07-21 21:48:46 +09:00
Noah
a742ba01fa Merge pull request #2017 from BolunThompson/init_subclass
Implementation of __init_subclass__
2020-07-21 01:14:49 -05:00
Bolun Thompson
dd9eb28eb8 formatting 2020-07-20 20:14:12 -07:00
Bolun Thompson
3f7ad38458 Update vm/src/obj/objtype.rs
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
2020-07-20 20:14:12 -07:00
Bolun Thompson
94bafbb1ea Refactored unecessary code out and calls __get__ descriptor when needed 2020-07-20 20:14:12 -07:00
Bolun Thompson
8cccf13c80 Implemented kwargs on __init_subclass__ 2020-07-20 20:14:12 -07:00
Bolun Thompson
05bd893e3d Partial support for __init_subclass__ dunder method.
This doesn't support passing kwargs to __init_subclass__.
2020-07-20 12:47:03 -07:00
Jeong YunWon
826dc900f8 SeqMul check non-zero length only once 2020-07-20 05:57:09 +09:00
Jeong YunWon
f40b19927f Simplify SimpleSeq 2020-07-20 05:57:06 +09:00
Jeong YunWon
e674b9f99e Use .to_usize().unwrap_or(0) rather than .max(0) 2020-07-20 05:49:59 +09:00
Jeong YunWon
5cfdf1db2c pystr::py_splitlines 2020-07-20 02:52:11 +09:00
Jeong YunWon
62277faa44 Share str.splitlines and bytes.splitlines implementaion 2020-07-20 01:18:43 +09:00
clemado1
53a116f9f1 Implement remove method of array 2020-07-19 16:31:07 +09:00
Jeong YunWon
0c11b8bf67 Merge pull request #1963 from palaviv/cpython-tests
Add CPython import tests
2020-07-19 03:00:31 +09:00
Jeong YunWon
d71dc69577 Merge pull request #2007 from youknowone/test-zlib
test_zlib.py
2020-07-19 02:54:56 +09:00
Aviv Palivoda
4ba6b476aa Wrap unlock in unsfae 2020-07-18 17:26:05 +03:00
Aviv Palivoda
5b51495119 Merge pull request #2011 from yanganto/issue-1555
handle nesting brackets in the spec of format
2020-07-18 17:08:47 +03:00
Aviv Palivoda
eba1d722ea Remove global import lock in WASM 2020-07-18 17:04:35 +03:00
Aviv Palivoda
f970f4fabc Add global import lock 2020-07-18 17:04:35 +03:00
Aviv Palivoda
d14f796b1a Raise error if sys.module value is None 2020-07-18 17:04:35 +03:00
Antonio Yang
bf9eb7a1b0 update testcase 2020-07-18 21:26:48 +08:00
Antonio Yang
ec42059dcb build spec of format when parse 2020-07-18 21:16:58 +08:00
Jeong YunWon
112aef87ed Merge pull request #2000 from RustPython/coolreader18/fix-wasi
Fix compilation on wasi
2020-07-18 21:23:03 +09:00
Jeong YunWon
915078e32f mark failing tests 2020-07-18 20:58:59 +09:00
Jeong YunWon
2d31f4e7c8 Merge pull request #2001 from RustPython/coolreader18/update-pwd
Update the pwd module
2020-07-17 15:47:04 +09:00
Noah
c4378eb275 Fix compilation on wasi 2020-07-16 20:59:16 -05:00
Noah
5401b2dd32 Merge pull request #2003 from qodot/impl-array-cmp
Implement lt, le, gt, ge method of array
2020-07-16 20:54:51 -05:00
qodot
40a5e64bf8 Fix rustfmt and clippy
followed message,
- using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)`
2020-07-17 10:18:23 +09:00
Noah
b585a6a930 Merge pull request #1998 from RustPython/coolreader18/zlib-compressobj
Add zlib.compressobj()
2020-07-16 15:05:24 -05:00
qodot
72a78ff542 Implement lt, le, gt, ge method of array 2020-07-16 22:58:54 +09:00
Noah
a9a5f06623 Rewrite the pwd module to use nix instead of the pwd crate 2020-07-15 12:54:51 -05:00
Noah
e30e2cd278 Update some num-* crates 2020-07-15 12:53:57 -05:00
Noah
dd4abd082e Add zlib.compressobj() 2020-07-14 21:24:49 -05:00
Noah
3c241cd91e Allow struct.pack to take a bytes spec 2020-07-14 21:24:41 -05:00
Noah
50ffa8ff10 fp.read(0) == b'', not read_full 2020-07-14 21:24:23 -05:00
Noah
6d383b6148 Fix fmt 2020-07-14 11:20:42 -05:00
Noah
55a95660c0 Merge branch 'master' into class-assign 2020-07-14 11:18:12 -05:00
Jeong YunWon
b6532d4c0c Merge pull request #1995 from skinny121/fraction
Add fractions.py
2020-07-14 18:17:50 +09:00
Ben Lewis
0ac4f3a642 Change builtins module to use pymodule proc macro. 2020-07-14 20:08:17 +12:00
Jeong YunWon
1c0925b4d9 CompilerError always contains source_path 2020-07-14 13:48:39 +09:00
Ben Lewis
c7094c5a8d Replace ArcSwap with RwLock for PyObject.dict as there is no significant performance difference. 2020-07-13 19:36:48 +12:00
Ben Lewis
f5daba7f83 Fix clippy warning. 2020-07-12 18:19:48 +12:00