You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rename 'name' to 'fullname' argument to ExtensionFileLoader #74460
says "name, path". While I would much rather change the parameter name to match the rest of the module, I don't think I'm comfortable with the backwards-compatibility breakage over just a single parameter name (although chances are no one will notice in either direction as everyone probably passes by position).
Another option is to rename 'name' to 'fullname', make 'name' keyword-only, and then raise a DeprecationWarning if 'name' is used, eventually removing the keyword-only argument.
I realized another solution to this is to make the argument positional-only, then the name simply doesn't matter. Probably unnecessary breakage, though.
changed the title [-]Make importlib.abc.ExtensionFileLoader.__init__() documentation match code[/-][+]Rename 'name' to 'fullname' argument to ExtensionFileLoader[/+]on May 14, 2021
Activity
brettcannon commentedon May 4, 2017
https://docs.python.org/3/library/importlib.html#importlib.machinery.ExtensionFileLoader says "fullname, path" for __init__(), but
cpython/Lib/importlib/_bootstrap_external.py
Line 909 in 647c3d3
brettcannon commentedon May 5, 2017
Another option is to rename 'name' to 'fullname', make 'name' keyword-only, and then raise a DeprecationWarning if 'name' is used, eventually removing the keyword-only argument.
sayanchowdhury commentedon May 22, 2017
I am starting to work on this issue.
brettcannon commentedon Apr 10, 2019
I realized another solution to this is to make the argument positional-only, then the name simply doesn't matter. Probably unnecessary breakage, though.
iritkatriel commentedon May 14, 2021
The PR was reviewed but it now has merge conflicts and possibly a test failure on MacOS.
[-]Make importlib.abc.ExtensionFileLoader.__init__() documentation match code[/-][+]Rename 'name' to 'fullname' argument to ExtensionFileLoader[/+]DonnaDia commentedon Aug 26, 2021
I want to work on it.
brettcannon commentedon May 4, 2022
This has been like this for so long I don't think it's worth the potential breakage to fix.