From 782aaab60dd471db7e1608b80cee2ca3a1c2dcd1 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 22 Oct 2024 15:31:22 -0700 Subject: [PATCH 1/4] Mark Aspire.Hosting.Python as experimental Fixes #6298 --- playground/python/Python.AppHost/Program.cs | 2 ++ src/Aspire.Hosting.Python/AssemblyInfo.cs | 6 ++++++ tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs | 2 ++ tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs | 2 ++ 4 files changed, 12 insertions(+) create mode 100644 src/Aspire.Hosting.Python/AssemblyInfo.cs diff --git a/playground/python/Python.AppHost/Program.cs b/playground/python/Python.AppHost/Program.cs index ea51d159817..3449eba1b0a 100644 --- a/playground/python/Python.AppHost/Program.cs +++ b/playground/python/Python.AppHost/Program.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREHOSTINGPYTHON001 // Test for experimental feature + var builder = DistributedApplication.CreateBuilder(args); builder.AddPythonApp("script-only", "../script_only", "main.py"); diff --git a/src/Aspire.Hosting.Python/AssemblyInfo.cs b/src/Aspire.Hosting.Python/AssemblyInfo.cs new file mode 100644 index 00000000000..d866cbca5db --- /dev/null +++ b/src/Aspire.Hosting.Python/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics.CodeAnalysis; + +[assembly: Experimental("ASPIREHOSTINGPYTHON001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")] diff --git a/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs b/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs index 54d50b2f159..ab52cc3de2b 100644 --- a/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs +++ b/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREHOSTINGPYTHON001 // Test for experimental feature + using Xunit; using Microsoft.Extensions.DependencyInjection; using Aspire.Hosting.Utils; diff --git a/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs b/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs index 8c70c549a56..0e79d5cb46e 100644 --- a/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs +++ b/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#pragma warning disable ASPIREHOSTINGPYTHON001 // Test for experimental feature + using Aspire.Hosting.Utils; using Xunit; From 32aaab1e6c8806034a1a310c6f1ce0bdd1580e48 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 22 Oct 2024 21:21:34 -0700 Subject: [PATCH 2/4] PR feedbcak --- tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs | 2 -- tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs | 6 ++++++ tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs diff --git a/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs b/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs index ab52cc3de2b..54d50b2f159 100644 --- a/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs +++ b/tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma warning disable ASPIREHOSTINGPYTHON001 // Test for experimental feature - using Xunit; using Microsoft.Extensions.DependencyInjection; using Aspire.Hosting.Utils; diff --git a/tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs b/tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs new file mode 100644 index 00000000000..e7a0112cb5e --- /dev/null +++ b/tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs @@ -0,0 +1,6 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("ASPIREHOSTINGPYTHON001", "Test assembly for experimental feature.")] diff --git a/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs b/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs index 0e79d5cb46e..8c70c549a56 100644 --- a/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs +++ b/tests/Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#pragma warning disable ASPIREHOSTINGPYTHON001 // Test for experimental feature - using Aspire.Hosting.Utils; using Xunit; From b1549dff9dd136ec007cec050bb3dac14c5cf5a5 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 23 Oct 2024 08:01:12 -0700 Subject: [PATCH 3/4] Move suppression to csproj --- .../Aspire.Hosting.Python.Tests.csproj | 4 ++++ tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs diff --git a/tests/Aspire.Hosting.Python.Tests/Aspire.Hosting.Python.Tests.csproj b/tests/Aspire.Hosting.Python.Tests/Aspire.Hosting.Python.Tests.csproj index 5ed2b6ca69f..669ac12ec32 100644 --- a/tests/Aspire.Hosting.Python.Tests/Aspire.Hosting.Python.Tests.csproj +++ b/tests/Aspire.Hosting.Python.Tests/Aspire.Hosting.Python.Tests.csproj @@ -2,6 +2,10 @@ $(DefaultTargetFramework) + + $(NoWarn); + ASPIREHOSTINGPYTHON001; + diff --git a/tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs b/tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs deleted file mode 100644 index e7a0112cb5e..00000000000 --- a/tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Diagnostics.CodeAnalysis; - -[assembly: SuppressMessage("ASPIREHOSTINGPYTHON001", "Test assembly for experimental feature.")] From 4e958085e107c38dc29e75a31b1bcefa369b7f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Thu, 24 Oct 2024 09:19:38 -0700 Subject: [PATCH 4/4] Remove stable flag from csproj --- src/Aspire.Hosting.Python/Aspire.Hosting.Python.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Aspire.Hosting.Python/Aspire.Hosting.Python.csproj b/src/Aspire.Hosting.Python/Aspire.Hosting.Python.csproj index 3af727c7e2c..86a216c7fbd 100644 --- a/src/Aspire.Hosting.Python/Aspire.Hosting.Python.csproj +++ b/src/Aspire.Hosting.Python/Aspire.Hosting.Python.csproj @@ -6,8 +6,6 @@ aspire integration hosting python Python support for .NET Aspire. 80 - - true