From 264d8885c2f7c6b1063c975cdf6754bf434abfe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Tue, 31 Mar 2026 08:47:43 -0400 Subject: [PATCH] Remove pragma disabling SYSLIB0011 --- src/core/IronPython/Runtime/ClrModule.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/IronPython/Runtime/ClrModule.cs b/src/core/IronPython/Runtime/ClrModule.cs index 4d05e1442..e9382f31f 100644 --- a/src/core/IronPython/Runtime/ClrModule.cs +++ b/src/core/IronPython/Runtime/ClrModule.cs @@ -1179,9 +1179,7 @@ public static void EnableProfiler(CodeContext/*!*/ context, bool enable) { // something more complex, let the binary formatter handle it BinaryFormatter bf = new BinaryFormatter(); MemoryStream stream = new MemoryStream(); -#pragma warning disable SYSLIB0011 // BinaryFormatter serialization methods are obsolete in .NET 5.0 bf.Serialize(stream, self); -#pragma warning restore SYSLIB0011 data = stream.ToArray().MakeString(); format = null; } @@ -1225,9 +1223,7 @@ public static object Deserialize(string serializationFormat, [NotNone] string/*! MemoryStream stream = new MemoryStream(data.MakeByteArray()); BinaryFormatter bf = new BinaryFormatter(); -#pragma warning disable SYSLIB0011 // BinaryFormatter serialization methods are obsolete in .NET 5.0 return bf.Deserialize(stream); -#pragma warning restore SYSLIB0011 } #endif }