diff --git a/CHANGELOG.md b/CHANGELOG.md index e8d42ee94..0a17c53c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,8 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki for a full changelog. errors. - It is now the same error raised as when trying to start an explicit transaction while another explicit transaction is already active. +- Remove deprecated `Record.__getslice__`. This magic method has been removed in Python 3.0. + If you were calling it directly, please use `Record.__getitem__(slice(...))` or simply `record[...]` instead. ## Version 5.28 diff --git a/src/neo4j/_data.py b/src/neo4j/_data.py index 0cbe300e0..2c03eac98 100644 --- a/src/neo4j/_data.py +++ b/src/neo4j/_data.py @@ -31,13 +31,6 @@ from ._codec.hydration import BrokenHydrationObject from ._conf import iter_items - - -if t.TYPE_CHECKING: - from typing_extensions import deprecated -else: - from ._meta import deprecated - from ._spatial import Point from .exceptions import BrokenRecordError from .graph import ( @@ -150,14 +143,6 @@ def __getitem__( # type: ignore[override] else: return self._super_getitem_single(index) - # TODO: 6.0 - remove - @deprecated("This method is deprecated and will be removed in the future.") - def __getslice__(self, start, stop): # noqa: PLW3201 will be removed - key = slice(start, stop) - keys = self.__keys[key] - values = tuple(self)[key] - return self.__class__(zip(keys, values, strict=True)) - def get(self, key: str, default: object = None) -> t.Any: """ Obtain a value from the record by key.