Commit Graph

2257 Commits

Author SHA1 Message Date
Jeong YunWon
859744236e Merge pull request #3391 from deantvv/os-error-refactor
Refactor OSError
2021-10-30 22:40:10 +09:00
Dean Li
a59556ad25 Refactor OSError
Implement `raw_os_error_to_exc_type` to reduce duplication of errno to
exception type.
2021-10-30 17:05:54 +08:00
Jeong YunWon
2ac05aba66 Merge pull request #3381 from DimitrisJim/time_mod
Time mod additions
2021-10-30 15:42:10 +09:00
Jeong YunWon
abd41b54b1 Merge pull request #3383 from DimitrisJim/silence_wasi_warnings
Fix warnings for wasi check.
2021-10-30 15:35:35 +09:00
Daniel Watkins
1ea93a59d5 stdlib/io.rs: align negative-fd-from-opener exception with CPython 2021-10-28 15:05:55 -04:00
jfh
c6ac24c2f2 Clean up cfgs, handle 32bit timespec creation, skip tests for windows. 2021-10-28 21:42:40 +03:00
jfh
a3771518de Fix warnings for wasi check. 2021-10-27 21:06:48 +03:00
jfh
ee77f3c332 Add monotonic_ns, perf_counter, perf_counter_ns. 2021-10-27 11:54:58 +03:00
jfh
1817fd6565 Add get_clock_info. 2021-10-27 10:36:10 +03:00
jfh
cab44a2ac3 Add clock_gettime, clock_settime, clock_getres. 2021-10-26 20:06:09 +03:00
Jeong YunWon
7ad7465827 Use PyIterReturn result-like tools 2021-10-27 00:14:59 +09:00
Jeong YunWon
c502037a8b Merge pull request #3363 from deantvv/os-env-anyos
os: fix test_putenv for all os
2021-10-26 01:54:39 +09:00
Dean Li
6ec380369a os: fix test_putenv for all os 2021-10-25 19:40:32 +08:00
jfh
ddeacbf0ce Add CLOCK_ constants. 2021-10-25 13:40:44 +03:00
Jeong YunWon
5f6c342c4a Merge pull request #3367 from DimitrisJim/length_hint_opt
vm.length_hint into vm.length_hint_opt
2021-10-24 23:36:49 +09:00
Jim Fasarakis-Hilliard
690ac7060b Merge pull request #3369 from deantvv/posix-rtld-constants
posix: add rtld constants
2021-10-24 13:53:06 +03:00
Dean Li
91256a4ec6 posix: add rtld constants 2021-10-24 17:53:49 +08:00
jfh
611e755599 Fix some uncaught clippy warnings. 2021-10-24 12:23:02 +03:00
jfh
4123e5eabc vm.length_hint into vm.length_hint_opt 2021-10-24 12:08:21 +03:00
Jeong YunWon
7f0ba0c176 Merge pull request #3364 from moreal/relocate-object-repr
Relocate `vm.to_repr` to `object.repr`
2021-10-24 01:14:56 +09:00
ChJR
e139364a60 Relocate vm.issubclass to obj.is_subclass 2021-10-24 01:05:32 +09:00
Moreal
bc05b98ca6 Relocate vm.to_repr to object.repr 2021-10-23 21:16:28 +09:00
snowapril
32ba09c407 add missing __class_getitem__ in several types
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-22 18:43:15 +09:00
Noa
53c261a19b Switch to array.into_iter() 2021-10-21 17:12:37 -05:00
Noa
09e9ea91e7 TryFrom, TryInto, FromIterator are in prelude now 2021-10-21 17:04:19 -05:00
Jeong YunWon
f76877347a Py -> PyObjectView 2021-10-21 18:04:13 +09:00
Jeong YunWon
b759808736 PyObj -> PyObject 2021-10-21 17:55:29 +09:00
Jeong YunWon
d4feb2a6c5 incref -> to_owned 2021-10-21 17:29:34 +09:00
Noa
8dd18d97be PyObjectRef -> &PyObj, &PyRef<T> -> &Py<T> 2021-10-21 16:49:01 +09:00
Jeong YunWon
08b5768a82 iternext uses ptr 2021-10-21 16:31:22 +09:00
Jeong YunWon
77b904ce64 __del__ uses ptr 2021-10-21 16:31:22 +09:00
jfh
388f278783 Remove usage of py_module macro from ast. 2021-10-21 08:20:00 +03:00
Jeong YunWon
fd2ba5159e Merge pull request #3204 from fanninpm/cleanup-skipped-tests
Clean up some skipped tests
2021-10-21 02:39:15 +09:00
Jeong YunWon
5ce05fcca0 Merge pull request #3330 from deantvv/uid-gid-from-object
posix: handle case -1 for `Uid` and `Gid`
2021-10-21 01:43:52 +09:00
Jeong YunWon
a83ad7aa1c Merge pull request #3337 from deantvv/fix-os-putenv
os: fix putenv
2021-10-21 01:33:37 +09:00
Dean Li
c56db2fafa os: fix putenv
Check key and value before calling `env::set_var`

From doc of `env::set_var`,
```

This function may panic if `key` is empty, contains an ASCII equals sign
`'='` or the NUL character `'\0'`, or when the value contains the NUL
character.
```
2021-10-20 23:15:39 +08:00
Dean Li
86920e21e5 posix: handle case -1 for Uid and Gid
For `Uid` and `Gid`, -1 means does not change the value.
2021-10-20 22:23:36 +08:00
Jim Fasarakis-Hilliard
0c07b7cbfc Merge pull request #3349 from AP2008/relocate-str
Relocate `vm.to_str` to `obj.str`
2021-10-20 08:54:24 +03:00
Jim Fasarakis-Hilliard
b7dab09b7d Merge pull request #3347 from AP2008/relocate-rich_compare
Relocate `vm.rich_compare` to `obj.rich_compare`
2021-10-20 08:49:40 +03:00
Jim Fasarakis-Hilliard
497eead8e9 Merge pull request #3344 from ChJR/feature/relocate_is_instance
Relocate vm.isinstance to obj.is_instance
2021-10-20 08:45:06 +03:00
Aratrik
fdd1baec65 Relocate vm.to_str to obj.str 2021-10-20 10:28:24 +05:30
Aratrik
c427462554 Relocate vm.rich_compare to obj.rich_compare 2021-10-20 09:44:41 +05:30
Jim Fasarakis-Hilliard
850187f246 Merge pull request #3343 from ChJR/feature/relocate_length
Relocate vm.obj_len to obj.length
2021-10-19 22:05:03 +03:00
Jim Fasarakis-Hilliard
fcb6551443 Merge pull request #3342 from ChJR/feature/relocate_hash
Relocate vm._hash to obj.hash
2021-10-19 22:04:23 +03:00
ChJR
d0f13f327b Relocate vm.isinstance to obj.is_instance 2021-10-20 02:15:44 +09:00
ChJR
0d32e1ae16 Relocate vm._hash to obj.hash 2021-10-20 02:10:36 +09:00
ChJR
6b14756542 Relocate vm.obj_len to obj.length 2021-10-20 02:08:45 +09:00
Aratrik
72c3a7027c Relocate vm.del_attr to obj.del_attr 2021-10-19 22:01:07 +05:30
Aratrik
d6fc20f64e Relocate vm.set_attr to obj.set_attr 2021-10-19 14:50:53 +05:30
Jeong YunWon
7f6e016526 Merge pull request #3282 from youknowone/remove-ref
Whitelist special-enough types to have PyRef aliases
2021-10-18 14:44:29 +09:00