tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Updates needed to remove `DeprecationWarning`s

Open padraic-shafer opened this issue 11 months ago • 5 comments

Some housekeeping is needed to respond to multiple DeprecationWarnings that are raised during testing.

  • DeprecationWarning: on_event is deprecated, use lifespan event handlers instead.
  • DeprecationWarning: product is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use prod 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.

padraic-shafer avatar Mar 04 '24 14:03 padraic-shafer

Submitted PR https://github.com/bluesky/tiled/pull/676 for the FastAPI lifespan events

padraic-shafer avatar Mar 04 '24 14:03 padraic-shafer

Submitted PR https://github.com/bluesky/tiled/pull/677 to use numpy.prod() rather than numpy.product().

padraic-shafer avatar Mar 04 '24 14:03 padraic-shafer

  • 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

padraic-shafer avatar Mar 07 '24 14:03 padraic-shafer

Submitted PR https://github.com/bluesky/tiled/pull/682 to ignore the warnings from cachey.nbytes().

padraic-shafer avatar Mar 07 '24 15:03 padraic-shafer

Maybe we can solve the cachey problem by simply dropping the dependency.

danielballan avatar Mar 07 '24 19:03 danielballan