mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
bpo-43720: Update import-related stdlib deprecation messages to say they will be removed in Python 3.12 (GH-25167)
This commit is contained in:
parent
c5354c045c
commit
dc6d3e1e4c
5 changed files with 16 additions and 7 deletions
|
@ -204,7 +204,8 @@ class ImpImporter:
|
|||
|
||||
def __init__(self, path=None):
|
||||
global imp
|
||||
warnings.warn("This emulation is deprecated, use 'importlib' instead",
|
||||
warnings.warn("This emulation is deprecated and slated for removal "
|
||||
"in Python 3.12; use 'importlib' instead",
|
||||
DeprecationWarning)
|
||||
_import_imp()
|
||||
self.path = path
|
||||
|
@ -271,7 +272,8 @@ class ImpLoader:
|
|||
code = source = None
|
||||
|
||||
def __init__(self, fullname, file, filename, etc):
|
||||
warnings.warn("This emulation is deprecated, use 'importlib' instead",
|
||||
warnings.warn("This emulation is deprecated and slated for removal in "
|
||||
"Python 3.12; use 'importlib' instead",
|
||||
DeprecationWarning)
|
||||
_import_imp()
|
||||
self.file = file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue