Pending removal in Python 3.17¶
-
Before Python 3.14, old-style unions were implemented using the private class
typing._UnionGenericAlias. This class is no longer needed for the implementation, but it has been retained for backward compatibility, with removal scheduled for Python 3.17. Users should use documented introspection helpers liketyping.get_origin()andtyping.get_args()instead of relying on private implementation details.typing.ByteString, deprecated since Python 3.9, is scheduled for removal in Python 3.17. PreferSequenceorBuffer. For use in type annotations, prefer a union, likebytes | bytearray, orcollections.abc.Buffer. (Contributed by Shantanu Jain in gh-91896.)
-
collections.abc.ByteStringis scheduled for removal in Python 3.17. PreferSequenceorBuffer. For use in type annotations, prefer a union, likebytes | bytearray, orcollections.abc.Buffer. (Contributed by Shantanu Jain in gh-91896.)