Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki for a full changelog.
If you were calling it directly, please use `Record.__getitem__(slice(...))` or simply `record[...]` instead.
- Remove deprecated class `neo4j.Bookmark` in favor of `neo4j.Bookmarks`.
- Remove deprecated class `session.last_bookmark()` in favor of `last_bookmarks()`.
- Remove deprecated `ServerInfo.connection_id`.
There is no replacement as this is considered internal information.
- Remove deprecated driver configuration option `trust`.
Use `trusted_certificates` instead.
- Remove the associated constants `neo4j.TRUST_ALL_CERTIFICATES` and `neo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES`.
Expand Down
16 changes: 1 addition & 15 deletions src/neo4j/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@

if t.TYPE_CHECKING:
import typing_extensions as te
from typing_extensions import (
deprecated,
Protocol as _Protocol,
)
from typing_extensions import Protocol as _Protocol

from ._addressing import Address
else:
from ._warnings import deprecated

_Protocol = object


Expand Down Expand Up @@ -311,15 +306,6 @@ def agent(self) -> str:
"""Server agent string by which the remote server identifies itself."""
return str(self._metadata.get("server"))

@property # type: ignore
@deprecated(
"The connection id is considered internal information "
"and will no longer be exposed in future versions."
)
def connection_id(self):
"""Unique identifier for the remote server connection."""
return self._metadata.get("connection_id")

def update(self, metadata: dict) -> None:
"""
Update server information with extra metadata.
Expand Down
10 changes: 0 additions & 10 deletions tests/integration/test_bolt_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,3 @@ def server_info(driver):
with driver.session() as session:
summary = session.run("RETURN 1").consume()
yield summary.server


# TODO: 6.0 -
# This test will stay as python is currently the only driver exposing
# the connection id. This will be removed in 6.0
def test_server_connection_id(driver):
server_info = driver.get_server_info()
with pytest.warns(DeprecationWarning):
cid = server_info.connection_id
assert cid.startswith("bolt-") and cid[5:].isdigit()
4 changes: 2 additions & 2 deletions tests/unit/common/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def test_serverinfo_initialization() -> None:
server_info = neo4j.ServerInfo(address, version)
assert server_info.address is address
assert server_info.protocol_version is version
with pytest.warns(DeprecationWarning):
assert server_info.connection_id is None
with pytest.raises(AttributeError):
_ = server_info.connection_id # type: ignore # expected to fail


@pytest.mark.parametrize(
Expand Down