Padraic Fanning
77fd1237b2
Add uuencoding/decoding code to binascii.rs
...
The code is based on the PyPy implementation. It may not work properly.
2021-09-14 23:59:58 +09:00
Jeong YunWon
c4949f99cc
Merge pull request #3055 from DimitrisJim/fix_duplicate_entry
...
Remove duplicate entry for warnoptions.
2021-09-14 23:39:29 +09:00
jfh
8d45654595
Remove duplicate entry for warnoptions.
2021-09-14 15:40:13 +03:00
Aaditya
4cc160eafe
Update vm/src/stdlib/cmath.rs
...
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com >
2021-09-14 04:40:54 +09:00
Aaditya
75a9413e22
Implemented sqrt for cmath
2021-09-14 04:40:47 +09:00
Noa
01f5020f6a
Redox does not have libc::times or libc::nice
2021-09-12 12:47:45 -05:00
Jeong YunWon
e0f3f1983c
Merge pull request #3041 from RustPython/upd-rustyline
...
Update rustyline to 9.0
2021-09-12 17:40:31 +09:00
Jeong YunWon
0a690634c2
Merge pull request #3040 from DimitrisJim/refactor_optionals
...
Clean up more instances of matching on Optional.
2021-09-12 06:23:04 +09:00
Noa
61749bf4cf
Remove unnecessary redox patches
2021-09-11 15:48:22 -05:00
jfh
f1be6d5427
Clean up more instances of matching on Optional.
2021-09-11 23:41:14 +03:00
Jeong YunWon
dcc8043edd
Merge pull request #3037 from owljoa/fix-math-remainder-test
...
Fix failed test remainder in test_math
2021-09-12 00:12:12 +09:00
Dongin Kim
516df295d5
Reduce duplicated conditions
...
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com >
2021-09-11 22:54:16 +09:00
jfh
166e69e731
Use associated constants instead of module constants.
2021-09-11 16:29:06 +03:00
Jeong YunWon
e8736b6135
Merge pull request #3031 from DimitrisJim/cmath_impl
...
Add cmath module.
2021-09-11 21:36:00 +09:00
Dongin Kim
7055a1cb34
apply cargo fmt
2021-09-11 21:18:38 +09:00
jfh
41f628a32a
Skip failing tests.
2021-09-11 14:22:59 +03:00
Dongin Kim
1406f80c3c
fix failed test remainder in test_math
...
add conditions for below rules
1. remainder(x, inf) is x, for non-NaN non-infinite x
2. According to IEEE 754-2008 7.2(f)
2-1. remainder(x, 0) for non-NaN x is invalid operation
2-2. remainder(infinity, x) for non-NaN x is invalid operation
2021-09-11 20:00:29 +09:00
Jeong YunWon
2b15bf1844
implementation comments for os utility
2021-09-11 13:53:10 +09:00
Jeong YunWon
f6db9188a3
Merge pull request #3032 from fanninpm/fix-codecs-cp-utf8
...
Fix comparison in codecs.rs that always failed
2021-09-11 13:36:21 +09:00
Padraic Fanning
ef3d3a7298
Add binascii.Error and binascii.Incomplete
2021-09-10 18:49:18 -04:00
Padraic Fanning
d04b52d43e
Fix comparison in codecs.rs that always failed
2021-09-10 17:11:02 -04:00
jfh
e56ca82f72
Add scaffold for cmath module.
2021-09-10 22:48:28 +03:00
Dean Li
8539a38cb2
os: scandir add argument support
...
Add support for class that can to cast to a buffer like object
ex. `bytearray` and `memoryview`
2021-09-11 00:19:45 +08:00
Lee Dogeon
0d2a4264b3
Correct object.__repr__
2021-09-11 00:38:34 +09:00
Noa
34b91e7cad
Update rustyline to 9.0
2021-09-10 10:28:23 -05:00
Jeong YunWon
2e685b858a
Fix clippy warning
2021-09-10 00:42:33 +09:00
Jeong YunWon
f6d4393887
replace a few zeroed to MaybeUninit
2021-09-09 20:49:45 +09:00
Lee Dogeon
63b1696458
Derive name from tp_name
2021-09-09 00:07:36 +09:00
ChJR
14405b7225
Add os.fchdir builtin function
2021-09-08 00:51:56 +09:00
Connor Troy
e5383c68d2
Use mul for imul
2021-09-06 04:06:18 -06:00
Connor Troy
21aa376b2d
Remove imul deque drop
2021-09-06 03:17:16 -06:00
Connor Troy
d2e4242fdc
Use borrowed SimpleSeqDeque
2021-09-06 03:09:03 -06:00
Connor Troy
99908e6d3e
Add deque imul method
2021-09-06 00:14:26 -06:00
Jim Fasarakis-Hilliard
23cd859122
Merge pull request #3009 from youknowone/time-module
...
Use pymodule for time module.
2021-09-05 16:13:51 +03:00
Jeong YunWon
0416e4b03e
enable macos thread/process time
2021-09-05 14:38:26 +09:00
Jeong Yunwon
f056146b23
MaybeUninit for time module
2021-09-05 14:38:26 +09:00
Jeong YunWon
e6495b6fbc
clean up time module default values
2021-09-05 14:38:26 +09:00
Jeong YunWon
1a38877a05
Fix get_time to raise time error
2021-09-05 14:38:26 +09:00
Jeong YunWon
0831975de5
pymodule for time.rs
2021-09-05 14:38:26 +09:00
Padraic Fanning
85ad38514b
Make code more idiomatic
2021-09-04 18:24:32 -04:00
Padraic Fanning
f0b541b507
Add uuencoding functions to binascii rust module
...
Currently, they don't work as advertised.
2021-09-04 18:24:31 -04:00
Padraic Fanning
704c2d1240
Add surrogateescape_errors to codecs module
...
Inelegant translation of the CPython original, with PyPy as a reference.
2021-09-04 18:24:30 -04:00
Padraic Fanning
a201ee1fd5
Add surrogatepass_errors to codecs module
...
Inelegant translation of the CPython original, with PyPy as a reference.
2021-09-04 18:24:30 -04:00
Padraic Fanning
c93608f906
Add namereplace_errors to codecs module
2021-09-04 18:24:29 -04:00
Jeong YunWon
114ee5a935
grouping cfg modules of time module
2021-09-05 06:07:15 +09:00
Jeong YunWon
8bc9b7630a
Merge pull request #3007 from DimitrisJim/length_hint_during_extract
...
Call `__length_hint__` before extracting elements
2021-09-05 04:25:09 +09:00
Jeong YunWon
ba15a23fed
Merge pull request #3003 from Snowapril/time-module
...
Add thread_time, process_time in `time` module
2021-09-05 02:04:13 +09:00
snowapril
639ec966c1
time: add thread_time, process_time
...
This commits add four methods, thread_time, thread_time_ns,
process_time and process_time_ns.
With use of libc crate, we can get thread_time and process_time from the
cpu.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-09-05 01:02:08 +09:00
jfh
cf67393ee7
Replace occurences of get_iter, get_all with extract_elements.
2021-09-04 15:04:44 +03:00
jfh
022eb28c09
Call __length_hint__ on object to be extracted.
2021-09-04 15:04:32 +03:00