14
0

Accepting request 793786 from devel:languages:python

- Update to 5.1.0:
  * Make @implementer(*iface) and classImplements(cls, *iface) ignore redundant interfaces. If the class already implements an interface through inheritance, it is no longer redeclared specifically for cls. This solves many instances of inconsistent resolution orders, while still allowing the interface to be declared for readability and maintenance purposes. See issue 199.
  * Remove all bare except: statements. Previously, when accessing special attributes such as __provides__, __providedBy__, __class__ and __conform__, this package wrapped such access in a bare except: statement, meaning that many errors could pass silently; typically this would result in a fallback path being taken and sometimes (like with providedBy()) the result would be non-sensical. This is especially true when those attributes are implemented with descriptors. Now, only AttributeError is caught. This makes errors more obvious.
  * In addition, ZODB errors like POSKeyError could now be propagated where previously they would ignored by this package.
  * Require that the second argument (bases) to InterfaceClass is a tuple. This only matters when directly using InterfaceClass to create new interfaces dynamically. Previously, an individual interface was allowed, but did not work correctly. Now it is consistent with type and requires a tuple.
  * Let interfaces define custom __adapt__ methods. This implements the other side of the PEP 246 adaptation protocol: objects being adapted could already implement __conform__ if they know about the interface, and now interfaces can implement __adapt__ if they know about particular objects. There is no performance penalty for interfaces that do not supply custom __adapt__ methods.
  * Make the internal singleton object returned by APIs like implementedBy and directlyProvidedBy for objects that implement or provide no interfaces more immutable. Previously an internal cache could be mutated. See issue 204.

OBS-URL: https://build.opensuse.org/request/show/793786
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-zope.interface?expand=0&rev=25
This commit is contained in:
2020-04-15 17:53:22 +00:00
committed by Git OBS Bridge
4 changed files with 17 additions and 7 deletions

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Apr 14 09:12:36 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 5.1.0:
* Make @implementer(*iface) and classImplements(cls, *iface) ignore redundant interfaces. If the class already implements an interface through inheritance, it is no longer redeclared specifically for cls. This solves many instances of inconsistent resolution orders, while still allowing the interface to be declared for readability and maintenance purposes. See issue 199.
* Remove all bare except: statements. Previously, when accessing special attributes such as __provides__, __providedBy__, __class__ and __conform__, this package wrapped such access in a bare except: statement, meaning that many errors could pass silently; typically this would result in a fallback path being taken and sometimes (like with providedBy()) the result would be non-sensical. This is especially true when those attributes are implemented with descriptors. Now, only AttributeError is caught. This makes errors more obvious.
* In addition, ZODB errors like POSKeyError could now be propagated where previously they would ignored by this package.
* Require that the second argument (bases) to InterfaceClass is a tuple. This only matters when directly using InterfaceClass to create new interfaces dynamically. Previously, an individual interface was allowed, but did not work correctly. Now it is consistent with type and requires a tuple.
* Let interfaces define custom __adapt__ methods. This implements the other side of the PEP 246 adaptation protocol: objects being adapted could already implement __conform__ if they know about the interface, and now interfaces can implement __adapt__ if they know about particular objects. There is no performance penalty for interfaces that do not supply custom __adapt__ methods.
* Make the internal singleton object returned by APIs like implementedBy and directlyProvidedBy for objects that implement or provide no interfaces more immutable. Previously an internal cache could be mutated. See issue 204.
-------------------------------------------------------------------
Tue Mar 24 14:39:03 UTC 2020 - pgajdos@suse.com

View File

@@ -20,21 +20,20 @@
%global modname zope.interface
%define oldpython python
Name: python-zope.interface
Version: 5.0.1
Version: 5.1.0
Release: 0
Summary: Interfaces for Python
License: ZPL-2.1
Group: Development/Languages/Python
URL: https://pypi.python.org/pypi/zope.interface
Source: https://files.pythonhosted.org/packages/source/z/zope.interface/%{modname}-%{version}.tar.gz
# needed for tests that try to compile things
BuildRequires: %{python_module devel}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module zope.event}
BuildRequires: %{python_module zope.testing}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
%ifpython2
Provides: %{oldpython}-zopeinterface = %{version}
Obsoletes: %{oldpython}-zopeinterface < %{version}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd0bc4016ec9ffa6d327bf3ba2f044c3ff376880661e5cc38c622e1ae023076f
size 214907

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40e4c42bd27ed3c11b2c983fecfb03356fae1209de10686d03c02c8696a1d90e
size 225400