@@ -10546,7 +10546,7 @@ m.py:9: error: Argument 2 to "foo" has incompatible type "str"; expected "int"
10546
10546
m.py:10: error: Unexpected keyword argument "a" for "foo"
10547
10547
partial.py:4: note: "foo" defined here
10548
10548
10549
- [case testAddKeepChangeAndRemoveFunctionDeprecation ]
10549
+ [case testDeprecatedAddKeepChangeAndRemoveFunctionDeprecation ]
10550
10550
from a import f
10551
10551
f()
10552
10552
import a
@@ -10587,7 +10587,7 @@ main:4: note: function a.f is deprecated: use f3 instead
10587
10587
==
10588
10588
10589
10589
10590
- [case testRemoveFunctionDeprecation ]
10590
+ [case testDeprecatedRemoveFunctionDeprecation ]
10591
10591
from a import f
10592
10592
f()
10593
10593
import a
@@ -10607,7 +10607,7 @@ main:1: note: function a.f is deprecated: use f2 instead
10607
10607
main:4: note: function a.f is deprecated: use f2 instead
10608
10608
==
10609
10609
10610
- [case testKeepFunctionDeprecation ]
10610
+ [case testDeprecatedKeepFunctionDeprecation ]
10611
10611
from a import f
10612
10612
f()
10613
10613
import a
@@ -10632,7 +10632,7 @@ main:1: note: function a.f is deprecated: use f2 instead
10632
10632
main:4: note: function a.f is deprecated: use f2 instead
10633
10633
10634
10634
10635
- [case testAddFunctionDeprecationIndirectImport1-only_when_nocache ]
10635
+ [case testDeprecatedAddFunctionDeprecationIndirectImport ]
10636
10636
from b import f
10637
10637
f()
10638
10638
import b
@@ -10649,15 +10649,15 @@ from typing_extensions import deprecated
10649
10649
@deprecated("use f2 instead")
10650
10650
def f() -> int: ...
10651
10651
10652
-
10653
10652
[builtins fixtures/tuple.pyi]
10654
10653
[out]
10655
10654
==
10655
+ b.py:1: note: function a.f is deprecated: use f2 instead
10656
10656
main:1: note: function a.f is deprecated: use f2 instead
10657
10657
main:4: note: function a.f is deprecated: use f2 instead
10658
- b.py:1: note: function a.f is deprecated: use f2 instead
10659
10658
10660
- [case testAddFunctionDeprecationIndirectImport2-only_when_cache]
10659
+
10660
+ [case testDeprecatedChangeFunctionDeprecationIndirectImport]
10661
10661
from b import f
10662
10662
f()
10663
10663
import b
@@ -10667,17 +10667,45 @@ b.f()
10667
10667
from a import f
10668
10668
10669
10669
[file a.py]
10670
+ from typing_extensions import deprecated
10671
+ @deprecated("use f1 instead")
10670
10672
def f() -> int: ...
10671
10673
10672
10674
[file a.py.2]
10673
10675
from typing_extensions import deprecated
10674
10676
@deprecated("use f2 instead")
10675
10677
def f() -> int: ...
10676
10678
10677
-
10678
10679
[builtins fixtures/tuple.pyi]
10679
10680
[out]
10681
+ b.py:1: note: function a.f is deprecated: use f1 instead
10682
+ main:1: note: function a.f is deprecated: use f1 instead
10683
+ main:4: note: function a.f is deprecated: use f1 instead
10680
10684
==
10681
10685
b.py:1: note: function a.f is deprecated: use f2 instead
10682
10686
main:1: note: function a.f is deprecated: use f2 instead
10683
10687
main:4: note: function a.f is deprecated: use f2 instead
10688
+
10689
+ [case testDeprecatedRemoveFunctionDeprecationIndirectImport]
10690
+ from b import f
10691
+ f()
10692
+ import b
10693
+ b.f()
10694
+
10695
+ [file b.py]
10696
+ from a import f
10697
+
10698
+ [file a.py]
10699
+ from typing_extensions import deprecated
10700
+ @deprecated("use f1 instead")
10701
+ def f() -> int: ...
10702
+
10703
+ [file a.py.2]
10704
+ def f() -> int: ...
10705
+
10706
+ [builtins fixtures/tuple.pyi]
10707
+ [out]
10708
+ b.py:1: note: function a.f is deprecated: use f1 instead
10709
+ main:1: note: function a.f is deprecated: use f1 instead
10710
+ main:4: note: function a.f is deprecated: use f1 instead
10711
+ ==
0 commit comments