gh-150075: tar.addfile() doesn't set member offsets#150131
gh-150075: tar.addfile() doesn't set member offsets#150131grantlouisherman wants to merge 23 commits into
Conversation
…file Signed-off-by: Grant Herman <grantlouisherman041@gmail.com>
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
@ethanfurman should I squash commits? |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
…n#149996) Some of these docstrings read as if they were written when typing.py was first written, and things have evolved since then. A few motivations: - Call protocols protocols instead of ABCs. They are also ABCs, but the fact they are protocols is more relevant to typing. - Avoid recommending direct use of .__annotations__ and steer users to annotationlib instead. - For TypedDict, mention NotRequired before total=False since it is more general and probably more frequently useful. - For overloads, mention runtime use first instead of stub use. I think early on there was talk of allowing overload only in stubs, but it is now heavily used at runtime too and that's more likely to be relevant to users.
…thonGH-134278) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…GzipReader.read() (pythonGH-150222) This has not been observed in practice, but we cannot be 100% sure that it will not happen with some weird gzip data.
…n for external resources (python#150030) Co-authored-by: Stan Ulbrych <stan@python.org> Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
@ethanfurman this is moved to #150278 due to bad rebasing on my part |
Original bug report:
Bug report
Bug description:
It appears that
tarfile.TarFile.addfile()sets neitheroffsetnoroffset_dataattributes in theTarInfoadded toself.members, when it's done adding the file. Members in a reopened TAR have correct values.Reproducer
Expected output
Actual output
CPython versions tested on:
3.15
Operating systems tested on:
Linux
Fix
I added the offset info for a given file based on the current offset of the file and then after the block size is calculated. I also included a test to validate the behavior