You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/05/19 06:06:39 UTC
(opendal) 01/01: refactor(services/onedrive): deprecate versioning option
This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch xuanwo/onedrive-capability-cleanup
in repository https://gitbox.apache.org/repos/asf/opendal.git
commit b3db75214e2a6e73350b50fee92982c433564583
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue May 19 14:06:25 2026 +0800
refactor(services/onedrive): deprecate versioning option
---
.../dotnet/OpenDAL/ServiceConfig/OnedriveServiceConfig.cs | 2 +-
.../src/main/java/org/apache/opendal/ServiceConfig.java | 4 +++-
bindings/python/python/opendal/operator.pyi | 6 ++++--
bindings/python/src/services.rs | 6 ++++--
core/services/onedrive/src/builder.rs | 13 ++++++++-----
core/services/onedrive/src/config.rs | 7 +++++--
core/services/onedrive/src/docs.md | 2 +-
7 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/bindings/dotnet/OpenDAL/ServiceConfig/OnedriveServiceConfig.cs b/bindings/dotnet/OpenDAL/ServiceConfig/OnedriveServiceConfig.cs
index 502d3594f..242174212 100644
--- a/bindings/dotnet/OpenDAL/ServiceConfig/OnedriveServiceConfig.cs
+++ b/bindings/dotnet/OpenDAL/ServiceConfig/OnedriveServiceConfig.cs
@@ -41,7 +41,7 @@ namespace OpenDAL.ServiceConfig
/// </summary>
public string? ClientSecret { get; init; }
/// <summary>
- /// Enabling version support
+ /// Deprecated: OneDrive versioning capability is enabled by default.
/// </summary>
public bool? EnableVersioning { get; init; }
/// <summary>
diff --git a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
index 5dc5af395..55e760c01 100644
--- a/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
+++ b/bindings/java/src/main/java/org/apache/opendal/ServiceConfig.java
@@ -2277,7 +2277,9 @@ public interface ServiceConfig {
*/
public final String clientSecret;
/**
- * <p>Enabling version support</p>
+ * <p>Deprecated: OneDrive versioning capability is enabled by default.</p>
+ *
+ * @deprecated OneDrive versioning capability is enabled by default and this option is no longer needed.
*/
public final Boolean enableVersioning;
/**
diff --git a/bindings/python/python/opendal/operator.pyi b/bindings/python/python/opendal/operator.pyi
index f5ac75e2d..cfe0cca46 100644
--- a/bindings/python/python/opendal/operator.pyi
+++ b/bindings/python/python/opendal/operator.pyi
@@ -1832,7 +1832,8 @@ class AsyncOperator:
Microsoft Graph API Application client secret that
is in the Azure's app registration portal
enable_versioning : builtins.bool, optional
- Enabling version support
+ Deprecated: OneDrive versioning capability is
+ enabled by default.
refresh_token : builtins.str, optional
Microsoft Graph API (also OneDrive API) refresh
token
@@ -4432,7 +4433,8 @@ class Operator:
Microsoft Graph API Application client secret that
is in the Azure's app registration portal
enable_versioning : builtins.bool, optional
- Enabling version support
+ Deprecated: OneDrive versioning capability is
+ enabled by default.
refresh_token : builtins.str, optional
Microsoft Graph API (also OneDrive API) refresh
token
diff --git a/bindings/python/src/services.rs b/bindings/python/src/services.rs
index 88b4ae1de..fe28c4d9f 100644
--- a/bindings/python/src/services.rs
+++ b/bindings/python/src/services.rs
@@ -1713,7 +1713,8 @@ submit! {
Microsoft Graph API Application client secret that
is in the Azure's app registration portal
enable_versioning : builtins.bool, optional
- Enabling version support
+ Deprecated: OneDrive versioning capability is
+ enabled by default.
refresh_token : builtins.str, optional
Microsoft Graph API (also OneDrive API) refresh
token
@@ -4391,7 +4392,8 @@ submit! {
Microsoft Graph API Application client secret that
is in the Azure's app registration portal
enable_versioning : builtins.bool, optional
- Enabling version support
+ Deprecated: OneDrive versioning capability is
+ enabled by default.
refresh_token : builtins.str, optional
Microsoft Graph API (also OneDrive API) refresh
token
diff --git a/core/services/onedrive/src/builder.rs b/core/services/onedrive/src/builder.rs
index 8d2371a71..3399e7a22 100644
--- a/core/services/onedrive/src/builder.rs
+++ b/core/services/onedrive/src/builder.rs
@@ -99,9 +99,12 @@ impl OnedriveBuilder {
self
}
- /// Enable versioning support for OneDrive
- pub fn enable_versioning(mut self, enabled: bool) -> Self {
- self.config.enable_versioning = enabled;
+ /// Deprecated: OneDrive versioning capability is enabled by default.
+ #[deprecated(
+ since = "0.57.0",
+ note = "OneDrive versioning capability is enabled by default and this option is no longer needed."
+ )]
+ pub fn enable_versioning(self, _enabled: bool) -> Self {
self
}
}
@@ -132,14 +135,14 @@ impl Builder for OnedriveBuilder {
stat: true,
stat_with_if_none_match: true,
- stat_with_version: self.config.enable_versioning,
+ stat_with_version: true,
delete: true,
create_dir: true,
list: true,
list_with_limit: true,
- list_with_versions: self.config.enable_versioning,
+ list_with_versions: true,
shared: true,
diff --git a/core/services/onedrive/src/config.rs b/core/services/onedrive/src/config.rs
index 91d4d7b1c..e60820499 100644
--- a/core/services/onedrive/src/config.rs
+++ b/core/services/onedrive/src/config.rs
@@ -38,7 +38,11 @@ pub struct OnedriveConfig {
pub client_id: Option<String>,
/// Microsoft Graph API Application client secret that is in the Azure's app registration portal
pub client_secret: Option<String>,
- /// Enabling version support
+ /// Deprecated: OneDrive versioning capability is enabled by default.
+ #[deprecated(
+ since = "0.57.0",
+ note = "OneDrive versioning capability is enabled by default and this option is no longer needed."
+ )]
pub enable_versioning: bool,
}
@@ -46,7 +50,6 @@ impl Debug for OnedriveConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("OnedriveConfig")
.field("root", &self.root)
- .field("enable_versioning", &self.enable_versioning)
.finish_non_exhaustive()
}
}
diff --git a/core/services/onedrive/src/docs.md b/core/services/onedrive/src/docs.md
index c7a2786d6..8534b6d92 100644
--- a/core/services/onedrive/src/docs.md
+++ b/core/services/onedrive/src/docs.md
@@ -47,7 +47,7 @@ You should consider [`RetryLayer`] and monitor your operations carefully.
- `client_id`: Set the client ID for a Microsoft Graph API application (available though Azure's registration portal)
- `client_secret`: Set the client secret for a Microsoft Graph API application
- `root`: Set the work directory for OneDrive backend
-- `enable_versioning`: Enable versioning support for OneDrive items
+- `enable_versioning`: Deprecated. OneDrive versioning capability is enabled by default and this option is no longer needed.
The configuration for tokens is one of the following: