Skip to content

Commit

Permalink
Replace pkg_resources by importlib.resources
Browse files Browse the repository at this point in the history
pkg_resources is deprecated

for it/e3-core#31
  • Loading branch information
enzbang committed Dec 11, 2024
1 parent 12c2b59 commit 49124d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/e3/os/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ def get_rlimit(platform: str | None = None) -> str:
if platform == "x86_64-windows64":
platform = "x86_64-windows"

from pkg_resources import resource_filename
import importlib.resources

return resource_filename(__name__, os.path.join("data", f"rlimit-{platform}"))
return str(
importlib.resources.files("e3.os").joinpath(
os.path.join("data", f"rlimit-{platform}")
)
)


def quote_arg(arg: str) -> str:
Expand Down

0 comments on commit 49124d7

Please sign in to comment.