-
Notifications
You must be signed in to change notification settings - Fork 204
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 returnNotImplementedinstead ofFalseor 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
⚠️ Alignconnection_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 aValueError.- 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 awithstatement.⚠️ Disallow using a closed driver (#1182).- Raise
DriverErroron using the closed driver. - Calling
driver.close()again is now a no-op.
- Raise
⚠️ Slightly changeNeo4jErrorandClientError(#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
⚠️ RaiseConfigurationErrorinstead of ignoring the routing context (URI query parameters) when creating a direct driver ("bolt[+s[sc]]://"scheme) (#1178).⚠️ Raise newConnectionAcquisitionTimeoutError(subclass ofDriverError) instead ofClientError(subclass ofNeo4jError) theconnection_acquisition_timeoutis exceeded (#1169).- This improves the differentiation between
DriverErrorfor client-side errors andNeo4jErrorfor server-side errors.
- This improves the differentiation between
⚠️ RaiseTypeErrorinstead ofValueErrorwhen passing aQueryobject toTransaction.run(#1171).⚠️ RaiseTransactionError(subclass ofDriverError) instead ofClientError(subclass ofNeo4jError) when callingsession.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 ofconnection_acquisition_timeoutconfiguration option (#1168).- Raise
ValueErroron invalid values (instead ofClientError). - Consistently restrict the value to be strictly positive.
- Raise
⚠️ Raiseneo4j.exceptions.UnsupportedServerProductif no common bolt protocol version could be negotiated with the server (instead of internalneo4j._exceptions.BoltHandshakeError) (#1164, #1224).
UnsupportedServerProductis now a subclass ofConfigurationError(instead ofExceptiondirectly).⚠️ Improve validation ofaccess_modeconfiguration option (#1166).-
ValueErroron invalid value (instead ofClientError). - Consistently check the value (also for non-routing drivers).
-
⚠️ RaiseConfigurationErrorif the passedauthparameters is not valid (instead ofAuthError) (#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_objectsneo4j.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 deprecatedBookmarkin favor orBookmarks(#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 deprecatedServerInfo.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_BOLTDRIVER_NEO4JSECURITY_TYPE_NOT_SECURESECURITY_TYPE_SECURESECURITY_TYPE_SELF_SIGNED_CERTIFICATEcheck_access_modeparse_neo4j_uriparse_routing_context
-
neo4j.exceptions(#1176, #1195).CLASSIFICATION_CLIENTCLASSIFICATION_DATABASECLASSIFICATION_TRANSIENTERROR_REWRITE_MAPclient_errorstransient_errors- all other indirectly exposed items from imports (e.g.
typingasneo4j.exceptions.t)
-
neo4j.time(#1191).DATE_ISO_PATTERNTIME_ISO_PATTERNDURATION_ISO_PATTERNNANO_SECONDSAVERAGE_SECONDS_IN_MONTHAVERAGE_SECONDS_IN_DAYFORMAT_F_REPLACEIS_LEAP_YEARDAYS_IN_YEARDAYS_IN_MONTHround_half_to_evensymmetric_divmodDateTimeTypeDateTypeTimeType- all other indirectly exposed items from imports (e.g.
reasneo4j.time.re)
-
neo4j.spatial(#1188).hydrate_pointdehydrate_pointpoint_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).ColourFormatterTaskIdFilter- all other indirectly exposed items from imports (e.g.
asyncioasneo4j.debug.asyncio)
-
⚠️ Remove deprecated option to indexEntitySetViewbyintid (#1187).
Graph type sets (neo4j.graph.EntitySetView) can no longer by indexed by legacyid(int, e.g.,graph.nodes[0]). Use theelement_idinstead (str, e.g.,graph.nodes["..."]).⚠️ MakeSummary.summary_notificationsatupleinstead of alistand type it withSequenceto signify that it should be treated as immutable (#1185).⚠️ Remove deprecatedsession.read_transactionandsession.write_transaction(#1184).
Instead, usesession.execute_readandsession.execute_writerespectively.⚠️ Deprecate notifications (use GQL status objects instead) (#1209).
Deprecated APIs:ResultSummary.notificationsResultSummary.summary_notificationsneo4j.SummaryNotificationneo4j.NotificationCategoryneo4j.NotificationDisabledCategory
⚠️ Remove deprecated driver configuration optiontrust(#1177).
Usetrusted_certificatesinstead.- Remove the associated constants
neo4j.TRUST_ALL_CERTIFICATESandneo4j.TRUST_SYSTEM_CA_SIGNED_CERTIFICATES.
- Remove the associated constants
⚠️ ReworkPreviewWarning(#1173).- Remove
ExperimentalWarningand turn the few left instances of it intoPreviewWarning. - Deprecate importing
PreviewWarningfromneo4j.
Import it fromneo4j.warningsinstead.
- Remove
⚠️ Make undocumented classesResolvedAddress,ResolvedIPv4Address, andResolvedIPv6Addressprivate (#1174).⚠️ Remove deprecatedRecord.__getslice__. This magic method has been removed in Python 3.0 (#1172).
If you were calling it directly, please useRecord.__getitem__(slice(...))or simplyrecord[...]instead.⚠️ ServerInfo.protocol_versionnow is atuple[int, int]insteadof aapi.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 fromneo4j(#1160).-
log,Config,PoolConfig,SessionConfig,WorkspaceConfig(internal - no replacement). -
SummaryNotificationPosition(useSummaryInputPositioninstead).
-
⚠️ Remove deprecated modules (#1159):neo4j.confneo4j.dataneo4j.metaneo4j.packstreamneo4j.routingneo4j.time.arithmeticneo4j.time.clock_implementationneo4j.time.hydrationneo4j.time.metaclassesneo4j.workneo4j.work.queryneo4j.work.summary
⚠️ DeprecateClockTimeand 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 aliasneo4j-driver(#1161).
Usepip install neo4jinstead.⚠️ Removesetup.py.
Please use a recent enough packaging/build tool that supportspyproject.toml(#1161).- PEP 639 style licensing metadata (#1207).
🧑️💻️ Development