Repository navigation
Read a version ID query only after a key, and not as a glob (GH-1491) - #1551
Conversation
| """ | ||
| match = cls.PATTERN.search(path) | ||
| if not match: | ||
| # A version ID query is read only after a key. |
There was a problem hiding this comment.
Self-review round one (implementation behavior) — FINDINGS, repaired
Base fc8c0cfc05351eb2646339d31a7113ea3d16c15a, initial head 302aba01c45fbb468592db6fab01d4ceb2c8a84e, repaired head c901e64b5458bc837d45002859fb2b3ca89463fa.
Covered: S3Path grammar (PATTERN, VERSION_QUERY, parse, is_glob, has_version_id/split_version_id/split_trailing_separators/version_separators, is_bucket), their callers in s3.py (_expand_unversioned, _ls, _find_paths, chmod, _parent), s3_cache.py invalidation, S3PathPairing (looks_up_destination, copy_pairs, delete_paths), aio paths through the shared helpers, docs and tests. Included /code-review high and /simplify passes.
Differential check rerun on the repaired head: 3,666 cases, 1,047 expected differences, 0 unexpected, 0 missing, against two merge-base runs.
Repaired:
s3_path_pairing.pydelete_paths:rm("s3://bucket//?versionId=v1")raisedCannot delete the bucket.whilerm_file()/mv()deleted the version, contrary to decision 4.S3Path.is_bucket(s3_path.py:261) is now False for a path with a version;rmdeletes it as given (testtest_rm_version_query_shape[s3://bucket//?versionId=v1-...], fails on base).PATTERNrepeated the query grammar in a lookahead; it keeps its old form andparse()rejects a version without a key (this line). Parser results unchanged (probe table and matrix).- Docs: a path ending in an empty/slash-only query is not a glob for the whole path (also
*/[before the query); the listed name of a root key?versionId=v1raises when passed back. - Tests:
mvtest also asserts the deletion (vias3_copy_targets/s3_request_targets); duplicatetest_ls_empty_bucket[s3://bucket/]dropped; rejection test reduced to one spelling × one method per parsing style; deadreturn_valueremoved; deadkey andconditions ats3.py_ls/_find_paths/chmodremoved. - Test comment claimed
mv()of a bucket path with a version sent no request; on base it sent HeadBucket and moved nothing. Corrected.
Not changed, with reasons:
has_version_id/split_version_id/partition_by_versionstill answerbucket?versionId=v1as versioned: they accept any string by contract (fsspec-built names), and every method that consumes the path then parses and raises;invalidate_cache()of that string over-evicts the bucket listing only.S3Path(bucket, None, "v1")/S3Path(b, "k", "/")remain constructible and do not round-trip throughstr(): the model never promised a round trip (keys ending in a query already do not), and constructor validation would be a model contract change outside (b).delete_pathsscans each path twice (parse +partition_by_version): pre-existing, microseconds.- Pre-existing, unchanged by this PR, noted in the PR body for (a):
expand_path()withoutrecursivereturnsbucket?versionId=v1unparsed;isfile()returns False for it;copy/mvinto the directorykey?versionId=/raiseCannot copy to a versioned file.
| not a glob pattern for `rm()`, `copy()`, `mv()`, `cat()`, `get()` and `expand_path()`, | ||
| also where `*`, `?` or `[` occur before the query: `rm("s3://YOUR_S3_BUCKET/key?versionId=")` | ||
| deletes only the key `key?versionId=`. | ||
| A bucket path with a version, such as `s3://YOUR_S3_BUCKET?versionId=v1` or |
There was a problem hiding this comment.
Self-review round two (claims, callers, operations, evidence) — FINDINGS, corrected
Base fc8c0cfc05351eb2646339d31a7113ea3d16c15a, head c901e64b5458bc837d45002859fb2b3ca89463fa.
Claims checked against the merge-base matrix data and probes:
- PR body, test comments and commit messages on old behavior:
rm_file()returned without a request,mv()sent HeadBucket and moved nothing (corrected from "returned without a request"),info()/ls()used the bucket,rm()raisedCannot delete the bucket.,rmdir()dropped the version (PermissionErrorof bucket deletion);rm("…/key?versionId=")deletedkeyXversionId=too;rm("…/key?versionId=/")sent DeleteObjectskey@/;mvof both moved both keys intodst/; the cache invalidation ofa/c.txt?versionId=/evicted thea/c.txtlookup. All confirmed. - Docs (this section):
bucket//?versionId=v1is versionv1of/— now true for every method includingrm()(round-one repair 1). The listed-name sentence (line 740) is new and matchesinfo(ls(...)[0])for a root key?versionId=v1. - Existing callers: strip-first methods unchanged for the slash-only spellings;
glob()unchanged;?versionId=v1/and/v1versions unchanged; no request is added (expansion ofkey?versionId=no longer lists). - Release-note claim corrected to "behavior change, release note on master and
4.x" since the change also goes to4.x. - Evidence: offline only (
--noconftest, failure/error set identical to base); no live AWS run; sync tests only, aio covered by the differential matrix (sync wrappers and coroutines, no parity regression).
| for p1, p2 in pairs | ||
| ] | ||
|
|
||
| def destination(p1: str | S3Path, p2: str) -> str | S3Path: |
There was a problem hiding this comment.
Independent review (relayed) — Codex CLI 0.172.0, codex exec -s read-only, static review (no tests run), detached snapshot of c901e64b5458bc837d45002859fb2b3ca89463fa, base fc8c0cfc05351eb2646339d31a7113ea3d16c15a, prompt without PR number/description/author conclusions; given the diff, conventions, docs/testing.md and the differential harness. Result: FINDINGS (6). Verified each on the merge base and the branch (offline moto probes):
- High, confirmed regression of this PR, repaired in
93b1f804(this function):mv(["s3://bucket/key?versionId="], "s3://bucket/?versionId=v1")moved the key to?versionId=v1/key?versionId=and deleted the source; on the merge base it raisedCannot copy to a versioned file.Same root as the copy intokey?versionId=/: destinations named below a stringpath2were joined strings. Nowpath2is parsed (bucket path with a version raises) and the suffix is added to its key; the string is kept when it names the same path. Tests:test_s3_copy_pairs_bucket_destination_with_version,test_mv_into_bucket_path_with_version_keeps_source,test_copy_into_directory_named_with_a_query, twotest_s3_copy_pairscases (all fail on the merge base). - Medium
expand_path()withoutrecursivereturnedbucket/?versionId=v1: repaired,_expand_pathsparses the paths with a version ID (s3.py:2005); other literal names stay unvalidated. Test:test_bucket_path_with_version_is_rejected[expand_path]. - Low
invalidate_cache("bucket/?versionId=v1")evicted the other spellings (?versionID=v1) as aliases of a bucket version: repaired ins3_cache.py(a version only when the base has a key). Test:test_invalidate_cache_root_key_keeps_other_spellings; the existing literal-eviction case still passes. - Low
S3Path("bucket", version_id="v1").is_bucketchanged to False: repaired,is_bucketis True without a key and False only for a slash-only key with a version (s3_path.py:261). - Low docs:
setxattrsentence now says "a path with a version ID" (key?versionId=writes the literal key, as on the merge base). The reopen of a file opened withS3Path("bucket", "?versionId=v1")raisesAttributeError: 'S3Path' object has no attribute 'startswith'on the merge base too: pre-existing, recorded for (a) on Parse caller-supplied S3 paths with one parser in every filesystem method #1491 (every method takes anS3Path). - Low tests: the
rmcase of the rejection test only differed by message on the merge base → replaced byexpand_path; the?versionId=/cache test again asserts that thev2lookup is kept and evicts the literala/c.txt?versionId=/lookup.
Differential check after the repair: 1,080 expected differences against both merge-base runs, 0 unexpected, 0 missing; new expected rows: copy_to/mv_to of the four slash-only spellings (write key?versionId=/k). One more pre-existing schedule-dependent request log excluded: cat("s3://bucket/dir/", recursive=True) fails fast on GetObject dir, so how many sibling GetObjects are sent varies (seen once in 30 stress runs; exception and state still compared).
There was a problem hiding this comment.
Independent follow-up (relayed): Codex, codex exec -s read-only, static review of c901e64b..93b1f804 on a detached snapshot. Result: FINDINGS (7). All repaired in 771d75ac except finding 5:
s3_copy_pairs()parsedpath2when a contents copy namedpath2itself without its slash ("s3://src/k/"→"s3://dst/out?versionId=v1/"). Fixed:path2is parsed only for a destination named below it or for anS3Pathsource. Test:test_s3_copy_pairs_contents_into_versioned_destination.- No test covered a joined string that does not parse. Added
s3://bucket/k→s3://bucket/?versionId=/, which givesS3Path("bucket", "?versionId=/k"). - No test covered the
is_bucketrepair. AddedS3Path("bucket", None, "v1")→ True. - The
rmcase of the rejection test is back. On the merge base it raisedCannot delete the bucket.before any request; the case guards againstrm()skipping the path silently. - Rejected. The finding was that the tests match undocumented message text. The repository's ruff config (PT011) requires
match=onpytest.raises(ValueError), and the existing parser tests (test_parse_invalid) already matchInvalid S3 path format. - Docs fixed:
isfile()returnsFalse, andcat_ranges()followson_error.fsspec.open_files()given a list in read mode expands each path containing*,?or[as a glob unlessexpand=False(fsspec/core.py:625). This also happens on the merge base.- The
expand_path()/_expand_path()docstrings name the newValueError.
- Docs fixed:
s3_copy_pairs()returnsS3Pathdestinations only whenpath2is a string.
Differential check at 771d75ac: 1,080 expected differences against both merge-base runs, 0 unexpected, 0 missing; no case changed against 93b1f804. The offline suite's failures and errors are identical to the merge base.
There was a problem hiding this comment.
Independent follow-ups 2–4 (relayed): Codex, codex exec -s read-only, static reviews of detached snapshots.
-
93b1f804..771d75ac: FINDINGS (3).- The fsspec glob caveat missed two cases:
open_files()globs a scalar string that contains*, andfsspec.open(expand=True)passes a list. - The
s3_copy_pairs()docstring deferred the check ofpath2itself for every source; that holds only for string sources. - The guide said every method raises;
mv(p, p)andinvalidate_cache(p)do not.
Docs and docstring fixed in
2fc8520f. - The fsspec glob caveat missed two cases:
-
771d75ac..2fc8520f: FINDINGS (5).- Four concern the precision of the fsspec glob caveat (write/append modes,
open_expand) and thatglob()reads the bucket spelling as a pattern. - One concerns
_conflict_lookups()parsing an exact destination: it still raisesValueErrorbefore any write.
6bda2250replaced the list of fsspec modes and says thatglob()reads the bucket spelling as a pattern. - Four concern the precision of the fsspec glob caveat (write/append modes,
-
2fc8520f..6bda2250: FINDINGS (3).open_files(..., "wb")names partition files below the path, andFSMap.__delitem__wrapsValueErrorinKeyError. Together with the earlier glob cases, these show that the composition sentence of the docs, which predates this PR (fc8c0cfdocs/filesystem.md:731), does not hold for every fsspec mode.12b4a5dbrestores it as it was, apart from the root-key sentence. The fsspec cases are recorded for (a) on Parse caller-supplied S3 paths with one parser in every filesystem method #1491.- Rejected:
S3PathPairing("bucket/src/", "bucket/out?versionId=v1", recursive=True)with sourcessrcandsrc/kraises while pairing. Writing below a versioned path raisesCannot copy to a versioned file.on the merge base too (atcp_file()). The docstring statement about the exact destination of a string source still holds for that pair.
Since 771d75ac, only docs and one docstring changed. just lint and just docs lint pass at 12b4a5db.
There was a problem hiding this comment.
Rebase and independent follow-up (relayed)
The branch was rebased from fc8c0cf onto master ce72fcc, which adds #1538, #1541, #1548 and #1532, and pushed with --force-with-lease.
- Range-diff (
fc8c0cfc..12b4a5dbvsce72fcc6..74353d27): commits 1–4 and 9 are unchanged. Commits 5–8 changed where they meet cp_file copies another object than it looks up, and a recursive copy of a bucket raises #1510's bucket filter ins3_copy_pairs(). - Changed test: cp_file copies another object than it looks up, and a recursive copy of a bucket raises #1510's
test_s3_copy_pairs_bucketcase that paired the sourcebucket?versionId=v1is nowtest_s3_copy_pairs_bucket_with_version, which expectsValueError, since the grammar rejects that string. - Docs: the pairing paragraph keeps both sentences.
Upstream changes that touch the grammar: only #1510's filter (s := S3Path.of(p1)).key or s.version_id and #1510's _copy_file lookup of the parsed source.
Differential check, rebuilt on ce72fcc. The two merge-base runs are identical. Against both, the branch has 1,083 expected differences, 0 unexpected and 0 missing. There is one new expected row: cp_file of key?version_id=/, which since #1510 looks up the key key?version_id=/ instead of version / of key.
Tests: just test offline at 74353d27 gives 4,252 passed. The Draft CI (lint, check, offline ×2) passes.
Independent follow-up: Codex, codex exec -s read-only, static review of the range-diff and of how the change composes with #1510 (filter order vs root parsing, empty pairs, list and S3Path sources, the replaced test). Result: CLEAN.
| also where `*`, `?` or `[` occur before the query: `rm("s3://YOUR_S3_BUCKET/key?versionId=")` | ||
| deletes only the key `key?versionId=`. | ||
| A bucket path with a version, such as `s3://YOUR_S3_BUCKET?versionId=v1` or | ||
| `s3://YOUR_S3_BUCKET/?versionId=v1`, is not an S3 path: the methods that read it raise |
There was a problem hiding this comment.
Design consultation (Codex + Claude Fable 5.2, same neutral package) and decisions — maintainer: proceed with the recommendations.
- D1 copy/mv into a directory named
…?versionId=/: both → fix here (option 1). Done; Codex's caution adopted: string destinations stay strings when unambiguous (4.x backport,cp_filecallers). - D2 non-recursive
expand_path()of a bucket path with a version: Codex → reject versioned candidates here; Fable → leave to (a). Adopted Codex's narrow form (only the paths with a version ID are parsed; general literal validation stays with (a)), which also makes the docs statement hold. - D3
isfile()returns False for invalid paths: both → no change here (fsspec'sexcept Exception; affects every invalid path). Fable: overrideisfileto catchOSErroronly, master-only in (a) → recorded on Parse caller-supplied S3 paths with one parser in every filesystem method #1491. Docs (this line) now state thatisfile()returns False. - D4 lexical helpers vs bucket versions: Codex → fix the cache eviction here, keep helpers lexical; Fable → no change needed (over-eviction only). Adopted Codex's narrow cache fix (
s3_cache.py), helpers unchanged (they retire with (a)). - D5
S3Pathmodel accepts a keyless version / slash-only version ID: both → not here; keyless version validation is a master-only model change (Codex: separate issue; Fable: part of (a)) → recorded on Parse caller-supplied S3 paths with one parser in every filesystem method #1491 for (a); slash-onlyversion_idstays opaque (normalizing would read the current object).
S3Path.parse() follows the rule of GH-1481 that _strip_protocol() already applied: a query whose version ID is empty or has only slashes names no version and is part of the key, so "key?versionId=/" no longer names the version "/" of "key" in the methods that parse the path as given. A version ID query is read only after a key: "bucket?versionId=v1" and "bucket/?versionId=v1" raise ValueError instead of naming a version of the bucket path, while "bucket//?versionId=v1" stays the version v1 of the key "/". A path that ends in the form of a version ID query, also with an empty or slash-only ID, is not a glob pattern, so rm(), mv(), copy(), cat(), get() and expand_path() no longer expand its "?": rm("s3://bucket/key?versionId=") deleted "keyXversionId=" as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…() (GH-1491) rm() rejected "bucket//?versionId=v1" as the bucket, while rm_file() and mv() address the version v1 of the key "/": a path with a version is deleted as given and never stripped to the bucket by expand_path(). S3Path.PATTERN keeps its form, and parse() rejects the bucket path with a version that it matches, instead of a second copy of the query grammar in a lookahead. The docs state that a path ending in a query that names no version is not a glob pattern also where wildcards occur before the query, and that the listed name of a key such as "?versionId=v1" at the bucket root raises when passed back. The tests check that mv() deletes what it copied and drop the duplicate and repeated cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A path with a version names an object, so is_bucket answers it, and rm() asks it alone. The ls(), find() and chmod() checks for a version drop the key condition that only a bucket path with a version needed, which parse() no longer returns. The mv() test reads the copies with s3_copy_targets(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ersions there (GH-1491) copy() and mv() into a directory whose name ends in a query that names no version, such as key?versionId=/, joined the source name to the string, which parsed as the version "/k" of "key". A destination named below a string path2 is now path2 parsed with the suffix added to its key, kept as the string when that string names the same path. A bucket path with a version as path2 is rejected there; a list of sources was moved below it as the key "?versionId=v1/..." and deleted. expand_path() parses the paths with a version ID, so a bucket path with a version raises as in the other methods. invalidate_cache() of the listed name of a key at the bucket root, such as bucket/?versionId=v1, evicts that name only, not the other spellings of the query. S3Path.is_bucket stays True for a path without a key. The docs name a version ID for setxattr() and state that isfile() returns False for an invalid path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ucket cases (GH-1491) s3_copy_pairs() parses path2 only for a destination named below it or for an S3Path source, so the contents of a directory copied to path2 itself keep the destination that copy_pairs() names, which cp_file() checks. Tests cover a string source copied into a directory at the bucket root whose joined string is no S3 path, is_bucket of a path without a key, and rm() of a bucket path with a version. The docs state the exceptions of cat_ranges() and isfile(), the glob expansion of a list in fsspec.open_files(), and the string path2 that s3_copy_pairs() needs to return S3Path destinations; the expand_path() docstrings name the ValueError of a path with a version ID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…H-1491) The docs name both glob expansions of fsspec.open_files() (a string with "*", and each path of a list with expand=True, which fsspec.open() uses when expanding) and limit the ValueError of a bucket path with a version to the methods that read it, besides invalidate_cache(), which invalidates the listed name of a key at the bucket root. The s3_copy_pairs() docstring defers the check of path2 itself only for a string source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…H-1491) Instead of listing the modes in which fsspec.open_files() expands a path as a glob pattern, the docs say that the compositions name the version where fsspec does not expand the path. glob() reads a bucket path with a version as a pattern, and s3_copy_pairs() does not parse the destination of a string source that is path2 itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The qualifier about fsspec's glob expansion is removed; how fsspec's compositions read such names is recorded for the entry point work on the issue instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12b4a5d to
74353d2
Compare
WHAT
The version-query half (b) of #1491: decision 4 of the #1493 audit and defects 6, 7 and 9.
S3Path.parse()applies the rule of Keep the slashes that end a version ID in path strings (GH-1469) #1481 (get() pairs conflicting local destinations: an object with the keys below it, and a folder marker with its directory #1487 item 2): a query whose version ID is empty or has only slashes names no version and is part of the key.s3://bucket/key?versionId=/now names the keykey?versionId=/in the methods that parse a path as given (cat_file,rm_file,touch,cp_file, tags,metadata, xattrs,chmod,sign,object_version_info,list_multipart_uploads, thecp_filedestination) instead of the version/ofkey. The strip-first methods already read it as the keykey?versionId=, and keep doing so. A version ID that ends in a slash (?versionId=v1/) or starts with one (?versionId=/v1) is still a version.bucket?versionId=v1,bucket/?versionId=v1(andbucket?versionId=/) raiseValueError: Invalid S3 path formatfromS3Path.parse(). They named a version of the bucket path, which the methods then handled differently (rm_file()returned without a request,mv()looked the bucket up and moved nothing,info()andls()used the bucket,rm()raisedCannot delete the bucket.,rmdir()dropped the version).bucket//?versionId=v1stays versionv1of the key/, andS3Path.is_bucketis False for a path with a version, sorm()now deletes that version asrm_file()andmv()already did, instead of raisingCannot delete the bucket.Thels(),find()andchmod()checks for a version drop the key condition that only the bucket path with a version needed.S3Path.is_glob()(used byS3PathPairing) and the expansion ofrm(),copy(),mv(),cat(),get()andexpand_path()do not read a path that ends in the form of a version ID query, also with an empty or slash-only ID, as a glob pattern.rm("s3://bucket/key?versionId=")also deletedkeyXversionId=, andmv()/copy()/get()/cat()likewise took the decoy. This holds for the whole path, also where*,?or[occur before the query, as it already did for a path with a version.glob()itself still reads such a string as a pattern.copy()/mv()name a destination below a stringpath2by parsingpath2and adding the suffix to its key (S3PathPairing.s3_copy_pairs), as already done for listedS3Pathsources; the string is kept when it names the same path.copy("s3://bucket/k", "s3://bucket/key?versionId=/")writeskey?versionId=/k(it raisedCannot copy to a versioned file.: the joined string parsed as version/kofkey), a version of a key ending in a query (a?versionId=v1?versionId=v2) is copied into a directory under its key's name, and a bucket path with a version aspath2raises before anything is copied or deleted.expand_path()parses the paths with a version ID, so a bucket path with a version raises there too;invalidate_cache()of the listed name of a root key such asbucket/?versionId=v1evicts that name only, not the other spellings of the query.docs/filesystem.mdand theS3Pathdocstrings state the grammar, including that the listed name of a key such as?versionId=v1at the bucket root raisesValueErrorwhen passed back as a path string (it named the bucket before).Out of scope, as agreed on #1491: the entry point (a) after #1454 (
s3::, doubled prefixes,S3Pathpassed inward), and the two cases of the 2026-11-29 comment (cp_filetrailing-slash lookup,touch("s3://bucket//")), which go with (a) and #1511. Trailing slashes keep their current targets (#1511): e.g.touch("s3://bucket/key?versionId=/")writes the keykey?versionId=/, whilepipe_file()of the same string writeskey?versionId=, as for anydir/.Behavior change, with a release note on master and
4.x: bucket paths with a version query raiseValueError;?versionId=with an empty or slash-only ID is a key everywhere and is not expanded as a glob. It goes to4.xthrough the backport session after it merges.WHY
Part (b) of #1491 (item 1 of the split); the audit is #1493 (decision 4; defects 6, 7, 9). It lands before (a), because passing
S3Pathinward would otherwise drop the #1481 rule for the strip-first methods.TEST
Tested commit: 74353d2, rebased on master ce72fcc (after #1538, #1541, #1548, #1532).
just lint,just docs lint: pass.just test offline(the offline target of Add an offline test target that no AWS account authorizes (GH-1495) #1532): 4,252 passed, none failed. No live AWS run.is_glob, cache invalidation, rejected bucket paths,rm/mvof the empty and slash-only queries,rmofbucket//?versionId=v1); the boundary cases (?versionId=v1/,?versionId=/v1,mvofbucket//?versionId=v1) pass on both.test_s3_copy_pairs_bucketthat paired the sourcebucket?versionId=v1(nowtest_s3_copy_pairs_bucket_with_version, which expectsValueError): thebucket?versionId=v1/bucket/?versionId=v1cases oftest_s3_path.py::test_parse,test_rm_bucket,test_ls_empty_bucket, the aiotest_put_checks_destinations_first[no-key](nowbucketandbucket/), and the?versionId=/case oftest_invalidate_cache_version_drops_object_path, which now has its own test: that spelling no longer invalidates the lookup ofa/c.txt, which it named only by reading/as a version.Differential check
Offline, moto
mock_aws()per case; same seeded versioned bucket for every case (k,key@v1/v2,key?versionId=,key?versionId=/, decoykeyXversionId=,dir/,dir/a,dir/b,x/y,/@s1, one pending upload ofkey), fresh filesystem and empty request log per case. Recorded: result, exception, request multiset (_make_api_callparams), bucket versions/delete markers/uploads after the call, local files.key,key?versionId=v1,key?versionId=v1/,key?versionId=,key?versionId=/,key?versionId=//,key?version_id=/,key?versionid=,bucket/key?versionId=/,key?,key?versionId=?,keyXversionId=,key*,dir/,dir/a?versionId=,bucket,bucket/,bucket//,bucket?versionId=v1(with and withouts3://),bucket/?versionId=v1,bucket//?versionId=s1,bucket?versionId=,bucket?versionId=/,bucket/?versionId=/,bucket/?versionId=. Operations: info, exists, isfile, isdir, ls, find (±withdirs), walk, du, glob, expand_path (±recursive), cat (±recursive), cat_file, open+read, size, get_file, get (±recursive), rm_file, rm (±recursive), rmdir, mkdir, touch (±truncate), pipe_file, put_file, cp_file/copy/copy recursive/mv from the path, cp_file/copy/mv to the path, checksum, created, modified, sign, metadata, getxattr, setxattr, get_tags, put_tags, chmod, object_version_info, list_multipart_uploads.get()of the bucket root (bucket,bucket/,bucket//), where whetherHeadObject diris sent depends on the thread schedule; only that field of those cells is excluded, their results, state and local files are compared.key?versionId=,key?versionid=,dir/a?versionId=,bucket/?versionId=) in the expanding methods only; every method for the bucket paths with a version;bucket/?versionId=/(now the key?versionId=/); ands3://bucket?versionId=in the expanding methods (Cannot traverse all files in S3→Invalid S3 path format).copy/mvfromkinto the four slash-only spellings (writekey?versionId=/k),cp_fileofkey?version_id=/(since cp_file copies another object than it looks up, and a recursive copy of a bucket raises #1510 it looks up the parsed source: the keykey?version_id=/instead of version/ofkey), andrm/rm -rofbucket//?versionId=s1(deletes version s1 of/instead ofCannot delete the bucket.).key?versionId=v1/and all other spellings and methods are unchanged. The cleanup commit c901e64 changes no case against 9cc87a4. A second schedule-dependent request log is excluded:cat("s3://bucket/dir/", recursive=True)fails fast on the GetObject ofdir(NoSuchKey), so how many of the parallel sibling GetObjects are sent varies (seen in 3 of ~34 branch runs and 0 of ~34 merge-base runs of that cell; the code path has no version query); its exception and state are compared.rm/mv/copy -rofkey?versionId=/act exactly as those ofkk/with keyskk,kk/,kk/a, and a missingkey?versionId=-shaped key behaves ass3://bucket/missing(rmsilent,catFileNotFoundError,expand_pathreturns the name).Recorded for (a) on #1491 (after consulting Codex and Claude Fable 5.2):
isfile()returningFalsefor invalid paths, validation of a keyless version in theS3Pathmodel, reopening a file opened with anS3Path(pre-existingAttributeError), validation of literal names inexpand_path(), and retiring the any-string helpers.🤖 Generated with Claude Code