GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-100609: Render an unnamed zipfile as ":zipfile:" in `zipfile.Path` by jaraco · Pull Request #160103 · python/cpython

Conversation

@jaraco

@jaraco jaraco commented Oct 21, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

str() of a zipfile.Path whose underlying zipfile has no filename — most
commonly one constructed from an io.BytesIO — raised TypeError, because
posixpath.join was handed None:

>>> import io, zipfile
>>> str(zipfile.Path(zipfile.ZipFile(io.BytesIO(), 'w')))
TypeError: expected str, bytes or os.PathLike object, not NoneType

Such a zipfile now renders its filename as :zipfile:, and the root of a
zipfile is no longer rendered with a trailing slash.

This synchronizes the fix from zipp
3.23.1
, extracted from a
larger zipfile.Path refresh so it can land and be backported as an isolated
bugfix.

🤖 Generated with Claude Code

  • Issue: str(zipfile.Path()) not working when root attribute is io.BytesIO #100609

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jaraco @claude
pythongh-100609: Render an unnamed zipfile as ":zipfile:" in `zipfile…
ce2f088
….Path`

Synchronizes the fix from zipp 3.23.1. `str()` of a `zipfile.Path` whose
zipfile has no filename previously raised `TypeError`.

Co-Authored-By: Claude Opus 5 <[email protected]>
@bedevere-app bedevere-app Bot mentioned this pull request Oct 21, 2026
str(zipfile.Path()) not working when root attribute is io.BytesIO #100609
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Oct 21, 2026
@jaraco jaraco added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 21, 2026
@jaraco jaraco mentioned this pull request Oct 21, 2026
gh-160104: Refresh zipfile.Path from zipp 4.1.2 #160105
Merged
@jaraco

jaraco commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

Merging as previously reviewed by @barneygale in zipp.

(sorry for the delay)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jaraco
jaraco enabled auto-merge (squash) October 21, 2026 19:34
@jaraco
jaraco merged commit ba96fab into python:main Oct 21, 2026
62 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

Thanks @jaraco for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Oct 21, 2026
@miss-islington-app

miss-islington-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

Sorry, @jaraco, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker ba96fab7348310651dcabadc1f4e954949e0e05a 3.14
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

GH-160118 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 21, 2026
@miss-islington-app miss-islington-app Bot assigned jaraco Oct 21, 2026
@bedevere-app

bedevere-app Bot commented Oct 21, 2026

Copy link
Copy Markdown

GH-160124 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 21, 2026
@jaraco jaraco mentioned this pull request Oct 21, 2026
[3.14] gh-100609: Render an unnamed zipfile as ":zipfile:" in zipfile.Path (GH-160103) #160124
Merged
jaraco added a commit that referenced this pull request Oct 21, 2026
@miss-islington @jaraco @claude
[3.15] gh-100609: Render an unnamed zipfile as ":zipfile:" in `zipfil…
bfccf0f
…e.Path` (GH-160103) (#160118)

gh-100609: Render an unnamed zipfile as ":zipfile:" in `zipfile.Path` (GH-160103)

Synchronizes the fix from zipp 3.23.1. `str()` of a `zipfile.Path` whose
zipfile has no filename previously raised `TypeError`.
(cherry picked from commit ba96fab)

Co-authored-by: Jason R. Coombs <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
jaraco added a commit that referenced this pull request Oct 21, 2026
@jaraco @claude
[3.14] gh-100609: Render an unnamed zipfile as ":zipfile:" in `zipfil…
ba0e4a4
…e.Path` (GH-160103) (#160124)

Synchronizes the fix from zipp 3.23.1. `str()` of a `zipfile.Path` whose
zipfile has no filename previously raised `TypeError`.
(cherry picked from commit ba96fab)

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@jaraco jaraco

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@jaraco
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.