Jim Fasarakis-Hilliard
97d388e3db
Merge pull request #2863 from youknowone/funcnames
...
clean up pymethod with names
2021-08-12 18:19:34 +03:00
Jeong YunWon
4ec328b85a
Merge pull request #2866 from eldpswp99/make-deque-maxlen-readonly
...
remove improper setter of deque.maxlen
2021-08-13 00:07:51 +09:00
eldpswp99
0e36ff83ec
remove unnecessary Option<usize> clone
2021-08-12 23:08:00 +09:00
eldpswp99
8e6a2660fc
change deque.maxlen type from atomicCell<Option> to Option
2021-08-12 22:59:19 +09: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
Jeong YunWon
3d66693612
Merge pull request #2864 from sobolevn/str-mul-1
...
`id()` for `str` stays the same after `* 1`
2021-08-12 21:40:12 +09:00
Jeong YunWon
0e604b55ac
Update vm/src/stdlib/collections.rs
...
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com >
2021-08-12 21:39:52 +09:00
Jeong YunWon
201664ed4f
avoid vm.new_stringref in pystr.rs
2021-08-12 20:58:38 +09:00
Jeong YunWon
06581db9c9
Merge pull request #2865 from eldpswp99/support-deque-insert-at-the-end
...
support deque.insert when idx is gte to len
2021-08-12 20:48:05 +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
sobolevn
06d33f8f2c
id() for str stays the same after * 1, refs #2840
2021-08-12 13:49:00 +03:00
Jeong YunWon
739ca964aa
PyDeque with extract_elements & extend
2021-08-12 16:34:38 +09:00
Jeong YunWon
32adc327b6
clean up pymethod with names
2021-08-12 15:12:17 +09:00
Jim Fasarakis-Hilliard
08b758c8eb
Merge pull request #2861 from youknowone/pymethod-magic
...
clean up #[pymethod(magic)]
2021-08-12 01:22:26 +03:00
Jeong YunWon
4e60bcd741
clean up #[pymethod(magic)]
2021-08-12 06:44:52 +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
Jeong YunWon
01c106b76c
Merge pull request #2857 from youknowone/richcompare
...
tp_cmp -> tp_richcompare
2021-08-12 04:41:12 +09:00
Jeong YunWon
94d046b7ca
Merge pull request #2858 from sobolevn/bytes-mul-1
...
`id()` for `bytes` stays the same after `* 1`
2021-08-12 04:32:24 +09:00
Jeong YunWon
1a57ef03aa
tp_cmp -> tp_richcompare
...
this was the last typeslot with mismatching name
2021-08-12 04:01:51 +09:00
sobolevn
37f66dd998
id() for bytes stays the same after * 1, refs #2840
2021-08-11 21:53:52 +03:00
Jeong YunWon
03a9d6058b
Refactor Buffer Protocol (mostly namings) ( #2849 )
...
* Refactor Buffer protocol into RustPython convention
2021-08-11 20:11:31 +03:00
Jeong YunWon
cd548b8fc3
PyDeque::extend to use _extend always
2021-08-12 00:01:22 +09: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
9c5dace49b
use _extend std:Iterator
2021-08-11 23:42:16 +09: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
Jeong YunWon
cae41136f9
Merge pull request #2850 from tony-jinwoo-ahn/_PathLike
...
Fixed to use PathLike in imghdr.py
2021-08-11 22:24:25 +09:00
Jeong YunWon
6bd69af8f6
Merge pull request #2848 from voidsatisfaction/fix-dict-or-ror-ior-return-notimplemented
...
Fix make dict.{__or__,__ror__,__ior__} with other types return NotImplemented
2021-08-11 21:36:44 +09:00
Tony Jinwoo Ahn
20cb4aca69
Fixed to use PathLike in imghdr.py
2021-08-11 21:29:22 +09:00
Jim Fasarakis-Hilliard
101fd80949
Merge pull request #2846 from Arnab1181412/master
...
Fixed unwrapping in frame.rs
2021-08-11 15:01:03 +03:00
voidsatisfaction
3500a58138
fix: make dict.{__or__,__ror__,__ior__} with other types should return NotImplemented
2021-08-11 20:23:51 +09:00
Arnab1181412
49a30b9dab
Fixed unwrapping in frame.rs
2021-08-11 16:52:12 +05:30
Jeong YunWon
56469ae204
Merge pull request #2843 from eldpswp99/add_deque_iadd
...
add deque __iadd__ method
2021-08-11 19:48:38 +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
Nikita Sobolev
2705fb2320
Update vm/src/builtins/tuple.rs
...
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com >
2021-08-11 10:38:36 +03:00
Jeong YunWon
b4810f166c
Merge pull request #2828 from Tetramad/float
...
Add __floor__ and __ceil__ to float w/ tests
2021-08-11 16:08:37 +09:00
Tetramad
d45161939d
Enable __floor__, __ceil__ test snippet for float
...
The test of __floor__ and __ceil__ for float will be activated
when python version is greater then or equal to 3.9
2021-08-11 14:30:10 +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
Nikita Sobolev
a4fd0144ad
Fixes repr of functions defined in classes
2021-08-11 02:55:05 +09: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
4812686f38
Merge pull request #2826 from deantvv/socket-hstrerror
...
socket: use libc::hstrerror
2021-08-11 00:21:08 +09:00
Dean Li
e01995d07f
socket: use libc::hstrerror
2021-08-10 20:31:39 +08:00