From 073dd6689d983c17095b752d37dfeb3bc25c2ef5 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 26 Dec 2019 13:39:10 -0600 Subject: fix imp deprecation --- src/pyramid/path.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/pyramid/path.py b/src/pyramid/path.py index 47877ce5d..55ed4df2e 100644 --- a/src/pyramid/path.py +++ b/src/pyramid/path.py @@ -1,18 +1,13 @@ +from importlib.machinery import SOURCE_SUFFIXES import os import pkg_resources import sys -import imp from zope.interface import implementer from pyramid.interfaces import IAssetDescriptor -ignore_types = [imp.C_EXTENSION, imp.C_BUILTIN] -init_names = [ - '__init__%s' % x[0] - for x in imp.get_suffixes() - if x[0] and x[2] not in ignore_types -] +init_names = ['__init__%s' % x for x in SOURCE_SUFFIXES] def caller_path(path, level=2): -- cgit v1.2.3