File tree Expand file tree Collapse file tree 4 files changed +5
-27
lines changed Expand file tree Collapse file tree 4 files changed +5
-27
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki for a full changelog.
6464 If you were calling it directly, please use ` Record.__getitem__(slice(...)) ` or simply ` record[...] ` instead.
6565- Remove deprecated class ` neo4j.Bookmark ` in favor of ` neo4j.Bookmarks ` .
6666- Remove deprecated class ` session.last_bookmark() ` in favor of ` last_bookmarks() ` .
67+ - Remove deprecated ` ServerInfo.connection_id ` .
68+ There is no replacement as this is considered internal information.
6769- Remove deprecated driver configuration option ` trust ` .
6870 Use ` trusted_certificates ` instead.
6971 - Remove the associated constants ` neo4j.TRUST_ALL_CERTIFICATES ` and ` neo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES ` .
Original file line number Diff line number Diff line change 2424
2525if t .TYPE_CHECKING :
2626 import typing_extensions as te
27- from typing_extensions import (
28- deprecated ,
29- Protocol as _Protocol ,
30- )
27+ from typing_extensions import Protocol as _Protocol
3128
3229 from ._addressing import Address
3330else :
34- from ._warnings import deprecated
35-
3631 _Protocol = object
3732
3833
@@ -311,15 +306,6 @@ def agent(self) -> str:
311306 """Server agent string by which the remote server identifies itself."""
312307 return str (self ._metadata .get ("server" ))
313308
314- @property # type: ignore
315- @deprecated (
316- "The connection id is considered internal information "
317- "and will no longer be exposed in future versions."
318- )
319- def connection_id (self ):
320- """Unique identifier for the remote server connection."""
321- return self ._metadata .get ("connection_id" )
322-
323309 def update (self , metadata : dict ) -> None :
324310 """
325311 Update server information with extra metadata.
Original file line number Diff line number Diff line change @@ -30,13 +30,3 @@ def server_info(driver):
3030 with driver .session () as session :
3131 summary = session .run ("RETURN 1" ).consume ()
3232 yield summary .server
33-
34-
35- # TODO: 6.0 -
36- # This test will stay as python is currently the only driver exposing
37- # the connection id. This will be removed in 6.0
38- def test_server_connection_id (driver ):
39- server_info = driver .get_server_info ()
40- with pytest .warns (DeprecationWarning ):
41- cid = server_info .connection_id
42- assert cid .startswith ("bolt-" ) and cid [5 :].isdigit ()
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ def test_serverinfo_initialization() -> None:
137137 server_info = neo4j .ServerInfo (address , version )
138138 assert server_info .address is address
139139 assert server_info .protocol_version is version
140- with pytest .warns ( DeprecationWarning ):
141- assert server_info .connection_id is None
140+ with pytest .raises ( AttributeError ):
141+ _ = server_info .connection_id # type: ignore # expected to fail
142142
143143
144144@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments