gh-118216: Don't consider dotted __future__ imports#118267
gh-118216: Don't consider dotted __future__ imports#118267JelleZijlstra merged 7 commits intopython:mainfrom
__future__ imports#118267Conversation
f0caedc to
9adb811
Compare
|
Could you also configure pre-commit? https://devguide.python.org/getting-started/setup-building/#install-pre-commit
|
6f7bc77 to
bb766c7
Compare
JelleZijlstra
left a comment
There was a problem hiding this comment.
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.
|
Got it. |
bb766c7 to
9b908ee
Compare
|
@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 |
|
Okay. |
Add checking for the number of dots before the module name alongside
__future__name checks inPython/future.candPython/compile.c. Basically makes a__future__import only be considered one when no dots are present before the module name.__future__imports allow dots before them #118216