mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Use backports.zoneinfo in job_metrics package under Python <3.9
Fix import errors in test_galaxy_packages_for_pulsar tests.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import datetime
|
||||
import json
|
||||
import logging
|
||||
import zoneinfo
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
@@ -19,6 +18,12 @@ from ..formatting import (
|
||||
)
|
||||
from ..safety import Safety
|
||||
|
||||
try:
|
||||
import zoneinfo
|
||||
except ImportError:
|
||||
# Python < 3.9
|
||||
from backports import zoneinfo # type: ignore[no-redef]
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
GALAXY_SLOTS_KEY = "galaxy_slots"
|
||||
|
||||
@@ -35,6 +35,7 @@ version = 25.0.dev0
|
||||
include_package_data = True
|
||||
install_requires =
|
||||
galaxy-util
|
||||
backports.zoneinfo;python_version<'3.9'
|
||||
packages = find:
|
||||
python_requires = >=3.7
|
||||
|
||||
|
||||
Reference in New Issue
Block a user