Message314672
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 | brett.cannon |
|---|---|
| Recipients | brett.cannon, eric.snow, gvanrossum, ncoghlan |
| Date | 2018-03-29.20:37:24 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1522355845.02.0.467229070634.issue33169@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Correct because as documented it calls invalidate_caches() on meta-path finders and the one that handles sys.path calls invalidate_caches() on the finders found in sys.path_importer_cache() (as documented by https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder.invalidate_caches). Since None isn't a finder it doesn't do anything there as there is no method to call. So the "full of lies" comment by the OP on the mypy repo is over-the-top/incorrect. Now tweaking https://github.com/python/cpython/blob/521995205a2cb6b504fe0e39af22a81f785350a3/Lib/importlib/_bootstrap_external.py#L1180-L1186 to delete entries in sys.path_importer_cache() that are set to None is straight-forward, but I don't think we can backport since it would be going against what the documentation says it does. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-03-29 20:37:25 | brett.cannon | set | recipients: + brett.cannon, gvanrossum, ncoghlan, eric.snow |
| 2018-03-29 20:37:25 | brett.cannon | set | messageid: <1522355845.02.0.467229070634.issue33169@psf.upfronthosting.co.za> |
| 2018-03-29 20:37:25 | brett.cannon | link | issue33169 messages |
| 2018-03-29 20:37:24 | brett.cannon | create | |