diff options
| author | Michael Merickel <michael@merickel.org> | 2019-12-26 13:39:10 -0600 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2019-12-26 13:58:40 -0600 |
| commit | 073dd6689d983c17095b752d37dfeb3bc25c2ef5 (patch) | |
| tree | fa0010b112de846e4eb07eedf74787b18954b6ad | |
| parent | 9e61a82458187abdd1747bbd8c38c6089b80b3ab (diff) | |
| download | pyramid-073dd6689d983c17095b752d37dfeb3bc25c2ef5.tar.gz pyramid-073dd6689d983c17095b752d37dfeb3bc25c2ef5.tar.bz2 pyramid-073dd6689d983c17095b752d37dfeb3bc25c2ef5.zip | |
fix imp deprecation
| -rw-r--r-- | src/pyramid/path.py | 9 |
1 files changed, 2 insertions, 7 deletions
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): |
