Skip to content

Commit

Permalink
Merge branch 'mr/ramonat/avoid-deprecated-pkg-resources' into 'master'
Browse files Browse the repository at this point in the history
Avoid use of deprecated pkg_resources

See merge request it/e3-core!74
  • Loading branch information
enzbang committed Dec 11, 2024
2 parents 12c2b59 + 49124d7 commit b5723a9
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 b5723a9

Please sign in to comment.