Skip to content

gh-118216: Don't consider dotted __future__ imports #118267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 2, 2024

Conversation

thatbirdguythatuknownot
Copy link
Contributor

@thatbirdguythatuknownot thatbirdguythatuknownot commented Apr 25, 2024

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
Copy link
Contributor

Could you also configure pre-commit? https://devguide.python.org/getting-started/setup-building/#install-pre-commit

Misc/NEWS.d/next/Core and Builtins/2024-04-25-11-48-28.gh-issue-118216.SVg700.rst:1: default role used (hint: for inline literals, use double backticks) (default-role)

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

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.

@JelleZijlstra JelleZijlstra self-assigned this May 2, 2024
@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented May 2, 2024

Got it.

@JelleZijlstra
Copy link
Member

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

@JelleZijlstra JelleZijlstra merged commit 7c97dc8 into python:main May 2, 2024
38 checks passed
@thatbirdguythatuknownot
Copy link
Contributor Author

Okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants