Mitchell Hentges <mitch9...@gmail.com> added the comment:
Looking closer into this, it appears that Python 3 will still try to load non-__pycache__ `.pyc` files. Perhaps I'm missing context, but aren't those only supposed by to written and read by Python 2? Location where `pyc` loader is registered: https://github.com/python/cpython/blob/v3.9.4/Lib/importlib/_bootstrap_external.py#L1571-L1572 Location where `__pycache__` loading happens is part of SourceFileLoader here: https://github.com/python/cpython/blob/v3.9.4/Lib/importlib/_bootstrap_external.py#L870 I'll attach a patch to remove this pyc-loading for convenience, but I don't have enough context to be confident that it's the correct solution. ---------- keywords: +patch message_count: 1.0 -> 2.0 pull_requests: +24422 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25731 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43969> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com