forked from pool/python-mypy
Compare commits
25 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 13c1ccdf47 | |||
| 48a285183b | |||
| ba997cb577 | |||
| 155d2c639e | |||
| bc7a98736a | |||
| fc308fe740 | |||
| 4d8260d38c | |||
| cd55f5c1cd | |||
| 5dbbee55a0 | |||
| 6917d24177 | |||
| ad2c1ad96e | |||
| 79e4785261 | |||
| 897587eb04 | |||
| a4a237dcd8 | |||
| 0b7850e4cc | |||
| cda7b538b4 | |||
| 506a4371c4 | |||
| 47f73b81c7 | |||
| f202d85d68 | |||
| a4f289e2b7 | |||
| cdc403a514 | |||
| fd273b4d22 | |||
| 5f0850ed11 | |||
| 2d6be309dc | |||
| 79f0018e58 |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79
|
||||
size 3078806
|
||||
3
mypy-1.17.0.tar.gz
Normal file
3
mypy-1.17.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5d7ccc08ba089c06e2f5629c660388ef1fee708444f1dee0b9203fa031dee03
|
||||
size 3352114
|
||||
4
mypy.obsinfo
Normal file
4
mypy.obsinfo
Normal file
@@ -0,0 +1,4 @@
|
||||
name: mypy
|
||||
version: 1.11.2+git.1728499967.eca206d
|
||||
mtime: 1728499967
|
||||
commit: eca206d3c96bf4082a0a087c2614deb5af8c4afd
|
||||
@@ -1,3 +1,530 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 12 12:59:14 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Fix the libalternatives condition
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 24 10:36:56 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Make the libalternatives transition conditional
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 16 10:11:26 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Update to 1.17.0:
|
||||
- Optionally Check That Match Is Exhaustive
|
||||
Mypy can now optionally generate an error if a match
|
||||
statement does not match exhaustively, without having to use
|
||||
assert_never(...). Enable this by using --enable-error-code
|
||||
exhaustive-match.
|
||||
- Further Improvements to Attribute Resolution
|
||||
This release includes additional improvements to how
|
||||
attribute types and kinds are resolved. These fix many bugs
|
||||
and overall improve consistency.
|
||||
- Fixes to Nondeterministic Type Checking
|
||||
Previous mypy versions could infer different types for
|
||||
certain expressions across different runs (typically
|
||||
depending on which order certain types were processed, and
|
||||
this order was nondeterministic). This release includes fixes
|
||||
to several such issues.
|
||||
- Remove Support for Targeting Python 3.8
|
||||
Mypy now requires --python-version 3.9 or greater. Support
|
||||
for targeting Python 3.8 is fully removed now. Since 3.8
|
||||
is an unsupported version, mypy will default to the oldest
|
||||
supported version (currently 3.9) if you still try to target
|
||||
3.8.
|
||||
- Initial Support for Python 3.14
|
||||
Mypy is now tested on 3.14 and mypyc works with 3.14.0b3 and
|
||||
later. Binary wheels compiled with mypyc for mypy itself will
|
||||
be available for 3.14 some time after 3.14.0rc1 has been
|
||||
released.
|
||||
- Deprecated Flag: --force-uppercase-builtins
|
||||
Mypy only supports Python 3.9+. The
|
||||
--force-uppercase-builtins flag is now deprecated as
|
||||
unnecessary, and a no-op. It will be removed in a future
|
||||
version.
|
||||
- Mypyc: Improvements to Generators and Async Functions
|
||||
This release includes both performance improvements and bug
|
||||
fixes related to generators and async functions (these share
|
||||
many implementation details).
|
||||
- Mypyc: Partial, Unsafe Support for Free Threading
|
||||
Mypyc has minimal, quite memory-unsafe support for the free
|
||||
threaded builds of 3.14. It is also only lightly tested. Bug
|
||||
reports and experience reports are welcome!
|
||||
- Other Mypyc Fixes and Improvements
|
||||
- Stubgen Improvements
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 8 08:33:25 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to libalternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 29 15:25:57 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Remove upstreamed mypy-1.14.1-gcc15.patch
|
||||
- Update to 1.16.0:
|
||||
Different Property Getter and Setter Types
|
||||
|
||||
Mypy now supports using different types for a property getter and setter:
|
||||
|
||||
class A:
|
||||
_value: int
|
||||
|
||||
@property
|
||||
def foo(self) -> int:
|
||||
return self._value
|
||||
|
||||
@foo.setter
|
||||
def foo(self, x: str | int) -> None:
|
||||
try:
|
||||
self._value = int(x)
|
||||
except ValueError:
|
||||
raise Exception(f"'{x}' is not a valid value for 'foo'")
|
||||
|
||||
This was contributed by Ivan Levkivskyi (PR 18510).
|
||||
Flexible Variable Redefinitions (Experimental)
|
||||
|
||||
Mypy now allows unannotated variables to be freely redefined
|
||||
with different types when using the experimental
|
||||
--allow-redefinition-new flag. You will also need to enable
|
||||
--local-partial-types. Mypy will now infer a union type when
|
||||
different types are assigned to a variable:
|
||||
|
||||
# mypy: allow-redefinition-new, local-partial-types
|
||||
|
||||
def f(n: int, b: bool) -> int | str:
|
||||
if b:
|
||||
x = n
|
||||
else:
|
||||
x = str(n)
|
||||
# Type of 'x' is int | str here.
|
||||
return x
|
||||
|
||||
Without the new flag, mypy only supports inferring optional
|
||||
types (X | None) from multiple assignments, but now mypy can
|
||||
infer arbitrary union types.
|
||||
|
||||
An unannotated variable can now also have different types in
|
||||
different code locations:
|
||||
|
||||
# mypy: allow-redefinition-new, local-partial-types
|
||||
...
|
||||
|
||||
if cond():
|
||||
for x in range(n):
|
||||
# Type of 'x' is 'int' here
|
||||
...
|
||||
else:
|
||||
for x in ['a', 'b']:
|
||||
# Type of 'x' is 'str' here
|
||||
...
|
||||
|
||||
We are planning to turn this flag on by default in mypy 2.0,
|
||||
along with --local-partial-types. The feature is still
|
||||
experimental and has known issues, and the semantics may
|
||||
still change in the future. You may need to update or add
|
||||
type annotations when switching to the new behavior, but if
|
||||
you encounter anything unexpected, please create a GitHub
|
||||
issue.
|
||||
|
||||
This was contributed by Jukka Lehtosalo (PR 18727, PR 19153).
|
||||
Stricter Type Checking with Imprecise Types
|
||||
|
||||
Mypy can now detect additional errors in code that uses Any
|
||||
types or has missing function annotations.
|
||||
|
||||
When calling dict.get(x, None) on an object of type dict[str,
|
||||
Any], this now results in an optional type (in the past it
|
||||
was Any):
|
||||
|
||||
def f(d: dict[str, Any]) -> int:
|
||||
# Error: Return value has type "Any | None" but expected "int"
|
||||
return d.get("x", None)
|
||||
|
||||
Type narrowing using assignments can result in more precise
|
||||
types in the presence of Any types:
|
||||
|
||||
def foo(): ...
|
||||
|
||||
def bar(n: int) -> None:
|
||||
x = foo()
|
||||
# Type of 'x' is 'Any' here
|
||||
if n > 5:
|
||||
x = str(n)
|
||||
# Type of 'x' is 'str' here
|
||||
|
||||
When using --check-untyped-defs, unannotated overrides are
|
||||
now checked more strictly against superclass definitions.
|
||||
|
||||
Related PRs:
|
||||
|
||||
Use union types instead of join in binder (Ivan Levkivskyi, PR 18538)
|
||||
Check superclass compatibility of untyped methods if
|
||||
--check-untyped-defs is set (Stanislav Terliakov, PR
|
||||
18970)
|
||||
|
||||
Improvements to Attribute Resolution
|
||||
|
||||
This release includes several fixes to inconsistent
|
||||
resolution of attribute, method and descriptor types.
|
||||
|
||||
Consolidate descriptor handling (Ivan Levkivskyi, PR 18831)
|
||||
Make multiple inheritance checking use common semantics (Ivan Levkivskyi, PR 18876)
|
||||
Make method override checking use common semantics (Ivan Levkivskyi, PR 18870)
|
||||
Fix descriptor overload selection (Ivan Levkivskyi, PR 18868)
|
||||
Handle union types when binding self (Ivan Levkivskyi, PR 18867)
|
||||
Make variable override checking use common semantics (Ivan Levkivskyi, PR 18847)
|
||||
Make descriptor handling behave consistently (Ivan Levkivskyi, PR 18831)
|
||||
|
||||
Make Implementation for Abstract Overloads Optional
|
||||
|
||||
The implementation can now be omitted for abstract overloaded methods, even outside stubs:
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import overload
|
||||
|
||||
class C:
|
||||
@abstractmethod
|
||||
@overload
|
||||
def foo(self, x: int) -> int: ...
|
||||
|
||||
@abstractmethod
|
||||
@overload
|
||||
def foo(self, x: str) -> str: ...
|
||||
|
||||
# No implementation required for "foo"
|
||||
|
||||
This was contributed by Ivan Levkivskyi (PR 18882).
|
||||
Option to Exclude Everything in .gitignore
|
||||
|
||||
You can now use --exclude-gitignore to exclude everything in
|
||||
a .gitignore file from the mypy build. This behaves similar
|
||||
to excluding the paths using --exclude. We might enable this
|
||||
by default in a future mypy release.
|
||||
|
||||
This was contributed by Ivan Levkivskyi (PR 18696).
|
||||
Selectively Disable Deprecated Warnings
|
||||
|
||||
It's now possible to selectively disable warnings generated
|
||||
from warnings.deprecated using the --deprecated-calls-exclude
|
||||
option:
|
||||
|
||||
# mypy --enable-error-code deprecated
|
||||
# --deprecated-calls-exclude=foo.A
|
||||
import foo
|
||||
|
||||
foo.A().func() # OK, the deprecated warning is ignored
|
||||
|
||||
# file foo.py
|
||||
|
||||
from typing_extensions import deprecated
|
||||
|
||||
class A:
|
||||
@deprecated("Use A.func2 instead")
|
||||
def func(self): pass
|
||||
|
||||
...
|
||||
|
||||
Contributed by Marc Mueller (PR 18641)
|
||||
Annotating Native/Non-Native Classes in Mypyc
|
||||
|
||||
You can now declare a class as a non-native class when
|
||||
compiling with mypyc. Unlike native classes, which are
|
||||
extension classes and have an immutable structure, non-native
|
||||
classes are normal Python classes at runtime and are fully
|
||||
dynamic. Example:
|
||||
|
||||
from mypy_extensions import mypyc_attr
|
||||
|
||||
@mypyc_attr(native_class=False)
|
||||
class NonNativeClass:
|
||||
...
|
||||
|
||||
o = NonNativeClass()
|
||||
|
||||
# Ok, even if attribute "foo" not declared in class body
|
||||
setattr(o, "foo", 1)
|
||||
|
||||
Classes are native by default in compiled modules, but
|
||||
classes that use certain features (such as most metaclasses)
|
||||
are implicitly non-native.
|
||||
|
||||
You can also explicitly declare a class as native. In this
|
||||
case mypyc will generate an error if it can't compile the
|
||||
class as a native class, instead of falling back to
|
||||
a non-native class:
|
||||
|
||||
from mypy_extensions import mypyc_attr
|
||||
from foo import MyMeta
|
||||
|
||||
# Error: Unsupported metaclass for a native class
|
||||
@mypyc_attr(native_class=True)
|
||||
class C(metaclass=MyMeta):
|
||||
...
|
||||
|
||||
Since native classes are significantly more efficient that
|
||||
non-native classes, you may want to ensure that certain
|
||||
classes always compiled as native classes.
|
||||
|
||||
- Update to 1.15.0:
|
||||
|
||||
By default, mypy treats bytearray and memoryview values as
|
||||
assignable to the bytes type, for historical reasons. Use the
|
||||
--strict-bytes flag to disable this behavior. PEP 688
|
||||
specified the removal of this special case. The flag will be
|
||||
enabled by default in mypy 2.0.
|
||||
|
||||
Contributed by Ali Hamdan (PR 18263) and Shantanu Jain (PR 13952).
|
||||
Improvements to Reachability Analysis and Partial Type Handling in Loops
|
||||
|
||||
This change results in mypy better modelling control flow
|
||||
within loops and hence detecting several previously ignored
|
||||
issues. In some cases, this change may require additional
|
||||
explicit variable annotations.
|
||||
|
||||
Contributed by Christoph Tyralla (PR 18180, PR 18433).
|
||||
|
||||
(Speaking of partial types, remember that we plan to enable
|
||||
--local-partial-types by default in mypy 2.0.)
|
||||
Better Discovery of Configuration Files
|
||||
|
||||
Mypy will now walk up the filesystem (up until a repository
|
||||
or file system root) to discover configuration files. See the
|
||||
mypy configuration file documentation for more details.
|
||||
|
||||
Contributed by Mikhail Shiryaev and Shantanu Jain (PR 16965, PR 18482)
|
||||
Better Line Numbers for Decorators and Slice Expressions
|
||||
|
||||
Mypy now uses more correct line numbers for decorators and
|
||||
slice expressions. In some cases, you may have to change the
|
||||
location of a # type: ignore comment.
|
||||
|
||||
Contributed by Shantanu Jain (PR 18392, PR 18397).
|
||||
Drop Support for Python 3.8
|
||||
|
||||
Mypy no longer supports running with Python 3.8, which has
|
||||
reached end-of-life. When running mypy with Python 3.9+, it
|
||||
is still possible to type check code that needs to support
|
||||
Python 3.8 with the --python-version 3.8 argument. Support
|
||||
for this will be dropped in the first half of 2025!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 5 13:29:04 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
|
||||
|
||||
- Add mypy-1.14.1-gcc15.patch from upstream to fix gcc15 compile
|
||||
time error
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 5 12:58:47 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Update vendored types_* to the appropriate versions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 15:13:25 UTC 2025 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to 1.14.1
|
||||
* Mypyc Improvements
|
||||
- Document optimized bytes operations and additional str operations (Jukka Lehtosalo, PR 18242)
|
||||
- Add primitives and specialization for ord() (Jukka Lehtosalo, PR 18240)
|
||||
- Optimize str.encode with specializations for common used encodings (Valentin Stanciu, PR 18232)
|
||||
- Fix fall back to generic operation for staticmethod and classmethod (Advait Dixit, PR 18228)
|
||||
- Support unicode surrogates in string literals (Jukka Lehtosalo, PR 18209)
|
||||
- Fix index variable in for loop with builtins.enumerate (Advait Dixit, PR 18202)
|
||||
- Fix check for enum classes (Advait Dixit, PR 18178)
|
||||
- Fix loading type from imported modules (Advait Dixit, PR 18158)
|
||||
- Fix initializers of final attributes in class body (Jared Hance, PR 18031)
|
||||
- Fix name generation for modules with similar full names (aatle, PR 18001)
|
||||
- Fix relative imports in __init__.py (Shantanu, PR 17979)
|
||||
- Optimize dunder methods (jairov4, PR 17934)
|
||||
- Replace deprecated _PyDict_GetItemStringWithError (Marc Mueller, PR 17930)
|
||||
- Fix wheel build for cp313-win (Marc Mueller, PR 17941)
|
||||
- Use public PyGen_GetCode instead of vendored implementation (Marc Mueller, PR 17931)
|
||||
- Optimize calls to final classes (jairov4, PR 17886)
|
||||
- Support ellipsis (...) expressions in class bodies (Newbyte, PR 17923)
|
||||
- Sync pythoncapi_compat.h (Marc Mueller, PR 17929)
|
||||
- Add runtests.py mypyc-fast for running fast mypyc tests (Jukka Lehtosalo, PR 17906)
|
||||
* Stubgen Improvements
|
||||
- Do not include mypy generated symbols (Ali Hamdan, PR 18137)
|
||||
- Fix FunctionContext.fullname for nested classes (Chad Dombrova, PR 17963)
|
||||
- Add flagfile support (Ruslan Sayfutdinov, PR 18061)
|
||||
- Add support for PEP 695 and PEP 696 syntax (Ali Hamdan, PR 18054)
|
||||
* Stubtest Improvements
|
||||
- Allow the use of --show-traceback and --pdb with stubtest (Stephen Morton, PR 18037)
|
||||
- Verify __all__ exists in stub (Sebastian Rittau, PR 18005)
|
||||
- Stop telling people to use double underscores (Jelle Zijlstra, PR 17897)
|
||||
* Documentation Updates
|
||||
- Update config file documentation (sobolevn, PR 18103)
|
||||
- Improve contributor documentation for Windows (ag-tafe, PR 18097)
|
||||
- Correct note about --disallow-any-generics flag in documentation (Abel Sen, PR 18055)
|
||||
- Further caution against --follow-imports=skip (Shantanu, PR 18048)
|
||||
- Fix the edit page buttton link in documentation (Kanishk Pachauri, PR 17933)
|
||||
* Other Notables Fixes and Improvements
|
||||
- Show Protocol __call__ for arguments with incompatible types (MechanicalConstruct, PR 18214)
|
||||
- Make join and meet symmetric with strict_optional (MechanicalConstruct, PR 18227)
|
||||
- Preserve block unreachablility when checking function definitions with constrained TypeVars (Brian Schubert, PR 18217)
|
||||
- Do not include non-init fields in the synthesized __replace__ method for dataclasses (Victorien, PR 18221)
|
||||
- Disallow TypeVar constraints parameterized by type variables (Brian Schubert, PR 18186)
|
||||
- Always complain about invalid varargs and varkwargs (Shantanu, PR 18207)
|
||||
- Set default strict_optional state to True (Shantanu, PR 18198)
|
||||
- Preserve type variable default None in type alias (Sukhorosov Aleksey, PR 18197)
|
||||
- Add checks for invalid usage of continue/break/return in except* block (coldwolverine, PR 18132)
|
||||
- Do not consider bare TypeVar not overlapping with None for reachability analysis (Stanislav Terliakov, PR 18138)
|
||||
- Special case types.DynamicClassAttribute as property-like (Stephen Morton, PR 18150)
|
||||
- Disallow bare ParamSpec in type aliases (Brian Schubert, PR 18174)
|
||||
- Move long_description metadata to pyproject.toml (Marc Mueller, PR 18172)
|
||||
- Support ==-based narrowing of Optional (Christoph Tyralla, PR 18163)
|
||||
- Allow TypedDict assignment of Required item to NotRequired ReadOnly item (Brian Schubert, PR 18164)
|
||||
- Allow nesting of Annotated with TypedDict special forms inside TypedDicts (Brian Schubert, PR 18165)
|
||||
- Infer generic type arguments for slice expressions (Brian Schubert, PR 18160)
|
||||
- Fix checking of match sequence pattern against bounded type variables (Brian Schubert, PR 18091)
|
||||
- Fix incorrect truthyness for Enum types and literals (David Salvisberg, PR 17337)
|
||||
- Move static project metadata to pyproject.toml (Marc Mueller, PR 18146)
|
||||
- Fallback to stdlib json if integer exceeds 64-bit range (q0w, PR 18148)
|
||||
- Fix 'or' pattern structural matching exhaustiveness (yihong, PR 18119)
|
||||
- Fix type inference of positional parameter in class pattern involving builtin subtype (Brian Schubert, PR 18141)
|
||||
- Fix [override] error with no line number when argument node has no line number (Brian Schubert, PR 18122)
|
||||
- Fix some dmypy crashes (Ivan Levkivskyi, PR 18098)
|
||||
- Fix subtyping between instance type and overloaded (Shantanu, PR 18102)
|
||||
- Clean up new_semantic_analyzer config (Shantanu, PR 18071)
|
||||
- Issue warning for enum with no members in stub (Shantanu, PR 18068)
|
||||
- Fix enum attributes are not members (Terence Honles, PR 17207)
|
||||
- Fix crash when checking slice expression with step 0 in tuple index (Brian Schubert, PR 18063)
|
||||
- Allow union-with-callable attributes to be overridden by methods (Brian Schubert, PR 18018)
|
||||
- Emit [mutable-override] for covariant override of attribute with method (Brian Schubert, PR 18058)
|
||||
- Support ParamSpec mapping with functools.partial (Stanislav Terliakov, PR 17355)
|
||||
- Fix approved stub ignore, remove normpath (Shantanu, PR 18045)
|
||||
- Make disallow-any-unimported flag invertible (Séamus Ó Ceanainn, PR 18030)
|
||||
- Filter to possible package paths before trying to resolve a module (falsedrow, PR 18038)
|
||||
- Fix overlap check for ParamSpec types (Jukka Lehtosalo, PR 18040)
|
||||
- Do not prioritize ParamSpec signatures during overload resolution (Stanislav Terliakov, PR 18033)
|
||||
- Fix ternary union for literals (Ivan Levkivskyi, PR 18023)
|
||||
- Fix compatibility checks for conditional function definitions using decorators (Brian Schubert, PR 18020)
|
||||
- TypeGuard should be bool not Any when matching TypeVar (Evgeniy Slobodkin, PR 17145)
|
||||
- Fix convert-cache tool (Shantanu, PR 17974)
|
||||
- Fix generator comprehension with mypyc (Shantanu, PR 17969)
|
||||
- Fix crash issue when using shadowfile with pretty (Max Chang, PR 17894)
|
||||
- Fix multiple nested classes with new generics syntax (Max Chang, PR 17820)
|
||||
- Better error for mypy -p package without py.typed (Joe Gordon, PR 17908)
|
||||
- Emit error for raise NotImplemented (Brian Schubert, PR 17890)
|
||||
- Add is_lvalue attribute to AttributeContext (Brian Schubert, PR 17881)
|
||||
- Changes from 1.13
|
||||
- Significantly speed up file handling error paths (Shantanu, PR 17920)
|
||||
- Use fast path in modulefinder more often (Shantanu, PR 17950)
|
||||
- Let mypyc optimise os.path.join (Shantanu, PR 17949)
|
||||
- Make is_sub_path faster (Shantanu, PR 17962)
|
||||
- Speed up stubs suggestions (Shantanu, PR 17965)
|
||||
- Use sha1 for hashing (Shantanu, PR 17953)
|
||||
- Use orjson instead of json, when available (Shantanu, PR 17955)
|
||||
- Add faster-cache extra, test in CI (Shantanu, PR 17978)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 14 12:48:06 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Update to officially released version 1.12.0:
|
||||
- Support Python 3.12 Syntax for Generics (PEP 695)
|
||||
- Related improvements are included:
|
||||
- Document Python 3.12 type parameter syntax (Jukka
|
||||
Lehtosalo, PR 17816)
|
||||
- Further documentation updates (Jukka Lehtosalo, PR 17826)
|
||||
- Allow Self return types with contravariance (Jukka
|
||||
Lehtosalo, PR 17786)
|
||||
- Enable new type parameter syntax by default (Jukka
|
||||
Lehtosalo, PR 17798)
|
||||
- Generate error if new-style type alias used as base class
|
||||
(Jukka Lehtosalo, PR 17789)
|
||||
- Inherit variance if base class has explicit variance (Jukka
|
||||
Lehtosalo, PR 17787)
|
||||
- Fix crash on invalid type var reference (Jukka Lehtosalo,
|
||||
PR 17788)
|
||||
- Fix covariance of frozen dataclasses (Jukka Lehtosalo, PR
|
||||
17783)
|
||||
- Allow covariance with attribute that has "_" name prefix
|
||||
(Jukka Lehtosalo, PR 17782)
|
||||
- Support Annotated[...] in new-style type aliases (Jukka
|
||||
Lehtosalo, PR 17777)
|
||||
- Fix nested generic classes (Jukka Lehtosalo, PR 17776)
|
||||
- Add detection and error reporting for the use of incorrect
|
||||
expressions within the scope of a type parameter and a type
|
||||
alias (Kirill Podoprigora, PR 17560)
|
||||
- Basic Support for Python 3.13 This release adds partial
|
||||
support for Python 3.13 features and compiled binaries for
|
||||
Python 3.13. Mypyc now also supports Python 3.13.
|
||||
- Various new stdlib features and changes (through typeshed
|
||||
stub improvements)
|
||||
- typing.ReadOnly (see below for more)
|
||||
- typing.TypeIs (added in mypy 1.10, PEP 742)
|
||||
- Type parameter defaults when using the legacy syntax (PEP
|
||||
Th696) ese features are not supported yet:
|
||||
- warnings.deprecated (PEP 702)
|
||||
- Type parameter defaults when using Python 3.12 type
|
||||
parameter syntax
|
||||
- Mypyc Support for Python 3.13
|
||||
- Add additional includes for Python 3.13 (Marc Mueller, PR
|
||||
17506)
|
||||
- Add another include for Python 3.13 (Marc Mueller, PR
|
||||
17509)
|
||||
- Fix ManagedDict functions for Python 3.13 (Marc Mueller, PR
|
||||
17507)
|
||||
- Update mypyc test output for Python 3.13 (Marc Mueller, PR
|
||||
17508)
|
||||
- Fix PyUnicode functions for Python 3.13 (Marc Mueller, PR
|
||||
17504)
|
||||
- Fix _PyObject_LookupAttrId for Python 3.13 (Marc Mueller,
|
||||
PR 17505)
|
||||
- Fix _PyList_Extend for Python 3.13 (Marc Mueller, PR 17503)
|
||||
- Fix gen_is_coroutine for Python 3.13 (Marc Mueller, PR
|
||||
17501)
|
||||
- Fix _PyObject_FastCall for Python 3.13 (Marc Mueller, PR
|
||||
17502)
|
||||
- Avoid uses of _PyObject_CallMethodOneArg on 3.13 (Jukka
|
||||
Lehtosalo, PR 17526)
|
||||
- Don't rely on _PyType_CalculateMetaclass on 3.13 (Jukka
|
||||
Lehtosalo, PR 17525)
|
||||
- Don't use _PyUnicode_FastCopyCharacters on 3.13 (Jukka
|
||||
Lehtosalo, PR 17524)
|
||||
- Don't use _PyUnicode_EQ on 3.13, as it's no longer exported
|
||||
(Jukka Lehtosalo, PR 17523)
|
||||
- Inferring Unions for Conditional Expressions
|
||||
- You can now use typing.ReadOnly to specity TypedDict items as
|
||||
read-only (PEP 705):
|
||||
- Python 3.8 End of Life Approaching
|
||||
- Planned Changes to Defaults - more details in the full
|
||||
Changelog.
|
||||
- Documentation Updates
|
||||
- Experimental Inline TypedDict Syntax
|
||||
- Stubgen Improvements
|
||||
- Stubtest Improvements
|
||||
- Other Notables Fixes and Improvements
|
||||
- Typeshed Updates
|
||||
- Update types-psutil 6.0.0.20241011, and types-setuptools to
|
||||
75.1.0.20241014 (just for testing, these are not openSUSE
|
||||
packages of these tools).
|
||||
- Remove _service* files.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 09 22:17:25 UTC 2024 - mcepl@cepl.eu
|
||||
|
||||
- Temporarily switched to using git source before the problems
|
||||
with 3.13.0 compatibility are fixed.
|
||||
- Update to version 1.11.2+git.1728499967.eca206d:
|
||||
* Fix union callees with functools.partial (#17903)
|
||||
* [mypyc] Add "runtests.py mypyc-fast" for running fast mypyc tests (#17906)
|
||||
* Emit error for "raise NotImplemented" (#17890)
|
||||
* Document ReadOnly (PEP 705) (#17905)
|
||||
* Make ReadOnly TypedDict items covariant (#17904)
|
||||
* documentation for TypeIs (#17821)
|
||||
* Improvements to functools.partial of types (#17898)
|
||||
* Use 3.13.0 for ci tests (#17900)
|
||||
* stubtest: Stop telling people to use double underscores (#17897)
|
||||
* Add changelog for mypy 1.12 (#17889)
|
||||
- Remove upstreamed latest-pythons.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 4 14:11:11 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add upstream latest-pythons.patch to fix tests on latest Python releases
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 10 15:01:11 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-mypy
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,43 +16,55 @@
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
%define types_psutil_version 7.0.0.20250401
|
||||
%define types_setuptools_version 78.1.0.20250329
|
||||
%bcond_without test
|
||||
%define types_psutil_version 5.9.5.17
|
||||
%define types_setuptools_version 68.2.0.0
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-mypy
|
||||
Version: 1.11.2
|
||||
Version: 1.17.0
|
||||
Release: 0
|
||||
Summary: Optional static typing for Python
|
||||
License: MIT
|
||||
URL: https://www.mypy-lang.org/
|
||||
Source0: https://files.pythonhosted.org/packages/source/m/mypy/mypy-%{version}.tar.gz
|
||||
# Source0: 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-psutil/types-psutil-%{types_psutil_version}.tar.gz
|
||||
Source1: https://files.pythonhosted.org/packages/source/t/types_psutil/types_psutil-%{types_psutil_version}.tar.gz
|
||||
# License Source2: Apache-2.0. Only for the test suite, not packaged here.
|
||||
Source2: https://files.pythonhosted.org/packages/source/t/types-setuptools/types-setuptools-%{types_setuptools_version}.tar.gz
|
||||
Source2: https://files.pythonhosted.org/packages/source/t/types_setuptools/types_setuptools-%{types_setuptools_version}.tar.gz
|
||||
Source99: python-mypy-rpmlintrc
|
||||
BuildRequires: %{python_module exceptiongroup}
|
||||
BuildRequires: %{python_module mypy_extensions >= 1.0.0}
|
||||
BuildRequires: %{python_module pathspec}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module tomli >= 1.1.0}
|
||||
BuildRequires: %{python_module typing_extensions >= 4.6.0}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-mypy_extensions >= 0.4.3
|
||||
Requires: python-pathspec
|
||||
Requires: python-typing_extensions >= 3.10
|
||||
Requires: (python-tomli >= 1.1.0 if python-base < 3.11)
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Suggests: python-psutil >= 4.0
|
||||
BuildArch: noarch
|
||||
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
|
||||
Provides: mypy = %{version}
|
||||
Obsoletes: mypy < %{version}
|
||||
%endif
|
||||
Suggests: python-psutil >= 4.0
|
||||
BuildArch: noarch
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module attrs >= 18}
|
||||
BuildRequires: %{python_module devel}
|
||||
@@ -84,15 +96,16 @@ Mypy's type system features type inference, gradual typing, generics
|
||||
and union types.
|
||||
|
||||
%prep
|
||||
%setup -q -a 1 -a 2 -n mypy-%{version}
|
||||
%setup -q -a1 -n mypy-%{version}
|
||||
%setup -q -T -D -a2 -n mypy-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
sed -i '/env python3/d' ./mypy/stubgenc.py
|
||||
sed -i '/env python3/d' ./mypy/stubgen.py
|
||||
|
||||
mkdir mystubs
|
||||
mv types-setuptools-%{types_setuptools_version}/setuptools-stubs* mystubs/
|
||||
mv types-psutil-%{types_psutil_version}/psutil-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
|
||||
@@ -112,6 +125,7 @@ rm docs/make.bat
|
||||
%python_clone -a %{buildroot}%{_bindir}/mypyc
|
||||
%python_clone -a %{buildroot}%{_bindir}/stubgen
|
||||
%python_clone -a %{buildroot}%{_bindir}/stubtest
|
||||
%python_group_libalternatives mypy dmypy mypyc stubgen 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}
|
||||
@@ -141,6 +155,9 @@ donttest+=" or PEP561Suite"
|
||||
%pytest -n auto -k "not (testallexcept ${donttest})"
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative mypy
|
||||
|
||||
%post
|
||||
%python_install_alternative mypy dmypy mypyc stubgen stubtest
|
||||
|
||||
@@ -152,7 +169,8 @@ donttest+=" or PEP561Suite"
|
||||
%license LICENSE
|
||||
%{python_sitelib}/mypy
|
||||
%{python_sitelib}/mypyc
|
||||
%{python_sitelib}/mypy-%{version}.dist-info
|
||||
# %%{python_sitelib}/mypy-%%{version}.dist-info
|
||||
%{python_sitelib}/mypy-*.dist-info
|
||||
%python_alternative %{_bindir}/dmypy
|
||||
%python_alternative %{_bindir}/mypy
|
||||
%python_alternative %{_bindir}/mypyc
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f7d8769812d72a4b513d7ec9eb5580fe2f6013fc270394a603cb6534811f3e4d
|
||||
size 14260
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4216f1e2ef29d089877b3af3ab2acf489eb869ccaf905125c69d2dc3932fd85
|
||||
size 32945
|
||||
BIN
types_psutil-7.0.0.20250401.tar.gz
LFS
Normal file
BIN
types_psutil-7.0.0.20250401.tar.gz
LFS
Normal file
Binary file not shown.
BIN
types_setuptools-78.1.0.20250329.tar.gz
LFS
Normal file
BIN
types_setuptools-78.1.0.20250329.tar.gz
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user