Pure-interface

Latest version: v8.0.2

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

Scan your dependencies

Page 1 of 5

8.0.2

What's Changed
* Fixes type hint on register_adapter https://github.com/seequent/pure_interface/pull/105
* permits & handles singledispatchmethod https://github.com/seequent/pure_interface/pull/106

8.0.1

Fixes bug when dataclass decorator is used with property implementation of an attribute.

8.0

python
class SubInterface(MyInterface, Interface):
...

class Concrete(MyInterface):
....

To assist in migrating existing code a simple script for listing interface classes is attached.

Other changes:

- Removed `allow_implicit` parameter to provided_by (it was pointless).
- Removed `pure_interface.dataclass` decorator in favour of supporting decorator from standard library.
- Added mypy plugin.

8.0.0

Version 8.0 is not backwards compatible with version 7.x.
The way concrete types are created has changed to be in line with `typing.Protocol`. This also made writing a mypy plugin easier (maybe even possible).
As per `Protocol`s, a class now has to directly inherit from `Interface` to be considered an interface type, this was not the case in previous versions.
This also removes the annoying idiom of concrete classes being created with `object` in the bases list.

Given
python
class MyInterface(Interface):
...

in version 7.x and earlier
python
class SubInterface(MyInterface):
...

class Concrete(MyInterface, object):
....

7.3.0

Adds `sub_interface_of` decorator.
Drops official support for Python 3.7
Adds py.typed marker file for type-hinting.
Interfaces may now subclass `typing.Generic`.

7.1.0

Removed deprecated base class mro fixing.
Fixed generic classes breaking type_is_interface.
Fixed fallback delegates accidentally creating interface attributes on sub-classes.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.