diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8bdadde9c..614c14d01 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,23 +16,23 @@ jobs: - name: Install tools if: matrix.os == 'ubuntu-latest' run: sudo apt-get -yq install mono-vbnc dos2unix - - uses: actions/checkout@v2 + - uses: actions/checkout@v7 with: submodules: true - name: Setup .NET Core 2.1 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v6 with: dotnet-version: '2.1.x' - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v6 with: dotnet-version: '3.1.x' - name: Setup .NET 5.0 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v6 with: dotnet-version: '5.0.x' - name: Setup .NET 6.0 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v6 with: dotnet-version: '6.0.x' - name: Version Information @@ -45,7 +45,7 @@ jobs: run: pwsh make.ps1 - name: Package run: pwsh make.ps1 package - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v7 with: name: packages path: Package/Release/Packages diff --git a/Directory.Build.props b/Directory.Build.props index 96dfe335c..3c8502449 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -103,7 +103,7 @@ $(RootDir)bin\$(Configuration) $(BaseOutputPath) true - 618;429;219;1717;162;414 + 618;429;219;1717;162;414;NU1900;CA1859;CA1861 1591;1584;1574;1685;1573 prompt 4 diff --git a/NuGet.config b/NuGet.config index a697dc8e0..b486c587e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + diff --git a/Src/IronPython/IronPython.csproj b/Src/IronPython/IronPython.csproj index f9749b961..8ed0a8e56 100644 --- a/Src/IronPython/IronPython.csproj +++ b/Src/IronPython/IronPython.csproj @@ -61,7 +61,7 @@ - + diff --git a/Src/IronPython/Runtime/PythonContext.cs b/Src/IronPython/Runtime/PythonContext.cs index b604236ed..25a496c7e 100644 --- a/Src/IronPython/Runtime/PythonContext.cs +++ b/Src/IronPython/Runtime/PythonContext.cs @@ -44,6 +44,15 @@ namespace IronPython.Runtime public delegate int HashDelegate(object o, ref HashDelegate dlg); public sealed partial class PythonContext : LanguageContext { + static PythonContext() { + try { +#if NETCOREAPP || NETSTANDARD + Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); +#endif + } catch { + } + } + internal static readonly string/*!*/ IronPythonDisplayName = CurrentVersion.DisplayName; internal const string/*!*/ IronPythonNames = "IronPython;Python;py"; internal const string/*!*/ IronPythonFileExtensions = ".py";