Skip to content

Commit ed80cc7

Browse files
committed
Getting ready for release 2.5.0
1 parent d705802 commit ed80cc7

File tree

6 files changed

+25
-15
lines changed

6 files changed

+25
-15
lines changed

ANNOUNCE.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
Announcing Python-Blosc2 2.4.0
1+
Announcing Python-Blosc2 2.5.0
22
==============================
33

4-
The new minor release 2.4 adds the grok codec plugin (more info in the blog
5-
post: https://www.blosc.org/posts/blosc2-grok-release/ ),
6-
the `blosc2.get_slice_nchunks()` function to get an array of chunk
7-
indexes needed to get a slice of a Blosc2 container and an
8-
imported target with pkg-config to support windows.
9-
C-Blosc2 is updated to the latest stable version.
4+
The new minor release 2.5 adds the `INT_TRUNC` filter for integer
5+
truncation, some optimizations for the zstd codec and the support for slices
6+
in ``blosc2.get_slice_nchunks()`` when using SChunk objects.
7+
Furthermore, the grok library will now be initialized when
8+
loading the plugin (so no need to import the package from Python to do so),
9+
the doc was revised and improved, and C-Blosc2
10+
is updated to the latest stable version.
1011

1112
For more info, you can have a look at the release notes in:
1213

RELEASE_NOTES.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# Release notes
22

3-
## Changes from 2.4.0 to 2.4.1
3+
## Changes from 2.4.0 to 2.5.0
4+
5+
* Updated to latest C-Blosc2 2.13.0.
6+
7+
* Added the filter `INT_TRUNC` for integer truncation.
8+
9+
* Added some optimizations for zstd.
10+
11+
* Now the grok library is initialized when loading the
12+
plugin from C-Blosc2.
13+
14+
* Improved doc.
415

516
* Support for slices in ``blosc2.get_slice_nchunks()`` when using SChunk
617
objects.
718

8-
* Added a new `Schunk.__len__()` method.
9-
1019
## Changes from 2.3.2 to 2.4.0
1120

1221
* Updated to latest C-Blosc2 2.12.0.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.1.dev0
1+
2.5.0

blosc2/blosc2_ext.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,9 @@ cdef class SChunk:
940940
return self.schunk.chunksize // self.schunk.typesize
941941

942942
def __len__(self):
943+
"""
944+
Return the number of items in the SChunk.
945+
"""
943946
return self.schunk.nbytes // self.schunk.typesize
944947

945948
@property

blosc2/schunk.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,6 @@ def __init__(self, chunksize=None, data=None, **kwargs):
239239
self._cparams = super(SChunk, self).get_cparams()
240240
self._dparams = super(SChunk, self).get_dparams()
241241

242-
def __len__(self):
243-
"""Return the number of items in the SChunk."""
244-
return self.nbytes // self.typesize
245-
246242
@property
247243
def cparams(self):
248244
"""

tests/test_schunk_constructor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_schunk_numpy(contiguous, urlpath, cparams, dparams, chunksize):
3232
bytes_obj = data.tobytes()
3333
schunk = blosc2.SChunk(chunksize=chunksize, data=data, **storage)
3434
# Test properties
35+
assert len(schunk) == num_elem
3536
assert chunksize == schunk.chunksize
3637
assert chunksize / 4 == schunk.chunkshape
3738
assert cparams.get("blocksize", 0) == schunk.blocksize

0 commit comments

Comments
 (0)