@@ -353,8 +353,6 @@ def merge_with_existing(self, schema: Dict[str, Any]) -> Dict[str, Any]:
353353 schema ["factor" ] = self .factor
354354 if self .asyncEnabled is not None :
355355 schema ["asyncEnabled" ] = self .asyncEnabled
356- if not self .asyncEnabled :
357- schema .pop ("asyncConfig" , None )
358356 if self .deletionStrategy is not None :
359357 schema ["deletionStrategy" ] = str (self .deletionStrategy .value )
360358 if self .asyncConfig is not None :
@@ -2922,14 +2920,21 @@ def replication(
29222920 ) -> _ReplicationConfigCreate :
29232921 """Create a `ReplicationConfigCreate` object to be used when defining the replication configuration of Weaviate.
29242922
2925- NOTE: `async_enabled` is only available with WeaviateDB `>=v1.26.0`
2923+ Note:
2924+ `async_enabled` is deprecated. On servers `>=v1.38` the `asyncEnabled` field no longer
2925+ exists in the schema: it is silently dropped, and async replication is decided
2926+ server-side (on by default for any collection with a replication factor > 1, unless the
2927+ `ASYNC_REPLICATION_DISABLED` runtime override is set). On older servers it still takes
2928+ effect. Passing it emits a ``DeprecationWarning``; it will be removed in a future release.
29262929
29272930 Args:
29282931 factor: The replication factor.
29292932 async_enabled: Enabled async replication.
29302933 deletion_strategy: How conflicts between different nodes about deleted objects are resolved.
2931- async_config: The configuration for async replication. This is only relevant if `async_enabled` is `True`.
2934+ async_config: The configuration for async replication.
29322935 """
2936+ if async_enabled is not None :
2937+ _Warnings .async_enabled_field_removed_server_side ()
29332938 return _ReplicationConfigCreate (
29342939 factor = factor ,
29352940 asyncEnabled = async_enabled ,
@@ -3210,12 +3215,21 @@ def replication(
32103215
32113216 Use this method when defining the `replication_config` argument in `collection.update()`.
32123217
3218+ Note:
3219+ `async_enabled` is deprecated. On servers `>=v1.38` the `asyncEnabled` field no longer
3220+ exists in the schema: it is silently dropped, and async replication is decided
3221+ server-side (on by default for any collection with a replication factor > 1, unless the
3222+ `ASYNC_REPLICATION_DISABLED` runtime override is set). On older servers it still takes
3223+ effect. Passing it emits a ``DeprecationWarning``; it will be removed in a future release.
3224+
32133225 Args:
32143226 factor: The replication factor.
32153227 async_enabled: Enable async replication.
32163228 deletion_strategy: How conflicts between different nodes about deleted objects are resolved.
3217- async_config: The async replication configuration. This is only applicable if `async_enabled` is set to `True`.
3229+ async_config: The async replication configuration.
32183230 """
3231+ if async_enabled is not None :
3232+ _Warnings .async_enabled_field_removed_server_side ()
32193233 return _ReplicationConfigUpdate (
32203234 factor = factor ,
32213235 asyncEnabled = async_enabled ,
0 commit comments