mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Attempt to clarify the ByteString situation (#9783)
See https://github.com/python/cpython/issues/102092 This makes the behaviour of typing.ByteString better match its documentation.
This commit is contained in:
@@ -23,6 +23,7 @@ collections.AsyncGenerator.ag_await
|
||||
collections.AsyncGenerator.ag_code
|
||||
collections.AsyncGenerator.ag_frame
|
||||
collections.AsyncGenerator.ag_running
|
||||
collections.ByteString # see comments in py3_common.txt
|
||||
collections.Callable
|
||||
collections.Mapping.__reversed__ # Set to None at runtime for a better error message
|
||||
contextvars.ContextVar.get
|
||||
|
||||
@@ -29,6 +29,7 @@ collections.AsyncGenerator.ag_await
|
||||
collections.AsyncGenerator.ag_code
|
||||
collections.AsyncGenerator.ag_frame
|
||||
collections.AsyncGenerator.ag_running
|
||||
collections.ByteString # see comments in py3_common.txt
|
||||
collections.Callable
|
||||
collections.ItemsView.__reversed__
|
||||
collections.KeysView.__reversed__
|
||||
|
||||
@@ -27,6 +27,7 @@ collections.AsyncGenerator.ag_await
|
||||
collections.AsyncGenerator.ag_code
|
||||
collections.AsyncGenerator.ag_frame
|
||||
collections.AsyncGenerator.ag_running
|
||||
collections.ByteString # see comments in py3_common.txt
|
||||
collections.Callable
|
||||
collections.Mapping.__reversed__ # Set to None at runtime for a better error message
|
||||
collections.ItemsView.__reversed__
|
||||
|
||||
@@ -667,6 +667,11 @@ xml.etree.ElementTree.Element.__iter__
|
||||
xml.etree.cElementTree.Element.__iter__
|
||||
typing.IO.__iter__ # See https://github.com/python/typeshed/commit/97bc450acd60c1bcdafef3ce8fbe3b95a9c0cac3
|
||||
|
||||
# Pretend typing.ByteString is a Union, to better match its documented semantics.
|
||||
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
|
||||
# because it's not an ABC that makes any sense and was deprecated in 3.12
|
||||
_collections_abc.ByteString
|
||||
|
||||
# ==========
|
||||
# Missing from deprecated modules
|
||||
# Any of these can be added if someone needs them
|
||||
|
||||
Reference in New Issue
Block a user