Message381707
> It looks like you imported the functools module twice and have two different classes functools.partial. When you try to import one of them, you found the other one.
You are right. Serhiy:)
The key point is `import_helper.import_fresh_module()`.
```
import functools
from test.support import import_helper
partial = functools.partial
new_functools = import_helper.import_fresh_module('functools',
fresh=['_functools'])
new_partial = new_functools.partial
assert(partial == new_partial)
```
Succeed in master, failed in PR23405. |
|
Date |
User |
Action |
Args |
2020-11-24 05:00:00 | shihai1991 | set | recipients:
+ shihai1991, vstinner, petr.viktorin, serhiy.storchaka |
2020-11-24 05:00:00 | shihai1991 | set | messageid: <1606194000.13.0.995335387401.issue42410@roundup.psfhosted.org> |
2020-11-24 05:00:00 | shihai1991 | link | issue42410 messages |
2020-11-24 04:59:59 | shihai1991 | create | |
|