mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Replaced import of the 'new' module with 'types' module and added a deprecation warning to the 'new' module.
This commit is contained in:
parent
8b01140d2c
commit
c756d00cf2
10 changed files with 52 additions and 81 deletions
|
@ -2016,16 +2016,16 @@ class Tester:
|
|||
return (f,t)
|
||||
|
||||
def rundict(self, d, name, module=None):
|
||||
import new
|
||||
m = new.module(name)
|
||||
import types
|
||||
m = types.ModuleType(name)
|
||||
m.__dict__.update(d)
|
||||
if module is None:
|
||||
module = False
|
||||
return self.rundoc(m, name, module)
|
||||
|
||||
def run__test__(self, d, name):
|
||||
import new
|
||||
m = new.module(name)
|
||||
import types
|
||||
m = types.ModuleType(name)
|
||||
m.__test__ = d
|
||||
return self.rundoc(m, name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue