no log: fix for Python 3.7

pull/1991/head v1.1.3-beta.13
morpheus65535 2 years ago
parent bbe2483e21
commit 4f060207ab

@ -15,7 +15,6 @@
import errno
import glob
import hashlib
import importlib.metadata as importlib_metadata
import itertools
import json
import logging
@ -24,6 +23,13 @@ import os.path
import struct
import sys
try:
# For python 3.8 and later
import importlib.metadata as importlib_metadata
except ImportError:
# For everyone else
import importlib_metadata
log = logging.getLogger('stevedore._cache')
@ -104,7 +110,8 @@ def _build_cacheable_data():
# importlib-metadata 4.0 or later (or stdlib importlib.metadata in
# Python 3.9 or later)
real_groups = {
name: real_groups.select(name=name) for name in real_groups.names
group: real_groups.select(group=group)
for group in real_groups.groups
}
# Convert the namedtuple values to regular tuples

@ -13,7 +13,12 @@
"""Tests for stevedore.extension
"""
import importlib.metadata as importlib_metadata
try:
# For python 3.8 and later
import importlib.metadata as importlib_metadata
except ImportError:
# For everyone else
import importlib_metadata
from stevedore import driver
from stevedore import exception

@ -13,10 +13,16 @@
"""Tests for stevedore.extension
"""
import importlib.metadata as importlib_metadata
import operator
from unittest import mock
try:
# For python 3.8 and later
import importlib.metadata as importlib_metadata
except ImportError:
# For everyone else
import importlib_metadata
from stevedore import exception
from stevedore import extension
from stevedore.tests import utils

@ -12,7 +12,12 @@
"""Tests for the sphinx extension
"""
import importlib.metadata as importlib_metadata
try:
# For python 3.8 and later
import importlib.metadata as importlib_metadata
except ImportError:
# For everyone else
import importlib_metadata
from stevedore import extension
from stevedore import sphinxext

@ -103,7 +103,7 @@ babelfish==0.6.0
beautifulsoup4==4.11.1
chardet==5.0.0
pysrt==1.1.2
stevedore==4.1.0
#stevedore==3.5.2 # Do not upgrade. Version newer than that have issues with importlib on Python 3.7
# Required-by: subliminal_patch
cloudscraper==1.2.58

Loading…
Cancel
Save