Commit Graph

1700 Commits

Author SHA1 Message Date
Dean Li
5dae7aacda Remove vm in path_from_fd 2021-04-05 11:13:39 +08:00
Dean Li
84e1cf87ab Extract path_from_fd from make_path and listdir 2021-04-05 10:09:12 +08:00
Dean Li
204dccc477 os: Add support_fd for listdir
Use same approach as make_path to add support_fd for `listdir`

After this patch, `os.fwalk` is available.
Noted that, test coverage doesn't increase due to the lack of 3rd argument in `os.symlink`.
2021-04-04 22:34:24 +08:00
Dean Li
a2b97f0f96 os: update support features for stat and fstat 2021-04-04 22:34:24 +08:00
Noah
286c784bea Fix overflow in _random 2021-04-03 16:40:40 -05:00
Noah
68b219ce2f Add rustyline to redox patches 2021-04-03 16:34:55 -05:00
Noah
605a353bc0 Merge pull request #2518 from RustPython/get-method-opt
Add optimized method lookup to avoid creating intermediate method objects
2021-03-27 15:05:04 -05:00
Jeong YunWon
843895c04d Merge pull request #2531 from RustPython/clippy-1.51
Fix clippy warnings for 1.51
2021-03-28 02:36:20 +09:00
Noah
76f8ed5299 Fix clippy warnings for 1.51 2021-03-26 17:54:22 -05:00
Noah
862c80f807 Fix closing fd for dir then calling closedir 2021-03-25 08:06:58 -05:00
Noah
25ecd7c38b Upgrade dependencies 2021-03-25 08:06:56 -05:00
Noah
cba3a2530e Merge pull request #2515 from deantvv/os-enhancement
Implement dir_fd in os.open
2021-03-19 21:49:17 -05:00
Dean Li
9963bf9fe4 Move filepath behind feature gate 2021-03-20 09:11:14 +08:00
Dean Li
d6d689dc1f os.open: make make_path return Cow 2021-03-16 20:15:26 +08:00
Noah
7d813761c5 Move io.rs over to vm.call_method 2021-03-15 09:45:07 -05:00
Noah
f50f930255 Add setattro slot, split call_method and call_special_method 2021-03-15 09:45:06 -05:00
Noah
70b3aa871e Fix zlib decompress for longer streams 2021-03-14 12:49:59 -05:00
Noah
d11cfd52e7 Enable zlib on wasm 2021-03-14 12:49:15 -05:00
Dean Li
cdcc191c0b Use cfg_if! for trait FilePath 2021-03-13 14:47:29 +08:00
Dean Li
9e6a7ae1a1 Exclude trait FilePath for wasi 2021-03-13 14:10:57 +08:00
Dean Li
ead42f2903 Implement dir_fd in os.open
Now pass `test_posix.py PosixTester.test_open_dir_fd`

Implement `dir_fd` in
`make_path` and `os.open(path, flags, mode=0o777, *, dir_fd=None)`
2021-03-13 11:23:18 +08:00
Noah
6da8b937da Add freebsd support 2021-03-08 08:08:54 -06:00
Dean Li
974ed856ba Implement os.closerange
`closerange` use `close` internally
2021-03-06 04:51:49 +00:00
Noah
6b0c0ca8cf Switch to upstream parking_lot git, fix compilation on wasi 2021-02-27 15:08:12 -06:00
Noah
491c4e775b Fix json.scanstring unicode handling 2021-02-20 21:04:30 -06:00
Noah
27fdb9eef1 Decompress.decompress() takes PyBytesLike 2021-02-20 21:04:30 -06:00
Noah
7d99e49fd9 Parse address tuple based on socket family 2021-02-20 21:04:30 -06:00
Noah
fb2efa95f9 Make getaddrinfo return a full tuple for inet6 2021-02-20 21:04:30 -06:00
Noah
b0f9c2809e Add SSLContext.compression 2021-02-20 21:04:30 -06:00
Noah
ede2d9ed16 Add SSLSocket.cipher 2021-02-20 21:04:30 -06:00
Noah
a0d9481fe5 Add RLock._is_owned 2021-02-20 21:04:30 -06:00
Noah
e6d9af43ca Miscellaneous fixes for aiohttp 2021-02-20 21:04:29 -06:00
rickygao
83ff1fb1d8 add itertools.pairwise and fix typos 2021-02-17 12:56:19 +08:00
rickygao
496eb8922b fix style 2021-02-16 14:45:42 +08:00
rickygao
c0e8b8d8bc follow the latest signature itertools.accumulate(iterable[, func, *, initial=None]) 2021-02-16 14:37:06 +08:00
Noah
73a6a49379 Merge pull request #2470 from zsilver1/math-lib-fixes
Fix `math.floor` and `math.ceil` functions to match cpython behavior
2021-02-15 21:05:30 -06:00
Zach Silver
9636996c4f Fix floor and ceil functions to match cpython behavior 2021-02-15 16:30:14 -08:00
pca006132
3f6df176d9 Optimize check_signals 2021-02-15 15:01:53 +08:00
kenkoooo
c558335089 Implement os.getpriority and os.setpriority (#2453) 2021-02-14 20:22:18 -06:00
kenkoooo
b15daec6c6 Merge branch 'master' into os_getgrouplist 2021-02-12 21:42:12 +09:00
Noah
6b761e94c0 Unify/simplify os.stat 2021-02-11 08:01:22 -06:00
kenkoooo
9b79ca4a0d Implement os.getgrouplist 2021-02-11 18:04:11 +09:00
Noah
561f4ee779 Allow tuple structs for derive(FromArgs) 2021-02-08 12:36:54 -06:00
Noah
ce8b5eed90 Enable dir_fd for utime, unskip a bunch of tests 2021-02-08 12:36:54 -06:00
Noah
9c6eea6aa0 Fix os.utime to be able to take floats 2021-02-08 12:36:54 -06:00
Noah
7809edd399 Fix non-threading callback 2021-02-07 19:39:36 -06:00
Noah
4a26d13481 Fix do_handshake method 2021-02-07 19:39:36 -06:00
Noah
781f46a826 Add more ssl methods 2021-02-07 19:39:36 -06:00
Noah
2e831f5daa Store OSError errno in the args tuple 2021-02-07 19:39:36 -06:00
Noah
aa238de4a9 Support newlines in the middle of base64 2021-02-07 19:39:36 -06:00