aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-12-13 11:24:01 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-12-13 11:39:04 +0300
commit8ab4ecc8f6b38cb40a0538c26f53abd3343094f3 (patch)
tree130f3c2d74ced87dbae00dd8c59968dee2b206c9
parentb643b0cb5b1a28996ce6ff18a3689d7af03f2e58 (diff)
downloadydb-8ab4ecc8f6b38cb40a0538c26f53abd3343094f3.tar.gz
Intermediate changes
commit_hash:733d9d1dc02b26eb79eefc2059e2b9e39f7e1289
-rw-r--r--contrib/python/zope.interface/py3/.dist-info/METADATA12
-rw-r--r--contrib/python/zope.interface/py3/ya.make2
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/_compat.py3
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/common/builtins.py20
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/common/collections.py16
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py13
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/interface.py2
7 files changed, 47 insertions, 21 deletions
diff --git a/contrib/python/zope.interface/py3/.dist-info/METADATA b/contrib/python/zope.interface/py3/.dist-info/METADATA
index eb379d3172..279d71d4f0 100644
--- a/contrib/python/zope.interface/py3/.dist-info/METADATA
+++ b/contrib/python/zope.interface/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: zope.interface
-Version: 7.1.1
+Version: 7.2
Summary: Interfaces for Python
Home-page: https://github.com/zopefoundation/zope.interface
Author: Zope Foundation and Contributors
@@ -76,12 +76,22 @@ For detailed documentation, please see https://zopeinterface.readthedocs.io/en/l
Changes
=========
+7.2 (2024-11-28)
+================
+
+- Add preliminary support for Python 3.14a2, this means that
+ ``.common.builtins.IByteString`` and ``.common.collections.IByteString`` are
+ no longer available from this Python version onwards as Python 3.14 dropped
+ ``collections.abc.ByteString``.
+
+
7.1.1 (2024-10-23)
==================
- Fix segmentation faults in `weakrefobject.c` on Python 3.12 and 3.13.
(`#323 <https://github.com/zopefoundation/zope.interface/issues/323>`_)
+
7.1.0 (2024-10-10)
==================
diff --git a/contrib/python/zope.interface/py3/ya.make b/contrib/python/zope.interface/py3/ya.make
index cb1aa87e6d..fd9015ba6b 100644
--- a/contrib/python/zope.interface/py3/ya.make
+++ b/contrib/python/zope.interface/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(7.1.1)
+VERSION(7.2)
LICENSE(ZPL-2.1)
diff --git a/contrib/python/zope.interface/py3/zope/interface/_compat.py b/contrib/python/zope.interface/py3/zope/interface/_compat.py
index bc3f867114..380329532b 100644
--- a/contrib/python/zope.interface/py3/zope/interface/_compat.py
+++ b/contrib/python/zope.interface/py3/zope/interface/_compat.py
@@ -22,6 +22,9 @@ import os
import sys
+PY313_OR_OLDER = sys.version_info < (3, 14)
+
+
def _normalize_name(name):
if isinstance(name, bytes):
name = str(name, 'ascii')
diff --git a/contrib/python/zope.interface/py3/zope/interface/common/builtins.py b/contrib/python/zope.interface/py3/zope/interface/common/builtins.py
index 09de5b3b2f..9e543c83f5 100644
--- a/contrib/python/zope.interface/py3/zope/interface/common/builtins.py
+++ b/contrib/python/zope.interface/py3/zope/interface/common/builtins.py
@@ -19,6 +19,7 @@ that they implement the appropriate interface.
"""
from zope.interface import classImplements
+from zope.interface._compat import PY313_OR_OLDER
from zope.interface.common import collections
from zope.interface.common import io
from zope.interface.common import numbers
@@ -67,17 +68,18 @@ class ITextString(collections.ISequence):
extra_classes = (str,)
-class IByteString(collections.IByteString):
- """
- Interface for immutable byte strings.
+if PY313_OR_OLDER:
+ class IByteString(collections.IByteString):
+ """
+ Interface for immutable byte strings.
- On all Python versions this is :class:`bytes`.
+ On all Python versions this is :class:`bytes`.
- Unlike :class:`zope.interface.common.collections.IByteString`
- (the parent of this interface) this does *not* include
- :class:`bytearray`.
- """
- extra_classes = (bytes,)
+ Unlike :class:`zope.interface.common.collections.IByteString`
+ (the parent of this interface) this does *not* include
+ :class:`bytearray`.
+ """
+ extra_classes = (bytes,)
class INativeString(ITextString):
diff --git a/contrib/python/zope.interface/py3/zope/interface/common/collections.py b/contrib/python/zope.interface/py3/zope/interface/common/collections.py
index 543266d9cf..defa8a15b9 100644
--- a/contrib/python/zope.interface/py3/zope/interface/common/collections.py
+++ b/contrib/python/zope.interface/py3/zope/interface/common/collections.py
@@ -38,6 +38,7 @@ from collections import UserList
from collections import UserString
from collections import abc
+from zope.interface._compat import PY313_OR_OLDER
from zope.interface.common import ABCInterface
from zope.interface.common import optional
@@ -190,13 +191,14 @@ class IMutableSequence(ISequence):
extra_classes = (UserList,)
-class IByteString(ISequence):
- """
- This unifies `bytes` and `bytearray`.
- """
- abc = _new_in_ver(
- 'ByteString', True, (ISequence.getABC(),), (bytes, bytearray),
- )
+if PY313_OR_OLDER:
+ class IByteString(ISequence):
+ """
+ This unifies `bytes` and `bytearray`.
+ """
+ abc = _new_in_ver(
+ 'ByteString', True, (ISequence.getABC(),), (bytes, bytearray),
+ )
class ISet(ICollection):
diff --git a/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py b/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py
index cf7019bfc5..3c76439283 100644
--- a/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py
+++ b/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py
@@ -12,6 +12,7 @@
import unittest
+from zope.interface._compat import PY313_OR_OLDER
from zope.interface.common import builtins
from . import VerifyClassMixin
@@ -24,16 +25,22 @@ class TestVerifyClass(VerifyClassMixin,
pass
-add_verify_tests(TestVerifyClass, (
+VERIFY_TESTS = [
(builtins.IList, (list,)),
(builtins.ITuple, (tuple,)),
(builtins.ITextString, (str,)),
- (builtins.IByteString, (bytes,)),
(builtins.INativeString, (str,)),
(builtins.IBool, (bool,)),
(builtins.IDict, (dict,)),
(builtins.IFile, ()),
-))
+
+]
+if PY313_OR_OLDER:
+ VERIFY_TESTS.append(
+ (builtins.IByteString, (bytes,))
+ )
+
+add_verify_tests(TestVerifyClass, tuple(VERIFY_TESTS))
class TestVerifyObject(VerifyObjectMixin,
diff --git a/contrib/python/zope.interface/py3/zope/interface/interface.py b/contrib/python/zope.interface/py3/zope/interface/interface.py
index e5dddb8811..ad8a7de6b3 100644
--- a/contrib/python/zope.interface/py3/zope/interface/interface.py
+++ b/contrib/python/zope.interface/py3/zope/interface/interface.py
@@ -825,6 +825,8 @@ class InterfaceClass(_InterfaceClassBase):
# __firstlineno__: Python 3.13b1+
# https://github.com/python/cpython/pull/118475
'__firstlineno__',
+ # __classdictcell__: Python 3.14
+ '__classdictcell__',
) and
aval is not _decorator_non_return # noqa W503
}