Jeong YunWon
289ddeaa3c
Merge pull request #2878 from DimitrisJim/sets_reduce
...
Add reduce for set, frozenset.
2021-08-14 12:50:07 +09:00
Noa
cc40ae025e
Merge pull request #2851 from deantvv/fix-os-sendfile
...
Fix os sendfile
2021-08-13 20:34:21 -05:00
jfh
ac0d5ff8b0
Add reduce for set, frozenset.
2021-08-14 01:11:13 +03:00
Jeong YunWon
634a6c2435
Merge pull request #2875 from DimitrisJim/retry_set_ops
...
Retrying contains, remove, discard with a frozenset.
2021-08-14 00:27:20 +09:00
jfh
4a460248b9
Retrying contains, remove, discard with a frozenset.
2021-08-13 17:33:13 +03:00
Jeong YunWon
805abb78e8
Merge pull request #2871 from DimitrisJim/deque_init
...
Deque.__init__ handles initialization.
2021-08-13 14:43:58 +09:00
jfh
64818913b8
Deque.__init__ handles initialization.
2021-08-12 21:04:41 +03:00
Jim Fasarakis-Hilliard
987516bc1f
Merge pull request #2868 from DimitrisJim/reverse_list_it
...
Fix pickling, length hint, iteration for reverse list iterators.
2021-08-12 21:02:55 +03:00
jfh
0c6375c031
Fix pickling, length hint, iteration for reverse list iterators. Refactor common functionality.
2021-08-12 20:26:59 +03:00
eldpswp99
c29a1d2632
remove improper setter of deque.maxlen
...
before: maxlen was writable
d = deque()
d.maxlen = 10 was allowed
after : make maxlen read-only
the before code raise attributError
2021-08-12 22:51:00 +09:00
Jeong YunWon
d2a9316344
Merge pull request #2853 from eldpswp99/support-deque.extend-recursive-call
...
support deque.extend recursive call
2021-08-12 22:20:56 +09:00
eldpswp99
ab8c6bf97a
support deque.insert when idx is gte to len
...
before: when idx >= len it doesn't insert the element to the end
it inserted to index len-1
after: when idx >= len it inserts the element to the end of the deque
2021-08-12 20:03:24 +09:00
Jim Fasarakis-Hilliard
5982e8c11c
Merge pull request #2859 from DimitrisJim/fix_faulty_length_hint
...
Fix length hint for dictionary iterators.
2021-08-12 00:20:06 +03:00
jfh
0c4d579adc
Fix length hint for dictionary iterators.
2021-08-11 23:46:00 +03:00
Nikita Sobolev
090672800a
Adds __rmul__ to collections.deque ( #2844 )
...
* Adds `__rmul__` to `collections.deque`, refs #2834
2021-08-11 17:58:46 +03:00
eldpswp99
2528d25fbe
support deque.extend recursive call
...
before: RustPython hangs when
d = deque('a')
d.extend(d)
after: it extends to the copy of it
2021-08-11 22:33:21 +09:00
Dean Li
b80db73af6
os: update TestSendfile from cpython
2021-08-11 20:58:13 +08:00
Tony Jinwoo Ahn
20cb4aca69
Fixed to use PathLike in imghdr.py
2021-08-11 21:29:22 +09:00
eldpswp99
571d9c4994
add deque __iadd__ method
2021-08-11 18:43:31 +09:00
Jeong YunWon
9ba674a2a9
Merge pull request #2841 from sobolevn/issue-2840
...
Fixes that `id()` of `tuple` was changing on `* 1`
2021-08-11 17:30:16 +09:00
Padraic Fanning
95b514b85d
Implement __floor__ for float type
...
Co-authored-by: Tetramad <cbwjd777@gmail.com >
2021-08-11 14:30:10 +09:00
Padraic Fanning
fae7b0e8ed
Implement __ceil__ for float type
...
Co-authored-by: Tetramad <cbwjd777@gmail.com >
2021-08-11 14:30:10 +09:00
Padraic Fanning
9f497fb65a
Add test_float from CPython 3.9.1
...
Co-authored-by: Tetramad <cbwjd777@gmail.com >
2021-08-11 14:30:10 +09:00
sobolevn
7e2efb4de5
Fixes that id() of tuple was changing on * 1, refs #2840
2021-08-11 01:47:16 +03:00
Jeong YunWon
08614bfc95
Merge pull request #2830 from DimitrisJim/bytearray_init_alloc
...
Add __alloc__ to bytearray and fix its __init__ issues.
2021-08-11 04:10:08 +09:00
jfh
04c9ae0c83
Fix bytearray.__init__.
2021-08-10 21:03:07 +03:00
leesungbin
2c6208a5f8
Add math_perm method
...
Co-authored-by: Jeong YunWon <youknowone@users.noreply.github.com >
2021-08-11 02:29:44 +09:00
jfh
a136db2917
Add __alloc__ for bytearray, add note to tests.
2021-08-10 19:09:22 +03:00
Jeong YunWon
be0e7ce539
Merge pull request #2818 from Snowapril/fix-seq-indexing
...
Add __index__ operator overriding class support for SequenceIndex
2021-08-10 04:24:34 +09:00
snowapril
8d507a6fbc
seq: add __index__ op overriding class support
...
This commit fix three test cases in test_index.py
* SeqTestCase.test_index
* SeqTestCase.test_wrappers
* ListTestCase.test_setdelitem
All these three cases' failures were caused by not supporting classes
that override __index__ operator when indexing sequence type.
This commit implement almost same routine with PR(#2807 ) which also did not
support classes which override __index__ operator in range indexing.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-09 21:33:53 +09:00
James Webber
596dfe1f5a
un-annotate now-passing test
2021-08-08 21:45:12 -04:00
Jim Fasarakis-Hilliard
9652c79f1d
Merge pull request #2787 from fanninpm/test-yield-from
...
Add test_yield_from from CPython 3.8
2021-08-08 21:15:28 +03:00
Padraic Fanning
373aff3d69
Mark failing tests due to GitHub Actions
2021-08-08 13:23:37 -04:00
Snowapril
89ca1db86d
builtins: add __index__ overriding class support
...
This commit fix RangeTestCase.test_range test in test_index.py
TryFromObject implementation for RangeIndex enum did not cover classes
that override __index__ operator which cpython implementation is currently providing
(https://docs.python.org/3.8/library/operator.html#operator.__index__ )
I add codes that cover upper case using vm.to_index method.
Signed-off-by: snowapril <sinjihng@gmail.com >
2021-08-08 21:27:05 +09:00
voidSatisfaction
3cd1f6b27c
Add math.comb function
2021-08-08 20:04:23 +09:00
eldpswp99
1c0bd83809
iskeyword: add None check
...
there was one todo in test_keyword.py
before: s was PyStrRef, it failed to handle None
after: convert s to PyObjectRef and add None check
2021-08-07 20:24:41 +09:00
Dean Li
06b40b3602
socket: impl herror
...
There is one todo that is waiting for hstrerror to land in libc crate.
For now it shows the same error as cpython when hstrerror is not
available.
2021-08-07 15:26:09 +08:00
Jeong YunWon
2d78812745
Merge pull request #2797 from fanninpm/test-zipfile
...
Add test_zipfile from CPython 3.8
2021-08-06 23:21:48 +09:00
Padraic Fanning
d99d255ee1
Mark erroring/failing/hanging tests
2021-08-05 23:32:02 -04:00
Padraic Fanning
12e8f59862
Add test_zipfile from CPython 3.8
...
Also adds the following supporting files:
- the entire ziptestdata/ directory
- zip_cp437_header.zip
- zipdir.zip
2021-08-05 18:08:38 -04:00
Jeong YunWon
7fc8ddb130
Merge pull request #2795 from DimitrisJim/rangeiter_reduce
...
Adds reduce, length_hint and set_state to range iterators.
2021-08-06 06:44:32 +09:00
jfh
f3a074ba90
Adds reduce, length_hint and set_state to range iterators.
2021-08-05 23:56:01 +03:00
Jeong YunWon
412fffbc5d
Merge pull request #2792 from DimitrisJim/init_bltins
...
Initialize with init for mutable builtins.
2021-08-05 03:59:19 +09:00
jfh
6950ad6ee4
Initialize with init for mutable builtins.
2021-08-04 20:57:47 +03:00
Jeong YunWon
62af4222ba
Merge pull request #2739 from fanninpm/test-xmlrpc
...
Add test_xmlrpc from CPython 3.8
2021-08-04 14:00:28 +09:00
Padraic Fanning
1cd25cdb41
Mark failing tests due to GitHub Actions sandbox
2021-08-02 20:23:33 -04:00
Padraic Fanning
60e36a08d5
Mark erroring/failing tests
2021-08-02 19:24:44 -04:00
Padraic Fanning
f6aeb8bf09
Add test_yield_from from CPython 3.8
2021-08-02 19:24:43 -04:00
Jim Fasarakis-Hilliard
8f397947fe
Merge pull request #2784 from jungsu-kwon/test-deque
...
added test_deque.py from CPython 3.8.7
2021-08-02 17:20:13 +03:00
jungsu.kwon
d44c98e926
skipped tests with error
2021-08-02 20:29:16 +09:00