Dmitry Voropaev
ab01d18474
gh-142083: Document the 'w' type code in the array.array docstring ( #158040 )
...
Add a test asserting that the table lists exactly the supported type
codes and that the minimum size it gives for each of them is one the
implementation really meets.
2026-10-01 18:36:43 +00:00
Sergey B Kirpichev
c0bc6fad25
gh-156865: Correctly detect overflows for array's "e", "f" and "Zf" type codes ( #156869 )
2026-09-18 17:16:57 +02:00
PhysicistJohn and Victor Stinner
46c355fabf
gh-154566: Fix array.byteswap() corrupting 'Zd' arrays with more than one element ( #154567 )
...
Fix array.array.byteswap() corrupting data for 'Zd' (complex
double) arrays with more than one element: the 16-byte item loop advanced
the buffer pointer by only 8 bytes per iteration, causing items after the
first to be scrambled.
Co-authored-by: Victor Stinner <vstinner@python.org >
2026-08-13 21:50:50 +02:00
PhysicistJohn
f3be08aa6f
gh-154568: Fix array unpickling of little-endian float16 ( #154569 )
...
Fix array._array_reconstructor() ignoring requested byte order for float16.
The slow-path decoder for IEEE_754_FLOAT16_LE/BE computed the
byte-order flag by comparing mformat_code against IEEE_754_FLOAT_LE
(the 32-bit float constant) instead of IEEE_754_FLOAT16_LE. Since the
float16 mformat codes are never equal to that constant, the comparison
was always false, so the decoder always treated input as big-endian
regardless of what was requested.
Adds a regression test.
2026-08-11 15:41:05 +02:00
sobolevn
ac2e14b4e2
gh-153210: Restore accidental array.ArrayType removal ( #153261 )
2026-07-07 19:09:02 +03:00
sobolevn
12ed8b16fe
gh-153210: Fix array module import crash under a memory pressure ( #153238 )
2026-07-07 11:25:30 +03:00
Sergey B Kirpichev
46b5e3e941
gh-80480: Remove deprecated 'u' array type code ( #149535 )
...
Reuse array.typecodes in tests.
2026-06-01 11:57:55 +00:00
Victor Stinner
5dd5c8b5a6
gh-148675: Remove F and D formats from array and memoryview (GH-149368)
2026-05-04 17:26:30 +02:00
Victor Stinner
6e6f9053e3
gh-148675: Add Zd/Zf formats to array, ctypes, memoryview, struct ( #148676 )
...
* Add Zd/Zf format support to array, memoryview and struct.
* ctypes: Replace F/D/G complex format with Zf/Zd/Zg.
* Modify array, ctypes and struct modules to support format strings
longer than 1 character (such as "Zd").
* Change array.typecodes type from str to tuple.
2026-05-04 16:14:23 +02:00
Sergey B Kirpichev and Victor Stinner
e79fd60339
gh-146238: Support half-floats in the array module ( #146242 )
...
Co-authored-by: Victor Stinner <vstinner@python.org >
2026-03-30 19:48:34 +00:00
Sergey B Kirpichev and Victor Stinner
0e3b3b895c
gh-146151: Add support for complex arrays in the array module ( #146237 )
...
Co-authored-by: Victor Stinner <vstinner@python.org >
2026-03-26 15:45:20 +01:00
AN Long
39f16a93ef
gh-142555: Fix null pointer dereference in array.__setitem__ via re-entrant __index__ (GH-142713)
2026-02-02 15:44:08 +01:00
decb25e8f0
gh-144128: Fix crash in array.fromlist with reentrant __index__ ( #144138 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com >
Co-authored-by: Victor Stinner <vstinner@python.org >
2026-01-26 13:13:49 +01:00
Stan Ulbrych
aa9d0a61d5
gh-140474: Fix memory leak in array.array (GH-140478)
2025-10-23 05:49:27 -04:00
Sam Gross
75f38af781
Revert "gh-128942: make array module thread safe ( #128943 )" ( #130707 )
...
The change regressed performance on scimark benchmarks from the
pyperformance benchmark suite.
This reverts commit 8ba0d7bbc2 .
2025-02-28 16:57:48 -05:00
Tomasz Pytel and Kumar Aditya
8ba0d7bbc2
gh-128942: make array module thread safe ( #128943 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org >
2025-02-27 14:00:14 +00:00
Tomasz Pytel
4dade055f4
gh-128961: Fix exhausted array iterator crash in __setstate__() ( #128962 )
2025-01-18 10:55:29 +01:00
Xie Yanbo and Alex Waygood
b6c80e21c7
Fix typos in comments and docstring ( #122720 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-08-07 07:39:16 +01:00
Serhiy Storchaka
1a0c7b9ba4
gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907)
2024-07-19 08:06:02 +00:00
9d1a353230
gh-114894: add array.array.clear() method ( #114919 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: AN Long <aisk@users.noreply.github.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2024-02-10 07:59:46 -08:00
Inada Naoki
8a4bba8b97
gh-106162: array: suppress warning in test_array ( #106404 )
...
array: suppress warning in test_array
2023-07-05 02:02:49 +09:00
Inada Naoki
a3dd8cce58
gh-106162: fix test_array modifies warning filter ( #106181 )
2023-06-28 16:50:36 +09:00
Hugo van Kemenade
cc879481e2
gh-80480: Emit DeprecationWarning for array's 'u' type code ( #95760 )
2023-06-11 03:17:35 -06:00
Inada Naoki
1237fb6a4b
gh-80480: array: Add 'w' typecode. ( #105242 )
2023-06-04 16:45:00 +00:00
Christian Heimes
e73283a20f
bpo-45668: Fix PGO tests without test extensions (GH-29315)
2021-11-01 11:14:53 +01:00
Serhiy Storchaka
2a8127cafe
bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005)
2021-08-29 14:04:40 +03:00
Erlend Egeberg Aasland
fbff5387c3
bpo-43988: Use check disallow instantiation helper (GH-26392)
2021-05-27 08:43:52 +02:00
Erlend Egeberg Aasland
4f725261c6
bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757)
2021-05-26 16:15:27 +02:00
Erlend Egeberg Aasland
9746cda705
bpo-43916: Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to selected types (GH-25748)
...
Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to the following types:
* _dbm.dbm
* _gdbm.gdbm
* _multibytecodec.MultibyteCodec
* _sre..SRE_Scanner
* _thread._localdummy
* _thread.lock
* _winapi.Overlapped
* array.arrayiterator
* functools.KeyWrapper
* functools._lru_list_elem
* pyexpat.xmlparser
* re.Match
* re.Pattern
* unicodedata.UCD
* zlib.Compress
* zlib.Decompress
2021-04-30 16:04:57 +02:00
Erlend Egeberg Aasland and Victor Stinner
c6ad03fddf
bpo-43908: Make array.array type immutable (GH-25696)
...
Co-authored-by: Victor Stinner <vstinner@python.org >
2021-04-29 08:47:48 +02:00
Zackery Spytz and Anders Lorentsen
afd1265058
bpo-31956: Add start and stop parameters to array.index() (GH-25059)
...
Co-Authored-By: Anders Lorentsen <Phaqui@gmail.com >
2021-04-03 00:28:35 +09:00
Ikko Ashimine
9303b9ecc3
Fix typo in test_array.py (GH-23189)
2020-11-10 18:12:36 +05:30
Pablo Galindo
e51dd9dad6
bpo-29727: Register array.array as a MutableSequence (GH-21338)
2020-07-05 22:43:14 +01:00
Hai Shi
f7ba40b505
bpo-40275: Use new test.support helper submodules in tests (GH-20849)
2020-06-25 12:38:51 +02:00
Victor Stinner
b1e11c31c5
bpo-40443: Remove unused imports in tests (GH-19804)
2020-04-30 02:21:30 +02:00
Victor Stinner
0131aba5ae
bpo-38916: array.array: remove fromstring() and tostring() (GH-17487)
...
array.array: Remove tostring() and fromstring() methods. They were
aliases to tobytes() and frombytes(), deprecated since Python 3.2.
2019-12-09 14:09:14 +01:00
Zackery Spytz and Martin Panter
14514d9084
bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)
...
The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.
Co-Authored-By: Martin Panter <vadmium+py@gmail.com >
2019-05-17 10:13:03 +03:00
sth
aa3ecb8041
bpo-36285: Fix integer overflow in the array module. (GH-12317)
2019-03-20 21:49:39 +02:00
Serhiy Storchaka
6a44f6eef3
bpo-36048: Use __index__() instead of __int__() for implicit conversion if available. (GH-11952)
...
Deprecate using the __int__() method in implicit conversions of Python
numbers to C integers.
2019-02-25 17:57:58 +02:00
Zackery Spytz
d1cbc6f8a0
Include the highest pickle protocol in a couple of tests. (GH-10735)
...
test_reduce_ex() in test_array.py and
test_reversevaluesiterator_pickling() in test_dict.py weren't using
the highest pickle protocol.
2018-11-27 07:40:49 +02:00
Adrian Wielgosik
7c17e2304b
bpo-24700: Add a fast path for comparing array.array of equal type ( #3009 )
2017-08-17 14:46:06 +02:00
orenmn
964281af59
bpo-28298: make array 'Q', 'L' and 'I' accept big intables as elements ( #570 )
2017-03-09 11:35:28 +02:00
Martin Panter
1c748f3830
Issue #27570 : Merge null pointer fixes from 3.5
2016-09-07 23:31:39 +00:00
Martin Panter
be8da9c990
Issue #27570 : Avoid zero-length memcpy() calls with null source pointers
2016-09-07 11:04:41 +00:00
Serhiy Storchaka
e437a10d15
Issue #23277 : Remove unused imports in tests.
2016-04-24 21:41:02 +03:00
Serhiy Storchaka
ab0d198c7a
Issue #26492 : Exhausted iterator of array.array now conforms with the behavior
...
of iterators of other mutable sequences: it lefts exhausted even if iterated
array is extended.
2016-03-30 21:11:16 +03:00
Serhiy Storchaka
aabafe7bc2
Issue #26015 : Added new tests for pickling iterators of mutable sequences.
2016-03-06 14:10:24 +02:00
Stefan Krah
650c1e818d
Issue #14203 : Remove obsolete support for view==NULL in bytesiobuf_getbuffer()
...
and array_buffer_getbuf().
2015-02-03 21:43:23 +01:00
Serhiy Storchaka
65ee4674e2
Issue #22777 : Test pickling with all protocols.
2014-12-15 14:06:02 +02:00
Serhiy Storchaka
bad1257c96
Issue #22777 : Test pickling with all protocols.
2014-12-15 14:03:42 +02:00