From 625f74b14f0e29eed6c72a6f522f133ce1a319bb Mon Sep 17 00:00:00 2001 From: mgravell Date: Thu, 17 Sep 2026 15:21:53 +0100 Subject: [PATCH] Point the obsolete messages at 4.0, since 3.2 has shipped without them 27 [Obsolete] messages across 11 files promised removal in 3.2. 3.2 is released and every one of them is still here, so the text now reads as a deadline that visibly passed. 4.0 is imminent and is where the break actually belongs. All 27 are already error: true, so nobody can compile against them today and this changes no behaviour - only what the compiler error says. The members stay binary-present, which is the point: removing them is a binary break for anything built against 2.x that has not been recompiled, and a major version is where that is allowed to happen. Mechanical and verified as such: one substring, 27 replacements, 27 changed lines across 11 files, nothing else touched. Covers the slave/replica renames (ClientFlags, ClientType, CommandFlags, ReplicationChangeOptions, IServer, ClusterConfiguration, RedisFeatures), the settings that no longer do anything (UseSsl, HighPrioritySocketThreads, PreserveAsyncOrder), and the exception-detail properties that moved to ConfigurationOptions. --- src/StackExchange.Redis/ClusterConfiguration.cs | 2 +- src/StackExchange.Redis/ConfigurationOptions.cs | 10 +++++----- .../ConnectionMultiplexer.Compat.cs | 4 ++-- src/StackExchange.Redis/ConnectionMultiplexer.cs | 4 ++-- src/StackExchange.Redis/Enums/ClientFlags.cs | 4 ++-- src/StackExchange.Redis/Enums/ClientType.cs | 2 +- src/StackExchange.Redis/Enums/CommandFlags.cs | 6 +++--- .../Enums/ReplicationChangeOptions.cs | 2 +- .../Interfaces/IConnectionMultiplexer.cs | 2 +- src/StackExchange.Redis/Interfaces/IServer.cs | 16 ++++++++-------- src/StackExchange.Redis/RedisFeatures.cs | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/StackExchange.Redis/ClusterConfiguration.cs b/src/StackExchange.Redis/ClusterConfiguration.cs index 57e2bb0c9..2d66005fb 100644 --- a/src/StackExchange.Redis/ClusterConfiguration.cs +++ b/src/StackExchange.Redis/ClusterConfiguration.cs @@ -434,7 +434,7 @@ public IList Children /// /// Gets whether this node is a replica. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(IsReplica) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(IsReplica) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool IsSlave => IsReplica; diff --git a/src/StackExchange.Redis/ConfigurationOptions.cs b/src/StackExchange.Redis/ConfigurationOptions.cs index 12db0bac1..f84ea29e1 100644 --- a/src/StackExchange.Redis/ConfigurationOptions.cs +++ b/src/StackExchange.Redis/ConfigurationOptions.cs @@ -356,7 +356,7 @@ public int AsyncTimeout /// /// Indicates whether the connection should be encrypted. /// - [Obsolete("Please use .Ssl instead of .UseSsl, will be removed in 3.2.", error: true), + [Obsolete("Please use .Ssl instead of .UseSsl, will be removed in 4.0.", error: true), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool UseSsl @@ -683,7 +683,7 @@ public TimeSpan HeartbeatInterval /// Use ThreadPriority.AboveNormal for SocketManager reader and writer threads (true by default). /// If , will be used. /// - [Obsolete($"This setting no longer has any effect, please use {nameof(SocketManager.SocketManagerOptions)}.{nameof(SocketManager.SocketManagerOptions.UseHighPrioritySocketThreads)} instead - this setting will be removed in 3.2.", error: true)] + [Obsolete($"This setting no longer has any effect, please use {nameof(SocketManager.SocketManagerOptions)}.{nameof(SocketManager.SocketManagerOptions.UseHighPrioritySocketThreads)} instead - this setting will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool HighPrioritySocketThreads { @@ -782,7 +782,7 @@ public string? SentinelPassword /// /// Specifies whether asynchronous operations should be invoked in a way that guarantees their original delivery order. /// - [Obsolete("Not supported; if you require ordered pub/sub, please see " + nameof(ChannelMessageQueue) + " - this will be removed in 3.2.", error: true)] + [Obsolete("Not supported; if you require ordered pub/sub, please see " + nameof(ChannelMessageQueue) + " - this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool PreserveAsyncOrder { @@ -830,7 +830,7 @@ public bool ResolveDns /// /// Specifies the time in milliseconds that the system should allow for responses before concluding that the socket is unhealthy. /// - [Obsolete("This setting no longer has any effect, and should not be used - will be removed in 3.2.", error: true)] + [Obsolete("This setting no longer has any effect, and should not be used - will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public int ResponseTimeout { @@ -910,7 +910,7 @@ public string TieBreaker /// /// The size of the output buffer to use. /// - [Obsolete("This setting no longer has any effect, and should not be used - will be removed in 3.2.", error: true)] + [Obsolete("This setting no longer has any effect, and should not be used - will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public int WriteBuffer { diff --git a/src/StackExchange.Redis/ConnectionMultiplexer.Compat.cs b/src/StackExchange.Redis/ConnectionMultiplexer.Compat.cs index 7108141ac..fd0c055a0 100644 --- a/src/StackExchange.Redis/ConnectionMultiplexer.Compat.cs +++ b/src/StackExchange.Redis/ConnectionMultiplexer.Compat.cs @@ -9,14 +9,14 @@ public partial class ConnectionMultiplexer /// /// No longer used. /// - [Obsolete("No longer used, will be removed in 3.2.", error: true)] + [Obsolete("No longer used, will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public static TaskFactory Factory { get => Task.Factory; set { } } /// /// Gets or sets whether asynchronous operations should be invoked in a way that guarantees their original delivery order. /// - [Obsolete("Not supported; if you require ordered pub/sub, please see " + nameof(ChannelMessageQueue) + ", will be removed in 3.2", error: true)] + [Obsolete("Not supported; if you require ordered pub/sub, please see " + nameof(ChannelMessageQueue) + ", will be removed in 4.0", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool PreserveAsyncOrder { get => false; set { } } } diff --git a/src/StackExchange.Redis/ConnectionMultiplexer.cs b/src/StackExchange.Redis/ConnectionMultiplexer.cs index 939829e9b..5fe9bc290 100644 --- a/src/StackExchange.Redis/ConnectionMultiplexer.cs +++ b/src/StackExchange.Redis/ConnectionMultiplexer.cs @@ -93,7 +93,7 @@ pulse is null unchecked(Environment.TickCount - Volatile.Read(ref lastGlobalHeartbeatTicks)) / 1000; /// - [Obsolete($"Please use {nameof(ConfigurationOptions)}.{nameof(ConfigurationOptions.IncludeDetailInExceptions)} instead - this will be removed in 3.2.", error: true)] + [Obsolete($"Please use {nameof(ConfigurationOptions)}.{nameof(ConfigurationOptions.IncludeDetailInExceptions)} instead - this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool IncludeDetailInExceptions { @@ -102,7 +102,7 @@ public bool IncludeDetailInExceptions } /// - [Obsolete($"Please use {nameof(ConfigurationOptions)}.{nameof(ConfigurationOptions.IncludePerformanceCountersInExceptions)} instead - this will be removed in 3.2.", error: true)] + [Obsolete($"Please use {nameof(ConfigurationOptions)}.{nameof(ConfigurationOptions.IncludePerformanceCountersInExceptions)} instead - this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool IncludePerformanceCountersInExceptions { diff --git a/src/StackExchange.Redis/Enums/ClientFlags.cs b/src/StackExchange.Redis/Enums/ClientFlags.cs index a6b86312d..68856a9a0 100644 --- a/src/StackExchange.Redis/Enums/ClientFlags.cs +++ b/src/StackExchange.Redis/Enums/ClientFlags.cs @@ -89,7 +89,7 @@ public enum ClientFlags : long /// /// The client is a replica in MONITOR mode. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicaMonitor) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicaMonitor) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] SlaveMonitor = 1, @@ -101,7 +101,7 @@ public enum ClientFlags : long /// /// The client is a normal replica server. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(Replica) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(Replica) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] Slave = 2, diff --git a/src/StackExchange.Redis/Enums/ClientType.cs b/src/StackExchange.Redis/Enums/ClientType.cs index 0013d4c79..b792b1b60 100644 --- a/src/StackExchange.Redis/Enums/ClientType.cs +++ b/src/StackExchange.Redis/Enums/ClientType.cs @@ -22,7 +22,7 @@ public enum ClientType /// /// Replication connections. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(Replica) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(Replica) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] Slave = 1, diff --git a/src/StackExchange.Redis/Enums/CommandFlags.cs b/src/StackExchange.Redis/Enums/CommandFlags.cs index b1b99b672..cb5066f27 100644 --- a/src/StackExchange.Redis/Enums/CommandFlags.cs +++ b/src/StackExchange.Redis/Enums/CommandFlags.cs @@ -34,7 +34,7 @@ public enum CommandFlags /// /// From 2.0, this flag is not used. /// - [Obsolete("From 2.0, this flag is not used, this will be removed in 3.2.", error: true)] + [Obsolete("From 2.0, this flag is not used, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] HighPriority = 1, @@ -51,14 +51,14 @@ public enum CommandFlags /// This operation should be performed on the replica if it is available, but will be performed on /// a primary if no replicas are available. Suitable for read operations only. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(PreferReplica) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(PreferReplica) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] PreferSlave = 8, /// /// This operation should only be performed on a replica. Suitable for read operations only. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(DemandReplica) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(DemandReplica) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] DemandSlave = 12, diff --git a/src/StackExchange.Redis/Enums/ReplicationChangeOptions.cs b/src/StackExchange.Redis/Enums/ReplicationChangeOptions.cs index 785ac722f..523f9ec74 100644 --- a/src/StackExchange.Redis/Enums/ReplicationChangeOptions.cs +++ b/src/StackExchange.Redis/Enums/ReplicationChangeOptions.cs @@ -28,7 +28,7 @@ public enum ReplicationChangeOptions /// /// Issue a REPLICAOF to all other known nodes, making this primary of all. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicateToOtherEndpoints) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicateToOtherEndpoints) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] EnslaveSubordinates = 4, diff --git a/src/StackExchange.Redis/Interfaces/IConnectionMultiplexer.cs b/src/StackExchange.Redis/Interfaces/IConnectionMultiplexer.cs index 905bc4352..7d63d6a9a 100644 --- a/src/StackExchange.Redis/Interfaces/IConnectionMultiplexer.cs +++ b/src/StackExchange.Redis/Interfaces/IConnectionMultiplexer.cs @@ -86,7 +86,7 @@ public interface IConnectionMultiplexer : IDisposable, IAsyncDisposable /// /// Should exceptions include identifiable details? (key names, additional annotations). /// - [Obsolete($"Please use {nameof(ConfigurationOptions)}.{nameof(ConfigurationOptions.IncludeDetailInExceptions)} instead - this will be removed in 3.2.", error: true)] + [Obsolete($"Please use {nameof(ConfigurationOptions)}.{nameof(ConfigurationOptions.IncludeDetailInExceptions)} instead - this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] bool IncludeDetailInExceptions { get; set; } diff --git a/src/StackExchange.Redis/Interfaces/IServer.cs b/src/StackExchange.Redis/Interfaces/IServer.cs index 749045b3a..1c8007e9f 100644 --- a/src/StackExchange.Redis/Interfaces/IServer.cs +++ b/src/StackExchange.Redis/Interfaces/IServer.cs @@ -41,7 +41,7 @@ public partial interface IServer : IRedis /// /// Gets whether the connected server is a replica. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(IsReplica) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(IsReplica) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] bool IsSlave { get; } @@ -53,7 +53,7 @@ public partial interface IServer : IRedis /// /// Explicitly opt in for replica writes on writable replica. /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(AllowReplicaWrites) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(AllowReplicaWrites) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] bool AllowSlaveWrites { get; set; } @@ -401,7 +401,7 @@ public partial interface IServer : IRedis Task LastSaveAsync(CommandFlags flags = CommandFlags.None); /// - [Obsolete("Please use " + nameof(MakePrimaryAsync) + ", this will be removed in 3.2.", error: true)] + [Obsolete("Please use " + nameof(MakePrimaryAsync) + ", this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] void MakeMaster(ReplicationChangeOptions options, TextWriter? log = null); @@ -504,17 +504,17 @@ public partial interface IServer : IRedis void Shutdown(ShutdownMode shutdownMode = ShutdownMode.Default, CommandFlags flags = CommandFlags.None); /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicaOfAsync) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicaOfAsync) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] void SlaveOf(EndPoint master, CommandFlags flags = CommandFlags.None); /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicaOfAsync) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(ReplicaOfAsync) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] Task SlaveOfAsync(EndPoint master, CommandFlags flags = CommandFlags.None); /// - [Obsolete("Please use " + nameof(ReplicaOfAsync) + ", this will be removed in 3.2.", error: true)] + [Obsolete("Please use " + nameof(ReplicaOfAsync) + ", this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] void ReplicaOf(EndPoint master, CommandFlags flags = CommandFlags.None); @@ -769,12 +769,12 @@ public partial interface IServer : IRedis Task[][]> SentinelMastersAsync(CommandFlags flags = CommandFlags.None); /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(SentinelReplicas) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(SentinelReplicas) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] KeyValuePair[][] SentinelSlaves(string serviceName, CommandFlags flags = CommandFlags.None); /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(SentinelReplicasAsync) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(SentinelReplicasAsync) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] Task[][]> SentinelSlavesAsync(string serviceName, CommandFlags flags = CommandFlags.None); diff --git a/src/StackExchange.Redis/RedisFeatures.cs b/src/StackExchange.Redis/RedisFeatures.cs index 68af9fa26..8f876a438 100644 --- a/src/StackExchange.Redis/RedisFeatures.cs +++ b/src/StackExchange.Redis/RedisFeatures.cs @@ -256,7 +256,7 @@ public RedisFeatures(Version version) public bool ScriptingDatabaseSafe => Version.IsAtLeast(v2_8_12); /// - [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(HyperLogLogCountReplicaSafe) + " instead, this will be removed in 3.2.", error: true)] + [Obsolete("Starting with Redis version 5, Redis has moved to 'replica' terminology. Please use " + nameof(HyperLogLogCountReplicaSafe) + " instead, this will be removed in 4.0.", error: true)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] public bool HyperLogLogCountSlaveSafe => HyperLogLogCountReplicaSafe;