From 83712fe9b93321ee7a7a790b6c38f5be11895f94 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 22 Oct 2024 15:31:22 -0700 Subject: [PATCH 1/3] 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 e69836a4db28818e42a16e05d7543290602a264d Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 22 Oct 2024 21:21:34 -0700 Subject: [PATCH 2/3] PR feedbcak --- src/Aspire.Hosting.Python/Directory.Build.props | 9 --------- tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs | 2 -- tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs | 6 ++++++ .../Aspire.Hosting.Python.Tests/PythonPublicApiTests.cs | 2 -- 4 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 src/Aspire.Hosting.Python/Directory.Build.props create mode 100644 tests/Aspire.Hosting.Python.Tests/AssemblyInfo.cs diff --git a/src/Aspire.Hosting.Python/Directory.Build.props b/src/Aspire.Hosting.Python/Directory.Build.props deleted file mode 100644 index 312f0916884..00000000000 --- a/src/Aspire.Hosting.Python/Directory.Build.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - - true - - - - 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 f4c873d6735c902f314f3629895878b760c2635f Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 23 Oct 2024 08:01:12 -0700 Subject: [PATCH 3/3] 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.")]