Skip to content

numcodecs.gzip is not configured in the config #3458

@K-Meech

Description

@K-Meech

Zarr version

latest main

Numcodecs version

0.16.2

Python Version

3.13

Operating System

Windows

Installation

pip install into virtual env

Description

numcodecs.zarr3 codecs were recently moved to zarr.codecs.numcodecs._codecs. Most are fetched correctly with get_codec_class, but gzip results in a user warning (see code below).

I have a fix for this locally, and will submit a PR shortly.

Steps to reproduce

# /// script
# requires-python = ">=3.11"
# dependencies = [
#   "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",
# ]
# ///
#
# This script automatically imports the development branch of zarr to check for issues

from zarr.registry import get_codec_class

print(get_codec_class("numcodecs.zstd"))
print(get_codec_class("numcodecs.gzip"))

Output:

<class 'zarr.codecs.numcodecs._codecs.Zstd'>

c:\Users\kimme\Documents\Repos\forked\zarr-python\data\tmp\test.py:11: ZarrUserWarning: Codec 'numcodecs.gzip' not configured in config. Selecting any implementation.
  print(get_codec_class("numcodecs.gzip"))
<class 'numcodecs.zarr3.GZip'>

Gzip throws a UserWarning and returns the old numcodecs.zarr3 implementation.

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions