-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-87264: tarfile list() method does not show file type. #29974
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
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
This PR is stale because it has been open for 30 days with no activity. |
Could you change the title for conformance: 'bpo' also the PR number? Also, please check why checks are failing, e.g. why no news? |
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.
Please add a unit test covering this change.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
@iritkatriel How do we check if the CLA has been signed? |
that should be automated. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
The following commit authors need to sign the Contributor License Agreement: |
This is an incorrect email. My email is val@nvsoft.net. I signed the CLA with that email. |
The bot picked up this email from somewhere. I can think of two easy solutions - sign the CLA again with that email, or close this PR and create a new one with the email you used to sign the CLA. |
The tests for the tar file module are at https://github.com/python/cpython/blob/main/Lib/test/test_tarfile.py |
I modified the related test. The patch is attached. |
If I close the PR and start a new one, do I need to re-submit all the material from scratch? |
We don't accept patches as attachments anymore. You need to include it in the PR. |
|
Please go over the ‘collaborative coding’ section of the GitHub documentation to see how it works: https://docs.github.com/en |
Issue numbers on PRs need to be disambiguated with a Because there are usually over 100 blurbs per release, we try to limit them to a line or two. Details, like the example, belong on the issue. The test revision needs to be added to the PR by switching to your tarfile-fix branch, editing test_tarfile, saving it, and running the test suite locally to test that the test runs on your machine without breaking anything. If it passes, commit it and push the new commit to your fork, as you did to make the PR. The new commit should show up here. This should not affect my revision of the blurb. Do this a few times and revising PRs will become routine. |
@val-shkolnikov : the CLA is still an issue. I would suggest just signing it again with the email address tied to the account you are using for PRs. |
Unfortunately I cannot do that. This patch dates way back. Broadcom changed their email to go to broadcom.com instead of broadcom.net, so this email address is not valid anymore. If I create a new PR, is there a way to reference this PR in there or have some method to make sure that the new PR gets reviewed by the same people? |
When you create the new PR, post a comment here with the number, then anyone following can click through to it. |
Automated systems failed us on this one. See above PR for current attempt. |
The list() method of TarFile tarfile object shows question mark in place of file type in verbose mode. For instance
python3 -m tarfile -v -l my.tar
?rwxr-xr-x vals/users 0 2021-01-16 18:28:30 bin/
?rwxr-x--- vals/users 266 2021-01-16 18:28:30 bin/backmine.sh
?rwxr-xr-x vals/users 950 2018-01-02 10:39:18 bin/tm.sh
?rwxrwxrwx vals/users 0 2021-01-16 11:49:36 bin/source-highlight -> ../source-highlight/bin/source-highlight
?rwxr-xr-x vals/users 435 2011-03-27 15:38:06 bin/dd.sh
This is because the call stat.filemode(tarinfo.mode) does not pass tarinfo.type to stat.filemode. The type needs to be properly encoded and added to the argument.