◐ Shell
clean mode source ↗

gh-118216: Don't consider dotted `__future__` imports by thatbirdguythatuknownot · Pull Request #118267 · python/cpython

Conversation

@thatbirdguythatuknownot

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.

@nineteendo

JelleZijlstra

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

JelleZijlstra

@JelleZijlstra

@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.

@thatbirdguythatuknownot

SonicField pushed a commit to SonicField/cpython that referenced this pull request

May 8, 2024