gh-118216: Don't consider dotted `__future__` imports by thatbirdguythatuknownot · Pull Request #118267 · python/cpython
Conversation
Add checking for the number of dots before the module name alongside __future__ name checks in Python/future.c and Python/compile.c. Basically makes a __future__ import only be considered one when no dots are present before the module name.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good. Could you add an entry to the What's New for 3.13? This is arguably a change to the language semantics.
@thatbirdguythatuknownot thanks! One piece of feedback: please avoid force-pushing to a PR branch, as it makes review somewhat harder. Just push a new commit and we'll squash them on merge. To update the PR branch with new commits from main, either click the "Update branch" button in GitHub or run git merge upstream/main (or whatever your remote is called) locally.