Skip to content
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

bpo-29435: Allow is_tarfile to take a filelike obj #18090

Open
wants to merge 3 commits into
base: master
from

Conversation

@woodruffw
Copy link

woodruffw commented Jan 20, 2020

This makes tarfile.is_tarfile behave similarly to zipfile.is_zipfile: instead of just a string or path-like, the single positional argument can also be a file or file-like.

Ref: https://bugs.python.org/issue29435

https://bugs.python.org/issue29435

@woodruffw woodruffw requested a review from ethanfurman as a code owner Jan 20, 2020
@the-knights-who-say-ni

This comment has been minimized.

Copy link

the-knights-who-say-ni commented Jan 20, 2020

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

CLA Missing

Our records indicate the following people have not signed the CLA:

@woodruffw

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@woodruffw woodruffw force-pushed the woodruffw-forks:fix-29435 branch from aea5277 to fe5e983 Jan 20, 2020
@tirkarthi

This comment has been minimized.

Copy link
Member

tirkarthi commented Jan 21, 2020

This will need a test similar to one in test_zipfile and also update to docs that the argument could be a file like object with a versionchanged directive like is_zipfile docs.

@woodruffw

This comment has been minimized.

Copy link
Author

woodruffw commented Jan 22, 2020

This will need a test similar to one in test_zipfile and also update to docs that the argument could be a file like object with a versionchanged directive like is_zipfile docs.

Thanks, will do.

@ethanfurman ethanfurman self-assigned this Jan 22, 2020
woodruffw added 2 commits Jan 22, 2020
@woodruffw

This comment has been minimized.

Copy link
Author

woodruffw commented Jan 22, 2020

Okay, added tests (for all is_tarfile cases, not just files and file-likes) and updated the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.