From 6baa5b136812c6ae0d74a515b69bc2d6682b2800 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 12 Jun 2024 10:46:48 -0700 Subject: [PATCH] Fixed a bug that causes `warnings.deprecated` not to work if the python version is 3.13. This was caused by recent changes to typeshed stubs. --- packages/pyright-internal/src/analyzer/sourceFile.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pyright-internal/src/analyzer/sourceFile.ts b/packages/pyright-internal/src/analyzer/sourceFile.ts index 550d824b1..fbe221aa4 100644 --- a/packages/pyright-internal/src/analyzer/sourceFile.ts +++ b/packages/pyright-internal/src/analyzer/sourceFile.ts @@ -298,7 +298,8 @@ export class SourceFile { this._uri.pathEndsWith('stdlib/abc.pyi') || this._uri.pathEndsWith('stdlib/enum.pyi') || this._uri.pathEndsWith('stdlib/queue.pyi') || - this._uri.pathEndsWith('stdlib/types.pyi') + this._uri.pathEndsWith('stdlib/types.pyi') || + this._uri.pathEndsWith('stdlib/warnings.pyi') ) { this._isBuiltInStubFile = true; }