This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shihai1991
Recipients petr.viktorin, serhiy.storchaka, shihai1991, vstinner
Date 2020-11-24.04:59:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606194000.13.0.995335387401.issue42410@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2020-11-24 05:00:00shihai1991setrecipients: + shihai1991, vstinner, petr.viktorin, serhiy.storchaka
2020-11-24 05:00:00shihai1991setmessageid: <1606194000.13.0.995335387401.issue42410@roundup.psfhosted.org>
2020-11-24 05:00:00shihai1991linkissue42410 messages
2020-11-24 04:59:59shihai1991create