Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove no-longer needed importlib_resources #2389

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions ctapipe/tools/quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
Create a working directory for ctapipe-process containing standard
configuration files.
"""
try:
from importlib.resources import files
except ImportError:
from importlib_resources import files

from importlib.resources import files
from pathlib import Path

from ..core import Provenance, Tool, traits
Expand Down
6 changes: 1 addition & 5 deletions ctapipe/tools/tests/test_merge.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import shutil
import tempfile
from importlib.resources import files
from io import StringIO
from pathlib import Path

Expand All @@ -14,11 +15,6 @@
from ctapipe.io.tests.test_astropy_helpers import assert_table_equal
from ctapipe.tools.process import ProcessorTool

try:
from importlib.resources import files
except ImportError:
from importlib_resources import files


def run_stage1(input_path, cwd, output_path=None):
config = files("ctapipe").joinpath("resources", "stage1_config.json")
Expand Down
6 changes: 1 addition & 5 deletions ctapipe/utils/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@
except ImportError:
has_resources = False

try:
from importlib.resources import files
except ImportError:
from importlib_resources import files

from importlib.resources import files

from ..core import Provenance

Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ install_requires=
docutils
eventio >=1.9.1, <2.0.0a0
iminuit >=2
importlib_resources ; python_version < "3.9"
importlib_metadata ; python_version < "3.10"
joblib
matplotlib ~=3.0
Expand Down
Loading