Skip to content

Commit

Permalink
[Python] Deprecate h5py support
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Mar 25, 2023
1 parent 7277efc commit 5e1a630
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interfaces/cython/cantera/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

_h5py = None
def _import_h5py():
"""
.. deprecated:: 3.0
Function to be removed after Cantera 3.0, as ``h5py`` support will be removed.
"""
# defer h5py import
global _h5py
if _h5py is not None:
Expand All @@ -19,6 +24,7 @@ def _import_h5py():
except importlib.metadata.PackageNotFoundError:
raise ImportError('Method requires a working h5py installation.')
else:
warnings.warn("Support for 'h5py' to be removed after Cantera 3.0.")
import h5py as _h5py


Expand Down

0 comments on commit 5e1a630

Please sign in to comment.