File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
@tests/stubtest_allowlists Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ pdb.Pdb.do_exceptions
116
116
pdb.Pdb.interaction
117
117
pdb.Pdb.message
118
118
pdb.Pdb.user_opcode
119
+ # `__replace__` to be special cased in dataclasses
119
120
pstats.FunctionProfile.__replace__
120
121
pstats.StatsProfile.__replace__
121
122
pydoc.pager
@@ -156,9 +157,7 @@ tkinter.PhotoImage.zoom
156
157
tkinter.Text.count
157
158
tkinter.Wm.wm_attributes
158
159
trace.CoverageResults.write_results
159
- types.CodeType.__replace__
160
160
types.MappingProxyType.get
161
- types.SimpleNamespace.__replace__
162
161
unittest.IsolatedAsyncioTestCase.loop_factory
163
162
unittest.TestProgram.usageExit
164
163
unittest.__all__
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ class CodeType:
245
245
co_qualname : str = ...,
246
246
co_linetable : bytes = ...,
247
247
co_exceptiontable : bytes = ...,
248
- ) -> CodeType : ...
248
+ ) -> Self : ...
249
249
elif sys .version_info >= (3 , 10 ):
250
250
def replace (
251
251
self ,
@@ -266,7 +266,7 @@ class CodeType:
266
266
co_filename : str = ...,
267
267
co_name : str = ...,
268
268
co_linetable : bytes = ...,
269
- ) -> CodeType : ...
269
+ ) -> Self : ...
270
270
else :
271
271
def replace (
272
272
self ,
@@ -287,7 +287,10 @@ class CodeType:
287
287
co_filename : str = ...,
288
288
co_name : str = ...,
289
289
co_lnotab : bytes = ...,
290
- ) -> CodeType : ...
290
+ ) -> Self : ...
291
+
292
+ if sys .version_info >= (3 , 13 ):
293
+ __replace__ = replace
291
294
292
295
@final
293
296
class MappingProxyType (Mapping [_KT , _VT_co ]):
@@ -314,6 +317,8 @@ class SimpleNamespace:
314
317
def __getattribute__ (self , name : str , / ) -> Any : ...
315
318
def __setattr__ (self , name : str , value : Any , / ) -> None : ...
316
319
def __delattr__ (self , name : str , / ) -> None : ...
320
+ if sys .version_info >= (3 , 13 ):
321
+ def __replace__ (self , ** kwargs : Any ) -> Self : ...
317
322
318
323
class ModuleType :
319
324
__name__ : str
You can’t perform that action at this time.
0 commit comments