Commit Graph

2338 Commits

Author SHA1 Message Date
Jeong Yunwon
625f8675ae Introduce AsPyObject to replace IdProtocol 2022-04-17 10:32:01 +09:00
Jeong Yunwon
828c28ebb8 Replace vm.extract_elements with TryFromBorrowedObject 2022-04-17 06:09:45 +09:00
Jeong Yunwon
fac28934f6 Refactor extract_elements_with 2022-04-17 06:09:45 +09:00
Jeong Yunwon
60e0e5f95d Refactor try_value_with 2022-04-17 06:09:45 +09:00
Jeong Yunwon
c2f9498ca6 Split vm.rs into segments 2022-04-17 06:09:45 +09:00
Jeong Yunwon
d7daf42756 atexit hold its features itself 2022-04-17 04:10:10 +09:00
Jeong YunWon
f817b7f124 Merge pull request #3621 from youknowone/update-asdl
Fix update_asdl
2022-04-17 02:47:34 +09:00
Jeong Yunwon
4f4e87729b Fix ast/asdl_rs.py 2022-04-17 02:24:41 +09:00
Jeong Yunwon
be9aaf71a6 Move _struct module to stdlib 2022-04-17 02:00:07 +09:00
Jeong Yunwon
c64b0442a1 split buffer formats to vm/src/buffer.rs 2022-04-17 01:49:52 +09:00
Jeong YunWon
5553558261 Merge pull request #3606 from youknowone/pyobject
split pyobject.rs to multiple files
2022-04-17 00:53:19 +09:00
Jeong Yunwon
86a8831124 vm::funciton::arithmetic 2022-04-16 00:49:05 +09:00
Jeong Yunwon
475d04c67e IntoPyRef to vm::function 2022-04-16 00:46:37 +09:00
Jeong Yunwon
a5b36e1937 split pyobject.rs 2022-04-16 00:45:19 +09:00
Daniel Watkins
98079878cb stdlib/os.rs: update wrong-type exception text for __fspath__
In CPython this error message is constructed by path_converter in
posixmodule.c[0].

[0] https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L1260
2022-04-16 00:10:30 +09:00
Jeong Yunwon
6357a1acbe clean up imports and useless allow attributes 2022-04-15 23:58:20 +09:00
Jeong Yunwon
3629ce5cd7 rename non-protocol PySequence to ArgSequence to avoid confusion 2022-04-14 03:26:38 +09:00
Narawit Rakket
0f4d6cd66c fix: correct deque repr result and fix hanging problem 2022-03-21 00:53:12 +07:00
Narawit Rakket
9851643ec2 refactor: add repr helper function for the collections 2022-03-20 23:11:06 +07:00
Jake Armendariz
0dba8701e8 Merged marshaling module 2022-03-16 18:54:47 -07:00
Jake Armendariz
aadaf18219 Marshaling sets, frozen sets, bytearr, and changes to testing 2022-03-16 18:09:33 -07:00
d1t2
e02a312f7e Fix bool un/marshaling
Test: import marshal; assert marshal.loads(marshal.dumps(True)) == True
Test: import marshal; assert marshal.loads(marshal.dumps(False))== False
2022-03-13 21:13:33 +08:00
Kangzhi Shi
c6ee563088 fix item protocol use sequence protocol 2022-03-12 16:12:12 +09:00
Kangzhi Shi
0abe90dd0a move obj_as to sequence_downcast 2022-03-12 16:12:12 +09:00
Kangzhi Shi
0c9235ce0a impl sequence protocol for PyDeque 2022-03-12 16:12:12 +09:00
Kangzhi Shi
e3247dae7a refactor use SliceableSequence for array 2022-03-12 16:12:12 +09:00
Kangzhi Shi
01a8e01ec8 refactor BufferResizeGuard 2022-03-12 16:12:12 +09:00
Padraic Fanning
88e0f13993 Fix unnecessary_lazy_evaluations Clippy warning 2022-02-25 19:33:52 -05:00
Padraic Fanning
6d1ea6d996 Fix let_underscore_lock Clippy errror 2022-02-25 19:33:51 -05:00
Dean Li
68b9d38fc6 os: add device_encoding to wasi
Update `libc` to 0.2.119 to include [libc PR#2683](https://github.com/rust-lang/libc/pull/2683) which added support `device_encoding` on wasi.
2022-02-24 20:41:31 +08:00
Jeong YunWon
ab502174f3 Merge pull request #3558 from fanninpm/codecs-3.10
Update codecs.py to CPython 3.10
2022-02-24 18:30:53 +09:00
Jeong YunWon
ef90d09950 Merge pull request #3506 from jakearmendariz/main
Marshaling support for ints, floats, strs, lists, dicts, tuples
2022-02-21 23:45:38 +09:00
Jake Armendariz
502d5c217d Changes to code/style of marshaling module 2022-02-21 02:12:49 -08:00
Padraic Fanning
37f62bb9f6 Fix platforms for errno.EDEADLOCK 2022-02-19 20:12:17 -05:00
Padraic Fanning
f87e557e20 Update errno module to CPython 3.10
Some constants have also been reordered to reflect the order in the
original C source.
2022-02-19 19:54:53 -05:00
Padraic Fanning
98d8ccb350 Add _codecs.unregister() 2022-02-18 22:00:09 -05:00
Jeong YunWon
bd6c203789 Merge pull request #3503 from deantvv/os-device-encoding
os: implement device_encoding
2022-02-09 02:49:51 +09:00
Dean Li
2df64f081f os: implement device_encoding 2022-02-08 07:47:57 +08:00
Padraic Fanning
e79a6a5d23 Add EncodingWarning from CPython 3.10 2022-02-07 17:49:57 -05:00
snowapril
bea21fa9af Fix os.urandom to accept isize and check negative
Signed-off-by: snowapril <sinjihng@gmail.com>
2022-02-06 14:56:39 +09:00
Jake Armendariz
25d2426ec3 Add marshalling support for ints, floats, strs, lists, dict 2022-02-06 14:13:29 +09:00
Padraic Fanning
1d9536f427 Allow kwargs in itertools.combinations() signature
Fixes #3533
2022-02-05 13:37:29 -05:00
Jeong YunWon
b70169e4f0 Merge pull request #3500 from deantvv/update-lib-os
Update `Lib/os.py`
2022-01-28 00:22:18 +09:00
Noa
4c82fbdff6 Merge pull request #3505 from coolreader18/sys_getrandom
Use syscall instead of the getrandom libc function
2022-01-26 13:59:40 -06:00
Noa
8c9fb2c775 Fix unsatisfied times import on wasi 2022-01-26 13:01:35 -06:00
Noa
5aef92cf4f Bring Duration into scope in time.rs 2022-01-26 13:01:35 -06:00
Noa
318a152a5c Use syscall instead of the getrandom libc function 2022-01-26 13:00:58 -06:00
Dean Li
8ac22a7a97 io: implement text_encoding 2022-01-22 22:20:03 +08:00
Jeong YunWon
9377134161 add #[non_exhaustive] 2022-01-22 20:22:58 +09:00
Jeong YunWon
38513cb468 Merge pull request #3462 from qingshi163/mapping-protocol2
Refactor Mapping Protocol and Item Protocol
2021-12-03 21:18:25 +09:00