Skip to content

Commit 3a42332

Browse files
mceplbmwiedemann
authored andcommitted
Update mypy to version 1.3.0 / rev 37 via SR 1086859
https://build.opensuse.org/request/show/1086859 by user mcepl + dimstar_suse - Skip over failing testMathOps (gh#python/mypy#15221). - Update to 1.3.0: - Improve performance of union subtyping - Add negative subtype caches - Stubtest: Check that the stub is abstract if the runtime is, even when the stub is an overloaded method - Stubtest: Verify stub methods or properties are decorated with @Final if they are decorated with @Final at runtime - Stubtest: Fix stubtest false positives with TypedDicts at runtime - Stubgen: Support @functools.cached_property - Improvements to stubgenc - Add support for converters with TypeVars on generic attrs classes - Fix attrs.evolve on bound TypeVar - Improve async documentation - Improvements to cheat sheet - Add documentation for bytes formatting error code - Convert insecure links to use H
1 parent d6cbd20 commit 3a42332

12 files changed

Lines changed: 227 additions & 9 deletions

‎packages/m/mypy/.files‎

1 Byte
Binary file not shown.

‎packages/m/mypy/.rev‎

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,4 +434,105 @@
434434
- Don't skip the test, add testI64Cast-fix.patch to make it</comment>
435435
<requestid>1085248</requestid>
436436
</revision>
437+
<revision rev="37" vrev="1">
438+
<srcmd5>07e7dd5b6c57b247b2d4701dcbb3310c</srcmd5>
439+
<version>1.3.0</version>
440+
<time>1684074695</time>
441+
<user>dimstar_suse</user>
442+
<comment>- Skip over failing testMathOps (gh#python/mypy#15221).
443+
- Update to 1.3.0:
444+
- Improve performance of union subtyping
445+
- Add negative subtype caches
446+
- Stubtest: Check that the stub is abstract if the runtime is,
447+
even when the stub is an overloaded method
448+
- Stubtest: Verify stub methods or properties are decorated
449+
with @final if they are decorated with @final at runtime
450+
- Stubtest: Fix stubtest false positives with TypedDicts at
451+
runtime
452+
- Stubgen: Support @functools.cached_property
453+
- Improvements to stubgenc
454+
- Add support for converters with TypeVars on generic attrs
455+
classes
456+
- Fix attrs.evolve on bound TypeVar
457+
- Improve async documentation
458+
- Improvements to cheat sheet
459+
- Add documentation for bytes formatting error code
460+
- Convert insecure links to use HTTPS
461+
- Also mention overloads in async iterator documentation
462+
- stubtest: Improve allowlist documentation
463+
- Clarify &quot;Using types... but not at runtime&quot;
464+
- Fix alignment of cheat sheet example
465+
- Fix error for callback protocol matching against callable
466+
type object
467+
- Improve bytes formatting error
468+
- Fix unions of bools and ints
469+
- Fix narrowing union types that include Self with isinstance
470+
- Allow objects matching SupportsKeysAndGetItem to be unpacked
471+
- Check type guard validity for staticmethods
472+
- Fix sys.platform when cross-compiling with emscripten
473+
- add sle15_python_module_pythons
474+
- update typed_ast to version 1.5.8.6
475+
- update types_psutil to version 5.9.5.12
476+
- update types_setuptools to version 67.7.0.1
477+
- fix &quot;E: wrong-script-end-of-line-encoding&quot; and &quot;E: spurious-executable-perm&quot; for docs/make.bat
478+
- fix &quot;W: python-doc-in-package&quot; for %{$python_sitelib}/mypyc/doc in Python 3.9, 3.10 and 3.11
479+
- update mypy to version 1.2.0:
480+
- Improvements to Dataclass Transforms
481+
- Support implicit default for &quot;init&quot; parameter in field specifiers (Wesley Collin Wright and Jukka Lehtosalo, PR 15010)
482+
- Support descriptors in dataclass transform (Jukka Lehtosalo, PR 15006)
483+
- Fix frozen_default in incremental mode (Wesley Collin Wright)
484+
- Fix frozen behavior for base classes with direct metaclasses (Wesley Collin Wright, PR 14878)
485+
- Mypyc: Native Floats
486+
- Mypyc now uses a native, unboxed representation for values of type float. Previously these were heap-allocated Python objects. Native floats are faster and use less memory. Code that uses floating-point operations heavily can be several times faster when using native floats.
487+
- Various float operations and math functions also now have optimized implementations. Refer to the documentation for a full list.
488+
- This can change the behavior of existing code that uses subclasses of float. When assigning an instance of a subclass of float to a variable with the float type, it gets implicitly converted to a float instance when compiled
489+
- Previously, implicit conversions were applied to int subclasses but not float subclasses.
490+
- Also, int values can no longer be assigned to a variable with type float in compiled code, since these types now have incompatible representations. An explicit conversion is required.
491+
- This restriction only applies to assignments, since they could otherwise narrow down the type of a variable from float to int. int values can still be implicitly converted to float when passed as arguments to functions that expect float values.
492+
- Note that mypyc still doesn’t support arrays of unboxed float values. Using list[float] involves heap-allocated float objects, since list can only store boxed values. Support for efficient floating point arrays is one of the next major planned mypyc features.
493+
- Related changes:
494+
- Use a native unboxed representation for floats (Jukka Lehtosalo, PR 14880)
495+
- Document native floats and integers (Jukka Lehtosalo, PR 14927)
496+
- Fixes to float to int conversion (Jukka Lehtosalo, PR 14936)
497+
- Mypyc: Native Integers
498+
- Mypyc now supports signed 32-bit and 64-bit integer types in addition to the arbitrary-precision int type. You can use the types mypy_extensions.i32 and mypy_extensions.i64 to speed up code that uses integer operations heavily.
499+
- Refer to the documentation for more information. This feature was contributed by Jukka Lehtosalo.
500+
- Other Mypyc Fixes and Improvements
501+
- Support iterating over a TypedDict (Richard Si, PR 14747)
502+
- Faster coercions between different tuple types (Jukka Lehtosalo, PR 14899)
503+
- Faster calls via type aliases (Jukka Lehtosalo, PR 14784)
504+
- Faster classmethod calls via cls (Jukka Lehtosalo, PR 14789)
505+
- Fixes to Crashes
506+
- Fix crash on class-level import in protocol definition (Ivan Levkivskyi, PR 14926)
507+
- Fix crash on single item union of alias (Ivan Levkivskyi, PR 14876)
508+
- Fix crash on ParamSpec in incremental mode (Ivan Levkivskyi, PR 14885)
509+
- Documentation Updates
510+
- Update adopting --strict documentation for 1.0 (Shantanu, PR 14865)
511+
- Some minor documentation tweaks (Jukka Lehtosalo, PR 14847)
512+
- Improve documentation of top level mypy: disable-error-code comment (Nikita Sobolev, PR 14810)
513+
- Error Reporting Improvements
514+
- Add error code to typing_extensions suggestion (Shantanu, PR 14881)
515+
- Add a separate error code for top-level await (Nikita Sobolev, PR 14801)
516+
- Don’t suggest two obsolete stub packages (Jelle Zijlstra, PR 14842)
517+
- Add suggestions for pandas-stubs and lxml-stubs (Shantanu, PR 14737)
518+
- Other Fixes and Improvements
519+
- Multiple inheritance considers callable objects as subtypes of functions (Christoph Tyralla, PR 14855)
520+
- stubtest: Respect @final runtime decorator and enforce it in stubs (Nikita Sobolev, PR 14922)
521+
- Fix false positives related to type[&lt;type-var&gt;] (sterliakov, PR 14756)
522+
- Fix duplication of ParamSpec prefixes and properly substitute ParamSpecs (EXPLOSION, PR 14677)
523+
- Fix line number if __iter__ is incorrectly reported as missing (Jukka Lehtosalo, PR 14893)
524+
- Fix incompatible overrides of overloaded generics with self types (Shantanu, PR 14882)
525+
- Allow SupportsIndex in slice expressions (Shantanu, PR 14738)
526+
- Support if statements in bodies of dataclasses and classes that use dataclass_transform (Jacek Chałupka, PR 14854)
527+
- Allow iterable class objects to be unpacked (including enums) (Alex Waygood, PR 14827)
528+
- Fix narrowing for walrus expressions used in match statements (Shantanu, PR 14844)
529+
- Add signature for attr.evolve (Ilya Konstantinov, PR 14526)
530+
- Fix Any inference when unpacking iterators that don't directly inherit from typing.Iterator (Alex Waygood, PR 14821)
531+
- Fix unpack with overloaded __iter__ method (Nikita Sobolev, PR 14817)
532+
- Reduce size of JSON data in mypy cache (dosisod, PR 14808)
533+
- Improve “used before definition” checks when a local definition has the same name as a global definition (Stas Ilinskiy, PR 14517)
534+
- Honor NoReturn as __setitem__ return type to mark unreachable code (sterliakov, PR 12572)
535+
</comment>
536+
<requestid>1086859</requestid>
537+
</revision>
437538
</revisionlist>

‎packages/m/mypy/mypy-1.1.1.tar.gz‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎packages/m/mypy/mypy-1.3.0.tar.gz‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/ipfs/bafybeighepf4lqoibi25tawptcalrenb3zqasnxk6gfp7a4kwpsva7yklq

‎packages/m/mypy/mypy.changes‎

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,112 @@
1+
-------------------------------------------------------------------
2+
Thu May 11 06:02:09 UTC 2023 - Matej Cepl <[email protected]>
3+
4+
- Skip over failing testMathOps (gh#python/mypy#15221).
5+
6+
-------------------------------------------------------------------
7+
Wed May 10 20:36:45 UTC 2023 - Matej Cepl <[email protected]>
8+
9+
- Update to 1.3.0:
10+
- Improve performance of union subtyping
11+
- Add negative subtype caches
12+
- Stubtest: Check that the stub is abstract if the runtime is,
13+
even when the stub is an overloaded method
14+
- Stubtest: Verify stub methods or properties are decorated
15+
with @final if they are decorated with @final at runtime
16+
- Stubtest: Fix stubtest false positives with TypedDicts at
17+
runtime
18+
- Stubgen: Support @functools.cached_property
19+
- Improvements to stubgenc
20+
- Add support for converters with TypeVars on generic attrs
21+
classes
22+
- Fix attrs.evolve on bound TypeVar
23+
- Improve async documentation
24+
- Improvements to cheat sheet
25+
- Add documentation for bytes formatting error code
26+
- Convert insecure links to use HTTPS
27+
- Also mention overloads in async iterator documentation
28+
- stubtest: Improve allowlist documentation
29+
- Clarify "Using types... but not at runtime"
30+
- Fix alignment of cheat sheet example
31+
- Fix error for callback protocol matching against callable
32+
type object
33+
- Improve bytes formatting error
34+
- Fix unions of bools and ints
35+
- Fix narrowing union types that include Self with isinstance
36+
- Allow objects matching SupportsKeysAndGetItem to be unpacked
37+
- Check type guard validity for staticmethods
38+
- Fix sys.platform when cross-compiling with emscripten
39+
40+
-------------------------------------------------------------------
41+
Mon May 8 13:56:42 UTC 2023 - Johannes Kastl <[email protected]>
42+
43+
- add sle15_python_module_pythons
44+
45+
-------------------------------------------------------------------
46+
Sun May 7 09:54:51 UTC 2023 - Sebastian Wagner <[email protected]>
47+
48+
- update typed_ast to version 1.5.8.6
49+
- update types_psutil to version 5.9.5.12
50+
- update types_setuptools to version 67.7.0.1
51+
- fix "E: wrong-script-end-of-line-encoding" and "E: spurious-executable-perm" for docs/make.bat
52+
- fix "W: python-doc-in-package" for %{$python_sitelib}/mypyc/doc in Python 3.9, 3.10 and 3.11
53+
- update mypy to version 1.2.0:
54+
- Improvements to Dataclass Transforms
55+
- Support implicit default for "init" parameter in field specifiers (Wesley Collin Wright and Jukka Lehtosalo, PR 15010)
56+
- Support descriptors in dataclass transform (Jukka Lehtosalo, PR 15006)
57+
- Fix frozen_default in incremental mode (Wesley Collin Wright)
58+
- Fix frozen behavior for base classes with direct metaclasses (Wesley Collin Wright, PR 14878)
59+
- Mypyc: Native Floats
60+
- Mypyc now uses a native, unboxed representation for values of type float. Previously these were heap-allocated Python objects. Native floats are faster and use less memory. Code that uses floating-point operations heavily can be several times faster when using native floats.
61+
- Various float operations and math functions also now have optimized implementations. Refer to the documentation for a full list.
62+
- This can change the behavior of existing code that uses subclasses of float. When assigning an instance of a subclass of float to a variable with the float type, it gets implicitly converted to a float instance when compiled
63+
- Previously, implicit conversions were applied to int subclasses but not float subclasses.
64+
- Also, int values can no longer be assigned to a variable with type float in compiled code, since these types now have incompatible representations. An explicit conversion is required.
65+
- This restriction only applies to assignments, since they could otherwise narrow down the type of a variable from float to int. int values can still be implicitly converted to float when passed as arguments to functions that expect float values.
66+
- Note that mypyc still doesn’t support arrays of unboxed float values. Using list[float] involves heap-allocated float objects, since list can only store boxed values. Support for efficient floating point arrays is one of the next major planned mypyc features.
67+
- Related changes:
68+
- Use a native unboxed representation for floats (Jukka Lehtosalo, PR 14880)
69+
- Document native floats and integers (Jukka Lehtosalo, PR 14927)
70+
- Fixes to float to int conversion (Jukka Lehtosalo, PR 14936)
71+
- Mypyc: Native Integers
72+
- Mypyc now supports signed 32-bit and 64-bit integer types in addition to the arbitrary-precision int type. You can use the types mypy_extensions.i32 and mypy_extensions.i64 to speed up code that uses integer operations heavily.
73+
- Refer to the documentation for more information. This feature was contributed by Jukka Lehtosalo.
74+
- Other Mypyc Fixes and Improvements
75+
- Support iterating over a TypedDict (Richard Si, PR 14747)
76+
- Faster coercions between different tuple types (Jukka Lehtosalo, PR 14899)
77+
- Faster calls via type aliases (Jukka Lehtosalo, PR 14784)
78+
- Faster classmethod calls via cls (Jukka Lehtosalo, PR 14789)
79+
- Fixes to Crashes
80+
- Fix crash on class-level import in protocol definition (Ivan Levkivskyi, PR 14926)
81+
- Fix crash on single item union of alias (Ivan Levkivskyi, PR 14876)
82+
- Fix crash on ParamSpec in incremental mode (Ivan Levkivskyi, PR 14885)
83+
- Documentation Updates
84+
- Update adopting --strict documentation for 1.0 (Shantanu, PR 14865)
85+
- Some minor documentation tweaks (Jukka Lehtosalo, PR 14847)
86+
- Improve documentation of top level mypy: disable-error-code comment (Nikita Sobolev, PR 14810)
87+
- Error Reporting Improvements
88+
- Add error code to typing_extensions suggestion (Shantanu, PR 14881)
89+
- Add a separate error code for top-level await (Nikita Sobolev, PR 14801)
90+
- Don’t suggest two obsolete stub packages (Jelle Zijlstra, PR 14842)
91+
- Add suggestions for pandas-stubs and lxml-stubs (Shantanu, PR 14737)
92+
- Other Fixes and Improvements
93+
- Multiple inheritance considers callable objects as subtypes of functions (Christoph Tyralla, PR 14855)
94+
- stubtest: Respect @final runtime decorator and enforce it in stubs (Nikita Sobolev, PR 14922)
95+
- Fix false positives related to type[<type-var>] (sterliakov, PR 14756)
96+
- Fix duplication of ParamSpec prefixes and properly substitute ParamSpecs (EXPLOSION, PR 14677)
97+
- Fix line number if __iter__ is incorrectly reported as missing (Jukka Lehtosalo, PR 14893)
98+
- Fix incompatible overrides of overloaded generics with self types (Shantanu, PR 14882)
99+
- Allow SupportsIndex in slice expressions (Shantanu, PR 14738)
100+
- Support if statements in bodies of dataclasses and classes that use dataclass_transform (Jacek Chałupka, PR 14854)
101+
- Allow iterable class objects to be unpacked (including enums) (Alex Waygood, PR 14827)
102+
- Fix narrowing for walrus expressions used in match statements (Shantanu, PR 14844)
103+
- Add signature for attr.evolve (Ilya Konstantinov, PR 14526)
104+
- Fix Any inference when unpacking iterators that don't directly inherit from typing.Iterator (Alex Waygood, PR 14821)
105+
- Fix unpack with overloaded __iter__ method (Nikita Sobolev, PR 14817)
106+
- Reduce size of JSON data in mypy cache (dosisod, PR 14808)
107+
- Improve “used before definition” checks when a local definition has the same name as a global definition (Stas Ilinskiy, PR 14517)
108+
- Honor NoReturn as __setitem__ return type to mark unreachable code (sterliakov, PR 12572)
109+
1110
-------------------------------------------------------------------
2111
Wed Apr 12 12:37:48 UTC 2023 - Matej Cepl <[email protected]>
3112

‎packages/m/mypy/mypy.spec‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616
#
1717

1818

19+
%{?sle15_python_module_pythons}
1920
%bcond_without test
2021
%define skip_python2 1
21-
%define typed_ast_version 1.5.8.3
22-
%define types_psutil_version 5.9.5.6
23-
%define types_setuptools_version 65.6.0.3
22+
%define typed_ast_version 1.5.8.6
23+
%define types_psutil_version 5.9.5.12
24+
%define types_setuptools_version 67.7.0.1
2425
Name: mypy
25-
Version: 1.1.1
26+
Version: 1.3.0
2627
Release: 0
2728
Summary: Optional static typing for Python
2829
License: MIT
29-
URL: http://www.mypy-lang.org/
30+
URL: https://www.mypy-lang.org/
3031
Source0: https://files.pythonhosted.org/packages/source/m/mypy/mypy-%{version}.tar.gz
3132
# License Source1: Apache-2.0. Only for the test suite, not packaged here.
3233
Source1: https://files.pythonhosted.org/packages/source/t/types-typed-ast/types-typed-ast-%{typed_ast_version}.tar.gz
@@ -102,6 +103,9 @@ mv types-typed-ast-%{typed_ast_version}/typed_ast-stubs* mystubs/
102103
mv types-setuptools-%{types_setuptools_version}/setuptools-stubs* mystubs/
103104
mv types-psutil-%{types_psutil_version}/psutil-stubs* mystubs/
104105

106+
# "E: wrong-script-end-of-line-encoding" and "E: spurious-executable-perm", file is not needed anyways
107+
rm docs/make.bat
108+
105109
%build
106110
%python_build
107111
# building docs fails due to missing theme 'furo'
@@ -117,6 +121,8 @@ mv types-psutil-%{types_psutil_version}/psutil-stubs* mystubs/
117121
%python_clone -a %{buildroot}%{_bindir}/mypyc
118122
%python_clone -a %{buildroot}%{_bindir}/stubgen
119123
%python_clone -a %{buildroot}%{_bindir}/stubtest
124+
# solve "W: python-doc-in-package" in 3.9, 3.10 and 3.11, but not in 3.8 (thus -f to ignore the error)
125+
%python_expand rm -rf %{buildroot}%{$python_sitelib}/mypyc/doc
120126
%python_expand %fdupes %{buildroot}%{$python_sitelib}
121127

122128
%if %{with test}
@@ -138,6 +144,8 @@ fi
138144
# the fake test_module is not in the modulepath without pytest-xdist
139145
# or with pytest-xdist >= 2.3 -- https://github.com/python/mypy/issues/11019
140146
donttest+=" or teststubtest"
147+
# gh#python/mypy#15221
148+
donttest+=" or testMathOps or testFloatOps"
141149
%pytest -n auto -k "not (testallexcept ${donttest} ${$python_donttest})"
142150
%endif
143151

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/ipfs/bafkreidbvelhtu76onzfaaj3mjg4ucjxlz6mhllx3tdtivjxi3cctqbkzi

‎packages/m/mypy/types-psutil-5.9.5.6.tar.gz‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎packages/m/mypy/types-setuptools-65.6.0.3.tar.gz‎

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/ipfs/bafkreieybitfdmvqdgajqf7blbihcwllq7527s2uim77hmjeivdb3mrxsa

0 commit comments

Comments
 (0)