gh-155358: [WIP] Deprecate tuple API of structseq objects - #155359
Draft
vstinner wants to merge 4 commits into
Draft
gh-155358: [WIP] Deprecate tuple API of structseq objects#155359vstinner wants to merge 4 commits into
vstinner wants to merge 4 commits into
Conversation
pip is not ready for this change:
$ PYTHONWARNINGS=error env/bin/python -Werror -m pip install setuptools -v
Traceback (most recent call last):
File "/home/vstinner/python/main/Lib/runpy.py", line 201, in _run_module_as_main
return _run_code(code, main_globals, None,
"__main__", mod_spec)
File "/home/vstinner/python/main/Lib/runpy.py", line 87, in _run_code
exec(code, run_globals)
~~~~^^^^^^^^^^^^^^^^^^^
File "/home/vstinner/python/main/env/lib/python3.16t/site-packages/pip/__main__.py", line 24, in <module>
sys.exit(_main())
~~~~~^^
File "/home/vstinner/python/main/env/lib/python3.16t/site-packages/pip/_internal/cli/main.py", line 70, in main
cmd_name, cmd_args = parse_command(args)
~~~~~~~~~~~~~^^^^^^
File "/home/vstinner/python/main/env/lib/python3.16t/site-packages/pip/_internal/cli/main_parser.py", line 71, in parse_command
parser = create_main_parser()
File "/home/vstinner/python/main/env/lib/python3.16t/site-packages/pip/_internal/cli/main_parser.py", line 26, in create_main_parser
formatter=UpdatingDefaultsHelpFormatter(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/vstinner/python/main/env/lib/python3.16t/site-packages/pip/_internal/cli/parser.py", line 45, in __init__
kwargs["width"] = shutil.get_terminal_size()[0] - 2
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
DeprecationWarning: tuple API is deprecated, use named attributes
inspect: keep tuple API for 3 namedtuple
Member
Author
|
pip and setuptools fail with these changes. The issue can be seen in test_cext and test_cppext for example. pip: setuptools: |
Member
Author
|
Notes to replace tuple API with named attributes. os.stat():
pwd:
grp:
pkgutil.ModuleInfo:
urllib.parse.urlsplit():
urllib.parse.urlparse():
test.support.script_helper:
os.statvfs:
inspect.stack() items:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
object[index]) of structseq types (ex: os.stat_result) #155358