GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104310: Rename the New Function in importlib.util by ericsnowcurrently · Pull Request #105255 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Jun 2, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The original name wasn't as clear as it could have been. This change includes the following:

  • rename the function
  • change the default value for "disable_check" to False
  • add clues to the docstring that folks should probably not use the function
  • Issue: Add importlib.util.allowing_all_extensions() #104310

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ericsnowcurrently added 4 commits June 2, 2023 14:05
@ericsnowcurrently
Fix the function doc string.
4f9521d
@ericsnowcurrently
Set the default for disable_check to False.
04b36cf
@ericsnowcurrently
Change the function name.
d459def
@ericsnowcurrently
Add a NEWS entry.
27296cb
@ericsnowcurrently
ericsnowcurrently requested review from brettcannon, encukou, ncoghlan and warsaw as code owners June 2, 2023 20:26
@bedevere-bot bedevere-bot added the awaiting core review label Jun 2, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jun 2, 2023
Add importlib.util.allowing_all_extensions() #104310
Closed
@ericsnowcurrently

ericsnowcurrently commented Jun 2, 2023

Copy link
Copy Markdown
Member Author

CC @brettcannon

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently ericsnowcurrently added the needs backport to 3.12 only security fixes label Jun 2, 2023
@ericsnowcurrently ericsnowcurrently changed the title gh-104310: Rename the New Function in Importlib.util gh-104310: Rename the New Function in importlib.util Jun 2, 2023
brettcannon
brettcannon reviewed Jun 2, 2023
View reviewed changes
Comment thread Lib/importlib/util.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Eclips4
Eclips4 reviewed Jun 2, 2023
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2023-06-02-14-23-41.gh-issue-104310.UamCOB.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

ericsnowcurrently and others added 2 commits June 2, 2023 15:25
@ericsnowcurrently @Eclips4
Update Misc/NEWS.d/next/Library/2023-06-02-14-23-41.gh-issue-104310.U…
01fdb4d
…amCOB.rst

Co-authored-by: Kirill Podoprigora <[email protected]>
@ericsnowcurrently
Get rid of the default argument.
bec03a2
brettcannon
brettcannon requested changes Jun 8, 2023
View reviewed changes
Comment thread Lib/importlib/util.py Outdated

def __init__(self, disable_check=True):
self.disable_check = disable_check
def __init__(self, disable_check):

@brettcannon brettcannon Jun 8, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the keyword, _incompatible_extension_module_restrictions(True) reads to me like incompatible module restrictions are turned on. I would either make the parameter keyword-only or invert the meaning (i.e., enable_check).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ericsnowcurrently reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@ericsnowcurrently ericsnowcurrently Jun 8, 2023

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ericsnowcurrently ericsnowcurrently Jun 8, 2023

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot removed the awaiting core review label Jun 8, 2023
@bedevere-bot

bedevere-bot commented Jun 8, 2023

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label Jun 8, 2023
@ericsnowcurrently
Use a keyword-only parameter.
760238e
brettcannon
brettcannon approved these changes Jun 8, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting changes labels Jun 8, 2023
@ericsnowcurrently
ericsnowcurrently enabled auto-merge (squash) June 8, 2023 18:15
@ericsnowcurrently
ericsnowcurrently merged commit 34c63b8 into python:main Jun 8, 2023
@miss-islington

miss-islington commented Jun 8, 2023

Copy link
Copy Markdown
Contributor

Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Jun 8, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2023
@ericsnowcurrently @Eclips4 @miss-islington
pythongh-104310: Rename the New Function in importlib.util (pythongh-…
28c0c4d
…105255)

The original name wasn't as clear as it could have been. This change includes the following:

* rename the function
* change the default value for "disable_check" to False
* add clues to the docstring that folks should probably not use the function

---------

(cherry picked from commit 34c63b8)

Co-authored-by: Eric Snow <[email protected]>
Co-authored-by: Kirill Podoprigora <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 8, 2023

Copy link
Copy Markdown

GH-105518 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jun 8, 2023
@ericsnowcurrently
ericsnowcurrently deleted the fix-importlib-util-helper branch June 8, 2023 18:35
ericsnowcurrently added a commit that referenced this pull request Jun 8, 2023
@miss-islington @ericsnowcurrently @Eclips4
[3.12] gh-104310: Rename the New Function in importlib.util (gh-105255)…
8698fa8
… (gh-105518)

The original name wasn't as clear as it could have been. This change includes the following:

* rename the function
* change the default value for "disable_check" to False
* add clues to the docstring that folks should probably not use the function

---------

(cherry picked from commit 34c63b8)

Co-authored-by: Eric Snow <[email protected]>
Co-authored-by: Kirill Podoprigora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Eclips4 Eclips4 Eclips4 left review comments
@brettcannon brettcannon brettcannon approved these changes
@encukou encukou Awaiting requested review from encukou
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@ericsnowcurrently @bedevere-bot @miss-islington @brettcannon @Eclips4
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.