Overview

Request 1086141 superseded

- 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
- 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)

Loading...
Request History
Matej Cepl's avatar

mcepl created request

- 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
- 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)


Matej Cepl's avatar

mcepl superseded request

superseded by 1086142

openSUSE Build Service is sponsored by