Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<BaseOutputPath>$(RootDir)bin\$(Configuration)</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>618;429;219;1717;162;414</WarningsNotAsErrors>
<WarningsNotAsErrors>618;429;219;1717;162;414;NU1900;CA1859;CA1861</WarningsNotAsErrors>
<NoWarn>1591;1584;1574;1685;1573</NoWarn>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<add key="globalPackagesFolder" value="./packages" />
</config>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/api/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="nunit.myget.org" value="https://www.myget.org/F/nunit/api/v3/index.json" />
</packageSources>
</configuration>
2 changes: 1 addition & 1 deletion Src/IronPython/IronPython.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' != 'net45' ">
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" />
</ItemGroup>

Expand Down
9 changes: 9 additions & 0 deletions Src/IronPython/Runtime/PythonContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down