GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Misleading exception message from `pathlib.PurePath()` when mixing str and bytes arguments · Issue #103525 · python/cpython Closed Closed Copy link Labels 3.12only security fixesonly security fixestopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionSince 6716254, attempting to create a >>> import pathlib >>> pathlib.Path('foo', b'bar') TypeError: Can't mix strings and bytes in path components This message implies that bytes are supported, as long as we don't mix them with strings. And yet when we try that: >>> pathlib.Path(b'foo', b'bar') TypeError: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'bytes' This message is better, and should be used in the former case. Linked PRsActivity
MetadataMetadataAssigneesLabels3.12only security fixesonly security fixestopic-pathlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| 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. |