-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependency typing-extensions to v4 #255
Open
renovate
wants to merge
1
commit into
release
Choose a base branch
from
renovate/typing-extensions-4.x
base: release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f3809ed
to
28b8850
Compare
d896b6d
to
6648f4b
Compare
6648f4b
to
06648c0
Compare
b47b407
to
8f83e50
Compare
06f40b0
to
739f042
Compare
739f042
to
22a1302
Compare
22a1302
to
6fe710b
Compare
6fe710b
to
60caa66
Compare
60caa66
to
fe4b9fb
Compare
fe4b9fb
to
31c511f
Compare
4047e7f
to
a1dd1a3
Compare
9fdaf76
to
6d06878
Compare
6d06878
to
4f12e96
Compare
4f12e96
to
b793d2d
Compare
b793d2d
to
e8cd0da
Compare
e8cd0da
to
5dc5ec9
Compare
5dc5ec9
to
3222364
Compare
3222364
to
3a7884e
Compare
3a7884e
to
f2b9934
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==3.10.0.2
->==4.12.2
Release Notes
python/typing_extensions (typing-extensions)
v4.12.2
Compare Source
generics with an overridden
__eq__
method would raise errors.Patch by Jelle Zijlstra.
v4.12.1
Compare Source
of PEP 649 in Python 3.14. Patch by Jelle Zijlstra.
Annotated
types would causeTypeError
to be raised if the nestedAnnotated
type had unhashablemetadata. Patch by Alex Waygood.
v4.12.0
Compare Source
This release is mostly the same as 4.12.0rc1 but fixes one more
longstanding bug.
typing_extensions.ParamSpec
on Python 3.8 and3.9 that meant that
isinstance(typing_extensions.ParamSpec("P"), typing.TypeVar)
would have adifferent result in some situations depending on whether or not a profiling
function had been set using
sys.setprofile
. Patch by Alex Waygood.v4.11.0
Compare Source
This feature release provides improvements to various recently
added features, most importantly type parameter defaults (PEP 696).
There are no changes since 4.11.0rc1.
v4.10.0
Compare Source
This feature release adds support for PEP 728 (TypedDict with extra
items) and PEP 742 (
TypeIs
).There are no changes since 4.10.0rc1.
v4.9.0
Compare Source
This feature release adds
typing_extensions.ReadOnly
, as specifiedby PEP 705, and makes various other improvements, especially to
@typing_extensions.deprecated()
.There are no changes since 4.9.0rc1.
v4.8.0
Compare Source
No changes since 4.8.0rc1.
v4.7.1
Compare Source
TypedDict
,NamedTuple
andis_protocol
on PyPy-3.7 andPyPy-3.8. Patch by Alex Waygood. Note that PyPy-3.7 and PyPy-3.8 are unsupported
by the PyPy project. The next feature release of typing-extensions will
drop support for PyPy-3.7 and may also drop support for PyPy-3.8.
v4.7.0
Compare Source
which reaches its end of life on June 27, 2023. Version 4.8.0 will support
only Python 3.8.0 and up.
typing_extensions.Protocol
class that had one or morenon-callable members would raise
TypeError
whenissubclass()
was called against it, even if it defined a custom
__subclasshook__
method. The correct behaviour -- which has now been restored -- is not to
raise
TypeError
in these situations if a custom__subclasshook__
methodis defined. Patch by Alex Waygood (backporthttps://github.com/python/cpython/pull/105976l/105976).
v4.6.3
Compare Source
runtime-checkable protocols. The regression meant
that doing
class Foo(X, typing_extensions.Protocol)
, whereX
was a class thathad
abc.ABCMeta
as its metaclass, would then cause subsequentisinstance(1, X)
calls to erroneously raiseTypeError
. Patch byAlex Waygood (backporting the CPythonhttps://github.com/python/cpython/pull/105152l/105152).
typing_extensions
is distributed under the same license asCPython itself.
a bug in CPython, which will be fixed in 3.12.0b2. The
typing_extensions
test suite now passes on 3.12.0b1.v4.6.2
Compare Source
@deprecated
on classes with__new__
but no__init__
.Patch by Jelle Zijlstra.
runtime-checkable protocol using
isinstance()
would causeAttributeError
to be raised if using Python 3.7.
v4.6.1
Compare Source
@runtime
to formal API@runtime_checkable
in the errormessage. Patch by Xuehai Pan.
Protocol
that wasgeneric over a
ParamSpec
or aTypeVarTuple
would causeTypeError
to beraised. Patch by Alex Waygood.
v4.6.0
Compare Source
typing_extensions
is now documented athttps://typing-extensions.readthedocs.io/en/latest/. Patch by Jelle Zijlstra.
Add
typing_extensions.Buffer
, a marker class for buffer types, as proposedby PEP 688. Equivalent to
collections.abc.Buffer
in Python 3.12. Patch byJelle Zijlstra.
Backport two CPython PRs fixing various issues with
typing.Literal
:https://github.com/python/cpython/pull/232943294 https://github.com/python/cpython/pull/23383ll/23383. Both CPython PRs were
originally by Yurii Karabas, and both were backported to Python >=3.9.1, but
no earlier. Patch by Alex Waygood.
A side effect of one of the changes is that equality comparisons of
Literal
objects will now raise a
TypeError
if one of theLiteral
objects beingcompared has a mutable parameter. (Using mutable parameters with
Literal
isnot supported by PEP 586 or by any major static type checkers.)
Literal
is now reimplemented on all Python versions <= 3.10.0. Thetyping_extensions
version does not suffer from the bug that was fixed inhttps://github.com/python/cpython/pull/293349334. (The CPython bugfix was
backported to CPython 3.10.1 and 3.9.8, but no earlier.)
Backport CPython PR 26067
(originally by Yurii Karabas), ensuring that
isinstance()
calls onprotocols raise
TypeError
when the protocol is not decorated with@runtime_checkable
. Patch by Alex Waygood.Backport several significant performance improvements to runtime-checkable
protocols that have been made in Python 3.12 (https://github.com/python/cpython/issues/74690es/74690 for details). Patch by Alex
Waygood.
A side effect of one of the performance improvements is that the members of
a runtime-checkable protocol are now considered “frozen” at runtime as soon
as the class has been created. Monkey-patching attributes onto a
runtime-checkable protocol will still work, but will have no impact on
isinstance()
checks comparing objects to the protocol. See"What's New in Python 3.12"
for more details.
isinstance()
checks against runtime-checkable protocols now useinspect.getattr_static()
rather thanhasattr()
to lookup whetherattributes exist (backporthttps://github.com/python/cpython/pull/1030343034).
This means that descriptors and
__getattr__
methods are no longerunexpectedly evaluated during
isinstance()
checks against runtime-checkableprotocols. However, it may also mean that some objects which used to be
considered instances of a runtime-checkable protocol on older versions of
typing_extensions
may no longer be considered instances of that protocolusing the new release, and vice versa. Most users are unlikely to be affected
by this change. Patch by Alex Waygood.
Backport the ability to define
__init__
methods on Protocol classes, achange made in Python 3.11 (originally implementedhttps://github.com/python/cpython/pull/31628ll/31628 by Adrian Garcia Badaracco).
Patch by Alex Waygood.
Speedup
isinstance(3, typing_extensions.SupportsIndex)
by >10x on Python<3.12. Patch by Alex Waygood.
Add
typing_extensions
versions ofSupportsInt
,SupportsFloat
,SupportsComplex
,SupportsBytes
,SupportsAbs
andSupportsRound
. Thesehave the same semantics as the versions from the
typing
module, butisinstance()
checks against thetyping_extensions
versions are >10x fasterat runtime on Python <3.12. Patch by Alex Waygood.
Add
__orig_bases__
to non-generic TypedDicts, call-based TypedDicts, andcall-based NamedTuples. Other TypedDicts and NamedTuples already had the attribute.
Patch by Adrian Garcia Badaracco.
Add
typing_extensions.get_original_bases
, a backport oftypes.get_original_bases
,introduced in Python 3.12 (CPythonhttps://github.com/python/cpython/pull/101827l/101827, originally by James
Hilton-Balfe). Patch by Alex Waygood.
This function should always produce correct results when called on classes
constructed using features from
typing_extensions
. However, it mayproduce incorrect results when called on some
NamedTuple
orTypedDict
classes that use
typing.{NamedTuple,TypedDict}
on Python <=3.11.Constructing a call-based
TypedDict
using keyword arguments for the fieldsnow causes a
DeprecationWarning
to be emitted. This matches the behaviourof
typing.TypedDict
on 3.11 and 3.12.Backport the implementation of
NewType
from 3.10 (where it is implementedas a class rather than a function). This allows user-defined
NewType
s to bepickled. Patch by Alex Waygood.
Fix tests and import on Python 3.12, where
typing.TypeVar
can no longer besubclassed. Patch by Jelle Zijlstra.
Add
typing_extensions.TypeAliasType
, a backport oftyping.TypeAliasType
from PEP 695. Patch by Jelle Zijlstra.
Backport changes to the repr of
typing.Unpack
that were made in order toimplement PEP 692 (backport of
https://github.com/python/cpython/pull/1040484048). Patch by Alex Waygood.
v4.5.0
Compare Source
typing_extensions.deprecated
. Patchby Jelle Zijlstra.
default
parameter, PEP 696. Enablesruntime check if
None
was passed as default. Patch by Marc Mueller (@cdce8p).@typing_extensions.override
decorator now sets the.__override__
attribute. Patch by Steven Troxler.
get_type_hints()
on cross-module inheritedTypedDict
in 3.9 and 3.10.Patch by Carl Meyer.
frozen_default
parameter ondataclass_transform
. Patch by Erik De Bonte.v4.4.0
Compare Source
typing_extensions.Any
a backport of python 3.11's Any class which issubclassable at runtime. (backport from python/cpython#31841, by Shantanu
and Jelle Zijlstra). Patch by James Hilton-Balfe (@Gobot1234).
default
parameter, PEP 696.Patch by Marc Mueller (@cdce8p).
typing_extensions.override
. Patch byJelle Zijlstra.
infer_variance
parameter toTypeVar
, as specified in PEP 695.Patch by Jelle Zijlstra.
v4.3.0
Compare Source
typing_extensions.NamedTuple
, allowing for genericNamedTuple
s onPython <3.11 (backport from python/cpython#92027, by Serhiy Storchaka). Patch
by Alex Waygood (@AlexWaygood).
typing_extensions.TypedDict
to allow for genericTypedDict
s onPython <3.11 (backport from python/cpython#27663, by Samodya Abey). Patch by
Alex Waygood (@AlexWaygood).
v4.2.0
Compare Source
typing.Unpack
andtyping.TypeVarTuple
on Python 3.11.ParamSpecArgs
andParamSpecKwargs
to__all__
.typing_extensions.dataclass_transform
to rename thefield_descriptors
parameter tofield_specifiers
and acceptarbitrary keyword arguments.
typing_extensions.get_overloads
andtyping_extensions.clear_overloads
, and add registry support totyping_extensions.overload
. Backport from python/cpython#89263.typing_extensions.assert_type
. Backport from bpo-46480.v4.1.1
Compare Source
typing_extensions
on Python 3.7.0 and 3.7.1. Originalpatch by Nikita Sobolev (@sobolevn).
v4.1.0
Compare Source
typing_extensions.TypeVarTuple
and
typing_extensions.Unpack
.Required
andNotRequired
with__required_keys__
,__optional_keys__
andget_type_hints()
. Patch by David Cabot (@d-k-bo).typing_extensions.LiteralString
.Never
andassert_never
. Backport from bpo-46475.ParamSpec
args and kwargs are now equal to themselves. Backport frombpo-46676. Patch by Gregory Beauregard (@GBeauregard).
reveal_type
. Backport from bpo-46414.typing_extensions.dataclass_transform
.Annotated
can now wrapClassVar
andFinal
. Backport frombpo-46491. Patch by Gregory Beauregard (@GBeauregard).
Required
andNotRequired
to__all__
. Patch byYuri Karabas (@uriyyo).
@final
decorator now sets the__final__
attribute on thedecorated object to allow runtime introspection. Backport from
bpo-46342.
is_typeddict
. Patch by Chris Moradi (@chrismoradi) and JamesHilton-Balfe (@Gobot1234).
v4.0.1
Compare Source
Required
andNotRequired
. Patch byJelle Zijlstra (@jellezijlstra).
Self
as a type argument. Patch by Chris Wesseling(@CharString) and James Hilton-Balfe (@Gobot1234).
v4.0.0
Compare Source
See the README for more information.
Added in version 4.0.0
typing_extensions.Self
. Patch byJames Hilton-Balfe (@Gobot1234).
typing_extensions.Required
andNotRequired
.Patch by David Foster (@davidfstr).
Removed in version 4.0.0
The following non-exported but non-private names have been removed as they are
unneeded for supporting Python 3.6 and newer.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.