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
|
@ -132,8 +132,8 @@ if f2.a.one <> f1.a.one <> F.a.one <> 11:
|
|||
raise TestFailed
|
||||
|
||||
# im_func may not be a Python method!
|
||||
import new
|
||||
F.id = new.instancemethod(id, None, F)
|
||||
import types
|
||||
F.id = types.MethodType(id, None, F)
|
||||
|
||||
eff = F()
|
||||
if eff.id() <> id(eff):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue