Commit Graph

9421 Commits

Author SHA1 Message Date
Jeong YunWon
3ede484656 Merge pull request #3205 from pheki/update-unit-testing-instructions
Update unit tests instructions, explain how to run them individually
2021-10-03 13:39:28 +09:00
Jim Fasarakis-Hilliard
bb0a63e509 Merge pull request #3207 from fanninpm/test-compile
Add test_compile from CPython 3.8
2021-10-03 05:59:51 +03:00
Aphek
66c00272a0 Fix grammar in DEVELOPMENT.md
Co-authored-by: fanninpm <fanninpm@miamioh.edu>
2021-10-02 23:09:42 -03:00
Aphek
a702a1709b Update unit tests instructions, explain how to run them individually 2021-10-02 20:11:07 -03:00
Padraic Fanning
b7a79eb002 Mark erroring/failing tests 2021-10-02 18:34:23 -04:00
Padraic Fanning
56058844fe Skip panicking test 2021-10-02 16:16:00 -04:00
Padraic Fanning
b95edf676f Add test_compile from CPython 3.8 2021-10-02 16:14:42 -04:00
Jeong YunWon
e17d20c920 Merge pull request #3187 from DimitrisJim/use_pyint_try_to_prim
Use PyInt::try_to_primitive.
2021-10-03 03:43:26 +09:00
Jeong YunWon
da9c25ac42 Merge pull request #3201 from youknowone/remove-tryinto-sequence-index
Remove impl TryFromObject for SequenceIndex
2021-10-03 03:43:10 +09:00
Jeong YunWon
93c0753da5 Remove impl TryFromObject for SequenceIndex 2021-10-03 02:18:08 +09:00
Jeong YunWon
e27b9ae32b Merge pull request #3169 from youknowone/hide-type-modules
pub(crate) for type modules
2021-10-03 02:03:06 +09:00
jfh
2f6deb8fd0 Use PyInt::try_to_primitive. 2021-10-02 19:19:28 +03:00
Jeong YunWon
001236e0ab pub(crate) for type modules 2021-10-03 00:15:15 +09:00
Jim Fasarakis-Hilliard
12d765fce3 Merge pull request #3196 from Snowapril/fix_pystruct
Fix pystruct incompatibility and add `test_buffer.py` from cpython 3.8
2021-10-02 17:27:21 +03:00
Jim Fasarakis-Hilliard
c991dff54b Merge pull request #3197 from Snowapril/mapping_proxy_repr
Add missing `repr` for `mappingproxy`
2021-10-02 16:02:06 +03:00
Jim Fasarakis-Hilliard
0edb11ac1e Merge pull request #3195 from youknowone/py-names
clean up py* attributes names
2021-10-02 16:00:10 +03:00
snowapril
c5cc179182 remove decorators on success tests
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 20:36:43 +09:00
snowapril
40101b726c remove decorators on success tests
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 20:33:47 +09:00
ChJR
fad0b6b944 Change posix.*chmod 2021-10-02 20:29:54 +09:00
snowapril
fa71ac9699 add missing repr on mappingproxy
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 20:01:27 +09:00
snowapril
2b3b5fbab6 fix pystruct to use struct.error
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 19:38:16 +09:00
snowapril
2b0c16d209 add test_buffer.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 19:07:01 +09:00
Jeong YunWon
6b1af9a45e Merge pull request #3121 from Snowapril/mapping-protocol
Implement Mapping Protocol
2021-10-02 18:00:17 +09:00
Jeong YunWon
7b0965c1d7 turn unreachable function to cold 2021-10-02 18:00:04 +09:00
Jeong YunWon
2c8020a081 clean up py* attributes names 2021-10-02 16:59:33 +09:00
snowapril
a81b3f91b9 fix posix & winapi to use proper PyMapping
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 16:45:35 +09:00
snowapril
aa2a7f01ee add PyMapping as PyObjectRef wrapper
Modify original `PyMapping` to `PyMappingMethods` and create `PyMapping`
struct as `PyObjectRef` wrapper for implementing `PyMapping_*`
functions. https://docs.python.org/3/c-api/mapping.html

Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 16:45:34 +09:00
Jeong YunWon
843a1bbc94 Merge pull request #3193 from tony-jinwoo-ahn/writeln
Replace write! with writeln!
2021-10-02 16:36:54 +09:00
Jeong YunWon
13a052b9ca Merge pull request #3094 from qingshi163/bytes-iter-pickle
General logic for positional iterator
2021-10-02 15:37:50 +09:00
Tony Jinwoo Ahn
34f5a8793a Replace write! with writeln!
Instead of calling write! with an explicit newline character at the end,
prefer its alternative, writeln!.

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
2021-10-02 15:23:11 +09:00
Jeong YunWon
b0575ccf5d Merge pull request #3191 from tony-jinwoo-ahn/Math
Enable exp() for cmath test
2021-10-02 15:13:24 +09:00
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
Tony Jinwoo Ahn
8d3461d1bb Enable exp() for cmath test 2021-10-02 13:59:36 +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