Skip to content

Commit

Permalink
chore: drop dep that never is valid (#1149)
Browse files Browse the repository at this point in the history
* chore: drop dep that never is valid

* no more renaming importlib.metadata as importlib_metadata

---------

Co-authored-by: Jim Pivarski <jpivarski@users.noreply.github.com>
  • Loading branch information
henryiii and jpivarski authored Feb 25, 2024
1 parent ef251ef commit ea207f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ classifiers = [
dependencies = [
"awkward>=2.4.6",
"cramjam>=2.5.0",
"importlib-metadata;python_version<\"3.8\"",
"numpy",
"fsspec",
"packaging",
Expand Down
6 changes: 3 additions & 3 deletions src/uproot/extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from __future__ import annotations

import atexit
import importlib.metadata as importlib_metadata
import importlib.metadata
import os

from uproot._util import parse_version
Expand Down Expand Up @@ -151,11 +151,11 @@ def xrootd_version():
Gets the XRootD version if installed, otherwise returns None.
"""
try:
return importlib_metadata.version("xrootd")
return importlib.metadata.version("xrootd")
except ModuleNotFoundError:
try:
# Versions before 4.11.1 used pyxrootd as the package name
return importlib_metadata.version("pyxrootd")
return importlib.metadata.version("pyxrootd")
except ModuleNotFoundError:
return None

Expand Down

0 comments on commit ea207f9

Please sign in to comment.