-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-28230: Document the pathlib support in tarfile and add tests. #512
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-28230: Document the pathlib support in tarfile and add tests. #512
Conversation
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.
It looks pretty good to me, thanks! All documented members are correctly tested and tests are passed in my local environment too.
You may want to document this in Misc/NEWS
. Side note: We probably should tweak the 3.6 whatsnew document to give readers up-to-date information about pathlib support in the standard library.
I just left a super minor comment.
Lib/test/test_tarfile.py
Outdated
tarname = pathlib.Path(self.tarname) | ||
with tarfile.open(tarname, mode=self.mode) as tar: | ||
self.assertIsInstance(tar.name, str) | ||
self.assertEqual(tar.name, os.path.abspath(str(tarname))) |
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.
Perhaps use os.fspath
instead of str
?
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.
Done.
I have not added an entry in |
I removed the |
This method has accepted PathLike objects since Python 3.6 (python/cpython#512)
This method has accepted PathLike objects since Python 3.6 (python/cpython#512)
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.16.0 to 0.17.2. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v0.16.0...v0.17.2) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mariatta Wijaya <[email protected]>
No description provided.