[med-svn] [Git][python-team/packages/mypy][master] cherry-pick another patch

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Wed Aug 14 16:18:07 BST 2024



Michael R. Crusoe pushed to branch master at Debian Python Team / packages / mypy


Commits:
f07cec31 by Michael R. Crusoe at 2024-08-14T17:17:21+02:00
cherry-pick another patch

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0006-Revert-Fix-RawExpressionType.accept-crash-with-cache.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,6 +1,6 @@
 mypy (1.11.1-2) UNRELEASED; urgency=medium
 
-  * d/patches: cherry-pick two patches from upstream to fix a regression
+  * d/patches: cherry-pick 3 patches from upstream to fix a regression
     found in SQLalchemy
 
  -- Michael R. Crusoe <crusoe at debian.org>  Wed, 14 Aug 2024 15:51:13 +0200


=====================================
debian/patches/0006-Revert-Fix-RawExpressionType.accept-crash-with-cache.patch
=====================================
@@ -0,0 +1,47 @@
+From: Ivan Levkivskyi <levkivskyi at gmail.com>
+Date: Sun, 4 Aug 2024 12:22:29 +0100
+Subject: Revert "Fix `RawExpressionType.accept` crash with
+ `--cache-fine-grained`" (#17637)
+
+Reverts python/mypy#17588
+---
+ mypy/types.py                       |  2 --
+ test-data/unit/check-typeddict.test | 12 ------------
+ 2 files changed, 14 deletions(-)
+
+diff --git a/mypy/types.py b/mypy/types.py
+index 2881717..6db6862 100644
+--- a/mypy/types.py
++++ b/mypy/types.py
+@@ -2734,8 +2734,6 @@ class RawExpressionType(ProperType):
+         return self.base_type_name.replace("builtins.", "")
+ 
+     def accept(self, visitor: TypeVisitor[T]) -> T:
+-        if self.node is not None:
+-            return self.node.accept(visitor)
+         assert isinstance(visitor, SyntheticTypeVisitor)
+         ret: T = visitor.visit_raw_expression_type(self)
+         return ret
+diff --git a/test-data/unit/check-typeddict.test b/test-data/unit/check-typeddict.test
+index a6a89f1..d35ec8d 100644
+--- a/test-data/unit/check-typeddict.test
++++ b/test-data/unit/check-typeddict.test
+@@ -1442,18 +1442,6 @@ reveal_type(x) # N: Revealed type is "TypedDict('__main__.X', {'a': TypedDict('_
+ reveal_type(x['a']['b']) # N: Revealed type is "builtins.int"
+ [builtins fixtures/dict.pyi]
+ 
+-[case testTypedDictForwardReferenceCacheFineGrained]
+-# flags: --cache-fine-grained
+-from mypy_extensions import TypedDict
+-class A(TypedDict):
+-    b: "B"
+-class B(TypedDict):
+-    c: "C"
+-class C(TypedDict):
+-    d: "D"
+-class D:
+-    pass
+-
+ [case testSelfRecursiveTypedDictInheriting]
+ from mypy_extensions import TypedDict
+ 


=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ verbose
 intersphinx
 0004-Revert-Fix-Literal-strings-containing-pipe-character.patch
 0005-An-alternative-fix-for-a-union-like-literal-string-1.patch
+0006-Revert-Fix-RawExpressionType.accept-crash-with-cache.patch



View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/commit/f07cec31fe205ea923882096b0b5a677d4ffde65

-- 
View it on GitLab: https://salsa.debian.org/python-team/packages/mypy/-/commit/f07cec31fe205ea923882096b0b5a677d4ffde65
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240814/e1ea5f6c/attachment-0001.htm>


More information about the debian-med-commit mailing list