summaryrefslogtreecommitdiff
path: root/Lib/zoneinfo/_tzpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/zoneinfo/_tzpath.py')
-rw-r--r--Lib/zoneinfo/_tzpath.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/zoneinfo/_tzpath.py b/Lib/zoneinfo/_tzpath.py
index 9ce4c88425..4985dce2dc 100644
--- a/Lib/zoneinfo/_tzpath.py
+++ b/Lib/zoneinfo/_tzpath.py
@@ -111,14 +111,14 @@ def available_timezones():
determine if a given file on the time zone search path is to open it
and check for the "magic string" at the beginning.
"""
- from importlib.resources import files
+ from importlib import resources
valid_zones = set()
# Start with loading from the tzdata package if it exists: this has a
# pre-assembled list of zones that only requires opening one file.
try:
- with files("tzdata").joinpath("zones").open() as f:
+ with resources.files("tzdata").joinpath("zones").open("r") as f:
for zone in f:
zone = zone.strip()
if zone: