mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #13959: Deprecate imp.get_suffixes() for new attributes on
importlib.machinery that provide the suffix details for import. The attributes were not put on imp so as to compartmentalize everything importlib needs for setting up imports in importlib.machinery. This also led to an indirect deprecation of inspect.getmoduleinfo() as it directly returned imp.get_suffix's returned tuple which no longer makes sense.
This commit is contained in:
parent
810c64df8f
commit
cb66eb0dec
17 changed files with 160 additions and 69 deletions
|
@ -40,8 +40,8 @@ if os.name == "nt":
|
|||
clibname = 'msvcr%d' % (version * 10)
|
||||
|
||||
# If python was built with in debug mode
|
||||
import imp
|
||||
if imp.get_suffixes()[0][0] == '_d.pyd':
|
||||
import importlib.machinery
|
||||
if '_d.pyd' in importlib.machinery.EXTENSION_SUFFIXES:
|
||||
clibname += 'd'
|
||||
return clibname+'.dll'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue