- 
                Notifications
    You must be signed in to change notification settings 
- Fork 203
6.x Changelog
        Robsdedude edited this page Oct 2, 2025 
        ·
        6 revisions
      
    🔧️ Fixes
- Fix DNS error re-write on Windows (#1254).
 On windows only, the driver would re-write the DNS error when resolvingAddress(None, None)to be retryable, which it shouldn't.
🔧️ Fixes
- Fix AttributeErroron package import on Windows:socket.EAI_ADDRFAMILY(#1252).
🔧️ Fixes
- Complete Bolt 6.0 implementation: add support for UnsupportedType(#1241).
👏️ Improvements
- Improve reprstring representation of spatial types (#1231).
- Improve reprandstrstring representations of SummaryCounters (#1233).
- Improve reprstring representation ofDurationandClockTime(#1235).
- Improve reprstring representation of internal classes (might change log output) (#1236).
- Improve reprstring representation ofGqlStatusObjectandSummaryInputPosition(#1234).
- Unify strstring representation ofVectorwith other drivers (#1238).
- Minor formatting fixes (#1246).
📚️ Docs
- Fix type hint resolution in docs (#1247).
- Document continuation of support for Bolt 4.4 (#1242).
- Fix deprecations around notification APIs as part of migrating notifications to GQL status (#1240).
- Better explain security config options interplay (#1239).
- Minor API docs improvements (#1247, #1248, #1251).
🧑️💻️ Development
- Improve internal packstream Structureclass for a better debugging and development experience (#1232).
- Bump development dependencies (#1250).
This release contains all fixes up until version 5.28.1 plus:
⭐️ New Features
- Introduce Bolt 6.0 support with vector types (#1214).
- Chain failure causes on routing table fetching failure (#1219).
 When a routing driver (neo4j[+s[sc]]URL scheme), fails to fetch a routing table, instead of swallowing all errors from the connection and RT fetching attempts that lead up to the failure, the errors are not attached as__cause__of the raised error.
- Introduce helper method GqlError.find_by_gql_status(#1216).
🔧️ Fixes
- Fix driver stuck on RecursionErroronCOMMITSUCCESS(#1192).
- Fix re-authentication interfering with connectivity checks (#1144).
- ⚠️ make unsupported comparisons return- NotImplementedinstead of- Falseor raising (#1199). This means that when comparing a driver type with another type is doesn't support, the other type gets the chance to handle the comparison.
 Affected types:- neo4j.Record
- 
neo4j.graph.Node,neo4j.graph.Relationship,neo4j.graph.Path
- 
neo4j.time.Date,neo4j.time.Time,neo4j.time.DateTime
- 
neo4j.spatial.Point(and subclasses)
 
👏️ Improvements
- ⚠️ Align- connection_acquisition_timeoutconfiguration option with other drivers (#1215).
 The timeout now spans anything required to acquire a working connection from the pool. This includes potential fetching of routing tables which in itself requires acquiring a connection. Previously, the timeout would be restarted for auxiliary connection acquisitions like those for fetching a routing table.
- ⚠️ Make DNS error retryable (#1211).
 Configuring the driver with a URL that cannot be DNS resolved will raise a (retryable)- ServiceUnavailableerror instead of a- ValueError.
- Introduce new sub-logger neo4j.session(#1206).
 This separates log entries that are session-related (including transaction retries) form sub-loggerneo4j.pool.
- ⚠️ No longer implicitly closing drivers and sessions in- __del__()(finalizer/destructor) (#1183).
 Make sure to call- .close()on them explicitly or use them in a- withstatement.
- ⚠️ Disallow using a closed driver (#1182).- Raise DriverErroron using the closed driver.
- Calling driver.close()again is now a no-op.
 
- Raise 
- ⚠️ Slightly change- Neo4jErrorand- ClientError(#1179).- Properties messageandcodeare always astr(instead ofstr | None).
- Remove possibility to override/set messageandcodeproperties.
- Remove undocumented, internal methods Neo4jError.hydrate,Neo4jError.invalidates_all_connections, andNeo4jError.is_fatal_during_discovery.
- Remove deprecated method Neo4jError.is_retriable.
 UseNeo4jError.is_retryableinstead.
- Change string representation of Neo4jErrorto include GQL error information.
 
- Properties 
- ⚠️ Raise- ConfigurationErrorinstead of ignoring the routing context (URI query parameters) when creating a direct driver (- "bolt[+s[sc]]://"scheme) (#1178).
- ⚠️ Raise new- ConnectionAcquisitionTimeoutError(subclass of- DriverError) instead of- ClientError(subclass of- Neo4jError) the- connection_acquisition_timeoutis exceeded (#1169).- This improves the differentiation between DriverErrorfor client-side errors andNeo4jErrorfor server-side errors.
 
- This improves the differentiation between 
- ⚠️ Raise- TypeErrorinstead of- ValueErrorwhen passing a- Queryobject to- Transaction.run(#1171).
- ⚠️ Raise- TransactionError(subclass of- DriverError) instead of- ClientError(subclass of- Neo4jError) when calling- session.run()while an explicit transaction is active on that session (#1170).- This improves the differentiation between DriverErrorfor client-side errors andNeo4jErrorfor server-side errors.
- It is now the same error raised as when trying to start an explicit transaction while another explicit transaction is already active.
 
- This improves the differentiation between 
- ⚠️ Improve validation of- connection_acquisition_timeoutconfiguration option (#1168).- Raise ValueErroron invalid values (instead ofClientError).
- Consistently restrict the value to be strictly positive.
 
- Raise 
- ⚠️ Raise- neo4j.exceptions.UnsupportedServerProductif no common bolt protocol version could be negotiated with the server (instead of internal- neo4j._exceptions.BoltHandshakeError) (#1164, #1224).
 - UnsupportedServerProductis now a subclass of- ConfigurationError(instead of- Exceptiondirectly).
- ⚠️ Improve validation of- access_modeconfiguration option (#1166).- 
ValueErroron invalid value (instead ofClientError).
- Consistently check the value (also for non-routing drivers).
 
- 
- ⚠️ Raise- ConfigurationErrorif the passed- authparameters is not valid (instead of- AuthError) (#1162).- This improves the differentiation between DriverErrorfor client-side errors andNeo4jErrorfor server-side errors.
 
- This improves the differentiation between 
📚️ Docs
- Document that is_retryableis not applicable to auto-commit transactions (#1217).
- Fix formatting, wording, and minor updates for 6.0 (#1200).
- Minor fixes: add more links and versions changed/added remarks (#1146).
🌳️ Maturing
- Stabilize GQL status objects (use these instead of notifications) (#1209).
 Affected APIs:- ResultSummary.gql_status_objects
- neo4j.GqlStatusObject
- (neo4j.exceptions.GqlError,neo4j.exceptions.GqlErrorClassification)
 
- Stabilize driver debug mode (#1205).
- 
warn_notification_severityconfig option
- concurrency checker
 
- 
🧹️ Clean-up
- ⚠️ Bump minimum supported Python version to 3.10 (#1153).- Drop support for Python 3.7 (end of life 2023-06-27)
- Drop support for Python 3.8 (end of life 2024-10-07)
- Drop support for Python 3.9 (end of life scheduled for 2025-10).
 
- ⚠️ Remove deprecated- Bookmarkin favor or- Bookmarks(#1175, #1196).- Remove deprecated class neo4j.Bookmarkin favor ofneo4j.Bookmarks.
- Remove deprecated method session.last_bookmark()in favor oflast_bookmarks().
- Deprecate passing raw sting bookmarks as initial_bookmarkstoGraphDatabase.bookmark_manager().
 Use aneo4j.Bookmarksobject instead.
- 
Driver.session()no longer accepts raw string bookmarks asbookmarksargument.
 Use aneo4j.Bookmarksobject instead.
 
- Remove deprecated class 
- ⚠️ Remove deprecated- ServerInfo.connection_id(#1193).
 There is no replacement as this is considered internal information.
- ⚠️ Make undocumented internal constants, helper functions, and other items private.- 
neo4j.api(#1176, #1186).- DRIVER_BOLT
- DRIVER_NEO4J
- SECURITY_TYPE_NOT_SECURE
- SECURITY_TYPE_SECURE
- SECURITY_TYPE_SELF_SIGNED_CERTIFICATE
- check_access_mode
- parse_neo4j_uri
- parse_routing_context
 
- 
neo4j.exceptions(#1176, #1195).- CLASSIFICATION_CLIENT
- CLASSIFICATION_DATABASE
- CLASSIFICATION_TRANSIENT
- ERROR_REWRITE_MAP
- client_errors
- transient_errors
- all other indirectly exposed items from imports (e.g. typingasneo4j.exceptions.t)
 
- 
neo4j.time(#1191).- DATE_ISO_PATTERN
- TIME_ISO_PATTERN
- DURATION_ISO_PATTERN
- NANO_SECONDS
- AVERAGE_SECONDS_IN_MONTH
- AVERAGE_SECONDS_IN_DAY
- FORMAT_F_REPLACE
- IS_LEAP_YEAR
- DAYS_IN_YEAR
- DAYS_IN_MONTH
- round_half_to_even
- symmetric_divmod
- DateTimeType
- DateType
- TimeType
- all other indirectly exposed items from imports (e.g. reasneo4j.time.re)
 
- 
neo4j.spatial(#1188).- hydrate_point
- dehydrate_point
- point_type
 
- 
neo4j.GraphDatabase(#1181).- .bolt_driver
- .neo4j_driver
 
- 
neo4j.BoltDriverandneo4j.Neo4jDriver(#1181).- .open
- .parse_target
- .default_host
- .default_port
- .default_target
 
- 
neo4j.graph,neo4j.addressing,neo4j.api(#1195).- indirectly exposed items from imports (e.g. collections.abc.Mappingasneo4j.graph.Mapping).
 
- indirectly exposed items from imports (e.g. 
- 
BoltDriverandNeo4jDriver().- .open
- .parse_target
- .default_host
- .default_port
- .default_target
 
- 
neo4j.debug(#1194).- ColourFormatter
- TaskIdFilter
- all other indirectly exposed items from imports (e.g. asyncioasneo4j.debug.asyncio)
 
 
- 
- ⚠️ Remove deprecated option to index- EntitySetViewby- intid (#1187).
 Graph type sets (- neo4j.graph.EntitySetView) can no longer by indexed by legacy- id(- int, e.g.,- graph.nodes[0]). Use the- element_idinstead (- str, e.g.,- graph.nodes["..."]).
- ⚠️ Make- Summary.summary_notificationsa- tupleinstead of a- listand type it with- Sequenceto signify that it should be treated as immutable (#1185).
- ⚠️ Remove deprecated- session.read_transactionand- session.write_transaction(#1184).
 Instead, use- session.execute_readand- session.execute_writerespectively.
- ⚠️ Deprecate notifications (use GQL status objects instead) (#1209).
 Deprecated APIs:- ResultSummary.notifications
- ResultSummary.summary_notifications
- neo4j.SummaryNotification
- neo4j.NotificationCategory
- neo4j.NotificationDisabledCategory
 
- ⚠️ Remove deprecated driver configuration option- trust(#1177).
 Use- trusted_certificatesinstead.- Remove the associated constants neo4j.TRUST_ALL_CERTIFICATESandneo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES.
 
- Remove the associated constants 
- ⚠️ Rework- PreviewWarning(#1173).- Remove ExperimentalWarningand turn the few left instances of it intoPreviewWarning.
- Deprecate importing PreviewWarningfromneo4j.
 Import it fromneo4j.warningsinstead.
 
- Remove 
- ⚠️ Make undocumented classes- ResolvedAddress,- ResolvedIPv4Address, and- ResolvedIPv6Addressprivate (#1174).
- ⚠️ Remove deprecated- Record.__getslice__. This magic method has been removed in Python 3.0 (#1172).
 If you were calling it directly, please use- Record.__getitem__(slice(...))or simply- record[...]instead.
- ⚠️ - ServerInfo.protocol_versionnow is a- tuple[int, int]insteadof a- api.Version(#1164).- This should be drop-in replacement is most cases:
- 
Versionwas a sup-type oftuple[int, int].
- 
ServerInfo.protocol_versionwas already documented and typed astuple[int, int].
- 
Version's additional methods were undocumented and shouldn't have been used.
 
- 
- 
api.Versionhas been removed as it's unused now.
 
- This should be drop-in replacement is most cases:
- ⚠️ Remove deprecated exports from- neo4j(#1160).- 
log,Config,PoolConfig,SessionConfig,WorkspaceConfig(internal - no replacement).
- 
SummaryNotificationPosition(useSummaryInputPositioninstead).
 
- 
- ⚠️ Remove deprecated modules (#1159):- neo4j.conf
- neo4j.data
- neo4j.meta
- neo4j.packstream
- neo4j.routing
- neo4j.time.arithmetic
- neo4j.time.clock_implementation
- neo4j.time.hydration
- neo4j.time.metaclasses
- neo4j.work
- neo4j.work.query
- neo4j.work.summary
 
- ⚠️ Deprecate- ClockTimeand its accessors (#1191).- For each neo4j.time.Date,neo4j.time.DateTime,neo4j.time.Time- 
from_clock_timeandto_clock_timemethods
 
- 
- 
neo4j.time.ClockTimeitself.
 
- For each 
- Lift server agent string restrictions (#1208).
📦️ Packaging
- ⚠️ Remove deprecated package alias- neo4j-driver(#1161).
 Use- pip install neo4jinstead.
- ⚠️ Remove- setup.py.
 Please use a recent enough packaging/build tool that supports- pyproject.toml(#1161).
- PEP 639 style licensing metadata (#1207).
🧑️💻️ Development