snowapril
4fd0681498
move mapping protocol to rustpython_vm::protocol
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-10-02 14:47:19 +09:00
snowapril
9e5120d546
add mapping type check to mappingproxy
...
As in cpython implementation there exists argument type checking before
create mapping proxy like below.
```c
if (!PyMapping_Check(mapping)
|| PyList_Check(mapping)
|| PyTuple_Check(mapping))
// print error
...
```
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-10-02 14:43:20 +09:00
snowapril
6e11b8931c
add mapping protocol methods to update_slot
...
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-10-02 14:43:20 +09:00
snowapril
1fbbdaabe3
support delitem in ass_subscript
2021-10-02 14:43:20 +09:00
snowapril
4f009ef971
switch SequenceIndex to PyObjectRef
...
As `getitem` and `setitem methods in other types,
get second argument as PyObjectRef.
2021-10-02 14:43:20 +09:00
snowapril
b197a178ea
switch RangeIndex to PyObjectRef
...
As `getitem` method in other types, get second argument as PyObjectRef.
2021-10-02 14:43:20 +09:00
snowapril
e83b68b810
apply mapping protocol in itemprotocol
2021-10-02 14:43:20 +09:00
snowapril
fc761b4e5b
add mapping protocol to proper types
2021-10-02 14:43:20 +09:00
snowapril
1b6cdf507e
rename length to compute_length
...
As cpython use `range_compute_length` naming
and `length` can be conflict with mapping protocol's method
2021-10-02 14:41:49 +09:00
snowapril
77351b3da8
add PyMapping struct for mapping protocol
2021-10-02 14:41:49 +09:00
snowapril
14ce6aa49a
add slot_as_mapping slots with atomic cell
2021-10-02 14:41:49 +09:00
Jeong YunWon
8e5a874df1
Merge pull request #3192 from youknowone/windows-stack-size
...
Fix windows stack size again
2021-10-02 14:21:24 +09:00
Jeong YunWon
18b7315c9a
Fix windows stack size again
2021-10-02 14:09:31 +09:00
Jeong YunWon
9656025de6
Merge pull request #3190 from RustPython/readme-env
...
Add RUSTPYTHONPATH note for windows users.
2021-10-02 13:31:06 +09:00
Jeong YunWon
c123ea382e
Add RUSTPYTHONPATH note for windows users.
2021-10-02 13:30:36 +09:00
Jeong YunWon
5728341a17
Merge pull request #3186 from DimitrisJim/rename_arithm
...
Arithmatic -> Arithmetic.
2021-10-02 12:58:55 +09:00
jfh
fbd3641f5d
Arithmatic into Arithmetic.
2021-10-02 03:42:59 +03:00
Jim Fasarakis-Hilliard
7ee6350285
Merge pull request #3185 from fanninpm/this-is-where-we-would-be-without-bors
...
Unmark passing tests in `test_cmd_line_script`
2021-10-02 03:34:19 +03:00
Padraic Fanning
c3221a0d7b
Unmark passing tests
2021-10-01 19:39:57 -04:00
Noa
b38ce3dbd3
Merge pull request #3158 from RustPython/pip-warnings
...
Miscellaneous pip fixes
2021-10-01 13:34:52 -05:00
Jim Fasarakis-Hilliard
2a31646d2f
Merge pull request #3181 from emhagman/cmath-sinh-cosh
...
Add sinh and cosh to cmath implementation
2021-10-01 21:03:31 +03:00
Eric Hagman
014dc9d20f
fix: run cargo fmt
2021-10-01 13:04:56 -04:00
Eric Hagman
e3e4071a00
fix: remove custom tests from cmath
2021-10-01 10:52:34 -04:00
Jeong YunWon
7ec363b58f
Merge pull request #3177 from youknowone/iter-return
...
PyIterReturn for StopIteration
2021-10-01 23:16:13 +09:00
Eric Hagman
787f6c1be6
Merge remote-tracking branch 'upstream/main' into cmath-sinh-cosh
2021-10-01 10:00:09 -04:00
Eric Hagman
55be9547d7
feat: add sinh and cosh to cmath
2021-10-01 09:52:39 -04: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
Noa
a2ea925812
Put track_caller on unwrap_pyresult
2021-09-30 18:33:52 -05:00
Noa
65c1be7d99
More inline(always), switch test to opt-level 3 + thin lto
2021-09-30 18:33:52 -05:00
Noa
65fa12a55a
Fix test failures
2021-09-30 18:33:51 -05:00
Noa
9743322aa2
Allow running packages passed to command line
2021-09-30 15:59:14 -05:00
Noa
5de5ce47ec
Make tokenize work on wasm
2021-09-30 15:55:48 -05:00
Noa
830418914e
Update zipfile.py to CPython 3.9
2021-09-30 15:55:47 -05:00
Noa
d5c4591fad
Add sys.platlibdir
2021-09-30 15:55:47 -05:00
Noa
f9a8413860
Update distutils.{command.install,sysconfig} to fix pip warnings
2021-09-30 15:55:47 -05:00