Commit Graph

29 Commits

Author SHA1 Message Date
김은빈
79e17cb1cf Fix subclass right-op dispatch for Python classes (#7462)
* Fix subclass right-op dispatch for Python classes

* Separate fallback queueing from subclass priority in op dispatch
2026-03-19 09:51:56 +09:00
Jeong, YunWon
5a5ddbbed4 Restore defaultdict fallback and update test markers 2026-03-04 18:44:27 +09:00
github-actions[bot]
16bb1040b4 Update collections from v3.14.3 (#7135)
- Updated Lib/collections from CPython v3.14.3
- Preserved RustPython's fallback implementation for defaultdict
- Added test for update_reentrant_add_clears_counter
- Minor formatting fixes in test file

Co-authored-by: CPython Developers <>
2026-02-14 21:35:25 +09:00
Lee Dogeon
5c7f6a2afa Update types from v3.14.2 (#6833)
This pull request updates `types` module to v3.14.2. While doing it, it
fixes also async-related feature. This pull request's base is generated
by #6827.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Generators that act as iterable coroutines are now recognized as
awaitable, improving async behavior.
* Yield-from and await interactions now handle coroutine-iterable
sources more consistently.

* **Bug Fixes**
* Reduces spurious TypeError cases when awaiting or yielding from
wrapped coroutine-like generators.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-23 23:23:02 +09:00
Lee Dogeon
3bcd071e4d Bump collections to 3.14.2 (#6770)
* Bump collections to 3.14.2

* Unmark resolved tests
2026-01-20 23:58:43 +09:00
Shahar Naveh
59d71be85f Update test_collections.py from 3.13.7 (#6136) 2025-09-07 17:08:35 +09:00
ShaharNaveh
5d9f9acb1d Update test_collections.py 2025-07-25 16:06:00 +02:00
Jeong, YunWon
cd58d154cf Type alias type (#6011)
* Constructor for TypeAliasType

* Fix PyBaseObject::py_new

* Representable for TypeAliasType
2025-07-21 14:42:18 +09:00
Jeong, YunWon
3566dcab28 Pyfunction builtins and constructor (#5823)
* func builtins

* PyFunction constructor
2025-06-24 10:23:14 +09:00
Daniel Chiquito
9481df23e1 Disable test_Buffer
This test will not work until the `__buffer__` and `__release_buffer__`
methods are implemented on the appropriate builtin types, which is
outside the current scope.
2024-02-24 11:02:41 -05:00
Daniel Chiquito
0bd8c2504c Update test_collections.py to 3.12.2 2024-02-23 20:16:16 -05:00
Jeong, YunWon
1c93c1630b Merge pull request #5164 from dchiquito/frozenset-hash
Use CPython hash algorithm for frozenset
2024-02-10 14:55:24 +09:00
Daniel Chiquito
bf461cdebc Use CPython hash algorithm for frozenset
The original hash algorithm just XOR'd all the hashes of the elements of
the set, which is problematic. The CPython algorithm is required to pass
the tests.

- Replace `PyFrozenSet::hash` with CPython's algorithm
- Remove unused `hash_iter_unorded` functions
- Add `frozenset` benchmark
- Enable tests
- Lower performance expectations on effectiveness test
- Adjust `slot::hash_wrapper` so that it doesn't rehash the computed
  hash value in the process of converting PyInt to PyHash.
2024-02-09 21:02:40 -05:00
Daniel Chiquito
ffc52ef87c Removed unused __bool__ methods
Python does not define `list().__bool__`, `dict().__bool__`, and
`str().__bool__`, and some tests were failing because they were
defined.
I could not find any references to them and deleting them doesn't
seem to break anything.
2024-02-09 20:58:17 -05:00
Bobby Palmer
500b0024f0 updated _collections_abc.py and test_collections.py to CPython 3.11.2 (#5016)
* updated _collections_abc.py and its tests in test_collections.py

* decorated failing tests in test_typing.py
2023-06-18 17:31:03 +03:00
Zhiyan Xiao
a949c35228 Temp: Skip test_collections.TestChainMap.test_union_operators 2023-03-09 23:51:14 +09:00
seungha-kim
223fe14d85 Update to pass test for unhashable collections (#4640) 2023-03-07 23:45:33 +09:00
Jeong Yunwon
7580e11320 adjust failing markers for test_{collections,defaultdict} 2022-07-18 03:54:49 +09:00
CPython developers
9537149572 Update collections/test_{collections,defaultdict} from CPython 3.10.5 2022-07-18 03:54:49 +09:00
Jeong YunWon
8484a91ed3 Fix reflection operator priority for subtypes 2022-04-14 02:38:54 +09:00
Chris Moradi
ab58885734 Check that all abstract methods are implemented prior to instantiation 2021-11-13 17:09:26 -08:00
joohongpark
5ceb2be86e fixed set.{__ror__, __sub__} operator to behave according to type 2021-11-11 16:11:48 +09:00
Chris Moradi
ec247e0d4f Update collections from CPython, fix tests for UserDict/List/String
Clean implementation of changes in PR #3371 based on feedback.

Copies from [CPython tag `v3.9.7` and adds back custom RustPython changes where needed for:
- `Lib/collections/__init__.py`
- `Lib/test/test_collections.py`

Closes: #3371
2021-10-25 21:19:44 -07:00
Jim Fasarakis-Hilliard
e34198fc00 Remove HEAPTYPE flag from builtins. 2021-09-17 03:30:21 +09:00
fermian
b1207ab39e Update test_collections.py 2021-08-14 17:27:43 +09:00
Padraic Fanning
f8d184b5df Pass test_Sequence_mixins 2021-02-25 16:59:28 -05:00
Padraic Fanning
f48bc88d9b Bypass doctests for collections module 2021-02-15 20:08:41 -05:00
Padraic Fanning
83971376c1 Mark failing/erroring tests 2021-02-15 19:37:17 -05:00
Padraic Fanning
e92ef7f3f0 Add test_collections from CPython 3.8.7 2021-02-15 19:22:03 -05:00