(BSR) fix(recommendation): Update reco-api-deps (major)#388
Open
renovate[bot] wants to merge 1 commit into
Open
(BSR) fix(recommendation): Update reco-api-deps (major)#388renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
660ff01 to
1760a5b
Compare
1760a5b to
d04f593
Compare
172c090 to
96e38e5
Compare
1bbbce9 to
344fe10
Compare
b5e81a4 to
b27fd19
Compare
e7362e1 to
f9a33b3
Compare
485aa25 to
f1bb240
Compare
a15d826 to
c08d580
Compare
9c76324 to
11f35cf
Compare
9e6ebff to
142d49c
Compare
142d49c to
9dd5047
Compare
1c8f8dd to
e762e64
Compare
6d17c47 to
5580db7
Compare
222cb47 to
b3bb321
Compare
aefeb78 to
fea3bdc
Compare
Contributor
Author
|
fea3bdc to
495e51e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~=23.0→~=26.0~=1.26→~=2.5~=2.2→~=3.0~=2.10→~=7.1~=6.0→~=8.1~=2023.3→~=2026.2Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
benoitc/gunicorn (gunicorn)
v26.0.0Compare Source
Breaking Changes
eventletworker class has been dropped. Migrate togevent,gthread, ortornado.New Features
Security
authority-formrequest-target outsideCONNECTasterisk-formrequest-target outsideOPTIONSrelative-referencerequest-targetsContent-Lengthlist form (RFC 9112 section 6.3)finish_bodybyte cap_body_receiveralive across the keepalive smuggling gate so pipelined requests cannot re-enter a closed bodyproxy_allow_ipsand tighten v1/v2 parsing in the ASGI callback parser.Bug Fixes
Content-Lengthon HEAD and 304 responses (#3621)_handle_stream_endedto set_body_completein the async HTTP/2 handler so request bodies finalize correctly on stream endInvalidChunkExtensionmapping and fast-parser support in ASGI tests (#3565)Transfer-Encoding: chunkedto 100-Continue interim responses.textkey isNoneearly_hintscallback to matchprocess_headers; pass only the header name toInvalidHeader(#3588).accept())Transfer-Encodingheader for BlackSheep streamingRefactoring
BodyReceiver._closedinto separate transport and body-wait flags for clearer keepalive/EOF semantics.Changes
gunicorn_h1c >= 0.6.5. Drop the lastpython_onlytest markers; the C extension is now used wherever available (CPython only; PyPy continues to use the Python parser).h2anduvloopto thetestingextra; removeeventlet.docker/setup-qemu-action,docker/setup-buildx-action,docker/login-action,docker/build-push-action, anddocker/metadata-actionto current major versions.Full changelog: benoitc/gunicorn@25.3.0...26.0.0
v25.3.0: Gunicorn 25.3.0Compare Source
Bug Fixes
HTTP/2 ASGI Body Duplication: Fix request body being received twice in HTTP/2
ASGI requests, causing JSON parsing errors with "Extra data" messages
(#3558)
ASGI Chunked EOF Handling: Add
finish()method to callback parser to handlechunked encoding edge case where connection closes before final CRLF after zero-chunk
HTTP/2 Documentation: Fix
http_protocolsexamples to use comma-separated stringinstead of list syntax (#3561)
Chunked Encoding: Reject chunk extensions containing bare CR bytes per RFC 9112
(#3556)
Request Line Limit: Fix
--limit-request-line 0to mean unlimited as documented,instead of using default maximum. Works with both Python and fast C parser.
(#3563)
Security
Changes
Fast HTTP Parser: Update to gunicorn_h1c >= 0.6.3 for
asgi_headerspropertyand
InvalidChunkExtensionvalidation for bare CR rejectionASGI PROXY Protocol: Add PROXY protocol v1/v2 support to callback parser
Docker Images: Update to Python 3.14
v25.2.0: Gunicorn 25.2.0Compare Source
New Features
http_parser='fast'automode if version not metBug Fixes
uWSGI Async Workers: Fix
InvalidUWSGIHeader: incomplete headererror when using gevent or gthread workers with uwsgi protocol behind nginx. (#3552, PR #3554)FileWrapper Iterator Protocol: Add
__iter__and__next__methods toFileWrapperfor full PEP 3333 compliance. (#3396, PR #3550)Performance
bytearraybuffer operationsbytearray.find()directly instead of converting to bytes firstlist.pop(0)(O(1) vs O(n))v25.1.0: Gunicorn 25.1.0Compare Source
New Features
Control Interface (gunicornc): Add interactive control interface for managing
running Gunicorn instances, similar to birdc for BIRD routing daemon
(PR #3505)
show all/workers/dirty/config/stats/listenersworker add/remove/kill,dirty add/removereload,reopen,shutdown--control-socket,--control-socket-mode,--no-control-socketgunicorncfor connecting to control socketDirty Stash: Add global shared state between workers via
dirty.stash(PR #3503)
Dirty Binary Protocol: Implement efficient binary protocol for dirty arbiter IPC
using TLV (Type-Length-Value) encoding
(PR #3500)
Dirty TTIN/TTOU Signals: Add dynamic worker scaling for dirty arbiters
(PR #3504)
Changes
Documentation
v25.0.3Compare Source
What's Changed
Bug Fixes
Documentation
Full Changelog: benoitc/gunicorn@25.0.2...25.0.3
v25.0.2: Release 25.0.2Compare Source
Bug Fixes
Fix ASGI concurrent request failures through nginx proxy by normalizing
sockaddr tuples to handle both 2-tuple (IPv4) and 4-tuple (IPv6) formats
(PR #3485)
Fix graceful disconnect handling for ASGI worker to properly handle
client disconnects without raising exceptions
(PR #3485)
Fix lazy import of dirty module for gevent compatibility - prevents
import errors when concurrent.futures is imported before gevent monkey-patching
(PR #3483)
Changes
Refactor: Extract
_normalize_sockaddrutility function for consistentsocket address handling across workers
Add license headers to all Python source files
Update copyright year to 2026 in LICENSE and NOTICE files
v25.0.1Compare Source
Bug Fixes
HTTP/1.1 responses without Content-Length header. Without chunked encoding,
clients wait for connection close to determine end-of-response.
Changes
uvloop for async task execution
Testing
WebSocket, streaming, lifespan, framework integration (Starlette, FastAPI),
HTTP/2, and concurrency scenarios
v25.0.0: Gunicorn 25.0.0Compare Source
New Features
Dirty Arbiters: Separate process pool for executing long-running, blocking
operations (AI model loading, heavy computation) without blocking HTTP workers
(PR #3460)
--dirty-app,--dirty-workers,--dirty-timeout,--dirty-threads,--dirty-graceful-timeouton_dirty_starting,dirty_post_fork,dirty_worker_init,dirty_worker_exitPer-App Worker Allocation for Dirty Arbiters: Control how many dirty workers
load each app for memory optimization with heavy models
(PR #3473)
workersclass attribute on DirtyApp (e.g.,workers = 2)module:class:N(e.g.,myapp:HeavyModel:2)DirtyNoWorkersAvailableErrorfor graceful error handlingworkers=2: 20GB (75% savings)HTTP/2 Support (Beta): Native HTTP/2 (RFC 7540) support for improved performance
with modern clients (PR #3468)
--http-protocols,--http2-max-concurrent-streams,--http2-initial-window-size,--http2-max-frame-size,--http2-max-header-list-sizepip install gunicorn[http2]examples/http2_gevent/with Docker and testsHTTP 103 Early Hints: Support for RFC 8297 Early Hints to enable browsers to
preload resources before the final response
(PR #3468)
environ['wsgi.early_hints'](headers)callbackhttp.response.informationalmessage typeuWSGI Protocol for ASGI Worker: The ASGI worker now supports receiving requests
via the uWSGI binary protocol from nginx
(PR #3467)
Bug Fixes
Fix HTTP/2 ALPN negotiation for gevent and eventlet workers when
do_handshake_on_connectis False (the default). The TLS handshake is nowexplicitly performed before checking
selected_alpn_protocol().Fix setproctitle initialization with systemd socket activation
(#3465)
Fix
Expect: 100-continuehandling: ignore the header for HTTP/1.0 requestssince 100-continue is only valid for HTTP/1.1+
(PR #3463)
Fix missing
_expected_100_continueattribute in UWSGIRequestDisable setproctitle on macOS to prevent segfaults during process title updates
Publish full exception traceback when the application fails to load
(#3462)
Fix ASGI: quick shutdown on SIGINT/SIGQUIT, graceful on SIGTERM
Deprecations
eventletworker is deprecated and will be removed inGunicorn 26.0. Eventlet itself is no longer actively maintained.
Please migrate to
gevent,gthread, or another supported worker type.Changes
(PR #3471)
v24.1.1Compare Source
Bug Fixes
forwarded_allow_ipsandproxy_allow_ipsto remain as strings for backwardcompatibility with external tools like uvicorn. Network validation now uses strict
mode to detect invalid CIDR notation (e.g.,
192.168.1.1/24where host bits are set)(#3458,
PR #3459)
Full Changelog: benoitc/gunicorn@24.1.0...24.1.1
v24.1.0: Gunicorn 24.1.0Compare Source
New Features
Official Docker Image: Gunicorn now publishes official Docker images to GitHub Container Registry (PR #3454)
ghcr.io/benoitc/gunicornPROXY Protocol v2 Support: Extended PROXY protocol implementation to support the binary v2 format in addition to the existing text-based v1 format (PR #3451)
--proxy-protocolmodes:off,v1,v2,autoautomode (default when enabled) detects v1 or v2 automaticallyCIDR Network Support:
--forwarded-allow-ipsand--proxy-allow-fromnow accept CIDR notation (e.g.,192.168.0.0/16) for specifying trusted networks (PR #3449)Socket Backlog Metric: New
gunicorn.socket.backloggauge metric reports the current socket backlog size on Linux systems (PR #3450)InotifyReloader Enhancement: The inotify-based reloader now watches newly imported modules, not just those loaded at startup (PR #3447)
Bug Fixes
finish_body()for faster timeout detection on slow or abandoned connections (PR #3453)SSLWantReadErrorinfinish_body()to prevent worker hangs during SSL renegotiation (PR #3448)unreader.unread()to prepend data to buffer instead of appending (PR #3442)RecursionErrorwhen pickling Config objects (PR #3441)raise fromin glogging.py (PR #3440)Installation
Or use the official Docker image:
v24.0.0Compare Source
New Features
ASGI Worker (Beta): Native asyncio-based ASGI support for running async Python frameworks like FastAPI, Starlette, and Quart without external dependencies
uWSGI Binary Protocol: Support for receiving requests from nginx via
uwsgi_passdirectiveDocumentation Migration: Migrated to MkDocs with Material theme
Security
Install
numpy/numpy (numpy)
v2.5.0: (June 21, 2026)Compare Source
NumPy 2.5.0 Release Notes
Numpy 2.5.0 is a transitional release. It drops support for Python 3.11,
marking the end of distutils, and expires a large number of deprecations made
in the 2.0.x release. It also improves free threading and brings sorting into
compliance with the array-api standard with the addition of descending sorts.
There is also a fair amount of preparation for Python 3.15, which will be
supported starting with the first rc.
This release supports Python versions 3.12-3.14.
Highlights
See New Features below for other additions.
Deprecations
numpy.char.chararrayis deprecated. Use anndarraywith a string or bytes dtype instead.(gh-30605)
numpy.takenow correctly checks if the result can be cast to the providedout=outunder the same-kind rule. ADeprecationWarningis given nowwhen this check fails. Previously,
takeincorrectly checked ifoutcould be cast to the result (the wrong direction). This deprecation also
affects
compressand possibly other functions. (Future versions of NumPymay tighten the casting check further.)
(gh-30615)
The
numpy.char.[as]arrayfunctions are deprecated. Use annumpy.[as]arraywith a string or bytes dtype instead.(gh-30802)
Setting the dtype attribute is deprecated because mutating an array is unsafe
if an array is shared, especially by multiple threads. As an alternative,
you can create a view with a new dtype via
array.view(dtype=new_dtype).(gh-29244)
Setting the
shapeattribute is deprecated because mutating an array isunsafe if an array is shared, especially by multiple threads. As an
alternative, you can create a new view via
np.reshapeornp.ndarray.reshape. For example:x = np.arange(15); x = np.reshape(x, (3, 5)).To ensure no copy is made from the data, one can use
np.reshape(..., copy=False).While setting the shape on an array is discouraged, for cases where it is
difficult to work around, e.g., in
__array_finalize__, it is possiblewith the private method
np.ndarray._set_shape.(gh-29536)
Using the
genericunit innumpy.timedelta64is deprecated since thiscan lead to unexpected behavior such as non-transitive comparison, see
gh-28287 for details. As
an alternative, specify an explicit unit such as
's'(seconds) or'D'(days) when constructing
numpy.timedelta64. Due to this change, operationsthat implicitly rely on the
genericunit are also deprecated. Forexample:
1is implicitly converted to generic timedelta64(gh-29619)
Resizing a Numpy array in place is deprecated since mutating an array is
unsafe if an array is shared, especially by multiple threads. As an
alternative, you can create a resized array via
np.resize.(gh-30181)
numpy.fixis deprecated, usenumpy.truncinstead. It is faster andfollows the Array API standard. Both functions provide identical
functionality: rounding array elements towards zero.
(gh-30644)
numpy.ma.round_is deprecated.numpy.ma.roundcan be used as areplacement.
(gh-30738)
numpy.typenameis deprecated because the names returned by it wereoutdated and inconsistent.
numpy.dtype.namecan be used as areplacement.
(gh-30774)
Inputs other than integers are deprecated for
numpy.triu_indicesandnumpy.tril_indices. Non-integer values for theM,kandNparameters of
numpy.triare deprecated. Non-integer values for thekparameter of both
numpy.tril_indices_fromandnumpy.triu_indices_fromare deprecated.
(gh-30869)
Deprecations in custom
dtypeproperty and__array_finalize__.Previously
arr.view(dtype=new_dtype)calledarr.dtype = new_dtypealso for subclasses, i.e., the attribute setting. That path is now
deprecated and refined, meaning that even subclasses that do not see this
DeprecationWarningmay wish to update their code.A subclass that does any
dtypespecific logic (i.e. verifying the dtypein
__array_finalize__or has adtypeproperty) should now:_set_dtype = Nonein which casearr.view(dtype=new_dtype)will call
__array_finalize__with the new dtype, ensuring thatany validation
__array_finalize__will run is done._set_dtypeas a function (callingndarray._set_dtype()to avoidDeprecationWarnings.(Future versions might migrate towards the
_set_dtype = Nonepath.)Ideally, follow NumPy's deprecation to prevent
dtypemutation by users.The use of
ndarray._set_dtype()may be necessary for some subclassfinalization patterns, but should otherwise be avoided.
(gh-31293)
Expired deprecations
numpy.distutilshas been removed(gh-30340)
Passing
Noneas dtype tonp.finfowill now raise aTypeError(deprecated since 1.25)
(gh-30460)
numpy.crossno longer supports 2-dimensional vectors.(Deprecated since 2.0)
(gh-30461)
numpy._core.numerictypes.maximum_sctypehas been removed.(deprecated since 2.0)
(gh-30462)
numpy.row_stackhas been removed in favor ofnumpy.vstack.(deprecated since 2.0)
(gh-30463)
get_array_wraphas been removed.(deprecated since 2.0)
(gh-30463)
recfromtxtandrecfromcsvhave been removed fromnumpy.lib._npyioin favor of
numpy.genfromtxt.(deprecated since 2.0)
(gh-30467)
The
numpy.chararrayre-export ofnumpy.char.chararrayhas been removed.(deprecated since 2.0)
(gh-30604)
bincountnow raises aTypeErrorfor non-integer inputs.(deprecated since 2.1)
(gh-30610)
The
numpy.lib.mathalias for the standard librarymathmodule hasbeen removed.
(deprecated since 1.25)
(gh-30612)
Data type alias
'a'was removed in favor of'S'.(deprecated since 2.0)
(gh-30613)
_add_newdoc_ufunc(ufunc, newdoc)has been removed in favor ofufunc.__doc__ = newdoc.(deprecated since 2.2)
(gh-30614)
Compatibility notes
linalg.eigandlinalg.eigvalsnow always return complex arraysPreviously, the return values depended on whether the eigenvalues happen to lie
on the real line (which, for a general, non-symmetric matrix, is not
guaranteed).
This change makes consistent what was a value-dependent result. To retain the
previous behavior, do:
If your matrix is symmetrix/hermitian, use
eighandeigvalshinstead ofeigandeigvals. These are guaranteed to return real values. A commoncase is covariance matrices, which are symmetric and positive definite by
construction.
(gh-30411)
MSVC support
NumPy now requires minimum MSVC 19.35 toolchain version on Windows platforms.
This corresponds to Visual Studio 2022 version 17.5 Preview 2 or newer.
(gh-30489)
Cython support
NumPy's Cython headers (accessed via
cimport numpy) now require Cython 3.0or newer to build. If you try to compile a project that depends on NumPy's
Cython headers using Cython 0.29 or older, you will see a message like this:
versions.
See init.cython-30.pxd for the real Cython header
Note that the invalid integer is not a bug in NumPy - we are intentionally
generating this error to avoid triggering a more obscure error later in the
build when an older Cython version tries to use a Cython feature that was not
available in the old Cython version.
(gh-30770)
numpy.whereno longer truncates Python integersPreviously, if the
xoryargument ofnumpy.wherewas a Pythoninteger that was out of range of the output type, it would be silently
truncated. Now, an
OverflowErrorwill be raised instead.This change also applies to the underlying C API function
PyArray_Where.(gh-30803)
Default memory allocator change
NumPy now uses
PyMem_RawMallocandPyMem_RawFreeas the default memoryallocator, instead of system's
mallocandfreedirectly.(gh-30846)
from_dlpackraisesBufferErrorinstead ofRuntimeErrornp.from_dlpacknow raisesBufferErrorinstead ofRuntimeErrorwhenthe incoming DLPack tensor has an unsupported device, dtype, or exceeds the
maximum number of dimensions. This aligns with the DLPack and Array API
specifications, which recommend
BufferErrorfor data that cannot beimported.
(gh-30937)
Corrections to the BTPE binomial sampler
Two independent errors in the Stirling series of the acceptance/rejection step
of the BTPE algorithm used by
numpy.random.Generator.binomialhave beencorrected:
error was inherited from section 5.3 of the original 1988 paper by
Kachitvichyanukul & Schmeiser, which incorrectly adds all four terms.
13680instead of13860) that was introduced in the initial implementation.As a result,
Generator.binomialandGenerator.multinomial, which usesbinomial internally, may now return different samples for the same seed.
The legacy
numpy.random.RandomState.binomialandnumpy.random.RandomState.multinomialare not affected: they preserve theoriginal (incorrect) behavior, so existing streams remain reproducible.
(gh-31238)
datetime64/timedelta64arithmetic raises on overflowAddition, subtraction, and integer multiplication of
datetime64andtimedelta64values now raiseOverflowErrorwhen the result wouldoverflow
int64or land on theNaTsentinel value. Previously theseoperations silently wrapped, often producing a value that was indistinguishable
from
NaT. This matches the overflow checking already performed byunit-conversion casts.
(gh-31378)
C API changes
It is now possible to register
"real"and"imag"ArrayMethods viaPyUFunc_AddLoopsFromSpecs. These will be used forimagandrealand should normally set
*view_offsetin theirresolve_descriptorsfunction to allow the array attributes to return views.
(gh-30984)
New
PyDataType_TYPE,PyDataType_KIND,PyDataType_BYTEORDERandPyDataType_TYPEOBJaccessor macros to the C API. Together with the otheraccessor macros added for the NumPy 2.0 transition, these allow accessing the
fields of
PyArray_Descrstructs without any direct field accesses.(gh-30994)
NumPy now supports the stable ABI for free-threaded Python as described in
803{.interpreted-text role="pep"}.(gh-31091)
PyArray_DescrFromScalarnow returns the full dtype descriptor for scalarsof user-defined parametric data types, including any dtype parameters.
Parameters were previously silently discarded, which could cause incorrect
results in operations like
astypeon scalar objects. Internally, thefunction now delegates to
discover_descr_from_pyobject, which handlesparametric dtypes correctly.
(gh-31067)
New Features
It is now possible to register user-dtypes for dlpack export and import
via
numpy.dtypes.register_dlpack_dtype. This functionality is meant tobe used with care by user-dtype authors.
(gh-31256)
Pixi package definitions
Pixi package definitions have been added for different kinds
of from-source builds of NumPy. These can be used in
downstream Pixi workspaces via the
pixi-buildfeature.Definitions for both
defaultand AddressSanitizer-instrumented(
asan) builds are available in the source code under thepixi-packages/directory.linux-64andosx-arm64platforms are supported.(gh-30381)
numpy.ndarraynow supports structural pattern matchingnumpy.ndarrayand its subclasses now have thePy_TPFLAGS_SEQUENCEflagset, enabling structural pattern matching (PEP 634) with
match/casestatements. This also enables Cython to optimize integer indexing operations.
See
`arrays.ndarray.pattern-matching{.interpreted-text role="ref"}` for details.(gh-30653)
Added N-D evaluation functions to the polynomial package
New functions
polyvalnd,chebvalnd,legvalnd,hermvalnd,hermevalnd, andlagvalndhave been added to evaluate polynomialsin arbitrary dimensions, analogous to the existing 2D and 3D evaluators.
(gh-30857)
New "descending" keyword argument for
numpy.sortandnumpy.argsortUsers can now pass the
descending=Truekeyword argument tonumpy.sortand
numpy.argsortto sort and argsort arrays in descending order. NaNvalues, if present, are sorted to the end of the array in both ascending and
descending sorts. This feature is available for all built-in dtypes except
void,object, andgeneric. Note that SIMD optimizations for sortingare currently not available for descending sorts, so performance may be slower.
(gh-31345)
Improvements
For
f2py, the behaviour ofintent(inplace)has improved. Previously,if an input array did not have the right dtype or order, the input array was
modified in-place, changing its dtype and replacing its data by a corrected
copy. Now, instead, the corrected copy is kept a separate array, which, after
being passed and presumably modified by the fortran routine, is copied back to
the input routine. The above means one no longer has the risk that
pre-existing views or slices of the input array start pointing to unallocated
memory (at the price of increased overhead for the write-back copy at the end
of the call).
A potential problem would be that one might get very different results if one,
e.g., previously passed in an integer array where a double array was expected:
the writeback to integer would likely give wrong results. To avoid such
situations,
intent(inplace)will now only allow arrays that have equivalenttype to that used in the fortran routine, i.e.,
dtype.kindis the same. Forinstance, a routine expecting double would be able to receive float, but would
raise on integer input.
(gh-29929)
f2pymodules now show allocatable arrays indir()Allocatable module variables wrapped by
f2pynow appear indir()output, matching their accessibility by name.
(gh-30965)
StringDTypecomparisons now correctly handle embedded NULL bytes.(gh-31662)
Performance improvements and changes
Improved performance of
numpy.searchsortedThe C++ binary search implementation used by
numpy.searchsortednow has amuch better performance when searching for multiple keys. The new
implementation batches binary search steps across all keys to leverage cache
locality and out-of-order execution. Benchmarks show the new implementation can
be up to 20 times faster for hundreds of thousands keys while single-key
performance remains comparable to previous versions.
(gh-30517)
Improved scaling of ufuncs on free-threading
NumPy's ufuncs now scale significantly better on free-threading builds
of CPython due to the following optimizations:
a lock-free concurrent hash map, allowing multiple threads to call ufuncs
without contention.
handlers, have been made immortal. This effectively reduces reference
counting contention across threads.
PyMem_RawMallocandPyMem_RawFreefor memory allocation. On Python 3.15 and newer, thisleverages
mimallocand significantly reduces memory allocation overheadin multi-threaded workloads.
(gh-30846)
Faster reductions on small/medium contiguous arrays
numpy.sum,numpy.prod,numpy.any,numpy.all, and otherreductions with an identity value now use a fast path when the input is a
contiguous, aligned, non-object array and the reduction covers all axes
(
axis=None) with no special arguments. Typical speedup is ~1.3x on smallarrays;
numpy.any/numpy.allon contiguous boolean arrays can seespeedup up to 1.9x.
(gh-31274)
Typing improvements and changes
numpy.linalgtyping improvements and preliminary shape-typing supportInput and output dtypes for
numpy.linalgfunctions are now more precise.Several of these functions also gain preliminary shape-typing support while
remaining backward compatible. For example, the return type of
numpy.linalg.matmulnow depends on the shape-type of its inputs, or fallback to the backward-compatible return type if the shape-types are unknown at
type-checking time. Because of limitations in Python's type system and current
type-checkers, shape-typing cannot cover every situation and is often only
implemented for the most common lower-rank cases.
(gh-30480)
numpy.matyping annotationsThe
numpy.mamodule is now fully covered by typing annotations. Thisincludes annotations for masked arrays, masks, and various functions and
methods. With this, NumPy has achieved 100% typing coverage across all its
submodules.
(gh-30566)
Shape-typing support for many functions and methods
Many functions and methods now have shape-aware return type annotations.
Type-checkers can now infer the number of dimensions of the returned array
through common operations. For example,
np.linspace(0, 1)is now typed as a1-d
float64array, andnp.sum(x, keepdims=True)has the same number ofdimensions as
x.This covers
numpy.linalgfunctions, array creation functions (likeasarray,from{buffer,string,file,iter,regex}), range functions(
linspace,logspace,geomspace), aggregation functions and methods(
sum,mean,std,var,min,max,all,any,etc.), sorting (
sort,argsort,argpartition), cumulative operations(
cumsum,cumprod, etc.), set operations (unique_values,intersect1d,union1d, etc.), and various other functions includingnonzero,transpose,diagonal,atleast_{1,2,3}d,clip,round,inner,bincount, andfft.fftfreq. Several of these alsogained more precise return dtype annotations as part of this work.
Shape-typing is still a work-in-progress, so coverage is not yet complete.
Because of limitations in Python's type system and current type-checkers,
shape-typing is often only implemented for the most common lower-rank cases.
(gh-31172)
numpy.ffttyping improvements and preliminary shape-typing supportThe
numpy.fftfunctions now support non-float64/complex128dtypesand gain preliminary shape-typing support. For example, the return type of
numpy.fft.fftnow depends on the shape-type of its inputs, falling back tothe backward-compatible return type when the shape-types are unknown at
type-checking time.
(gh-31226)
Changes
Structured array copies now use
memcpyfor contiguous dtypesCopying structured arrays with identical dtypes now uses
memcpyinstead offield-by-field transfer when the dtype has a contiguous layout (no gaps between
fields). A new
NPY_NOT_TRIVIALLY_COPYABLEdtype flag is set on structureddtypes that have gaps in their memory layout, such as those created with
explicit
offsetsor via multi-field indexing. Only these dtypes continue touse the slower field-by-field copy.
This means that padding bytes in contiguous structured dtypes (e.g. those
created without explicit
offsets) may now be copied as part of thememcpy, whereas previously they were left untouched. Code that relies onpadding bytes being preserved during structured array copies may be affected.
(gh-29270)
numpy.ctypeslib.as_ctypesnow does not support scalar typesThe function
numpy.ctypeslib.as_ctypeshas been updated to only acceptnumpy.ndarray. Passing a scalar type (e.g.,numpy.int32(5)) will nowraise a
TypeError. This change was made to avoid the issuegh-30354 and to enforce the
readonly nature of scalar types in NumPy. The previous behavior relied on
undocumented implicit temporary arrays and was not well-defined. Users who
need to convert scalar types to ctypes should first convert them to an array
(e.g.,
numpy.asarray) before passing them tonumpy.ctypeslib.as_ctypes.(gh-30538)
__array_interface__changes on scalarsScalars now export the
__array_interface__directly rather than includingan array copy as a
__refentry. This means that scalars are now exported asread-only while they previously exported as writeable. The path via
__refwas undocumented and not consistently used even within NumPy itself.
(gh-30538)
meshgridnow always returns a tuplenp.meshgridpreviously used to return a list whensparsewas true andcopywas false. Now, it always returns a tuple regardless of thearguments.
(gh-30707)
numpy.triu_indicesnow acceptsunsigned integersnumpy.triu_indicespreviously used to error in some cases whenunsigned integerswere given as arguments. Now, it accepts them in all cases.
(gh-30869)
objectdtype in.realand.imagand related functionsThe array attributes
.realand.imagnow behave differently for objectarrays and return
getattr(element, "real", element)orgetattr(element, "imag", 0)elementwise. Additionally, the return for both is now read-only to avoid possible
in-place changes having no effect.
This change also affects
np.isreal()which usesarr.imag.Previously,
.imagalways returned0while.realreturned theoriginal array unmodified. The new behavior now returnes the correct values
for complex Python objects but may also lead to surprises for example if
element.real()is a method and not a property.(gh-30984)
NumPy's internal memory allocations now use
PyMem_RawMallocNumPy's internal memory allocations now use
PyMem_RawMallocinstead ofmallocand can be tracked bytracemalloc.(gh-31503)
v2.4.6Compare Source
v2.4.5: (May 15, 2026)Compare Source
NumPy 2.4.5 Release Notes
NumPy 2.4.5 is a patch release that fixes bugs discovered after the 2.4.4
release, has some typing improvements, and maintains infrastructure.
This release supports Python versions 3.11-3.14
Contributors
A total of 17 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.
Pull requests merged
A total of 28 pull requests were merged for this release.
np.shapeassignability issue for python lists (#31171)pack_inner...tile: accept numpy scalars and arrays as second argument...ix_fix for boolean and non-1d input (#31218)_NestedSequencetype parameter default to work around...DTypeLikeruntime type-checker support (#31425)v2.4.4: 2.4.4 (Mar 29, 2026)Compare Source
NumPy 2.4.4 Release Notes
The NumPy 2.4.4 is a patch release that fixes bugs discovered after the 2.4.3
release. It should finally close issue #30816, the OpenBLAS threading problem
on ARM.
This release supports Python versions 3.11-3.14
Contributors
A total of 8 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.
Pull requests merged
A total of 7 pull requests were merged for this release.
sprintfwithsnprintf...v2.4.3Compare Source
v2.4.2Compare Source
[
v2.4.1](https://redirect.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.