Skip to content

Commit

Permalink
Update mypy to version 0.942 / rev 28 via SR 965437
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/965437
by user mcepl + dimstar_suse
- Add 12452-stringent-err-msg.patch to make mypy work
  with more stringent error messages in Python
  >= 3.10.3 (gh#python/mypy#12451).

- Update to version 0.942:
 - Fixes to Regressions:
  - Let overload item have a more general return type than the implementation (Jukka Lehtosalo, PR 12435)
  - Fix inheritance false positives with dataclasses/attrs (Jukka Lehtosalo, PR 12411)
  - Support overriding dunder attributes in Enum subclass (Petter Friberg, PR 12138)
  - Fix small conditional overload regression (Marc Mueller, PR 12336)
 - Other Fixes:
  - Fix issues related to the order of processing in the builtins import cycle (Jukka Lehtosalo, PR 12431)
  - Fix crash in match statement if class name is undefined (Jukka Lehtosalo, PR 12417)
  - Allow non-final __match_args__ and overriding (
  • Loading branch information
mcepl authored and bmwiedemann committed Apr 1, 2022
1 parent 5da7df4 commit a43e42f
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 3 deletions.
Binary file modified packages/m/mypy/.files
Binary file not shown.
23 changes: 23 additions & 0 deletions packages/m/mypy/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,27 @@
<comment>Automatic submission by obs-autosubmit</comment>
<requestid>964181</requestid>
</revision>
<revision rev="28" vrev="1">
<srcmd5>5cea14d78ead57137b153160f761924b</srcmd5>
<version>0.942</version>
<time>1648841688</time>
<user>dimstar_suse</user>
<comment>- Add 12452-stringent-err-msg.patch to make mypy work
with more stringent error messages in Python
&gt;= 3.10.3 (gh#python/mypy#12451).

- Update to version 0.942:
- Fixes to Regressions:
- Let overload item have a more general return type than the implementation (Jukka Lehtosalo, PR 12435)
- Fix inheritance false positives with dataclasses/attrs (Jukka Lehtosalo, PR 12411)
- Support overriding dunder attributes in Enum subclass (Petter Friberg, PR 12138)
- Fix small conditional overload regression (Marc Mueller, PR 12336)
- Other Fixes:
- Fix issues related to the order of processing in the builtins import cycle (Jukka Lehtosalo, PR 12431)
- Fix crash in match statement if class name is undefined (Jukka Lehtosalo, PR 12417)
- Allow non-final __match_args__ and overriding (Jukka Lehtosalo, PR 12415)

- Update to version 0.941:</comment>
<requestid>965437</requestid>
</revision>
</revisionlist>
31 changes: 31 additions & 0 deletions packages/m/mypy/12452-stringent-err-msg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From d7f0b6c849149c77f09e2773a667c7f1cc16ab74 Mon Sep 17 00:00:00 2001
From: Stanislav Levin <slev@altlinux.org>
Date: Fri, 25 Mar 2022 17:12:47 +0300
Subject: [PATCH] testcmdline: Sync assumption about error message for Python
3.10.3

Python 3.10.3 is more correct about syntax error for
`mypy` test case `testBlocker`.

See https://bugs.python.org/issue46240 for details.

Closes #12451

Signed-off-by: Stanislav Levin <slev@altlinux.org>
---
test-data/unit/cmdline.test | 4 ++++
1 file changed, 4 insertions(+)

--- a/test-data/unit/cmdline.test
+++ b/test-data/unit/cmdline.test
@@ -1249,6 +1249,10 @@ Found 1 error in 1 file (errors prevente
pkg/x.py:1: error: invalid syntax. Perhaps you forgot a comma?
Found 1 error in 1 file (errors prevented further checking)
== Return code: 2
+[out version>=3.10.3]
+pkg/x.py:1: error: invalid syntax
+Found 1 error in 1 file (errors prevented further checking)
+== Return code: 2

[case testCmdlinePackageAndFile]
# cmd: mypy -p pkg file
1 change: 0 additions & 1 deletion packages/m/mypy/mypy-0.941.tar.gz

This file was deleted.

1 change: 1 addition & 0 deletions packages/m/mypy/mypy-0.942.tar.gz
23 changes: 22 additions & 1 deletion packages/m/mypy/mypy.changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
-------------------------------------------------------------------
Mon Mar 28 15:33:14 UTC 2022 - Matej Cepl <mcepl@suse.com>

- Add 12452-stringent-err-msg.patch to make mypy work
with more stringent error messages in Python
>= 3.10.3 (gh#python/mypy#12451).

-------------------------------------------------------------------
Fri Mar 25 21:32:58 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>

- Update to version 0.942:
- Fixes to Regressions:
- Let overload item have a more general return type than the implementation (Jukka Lehtosalo, PR 12435)
- Fix inheritance false positives with dataclasses/attrs (Jukka Lehtosalo, PR 12411)
- Support overriding dunder attributes in Enum subclass (Petter Friberg, PR 12138)
- Fix small conditional overload regression (Marc Mueller, PR 12336)
- Other Fixes:
- Fix issues related to the order of processing in the builtins import cycle (Jukka Lehtosalo, PR 12431)
- Fix crash in match statement if class name is undefined (Jukka Lehtosalo, PR 12417)
- Allow non-final __match_args__ and overriding (Jukka Lehtosalo, PR 12415)

-------------------------------------------------------------------
Mon Mar 14 21:44:08 UTC 2022 - Sebastian Wagner <sebix+novell.com@sebix.at>

- Update to version 0.9.41:
- Update to version 0.941:
- No changelog available.

-------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion packages/m/mypy/mypy.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
%define skip_python2 1
%define typed_ast_version 1.5.1
Name: mypy
Version: 0.941
Version: 0.942
Release: 0
Summary: Optional static typing for Python
License: MIT
Expand All @@ -31,6 +31,9 @@ Source0: https://files.pythonhosted.org/packages/source/m/mypy/mypy-%{ver
# License Source1: Apache-2.0. Only for the test suite, not packaged here.
Source1: https://files.pythonhosted.org/packages/source/t/types-typed-ast/types-typed-ast-%{typed_ast_version}.tar.gz
Source99: mypy-rpmlintrc
# PATCH-FIX-UPSTREAM 12452-stringent-err-msg.patch gh#python/mypy#12451 mcepl@suse.com
# Work with more stringent error messages in Python >= 3.10.3
Patch0: 12452-stringent-err-msg.patch
BuildRequires: %{python_module mypy_extensions >= 0.4.3}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tomli >= 1.1.0}
Expand Down

0 comments on commit a43e42f

Please sign in to comment.