Skip to content

Deprecate blosc helper functions#619

Merged
dstansby merged 4 commits intozarr-developers:mainfrom
dstansby:deprecate-blosc
Jan 4, 2025
Merged

Deprecate blosc helper functions#619
dstansby merged 4 commits intozarr-developers:mainfrom
dstansby:deprecate-blosc

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.

@codecov
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 25 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%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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.

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