Skip to content

Commit

Permalink
Use importlib-resources package because pkg_resources is deprecated i…
Browse files Browse the repository at this point in the history
…n Python 3.12 and it is backwards compatible. (#261)
  • Loading branch information
dsevilla authored Jul 23, 2024
1 parent 13f91f3 commit 6564099
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions happybase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
HBase.
"""

import pkg_resources as _pkg_resources
import importlib_resources as _importlib_resources
import thriftpy2 as _thriftpy

_thriftpy.load(
_pkg_resources.resource_filename('happybase', 'Hbase.thrift'),
str(_importlib_resources.files('happybase') / 'Hbase.thrift'),
'Hbase_thrift')

from ._version import __version__ # noqa
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
six
thriftpy2>=0.4
importlib-resources

0 comments on commit 6564099

Please sign in to comment.