Skip to content

gh-104310: Rename the New Function in importlib.util - #105255

Merged
ericsnowcurrently merged 7 commits into
python:mainfrom
ericsnowcurrently:fix-importlib-util-helper
Jun 8, 2023
Merged

ericsnowcurrently merged 7 commits into
python:mainfrom
ericsnowcurrently:fix-importlib-util-helper

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Jun 2, 2023 •

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

Copy link
Copy Markdown
Member Author
@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 Jun 2, 2023
Comment thread Lib/importlib/util.py Resolved
ericsnowcurrently and others added 2 commits June 2, 2023 15:25
Comment thread Lib/importlib/util.py Outdated

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

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

@bedevere-bot

Copy link
Copy Markdown

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

@ericsnowcurrently
ericsnowcurrently enabled auto-merge (squash) June 8, 2023 18:15
@ericsnowcurrently
ericsnowcurrently merged commit 34c63b8 into python:main Jun 8, 2023
@miss-islington

Copy link
Copy Markdown
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2023
…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 <ericsnowcurrently@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
@bedevere-bot

Copy link
Copy Markdown

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

@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
… (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 <ericsnowcurrently@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants