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 kaorihinata
Recipients brett.cannon, eric.smith, kaorihinata
Date 2021-03-14.04:31:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615696293.52.0.967420199486.issue43477@roundup.psfhosted.org>
In-reply-to
Content
Ahh, I always forget about blame.

Though the form was different, the initial commit of `importlib` (authored by Brett, so the nosy list seems fine for the moment) behaved the same way, and had an additional comment noting that the section in question was included to maintain backwards compatibility. I checked with Python 2.x and can confirm that this was how Python 2.x behaved as well (so I assume that's what the comment was for.)

I've tested simply commenting out that section (as, at a glance, I don't believe it will have any effect on explicit imports), and for the few scripts I tested with the backtraces were actually pretty clear: a lot of places in the standard library are accidentally relying on this quirk. collections doesn't import abc, importlib doesn't import machinery, concurrent doesn't import futures, etc, etc.

The easy, temporary fix would be to just add the necessary imports, then worry about `importlib`'s innards when the time comes to cross that bridge. That said, I know of only a few of the modules which will need imports added (the ones above, essentially), so I can't really say what the full scale of the work will be.
History
Date User Action Args
2021-03-14 04:31:33kaorihinatasetrecipients: + kaorihinata, brett.cannon, eric.smith
2021-03-14 04:31:33kaorihinatasetmessageid: <1615696293.52.0.967420199486.issue43477@roundup.psfhosted.org>
2021-03-14 04:31:33kaorihinatalinkissue43477 messages
2021-03-14 04:31:33kaorihinatacreate