Commit Graph

37 Commits

Author SHA1 Message Date
Changjoon
1d42ee565f Preserve __dict__ and __slots__ state in deque.__reduce__ (#7699)
deque.__reduce__ passed None as the unpickle state, so a deque
subclass's __dict__ and __slots__ values were dropped across a pickle
round-trip. CPython's deque___reduce___impl
(Modules/_collectionsmodule.c::deque___reduce___impl) calls
_PyObject_GetState, which returns the dict (or a (dict, slots) tuple)
so subclass attributes survive.

Replace the placeholder with the result of __getstate__() on the
instance. object.__getstate__ already implements the dict / dict+slots
protocol, matching _PyObject_GetState.
2026-04-27 12:50:23 +00:00
Jeong, YunWon
5a5ddbbed4 Restore defaultdict fallback and update test markers 2026-03-04 18:44:27 +09:00
ShaharNaveh
33921c2ac0 Update test_deque.py from 3.14.3 2026-02-13 13:43:46 +09:00
Shahar Naveh
2c30e01ae2 Update test_deque from 3.13.5 (#5939) 2025-07-11 08:36:34 +09:00
JaeyoungAhn
395e7b390a updated test_deque.py from CPython v3.11.2 2023-03-25 17:37:56 +09:00
JaeyoungAhn
6e921912d7 update test_deque from cpython v3.11.2 2023-03-25 16:32:13 +09:00
Hyunmin Shin
a6780040c8 Update test_{list, deque, userlist}.py 2022-08-01 21:14:17 +09:00
Jeong Yunwon
45e6fb14c2 adjust failing markers for test_deque 2022-07-18 04:07:35 +09:00
CPython developers
c8ae1806a4 Update test_deque from CPython 3.10.5 2022-07-18 03:54:49 +09:00
CHOUMnote
1d49cfdb70 fix error in test_weakref() 2022-05-21 19:31:37 +09:00
Dean Li
5ee4fb899b test: use os_helper 2021-11-28 20:51:32 +08:00
Jeong YunWon
913b78ca44 Revert "Merge pull request #3433 from deantvv/test-update"
This reverts commit 9fa5c5ac66, reversing
changes made to e7fa32c687.
2021-11-17 17:06:51 +09:00
Dean Li
49a5805d11 test: use os_helper 2021-11-13 02:18:33 +00:00
Myunghoon Park
e4953efac1 add __new__ method to deque iterator and reverse iterator (#2987)
* add __new__ method to deque iterator and reverse iterator
2021-08-29 17:13:19 +03:00
jfh
2b5251a4ec Return subclass on copy. 2021-08-27 20:47:41 +03:00
jfh
5e758f07b5 Add deque.__reduce__. 2021-08-26 19:15:32 +03:00
jfh
11349db67b Update test_deque to CPython 3.8 2021-08-26 19:06:41 +03:00
Alexander Stromberger
4e733c450b added __add__ method to collections.deque 2021-08-26 22:50:22 +09:00
Jim Fasarakis-Hilliard
45a64e10fe Merge pull request #2954 from eldpswp99/add-deque.__copy__
add deque.__copy__
2021-08-24 16:18:29 +03:00
eldpswp99
4e62e82d4f add deque.__copy__ 2021-08-24 21:17:45 +09:00
eldpswp99
988c686e7d resolve deque.rotate panic 2021-08-24 20:04:46 +09:00
Myunghoon Park
ca1e349a18 support deuqe.index using start, end index (#2944)
Support deque.index using start, end index
2021-08-23 17:44:14 +03:00
whgusdn321
04d77c23be Fix extendleft method of deque (#2893)
Fix extendleft function of deque.
2021-08-22 17:55:25 +03:00
Myunghoon Park
bfd9e39810 resolve deque deadlock using state (#2934)
Resolve deque deadlock using state
2021-08-22 14:31:03 +03:00
jfh
8978e8ccda Add reverse deque iterator. 2021-08-14 22:07:41 +03:00
jfh
64818913b8 Deque.__init__ handles initialization. 2021-08-12 21:04:41 +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
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
eldpswp99
571d9c4994 add deque __iadd__ method 2021-08-11 18:43:31 +09:00
James Webber
596dfe1f5a un-annotate now-passing test 2021-08-08 21:45:12 -04:00
jungsu.kwon
d44c98e926 skipped tests with error 2021-08-02 20:29:16 +09:00
jungsu.kwon
c3c8148d68 added expectedFailure for failing tests 2021-08-02 20:17:43 +09:00
jungsu.kwon
4142fd630d skipped hanging/panicking tests 2021-08-02 20:11:06 +09:00
jungsu.kwon
89d349be7a added test_deque.py from CPython 3.8.7 2021-08-02 20:06:28 +09:00