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.
64
64
If you were calling it directly, please use ` Record.__getitem__(slice(...)) ` or simply ` record[...] ` instead.
65
65
- Remove deprecated class ` neo4j.Bookmark ` in favor of ` neo4j.Bookmarks ` .
66
66
- 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.
67
69
- Remove deprecated driver configuration option ` trust ` .
68
70
Use ` trusted_certificates ` instead.
69
71
- 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 24
24
25
25
if t .TYPE_CHECKING :
26
26
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
31
28
32
29
from ._addressing import Address
33
30
else :
34
- from ._warnings import deprecated
35
-
36
31
_Protocol = object
37
32
38
33
@@ -311,15 +306,6 @@ def agent(self) -> str:
311
306
"""Server agent string by which the remote server identifies itself."""
312
307
return str (self ._metadata .get ("server" ))
313
308
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
-
323
309
def update (self , metadata : dict ) -> None :
324
310
"""
325
311
Update server information with extra metadata.
Original file line number Diff line number Diff line change @@ -30,13 +30,3 @@ def server_info(driver):
30
30
with driver .session () as session :
31
31
summary = session .run ("RETURN 1" ).consume ()
32
32
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:
137
137
server_info = neo4j .ServerInfo (address , version )
138
138
assert server_info .address is address
139
139
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
142
142
143
143
144
144
@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments