Pytype

Latest version: v2024.4.11

Safety actively analyzes 629503 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 34

2023.09.19

Updates:
* Update typeshed pin to commit ce222e5 from Jun 12.
* pytype-single: Add --no-validate-version flag to disable Python version
checks. This makes testing not-yet-supported versions easier.
* Remove max version requirement for installing pytype. This prevents accidental
installation of very old versions of pytype that don't have this requirement.
Pytype itself still emits an error upon encountering an unsupported version.
* Use pycnite for bytecode processing.

Bug fixes:
* Fix a corner case in ParamSpec matching for a class with a __call__ method.
* Python 3.11:
* Fix implementations of several 3.11 opcodes.
* op.next should not point backwards even if the op is a backwards jump.
* Track undecorated functions for better handling of TypeVars in signatures.
* Fix 'TypeVar not in scope' check for imported TypeVars.

2023.09.11

Updates:
* Preserve the line number of del statements to use in error messages.

Bug fixes:
* Never discard user-provided overloads in output.py.

2023.08.31

Updates:
* Support typing.is_typeddict.
* Change how pytype handles `isinstance(..., Any)`.
* Allow class-scoped TypeVars in classmethods.

Bug fixes:
* Filter out non-visible bindings in vm._unpack_sequence.
* Use the alias name for resolving property decorators.
* Don't collapse long unions containing literals.
* Update pytd printer's treatment of `cls` annotations to match `self`.
* Clear out any `self` annotation before a function recursively calls itself.
* vm: fix narrowing for unittest assertions.

2023.08.22

Bug fixes:
* Report more position information for type stub parse errors.
* Handle aliases in type stubs more consistently.

2023.08.14

Updates:
* Add support for typing_extensions.dataclass_transform used without arguments.
* Remove --enable-cached-property entirely.

Bug fixes:
* Relax the pyi parser's duplicate identifier detection.
* Don't crash on `[]` appearing in the parameters of a user-defined class.
* Work around syntax errors in type stubs.
* Allow `_HAS_DYNAMIC_ATTRIBUTES` to work for class attribute lookups.
* Fix how pytype handles aliases to properties and overloaded methods in stubs.
* Fix how the enum overlay logs [not-supported-yet].

2023.07.28

Updates:
* Flip the enable-cached-property flag to True. This flag is now a no-op and
will be removed in the next release.
* Add bad_unpacking error for unordered types (set and frozenset) unpacking.
* Support assigning to `importlib.import_module(...)` in pyi files.

Bug fixes:
* Raise a parser error when loading a pyi file with an invalid literal
annotation.
* Use init_class instead of instantiate in MATCH_CLASS.

Page 4 of 34

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.