Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate blosc helper functions #619

Merged
merged 4 commits into from
Jan 4, 2025

Conversation

dstansby
Copy link
Contributor

As a pre-requisite for depending on pre-built blosc wheels (see #571, #262, #464), this deprecates several functions. The idea would be to have one deprecation cycle (say numdocecs 0.14), then remove the public functions in the next release (say numcodecs 0.15).

This uses the deprecated library to handle the deprecations, which does add a nother dependency, but it is quite lightweight.

"""Initialize the Blosc library environment."""
blosc_init()

init = deprecated(_init)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess decorators don't work in .pyx files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They probably do, but the idea here was to leave a non-deprecated version of the functions (starting with _) that we can call internally, and a deprecated version which has the same name as previous.

@dstansby dstansby force-pushed the deprecate-blosc branch 2 times, most recently from e1179a3 to b7fbea6 Compare December 3, 2024 08:58
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.92%. Comparing base (c5cf0c5) to head (c2d10a5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #619   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          62       62           
  Lines        2754     2754           
=======================================
  Hits         2752     2752           
  Misses          2        2           
Files with missing lines Coverage Δ
numcodecs/__init__.py 100.00% <100.00%> (ø)
numcodecs/tests/test_blosc.py 100.00% <100.00%> (ø)

@dstansby dstansby marked this pull request as ready for review December 3, 2024 09:24
@dstansby dstansby requested a review from normanrz December 28, 2024 21:08
@dstansby
Copy link
Contributor Author

Last call for comments - if no-one objects, I'll merge this in a couple of weeks.

@dstansby dstansby force-pushed the deprecate-blosc branch 2 times, most recently from 8b3cc16 to 5f8d676 Compare January 4, 2025 15:49
@dstansby dstansby merged commit 3a060f4 into zarr-developers:main Jan 4, 2025
26 checks passed
@dstansby dstansby deleted the deprecate-blosc branch January 4, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants