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 — Attempt to clarify the ByteString situation by hauntsaninja · Pull Request #9783 · python/typeshed Conversation
|
|
+1 at least for removing the subclass dependency to match runtime. (Even if the abc is registered at runtime.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
For the record, I only clicked "approve" once; not sure how that happened! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| def __enter__(self) -> TextIO: ... | ||
|
|
||
| class ByteString(Sequence[int], metaclass=ABCMeta): ... | ||
| ByteString: typing_extensions.TypeAlias = bytes | bytearray | memoryview |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We discussed this in person a bit. "bytes | bytearray | memoryview" matches the documented semantics of this symbol (https://docs.python.org/3.11/library/typing.html#typing.ByteString), but the previous stubs here in typeshed didn't include memoryview, which is not a Sequence. It's a mess either way and that's why we deprecated this thing, but we may have to adjust this definition if people complain about it.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This still marked as draft, @hauntsaninja shall we land it? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.