tiled
tiled copied to clipboard
Updates needed to remove `DeprecationWarning`s
Some housekeeping is needed to respond to multiple DeprecationWarning
s that are raised during testing.
- DeprecationWarning: on_event is deprecated, use lifespan event handlers instead.
- Read more about it in the FastAPI docs for Lifespan Events.
- I will submit a PR for this.
- DeprecationWarning:
product
is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please useprod
instead.- I will submit a PR for this.
- DataFrame._data is deprecated and will be removed in a future version. Use public APIs instead.
- This comes from the
cachey
dependency. It will likely require an upstream PR.
- This comes from the
Submitted PR https://github.com/bluesky/tiled/pull/676 for the FastAPI lifespan events
Submitted PR https://github.com/bluesky/tiled/pull/677 to use numpy.prod()
rather than numpy.product()
.
- DataFrame._data is deprecated and will be removed in a future version. Use public APIs instead.
- This comes from the
cachey
dependency. It will likely require an upstream PR.
It looks like Pandas wants to remove its BlockManager
. The roadmap is not yet clear on what the replacement will look like, and there is not suggested alternate for accessing the blocks. This access has remained stable for several years, and discussions suggest there is no hurry to change that.
So our best option here is probably to just ignore this warning. We could specifically filter it with action: ignore:DataFrame._data is deprecated and will be removed in a future version. Use public APIs instead.:DeprecationWarning
.
References
- https://pandas.pydata.org/pandas-docs/version/0.25.2/development/roadmap.html?highlight=blocks#block-manager-rewrite
- https://github.com/pandas-dev/pandas/issues/17302
Submitted PR https://github.com/bluesky/tiled/pull/682 to ignore the warnings from cachey.nbytes()
.
Maybe we can solve the cachey problem by simply dropping the dependency.