Commit Graph

9353 Commits

Author SHA1 Message Date
Kangzhi Shi
87edbfece7 fix str iterator position 2021-10-01 16:53:47 +02:00
Kangzhi Shi
70fc910268 refactor set_state 2021-10-01 16:53:47 +02:00
Kangzhi Shi
b4cbca0e8c rename functions for cached iter and reversed 2021-10-01 16:53:47 +02:00
Kangzhi Shi
a0d9ce030f fix setstate saturated 2021-10-01 16:53:47 +02:00
Kangzhi Shi
fa8df88b5d optimize avoid lookup for builtin iter and reversed 2021-10-01 16:53:47 +02:00
Kangzhi Shi
8b9c33c12a Refactor rwlock -> mutex because multiple read is rare 2021-10-01 16:53:47 +02:00
Kangzhi Shi
1ade56fa84 fix deque reversed iterator use the back counting 2021-10-01 16:53:47 +02:00
Kangzhi Shi
eab3609bde fix __length_hint__ 2021-10-01 16:53:47 +02:00
Kangzhi Shi
1cd3d03951 fix deadlock and clear up 2021-10-01 16:53:47 +02:00
Kangzhi Shi
4676dd902e clear up dictdatatype and fix arithmetic overflow 2021-10-01 16:53:47 +02:00
Kangzhi Shi
b6fa8670e8 Refactor IterStatus with generic payload 2021-10-01 16:53:43 +02:00
Kangzhi Shi
547e19b493 Refactor IterStatus to hold the PyObjectRef 2021-10-01 16:53:25 +02:00
Kangzhi Shi
563c04dea9 Refactor PyListIterator with PositionIterInternal 2021-10-01 16:52:11 +02:00
Kangzhi Shi
329afeaf15 Fix __length_hint__ to return not_implemented 2021-10-01 16:51:43 +02:00
Kangzhi Shi
bf04b505b1 Refactor positional iterator with general logic 2021-10-01 16:51:39 +02:00
Kangzhi Shi
4e6c451b2a Impl pickling for bytes and bytearray 2021-10-01 16:49:27 +02:00
Jeong YunWon
7ec363b58f Merge pull request #3177 from youknowone/iter-return
PyIterReturn for StopIteration
2021-10-01 23:16:13 +09:00
Jeong YunWon
ff1129adb7 PyIterReturn for StopIteration
Same as ArithmaticValue for NotImplemented
2021-10-01 22:33:57 +09:00
Jeong YunWon
7d859f54b9 unmark resolved test 2021-10-01 22:32:44 +09:00
Jeong YunWon
2eb6c6826e Merge pull request #3046 from fanninpm/latin-1-encoding
Implement latin_1 in Rust
2021-10-01 21:38:38 +09:00
Jeong YunWon
e000f8e2a5 Merge pull request #3173 from deantvv/io-error-with-filename2
OSError with filename2
2021-10-01 21:30:23 +09:00
Dean Li
d1522d2c02 OSError with filename2 2021-10-01 19:46:36 +08:00
Jeong YunWon
0044b5b55b Merge pull request #3180 from Snowapril/add-missing-tests
Add missing tests from cpython 3.8
2021-10-01 15:37:07 +09:00
snowapril
4014b91780 add decorators on failed & error tests
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
snowapril
1253fe0952 add tset__osx_support.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
snowapril
2432c784c3 add test_cmd_line_script.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
snowapril
c2f11e593d add test_codeccallbacks.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
snowapril
5317f88118 add test_binhex.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
snowapril
4872e35210 add test_trace.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
snowapril
957bae668b add test_zipapp.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
Jeong YunWon
dc069a478e Merge pull request #3179 from Snowapril/pyiter_check
Implement `PyIter_Check`
2021-10-01 13:19:06 +09:00
snowapril
e24ea4912f add PyIter_Check before using iternext
As [cpython 3.8
implementation](https://github.com/python/cpython/blob/main/Python/bltinmodule.c#L1448),
add `PyIter_Check` and its error message.

Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 12:26:59 +09:00
snowapril
4a29231b3a implement PyIter_Check on PyIter
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 12:26:59 +09:00
Jim Fasarakis-Hilliard
30fd99f1be Merge pull request #3129 from youknowone/rustpython-stdlib
rustpython-stdlib crate
2021-09-30 23:16:19 +03:00
Jeong YunWon
fb25a15f2c split rustpython-stdlib crate 2021-10-01 01:54:04 +09:00
Jeong YunWon
e881e3da0a move init_winsock to nt 2021-10-01 01:54:04 +09:00
Jeong YunWon
d42c4eb21e move builtins module to vm::stdlib::builtlins for consistency 2021-10-01 01:54:04 +09:00
Jeong YunWon
c62914daac expose PyFrozenSet 2021-10-01 01:54:04 +09:00
Jeong YunWon
b2ab17aaa7 clean up to use only public api 2021-10-01 01:54:04 +09:00
Jeong YunWon
e888991da8 expose PyTuple::_new for PyStructSequence 2021-10-01 01:54:04 +09:00
Jeong YunWon
6da45da5e7 expose time::time as pub 2021-10-01 01:54:04 +09:00
Jeong YunWon
7fd2f0b5e7 expose more common interfaces 2021-10-01 01:54:04 +09:00
Jeong YunWon
b4a6b1e491 Merge pull request #3175 from lijm1358/cmath-atan-atanh
Add `atanh` and `atan` to `cmath`
2021-10-01 01:52:09 +09:00
lijm1358
438661dc44 Add atanh and atan to cmath 2021-10-01 01:19:43 +09:00
Jeong YunWon
dee7828d18 Merge pull request #3174 from dldks321/missing-cmath
Add `asinh` function to `cmath`
2021-10-01 01:06:33 +09:00
LeeBeomsu
59b707c2ac add asinh function to cmath
Signed-off-by: LeeBeomsu <dlqjatn2@gmail.com>
2021-09-30 21:46:25 +09:00
Jim Fasarakis-Hilliard
a3c06d9164 Merge pull request #3117 from youknowone/pyiter-protocol
PyIter protocol object
2021-09-30 00:36:48 +03:00
Jim Fasarakis-Hilliard
e045f4b239 Merge pull request #3171 from youknowone/derive-default
Derive Default for CompileOpts
2021-09-29 23:17:30 +03:00
Jeong YunWon
3273be1a6b PyIter protocol 2021-09-30 05:16:10 +09:00
Jeong YunWon
4c8b14d2f1 Derive Default for CompileOpts 2021-09-30 03:59:18 +09:00