Noah
99104faaf7
Re-export pyobject::* from the root of the crate
2021-05-20 10:24:07 -05:00
Noah
3f68a23963
Merge pull request #2646 from RustPython/coolreader18/native-codecs
...
Implement _codecs (but not encoding/decoding) as a Rust module
2021-05-20 09:55:45 -05:00
Jeong YunWon
110a31ca5a
Merge pull request #2656 from RustPython/fix-redox
...
Fix errors and (some) warnings on redox
2021-05-20 21:55:44 +09:00
Noah
c0f1da8d8f
Make _codecs a native module
2021-05-18 23:43:13 -05:00
Noah
2bcf7d4d5b
Merge pull request #2649 from deantvv/os-direntry-fix
...
os: Fix `DirEntry` is_file and is_dir function
2021-05-16 00:10:29 -05:00
Noah
855925ef56
Fix errors and (some) warnings on redox
2021-05-16 00:09:38 -05:00
Dean Li
15427a26a5
os: Fix DirEntry is_file and is_dir function
...
Change `perform_on_metadata` to fit python document and tests.
From python document ->
> Return True if this entry is a directory or a symbolic link pointing to a directory;
> return False if the entry is or points to any other kind of file, or if it doesn’t exist anymore.
> ...
> This method can raise OSError, such as PermissionError, but FileNotFoundError is caught and not raised.
> - [python doc](https://docs.python.org/3/library/os.html?highlight=direntry#os.DirEntry.is_dir )
2021-05-16 12:36:17 +08:00
Noah
a5f1e74e6f
Cache stat result in DirEntry to fix spurious CI failures
2021-05-15 22:10:06 -05:00
Noah
3fdfbefd5c
Accept floats for poll.poll()
2021-05-15 12:41:22 -05:00
Noah
867a437da2
Fix install-pip regressions
2021-05-15 11:31:46 -05:00
Jeong YunWon
28e1ddf852
Merge pull request #2634 from RustPython/coolreader18/proper-textio
...
Properly implement TextIOWrapper using codecs
2021-05-15 11:31:42 +09:00
Noah
6a95d9aaf3
Add FileIO.__repr__
2021-05-14 16:11:23 -05:00
Noah
6bc27257c4
Update _ssl to use select()/poll() to handle sockets w/ timeouts
2021-05-13 22:53:32 -05:00
Noah
295613ecfe
Fix tests
2021-05-13 20:05:17 -05:00
Noah
801119f5b7
Fix clippy error
2021-05-13 19:46:17 -05:00
Noah
ab658a11a6
Call the encoder for TextIOWrapper.write
2021-05-13 19:46:17 -05:00
Noah
80e5c984f4
Implement TextIOWrapper.readline correctly
2021-05-13 19:46:17 -05:00
Noah
4250a5dbaa
Properly implement TextIOWrapper using codecs
2021-05-13 19:46:17 -05:00
Dean Li
aae82422fa
os: implement repr for DirEntry
2021-05-13 21:39:13 +08:00
Jeong YunWon
53e2f5f48a
module _scproxy
2021-05-13 03:03:21 +09:00
Noah
6d9208acae
Merge pull request #2617 from deantvv/os-direntry-inode
...
os: Implement `inode()` for class `DirEntry`
2021-05-11 10:37:14 -05:00
Noah
f858d76433
Merge pull request #2621 from RustPython/coolreader18/socketstuff
...
Add a bunch of stuff to the socket module
2021-05-11 08:08:41 -05:00
Noah
e9b55686f4
Add os.[sg]et_handle_inheritable
2021-05-11 00:07:11 -05:00
Noah
561cb78047
Fix windows select() + asyncore
2021-05-11 00:07:09 -05:00
Noah
d22ada23c2
Improve the openssl vendoring situation
2021-05-10 14:09:06 -05:00
Dean Li
e84ba9278b
os: Implement inode() for class DirEntry
...
Use `std::os::unix::fs::DirEntryExt` on unix to get inode and
use `stat_inner` for other platfrom to get stat and cache
inode into `AtomicCell<Option<u64>>`.
Currently on windows platform in `stat_inner` inode will only contains
default value (0).
2021-05-10 22:25:57 +08:00
Padraic Fanning
2e75403a54
Suppress manual_map lint for future expansion
2021-05-07 17:57:02 -04:00
Padraic Fanning
984ea440c3
Fix manual_map Clippy warning
2021-05-07 17:16:53 -04:00
Noah
6b55c8d44f
Fix(?) windows errnos
2021-05-04 11:31:09 -05:00
Noah
e6463ebcd8
Unskip tests for asynchat and asyncore
2021-05-03 15:31:00 -05:00
Noah
2dbe4a9c9a
Add sock.recvfrom_into + other
2021-05-03 15:14:52 -05:00
Noah
43457da22e
Add sock.connext_ex
2021-05-03 12:27:48 -05:00
Noah
8ac4a8fa7a
Check WSAE* errors on windows
2021-05-03 12:27:29 -05:00
Noah
3dbbc068fb
Replace Socket2::r#type with manual getsockopt
2021-05-03 12:26:54 -05:00
Noah
b2470bba85
More socket stuff
2021-05-03 12:26:54 -05:00
Noah
e9984c3829
Add a bunch of stuff to the socket module
2021-05-03 12:26:54 -05:00
Noah
9a83e15918
Fix cfg for windows-gnu target
2021-05-02 10:41:46 -05:00
Dean Li
69a7f3d1cb
os: symlink use FromArgs for arguments
...
Related to #1175
2021-04-30 20:33:17 +08:00
Noah
f608626f27
Fix tests in test_ntpath/add functions to the nt module
2021-04-27 21:04:59 -05:00
Noah
d8d979a420
Skip/unskip some tests on unix now
2021-04-27 08:15:13 -05:00
Noah
1feae7841f
Fix stuff on windows
2021-04-27 08:15:13 -05:00
Noah
d969299de5
Always have fds represent the C RT's fds, even on windows
2021-04-27 08:15:12 -05:00
Jeong YunWon
53ce13bf00
Merge pull request #2588 from RustPython/coolreader18/less-deps
...
Less dependencies (remove _serde_json and regex_crate modules)
2021-04-27 21:05:41 +09:00
Noah
d226cb818c
Merge pull request #2594 from deantvv/os-open-args
...
os: Fix `open` keyword arguments
2021-04-26 09:06:25 -05:00
Dean Li
d99f4038e1
os: Fix open keyword arguments
...
Following code used to fail due to the way used to define
os.open in rust. To fix this, we need to use `FromArgs`
to define `struct OpenArgs {...}`.
```
f = os.open(path=__file__, flags=os.O_RDONLY, mode=0o777, dir_fd=None)
```
Noted that the original `open` is now rename to `os_open`
and is exported as `open`.
Related to #1175
2021-04-26 19:51:24 +08:00
Noah
8ae26e545f
Don't depend on num-iter
2021-04-25 18:03:29 -05:00
Noah
2e33b227b3
Impl py_io::Write for String
2021-04-25 18:03:28 -05:00
Noah
f7de913e07
Merge pull request #2593 from deantvv/os-utimeargs-cfg-gate
...
os: Put `UtimeArgs` behind cfg gate
2021-04-25 10:06:42 -05:00
Dean Li
0620918a30
os: Put UtimeArgs behind cfg gate
2021-04-25 10:31:16 +08:00
Noah
325007f6f3
Don't include regex in the binary, remove regex_crate module
2021-04-22 08:31:27 -05:00