{"id":290,"library":"zipp","title":"zipp","description":"zipp is the official backport of the pathlib-compatible zipfile.Path object from the Python standard library. It provides a Traversable/pathlib-like interface for navigating and reading ZIP archives (zipp.Path), with new features introduced here first and later merged into CPython. Current version is 3.23.0, released June 2025, with a very active cadence of roughly one release per month maintained by Jason R. Coombs (jaraco).","status":"active","version":"3.23.0","language":"python","source_language":"en","source_url":"https://github.com/jaraco/zipp","tags":["zip","pathlib","backport","stdlib","filesystem","archives","importlib"],"install":[{"cmd":"pip install zipp","lang":"bash","label":"Latest stable"}],"dependencies":[],"imports":[{"wrong":"import zipp; path = zipp.Path('archive.zip')","symbol":"Path","correct":"from zipp import Path"}],"quickstart":{"code":"import io\nimport zipfile\nimport zipp\n\n# Build an in-memory zip\ndata = io.BytesIO()\nwith zipfile.ZipFile(data, 'w') as zf:\n    zf.writestr('hello.txt', 'Hello, zipp!')\n    zf.writestr('sub/world.txt', 'World!')\n    zf.filename = 'example.zip'\n\n# Navigate with zipp.Path (pathlib-style)\nroot = zipp.Path(data)\nfor item in root.iterdir():\n    print(item.name, item.is_file())\n\n# Read a nested file\nfile_path = root / 'hello.txt'\nprint(file_path.read_text())  # 'Hello, zipp!'\n\n# Glob support\nfor txt in root.glob('**/*.txt'):\n    print(txt)","lang":"python","description":"Create an in-memory ZIP, wrap it with zipp.Path, iterate entries, read file content, and glob for files — all using a pathlib-style API."},"warnings":[{"fix":"Pass mode='rb' explicitly for binary reads. Remove any positional pwd argument; keyword args still pass through to io.TextIOWrapper.","message":"zipp.Path.open() changed to text mode by default and dropped positional pwd and force_zip64 parameters.","severity":"breaking","affected_versions":"<3.2"},{"fix":"Replace joinpath(add='sub/path') with joinpath('sub/path') or the / operator (root / 'sub' / 'path').","message":"Path.joinpath() dropped the 'add' keyword argument; it now only accepts arbitrary positional path segments.","severity":"breaking","affected_versions":"<3.6"},{"fix":"Pin to zipp<3.20 if you must support Python 3.8. For Python 3.7, pin to zipp<3.5.","message":"Requires Python >=3.9 as of recent releases. Older zipp releases supported Python 3.6/3.7/3.8 but those branches are no longer maintained.","severity":"breaking","affected_versions":">=3.20"},{"fix":"Use path.name (strips the slash) rather than str(path) when comparing directory names.","message":"Directory entries from iterdir() always end with a trailing slash in their string representation. Comparing path names with string equality will fail unless you strip the slash.","severity":"gotcha","affected_versions":"all"},{"fix":"Do not rely on the original ZipFile object type after wrapping it in zipp.Path; use the zipp.Path interface exclusively for all navigation.","message":"Passing a ZipFile object to zipp.Path mutates the ZipFile in place (converts it to a CompleteDirs subclass). The caller's reference is affected. This is by design to prevent double-close bugs.","severity":"gotcha","affected_versions":">=3.3"},{"fix":"Filter results with item.is_file() when you want only files: [p for p in root.glob('**/*.txt') if p.is_file()].","message":"Path.glob('**') previously did not match directories; since 3.20 it does. Code that relied on glob returning only files may now receive unexpected directory entries.","severity":"gotcha","affected_versions":">=3.20"},{"fix":"Declare a loose lower bound (zipp>=3.9) rather than an exact pin unless you have a specific compatibility reason.","message":"zipp is commonly pulled in as a transitive dependency (e.g. by importlib-metadata, pip, pytest). Pinning it too tightly in lock files can block upgrades of those tools.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2025':48 '3.23.0':45 'activ':52 'archiv':29,71 'backport':6,68 'cadenc':53 'compat':11 'coomb':64 'cpython':41 'current':42 'featur':33 'filesystem':70 'first':36 'importlib':72 'interfac':23 'introduc':34 'jaraco':65 'jason':62 'june':47 'later':38 'librari':18 'maintain':60 'merg':39 'month':59 'navig':25 'new':32 'object':13 'offici':5 'one':56 'pathlib':10,67 'pathlib-compat':9 'per':58 'provid':20 'python':16 'r':63 'read':27 'releas':46,57 'rough':55 'standard':17 'stdlib':69 'traversable/pathlib-like':22 'version':43 'zip':28,66 'zipfile.path':12 'zipp':1,2 'zipp.path':30","created_at":"2026-03-28T05:38:55.795265+00:00","updated_at":"2026-04-17T01:16:27.671069+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":0,"quickstart_score":80,"quickstart_tag":"verified","pypi_latest":"4.1.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/jaraco/zipp","docs":null,"changelog":null,"pypi":"https://pypi.org/project/zipp/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-27","next_check":"2026-08-02","install_tag":"stale"}}