From f7e6c51026729b69543d219835766d984c14964504c4294205545f10c4d67560 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 1 Sep 2023 17:05:19 +0000 Subject: [PATCH] Accepting request 1108336 from home:mschreiner:branches:devel:languages:python - Update to 1.5.1: - stubtest: Fix __mypy-replace false positives. - Update typing_extensions stubs. - Update test suite dependencies: - types_psutil_version 5.9.5.15 -> 5.9.5.16 - types_setuptools_version 68.0.0.2 -> 68.0.0.1 - Rename package from mypy to python-mypy. - Rename .spec, .changes and rpmlintrc files, accordingly. OBS-URL: https://build.opensuse.org/request/show/1108336 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mypy?expand=0&rev=3 --- mypy-1.1.1.tar.gz | 3 - mypy-1.5.1.tar.gz | 3 + mypy-rpmlintrc => python-mypy-rpmlintrc | 0 mypy.changes => python-mypy.changes | 198 ++++++++++++++++++++++++ mypy.spec => python-mypy.spec | 38 +++-- types-psutil-5.9.5.16.tar.gz | 3 + types-psutil-5.9.5.6.tar.gz | 3 - types-setuptools-65.6.0.3.tar.gz | 3 - types-setuptools-68.1.0.0.tar.gz | 3 + types-typed-ast-1.5.8.3.tar.gz | 3 - types-typed-ast-1.5.8.7.tar.gz | 3 + 11 files changed, 232 insertions(+), 28 deletions(-) delete mode 100644 mypy-1.1.1.tar.gz create mode 100644 mypy-1.5.1.tar.gz rename mypy-rpmlintrc => python-mypy-rpmlintrc (100%) rename mypy.changes => python-mypy.changes (86%) rename mypy.spec => python-mypy.spec (83%) create mode 100644 types-psutil-5.9.5.16.tar.gz delete mode 100644 types-psutil-5.9.5.6.tar.gz delete mode 100644 types-setuptools-65.6.0.3.tar.gz create mode 100644 types-setuptools-68.1.0.0.tar.gz delete mode 100644 types-typed-ast-1.5.8.3.tar.gz create mode 100644 types-typed-ast-1.5.8.7.tar.gz diff --git a/mypy-1.1.1.tar.gz b/mypy-1.1.1.tar.gz deleted file mode 100644 index 187d87f..0000000 --- a/mypy-1.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae9ceae0f5b9059f33dbc62dea087e942c0ccab4b7a003719cb70f9b8abfa32f -size 2778293 diff --git a/mypy-1.5.1.tar.gz b/mypy-1.5.1.tar.gz new file mode 100644 index 0000000..714b2e8 --- /dev/null +++ b/mypy-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b031b9601f1060bf1281feab89697324726ba0c0bae9d7cd7ab4b690940f0b92 +size 2891640 diff --git a/mypy-rpmlintrc b/python-mypy-rpmlintrc similarity index 100% rename from mypy-rpmlintrc rename to python-mypy-rpmlintrc diff --git a/mypy.changes b/python-mypy.changes similarity index 86% rename from mypy.changes rename to python-mypy.changes index fe92556..6690e08 100644 --- a/mypy.changes +++ b/python-mypy.changes @@ -1,8 +1,206 @@ +------------------------------------------------------------------- +Wed Aug 30 18:31:19 UTC 2023 - Martin Schreiner + +- Update to 1.5.1: + - stubtest: Fix __mypy-replace false positives. + - Update typing_extensions stubs. +- Update test suite dependencies: + - types_psutil_version 5.9.5.15 -> 5.9.5.16 + - types_setuptools_version 68.0.0.2 -> 68.0.0.1 +- Rename package from mypy to python-mypy. + - Rename .spec, .changes and rpmlintrc files, accordingly. + +------------------------------------------------------------------- +Sun Aug 13 06:30:29 UTC 2023 - Sebastian Wagner + +- update to version 1.5.0: + - Drop Support for Python 3.7 + - Mypy no longer supports running with Python 3.7, which has reached end-of-life. This was contributed by Shantanu (PR 15566). + - Optional Check to Require Explicit @override + - If you enable the explicit-override error code, mypy will generate an error if a method override doesn’t use the @typing.override decorator (as discussed in PEP 698). This way mypy will detect accidentally introduced overrides. + - You can enable the error code via --enable-error-code=explicit-override on the mypy command line or enable_error_code = explicit-override in the mypy config file. + - The override decorator will be available in typing in Python 3.12, but you can also use the backport from a recent version of typing_extensions on all supported Python versions. + - More Flexible TypedDict Creation and Update + - Mypy was previously overly strict when type checking TypedDict creation and update operations. Though these checks were often technically correct, they sometimes triggered for apparently valid code. These checks have now been relaxed by default. You can enable stricter checking by using the new --extra-checks flag. + - Deprecated Flag: --strict-concatenate + - The behavior of --strict-concatenate is now included in the new --extra-checks flag, and the old flag is deprecated. + - Optionally Show Links to Error Code Documentation + - If you use --show-error-code-links, mypy will add documentation links to (many) reported errors. The links are not shown for error messages that are sufficiently obvious, and they are shown once per error code only. + - Consistently Avoid Type Checking Unreachable Code + - If a module top level has unreachable code, mypy won’t type check the unreachable statements. This is consistent with how functions behave. The behavior of --warn-unreachable is also more consistent now. + - Experimental Improved Type Inference for Generic Functions + - You can use --new-type-inference to opt into an experimental new type inference algorithm. It fixes issues when calling a generic functions with an argument that is also a generic function, in particular. This current implementation is still incomplete, but we encourage trying it out and reporting bugs if you encounter regressions. We are planning to enable the new algorithm by default in a future mypy release. + - Partial Support for Python 3.12 + - Mypy and mypyc now support running on recent Python 3.12 development versions. Not all new Python 3.12 features are supported, and we don’t ship compiled wheels for Python 3.12 yet. + - Improvements to Dataclasses + - Improve signature of dataclasses.replace (Ilya Priven, PR 14849) + - Fix dataclass/protocol crash on joining types (Ilya Priven, PR 15629) + - Fix strict optional handling in dataclasses (Ivan Levkivskyi, PR 15571) + - Support optional types for custom dataclass descriptors (Marc Mueller, PR 15628) + - Add __slots__ attribute to dataclasses (Nikita Sobolev, PR 15649) + - Support better __post_init__ method signature for dataclasses (Nikita Sobolev, PR 15503) + - Mypyc Improvements + - Support unsigned 8-bit native integer type: mypy_extensions.u8 (Jukka Lehtosalo, PR 15564) + - Support signed 16-bit native integer type: mypy_extensions.i16 (Jukka Lehtosalo, PR 15464) + - Define mypy_extensions.i16 in stubs (Jukka Lehtosalo, PR 15562) + - Document more unsupported features and update supported features (Richard Si, PR 15524) + - Fix final NamedTuple classes (Richard Si, PR 15513) + - Use C99 compound literals for undefined tuple values (Jukka Lehtosalo, PR 15453) + - Don't explicitly assign NULL values in setup functions (Logan Hunt, PR 15379) + - Stubgen Improvements + - Teach stubgen to work with complex and unary expressions (Nikita Sobolev, PR 15661) + - Support ParamSpec and TypeVarTuple (Ali Hamdan, PR 15626) + - Fix crash on non-str docstring (Ali Hamdan, PR 15623) + - Documentation Updates + - Add documentation for additional error codes (Ivan Levkivskyi, PR 15539) + - Improve documentation of type narrowing (Ilya Priven, PR 15652) + - Small improvements to protocol documentation (Shantanu, PR 15460) + - Remove confusing instance variable example in cheat sheet (Adel Atallah, PR 15441) + - Other Notable Fixes and Improvements + - Constant fold additional unary and binary expressions (Richard Si, PR 15202) + - Exclude the same special attributes from Protocol as CPython (Kyle Benesch, PR 15490) + - Change the default value of the slots argument of attrs.define to True, to match runtime behavior (Ilya Priven, PR 15642) + - Fix type of class attribute if attribute is defined in both class and metaclass (Alex Waygood, PR 14988) + - Handle type the same as typing.Type in the first argument of classmethods (Erik Kemperman, PR 15297) + - Fix --find-occurrences flag (Shantanu, PR 15528) + - Fix error location for class patterns (Nikita Sobolev, PR 15506) + - Fix re-added file with errors in mypy daemon (Ivan Levkivskyi, PR 15440) + - Fix dmypy run on Windows (Ivan Levkivskyi, PR 15429) + - Fix abstract and non-abstract variant error for property deleter (Shantanu, PR 15395) + - Remove special casing for "cannot" in error messages (Ilya Priven, PR 15428) + - Add runtime __slots__ attribute to attrs classes (Nikita Sobolev, PR 15651) + - Add get_expression_type to CheckerPluginInterface (Ilya Priven, PR 15369) + - Remove parameters that no longer exist from NamedTuple._make() (Alex Waygood, PR 15578) + - Allow using typing.Self in __new__ with an explicit @staticmethod decorator (Erik Kemperman, PR 15353) + - Fix self types in subclass methods without Self annotation (Ivan Levkivskyi, PR 15541) + - Check for abstract class objects in tuples (Nikita Sobolev, PR 15366) + - Typeshed Updates + - Typeshed is now modular and distributed as separate PyPI packages for everything except the standard library stubs. Please see git log for full list of typeshed changes. + +------------------------------------------------------------------- +Sun Jul 16 08:34:41 UTC 2023 - Sebastian Wagner + +- Update to 1.4.1 +- disable pep561 tests, as they fail on Python 3.11.4, see https://github.com/python/mypy/issues/15446 + +------------------------------------------------------------------- +Tue Jun 20 20:50:48 UTC 2023 - Matej Cepl + +- Update to 1.4.0: + - The Override Decorator + - Propagating Type Narrowing to Nested Functions + - Narrowing Enum Values Using “==” + - Performance Improvements + +------------------------------------------------------------------- +Thu May 11 06:02:09 UTC 2023 - Matej Cepl + +- Skip over failing testMathOps (gh#python/mypy#15221). + +------------------------------------------------------------------- +Wed May 10 20:36:45 UTC 2023 - Matej Cepl + +- 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 HTTPS + - Also mention overloads in async iterator documentation + - stubtest: Improve allowlist documentation + - Clarify "Using types... but not at runtime" + - Fix alignment of cheat sheet example + - Fix error for callback protocol matching against callable + type object + - Improve bytes formatting error + - Fix unions of bools and ints + - Fix narrowing union types that include Self with isinstance + - Allow objects matching SupportsKeysAndGetItem to be unpacked + - Check type guard validity for staticmethods + - Fix sys.platform when cross-compiling with emscripten + ------------------------------------------------------------------- Mon May 8 13:56:42 UTC 2023 - Johannes Kastl - add sle15_python_module_pythons +------------------------------------------------------------------- +Sun May 7 09:54:51 UTC 2023 - Sebastian Wagner + +- update typed_ast to version 1.5.8.6 +- update types_psutil to version 5.9.5.12 +- update types_setuptools to version 67.7.0.1 +- fix "E: wrong-script-end-of-line-encoding" and "E: spurious-executable-perm" for docs/make.bat +- fix "W: python-doc-in-package" for %{$python_sitelib}/mypyc/doc in Python 3.9, 3.10 and 3.11 +- update mypy to version 1.2.0: + - Improvements to Dataclass Transforms + - Support implicit default for "init" parameter in field specifiers (Wesley Collin Wright and Jukka Lehtosalo, PR 15010) + - Support descriptors in dataclass transform (Jukka Lehtosalo, PR 15006) + - Fix frozen_default in incremental mode (Wesley Collin Wright) + - Fix frozen behavior for base classes with direct metaclasses (Wesley Collin Wright, PR 14878) + - Mypyc: Native Floats + - 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. + - Various float operations and math functions also now have optimized implementations. Refer to the documentation for a full list. + - 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 + - Previously, implicit conversions were applied to int subclasses but not float subclasses. + - 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. + - 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. + - 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. + - Related changes: + - Use a native unboxed representation for floats (Jukka Lehtosalo, PR 14880) + - Document native floats and integers (Jukka Lehtosalo, PR 14927) + - Fixes to float to int conversion (Jukka Lehtosalo, PR 14936) + - Mypyc: Native Integers + - 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. + - Refer to the documentation for more information. This feature was contributed by Jukka Lehtosalo. + - Other Mypyc Fixes and Improvements + - Support iterating over a TypedDict (Richard Si, PR 14747) + - Faster coercions between different tuple types (Jukka Lehtosalo, PR 14899) + - Faster calls via type aliases (Jukka Lehtosalo, PR 14784) + - Faster classmethod calls via cls (Jukka Lehtosalo, PR 14789) + - Fixes to Crashes + - Fix crash on class-level import in protocol definition (Ivan Levkivskyi, PR 14926) + - Fix crash on single item union of alias (Ivan Levkivskyi, PR 14876) + - Fix crash on ParamSpec in incremental mode (Ivan Levkivskyi, PR 14885) + - Documentation Updates + - Update adopting --strict documentation for 1.0 (Shantanu, PR 14865) + - Some minor documentation tweaks (Jukka Lehtosalo, PR 14847) + - Improve documentation of top level mypy: disable-error-code comment (Nikita Sobolev, PR 14810) + - Error Reporting Improvements + - Add error code to typing_extensions suggestion (Shantanu, PR 14881) + - Add a separate error code for top-level await (Nikita Sobolev, PR 14801) + - Don’t suggest two obsolete stub packages (Jelle Zijlstra, PR 14842) + - Add suggestions for pandas-stubs and lxml-stubs (Shantanu, PR 14737) + - Other Fixes and Improvements + - Multiple inheritance considers callable objects as subtypes of functions (Christoph Tyralla, PR 14855) + - stubtest: Respect @final runtime decorator and enforce it in stubs (Nikita Sobolev, PR 14922) + - Fix false positives related to type[] (sterliakov, PR 14756) + - Fix duplication of ParamSpec prefixes and properly substitute ParamSpecs (EXPLOSION, PR 14677) + - Fix line number if __iter__ is incorrectly reported as missing (Jukka Lehtosalo, PR 14893) + - Fix incompatible overrides of overloaded generics with self types (Shantanu, PR 14882) + - Allow SupportsIndex in slice expressions (Shantanu, PR 14738) + - Support if statements in bodies of dataclasses and classes that use dataclass_transform (Jacek Chałupka, PR 14854) + - Allow iterable class objects to be unpacked (including enums) (Alex Waygood, PR 14827) + - Fix narrowing for walrus expressions used in match statements (Shantanu, PR 14844) + - Add signature for attr.evolve (Ilya Konstantinov, PR 14526) + - Fix Any inference when unpacking iterators that don't directly inherit from typing.Iterator (Alex Waygood, PR 14821) + - Fix unpack with overloaded __iter__ method (Nikita Sobolev, PR 14817) + - Reduce size of JSON data in mypy cache (dosisod, PR 14808) + - Improve “used before definition” checks when a local definition has the same name as a global definition (Stas Ilinskiy, PR 14517) + - Honor NoReturn as __setitem__ return type to mark unreachable code (sterliakov, PR 12572) + ------------------------------------------------------------------- Wed Apr 12 12:37:48 UTC 2023 - Matej Cepl diff --git a/mypy.spec b/python-mypy.spec similarity index 83% rename from mypy.spec rename to python-mypy.spec index 3522b06..571611b 100644 --- a/mypy.spec +++ b/python-mypy.spec @@ -1,5 +1,5 @@ # -# spec file for package mypy +# spec file for package python-mypy # # Copyright (c) 2023 SUSE LLC # @@ -19,15 +19,15 @@ %{?sle15_python_module_pythons} %bcond_without test %define skip_python2 1 -%define typed_ast_version 1.5.8.3 -%define types_psutil_version 5.9.5.6 -%define types_setuptools_version 65.6.0.3 -Name: mypy -Version: 1.1.1 +%define typed_ast_version 1.5.8.7 +%define types_psutil_version 5.9.5.16 +%define types_setuptools_version 68.1.0.0 +Name: python-mypy +Version: 1.5.1 Release: 0 Summary: Optional static typing for Python License: MIT -URL: http://www.mypy-lang.org/ +URL: https://www.mypy-lang.org/ Source0: https://files.pythonhosted.org/packages/source/m/mypy/mypy-%{version}.tar.gz # 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 @@ -35,22 +35,19 @@ Source1: https://files.pythonhosted.org/packages/source/t/types-typed-ast Source2: https://files.pythonhosted.org/packages/source/t/types-psutil/types-psutil-%{types_psutil_version}.tar.gz # License Source3: Apache-2.0. Only for the test suite, not packaged here. Source3: https://files.pythonhosted.org/packages/source/t/types-setuptools/types-setuptools-%{types_setuptools_version}.tar.gz -Source99: mypy-rpmlintrc -BuildRequires: %{python_module mypy_extensions >= 0.4.3} +Source99: python-mypy-rpmlintrc +BuildRequires: %{python_module mypy_extensions >= 1.0.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module tomli >= 1.1.0 if %python-base < 3.11} BuildRequires: %{python_module typed-ast >= 1.4.0 if %python-base < 3.8} BuildRequires: %{python_module typing_extensions >= 3.10} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-mypy_extensions >= 0.4.3 Requires: python-typing_extensions >= 3.10 -%if 0%{?python_version_nodots} < 38 -Requires: python-typed-ast >= 1.4.0 -%endif -%if 0%{?python_version_nodots} < 311 -Requires: python-tomli >= 1.1.0 -%endif +Requires: (python-tomli >= 1.1.0 if python3-base < 3.11) +Requires: (python-typed-ast >= 1.4.0 if python3-base < 3.8) Requires(post): update-alternatives Requires(postun):update-alternatives %if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3" @@ -103,6 +100,9 @@ mv types-typed-ast-%{typed_ast_version}/typed_ast-stubs* mystubs/ mv types-setuptools-%{types_setuptools_version}/setuptools-stubs* mystubs/ mv types-psutil-%{types_psutil_version}/psutil-stubs* mystubs/ +# "E: wrong-script-end-of-line-encoding" and "E: spurious-executable-perm", file is not needed anyways +rm docs/make.bat + %build %python_build # building docs fails due to missing theme 'furo' @@ -118,6 +118,8 @@ mv types-psutil-%{types_psutil_version}/psutil-stubs* mystubs/ %python_clone -a %{buildroot}%{_bindir}/mypyc %python_clone -a %{buildroot}%{_bindir}/stubgen %python_clone -a %{buildroot}%{_bindir}/stubtest +# 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) +%python_expand rm -rf %{buildroot}%{$python_sitelib}/mypyc/doc %python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with test} @@ -139,7 +141,11 @@ fi # the fake test_module is not in the modulepath without pytest-xdist # or with pytest-xdist >= 2.3 -- https://github.com/python/mypy/issues/11019 donttest+=" or teststubtest" -%pytest -n auto -k "not (testallexcept ${donttest} ${$python_donttest})" +# gh#python/mypy#15221 +donttest+=" or testMathOps or testFloatOps" +# fails on Python 3.11.4, see gh#python/mypy#15446. Patch db5b5af1201fff03465b0684d16b6489a62a3d78 does not apply clean, better wait for a new upstream version +donttest+=" or PEP561Suite" +%pytest -n auto -k "not (testallexcept ${donttest} ${$python_donttest})" -x %endif %post diff --git a/types-psutil-5.9.5.16.tar.gz b/types-psutil-5.9.5.16.tar.gz new file mode 100644 index 0000000..ead8aab --- /dev/null +++ b/types-psutil-5.9.5.16.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e9b219efb625d3d04f6bf106934f87cab49aa41a94b0a3b3089403f47a79228 +size 14060 diff --git a/types-psutil-5.9.5.6.tar.gz b/types-psutil-5.9.5.6.tar.gz deleted file mode 100644 index ac137c1..0000000 --- a/types-psutil-5.9.5.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65f93589711ca48859602c955c4247c834d96d4d33a9cbe4142d89593ef33b3c -size 13194 diff --git a/types-setuptools-65.6.0.3.tar.gz b/types-setuptools-65.6.0.3.tar.gz deleted file mode 100644 index 8f51f0b..0000000 --- a/types-setuptools-65.6.0.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7ddd7415282fa97ab18e490206067c0cdb126b103743e72ee86783d7af6481c5 -size 26827 diff --git a/types-setuptools-68.1.0.0.tar.gz b/types-setuptools-68.1.0.0.tar.gz new file mode 100644 index 0000000..a4ee202 --- /dev/null +++ b/types-setuptools-68.1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bc9b0c0818f77bdcec619970e452b320a423bb3ac074f5f8bc9300ac281c4ae +size 32689 diff --git a/types-typed-ast-1.5.8.3.tar.gz b/types-typed-ast-1.5.8.3.tar.gz deleted file mode 100644 index 445de76..0000000 --- a/types-typed-ast-1.5.8.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a62bc25168f8b44ce74e1114f9fbc2ee87d6e96e3880cbef39aad9522555b4e -size 5114 diff --git a/types-typed-ast-1.5.8.7.tar.gz b/types-typed-ast-1.5.8.7.tar.gz new file mode 100644 index 0000000..69c23cd --- /dev/null +++ b/types-typed-ast-1.5.8.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7795f6f9d597b35212314040b993f6613b51d81738edce3c1e3a3e9ef655124 +size 5581