This file records the changes that a user of pygridgain can see: new API, changed
behaviour, and fixed defects. Internal work appears here only when it changes what the
client does.
The format follows Keep a Changelog.
- The client ships a PEP 561
py.typedmarker. Cache.vector()andAioCache.vector()takefield_filterandoversample.field_filtermaps field names to values. The engine applies it before it chooses theknearest, so a filtered query no longer comes back short the way a filter applied after the query does. The filter is a conjunction of exact-value tests on fields of the type's text index; the server refuses a field that is not indexed. The client checks the filter before it sends anything and raisesValueErrorfor an empty field name, aNonevalue, or a value that is not astr,int,float,bool,Decimal,UUID,datetime,dateor a(datetime, nanos)tuple. The server compares text forms, so a value must match the Java type of the stored field: adatetimeordatematches ajava.util.Datefield, and ajava.sql.Timestampfield needs the(datetime, nanos)Timestamp form. Both parameters need a cluster with theQUERY_VECTOR_PARAMSfeature. Against an older cluster, a filter or a nonzerooversampleraisesNotSupportedByClusterError; the client does not drop the filter. A query without them sends the same request as before. (GG-51945)
-
The client now needs Python 3.11 or newer, and supports Python 3.11 to 3.15. Python 3.9 has reached its end of life, and 3.10 reaches it in October 2026. Wheels are built for 3.11 to 3.15. The metadata said 3.7 before, so
pipnow refuses to install the client on an older interpreter instead of installing it where it was never tested. (GG-51637) -
SSL connections use TLS 1.3 by default. Before, the default was TLS 1.2 only. Now it is TLS 1.3 or newer, so the client cannot connect to a server that supports only TLS 1.2 unless you pass
ssl_version=ssl.TLSVersion.TLSv1_2.ssl_versionnow takes anssl.TLSVersion, which is the minimum version. Thessl.PROTOCOL_*constants still work and select the same versions as before: passssl_version=ssl.PROTOCOL_TLSv1_2to keep TLS 1.2 only. Other values, such asssl.PROTOCOL_TLS_SERVER, raiseParameterErroron connect.SSL_DEFAULT_VERSIONis nowssl.TLSVersion.TLSv1_3.ssl_ciphersdoes not apply to TLS 1.3. The client still does not check the server host name. This is a public API behaviour change. (GG-51637) -
The installed package no longer contains a top-level
testspackage. The wheel put the client's tests intosite-packages/tests, where they clashed with any other project that ships atestspackage. Onlypygridgainis installed now. The source distribution still contains the tests. -
The client no longer pins exact versions of its dependencies, and no longer needs
contextvars.attrsandtzlocalwere pinned with==, so the client could not be installed together with an application that needed another version. They are now minimum versions (attrs>=23.2.0,tzlocal>=4.3.1).contextvarshas been in the standard library since Python 3.7, so the backport only addedimmutablesfor nothing. -
The package metadata moved from
setup.pytopyproject.toml, and the license now uses the PEP 639 fields instead of the deprecated license classifier.setup.pystill builds the C extension. Building from a source distribution now needs setuptools 77 or newer, whichpipinstalls on its own. -
Cache.vector()andAioCache.vector()now usekas the defaultpage_size(before:1). A vector query returns at mostkrows, so the whole result now arrives in one page. The old default made one server round trip for every result row: ak=10query used 20 socket reads, and now it uses 2. This is a public API behaviour change. Passpage_sizeexplicitly to keep a smaller page. (GG-49932) -
Cache.vector()andAioCache.vector()reject a non-positivekwithValueError. Before, the client sent the request and the server refused it. The server keeps the upper bound, becauseGRIDGAIN_VECTOR_MAX_Kis configurable there. (GG-49932) -
Response parsing shares one ctypes class for each distinct structure shape, instead of building a new class for every element of every row. Vector queries that carry values are 20% to 28% faster, and the client keeps no dead classes. There is no API change. (GG-49932)
-
Vector query responses decode in one pass, directly from the response buffer. The vector cursors no longer unwrap each value a second time. Queries that carry values are a further 18% faster at
k=100; rows are unchanged. Two response shapes change at the edges:- An asyncio legacy
(key, value)row is now atuple. Before, it was alist. The synchronous client always returned atuple, so the two clients now agree. pygridgain.api.sql.vector()returns legacy rows as a list of(key, value)tuples. Before, it returned a dictionary. The wire order stays the same, and the cursor gives the same rows as before. This function is low-level;Cache.vector()is unchanged.
(GG-49932)
- An asyncio legacy
- The empty
pygridgain.stream.aio_clustermodule. It was an accidental copy ofpygridgain.aio_cluster, left empty instead of deleted. Nothing imported it, andpygridgain.aio_clusteritself is not affected. (GG-51636)
- The client no longer emits
DeprecationWarningon Python 3.14 and newer. The ctypes structures of the binary protocol now set_layout_ = 'ms'; without it, Python 3.19 is going to reject them. The layout on the wire does not change. The client also no longer callsasyncio.iscoroutinefunction, which is deprecated in 3.14, and no longer creates SSL contexts with a deprecatedssl.PROTOCOL_*constant. (GG-51637) - A partition-aware client now registers the binary type of a complex key. Picking the
node for a key serializes it and keeps the bytes on the object, and the request was then
written from those bytes, which skipped the type registration that ordinary serialization
does. The cluster stored the entry under a type ID whose fields it had never been told, so
SQL and other clients could not read the key back.
AioClientis partition-aware by default, so this affected asyncio code even when it did not ask for partition awareness. (GG-38200) - A string that contains a NUL character (U+0000) is no longer truncated. The string
codec used a ctypes
c_chararray, which stops at the first NUL. The client cut such a string on read and on write, so'a\x00b'went to the server as'a'and came back as'a'. This applies to every string the client sends or receives, not only to vector queries. (GG-49932) - The installation instructions no longer send users to the GridGain 9 client. The
pygridgainname on PyPI also carries the GridGain 9 client, which is versioned from 9.0 upwards, so a plainpip install pygridgainresolves to that instead of to this client. The README and the documentation now usepip install "pygridgain<9". (GG-51636) - The client now reports its own time zone to the server. The
client.timezonehandshake attribute wasNonefor every zone that uses DST, so the server kept its own default zone and shifted every timestamp of the connection by the difference between the two. The client now sends the IANA zone ID (Europe/Berlin), like the other thin clients, and sends nothing when the machine names no zone. Versions 1.5.0 and 1.6.0 are affected: thetzlocalupdate in 1.5.0 changed whattzname(None)returns. (GG-51543)