Skip to content
Merged
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
7 changes: 0 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Setup .NET 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -58,9 +54,6 @@ jobs:
- name: Test (netcoreapp3.1)
run: ./make.ps1 -frameworks netcoreapp3.1 test-all
shell: pwsh
- name: Test (net5.0)
run: ./make.ps1 -frameworks net5.0 test-all
shell: pwsh
- name: Test (net6.0)
run: ./make.ps1 -frameworks net6.0 test-all
shell: pwsh
9 changes: 0 additions & 9 deletions Build/net5.0-windows.props

This file was deleted.

42 changes: 0 additions & 42 deletions Build/net5.0.props

This file was deleted.

8 changes: 1 addition & 7 deletions Build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ steps:
version: '3.1.x'

- task: UseDotNet@2
displayName: Install .NET Core 5.0 runtime for testing
inputs:
packageType: 'runtime'
version: '5.0.x'

- task: UseDotNet@2
displayName: Install .NET Core 6.0 SDK for build
displayName: Install .NET 6.0 SDK for build
inputs:
packageType: 'sdk'
version: '6.0.x'
Expand Down
4 changes: 2 additions & 2 deletions IronPython.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{17737ACB
ProjectSection(SolutionItems) = preProject
Build\After.targets = Build\After.targets
Build\net46.props = Build\net46.props
Build\net5.0-windows.props = Build\net5.0-windows.props
Build\net5.0.props = Build\net5.0.props
Build\net6.0-windows.props = Build\net6.0-windows.props
Build\net6.0.props = Build\net6.0.props
Build\netcoreapp2.1.props = Build\netcoreapp2.1.props
Build\netcoreapp3.1.props = Build\netcoreapp3.1.props
Build\netstandard2.0.props = Build\netstandard2.0.props
Expand Down
6 changes: 3 additions & 3 deletions Package/nuget/IronPython.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
</dependencies>
</metadata>
<files>
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll;netcoreapp2.1\**\*;net5.0*\**\*" />
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb;netcoreapp2.1\**\*;net5.0*\**\*" />
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml;netcoreapp2.1\**\*;net5.0*\**\*" />
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll;netcoreapp2.1\**\*;net7.0*\**\*" />
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb;netcoreapp2.1\**\*;net7.0*\**\*" />
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml;netcoreapp2.1\**\*;net7.0*\**\*" />
<file src="LICENSE;README.md" />
</files>
</package>
2 changes: 1 addition & 1 deletion Package/zip/Zip.Packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MakeDir Directories="$(PackageDir)" Condition="!Exists('$(PackageDir)')"/>

<ItemGroup>
<ZipFiles Include="$(StageDir)\**\*.*" Exclude="$(StageDir)\**\IronPythonTest.*;$(StageDir)\**\*.pdb;$(StageDir)\netcoreapp2.1\**\*;$(StageDir)\net5.0*\**\*" />
<ZipFiles Include="$(StageDir)\**\*.*" Exclude="$(StageDir)\**\IronPythonTest.*;$(StageDir)\**\*.pdb;$(StageDir)\netcoreapp2.1\**\*;$(StageDir)\net7.0*\**\*" />
</ItemGroup>
<Zip Files="@(ZipFiles)" ZipFileName="$(PackageDir)\IronPython.$(PackageVersion).zip" WorkingDirectory="$(StageDir)" />

Expand Down
6 changes: 1 addition & 5 deletions Src/IronPython.Modules/IronPython.Modules.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp3.1;netstandard2.0;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp3.1;netstandard2.0;net6.0</TargetFrameworks>
<BaseAddress>885063680</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down Expand Up @@ -40,10 +40,6 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0 " />
</ItemGroup>

<Import Project="$(AfterTargetFiles)" />
<Target Name="AfterBuildEnds" AfterTargets="AfterBuild" DependsOnTargets="$(AfterTargets)" />

Expand Down
10 changes: 5 additions & 5 deletions Src/IronPython.Modules/_ssl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void set_ecdh_curve(CodeContext context, [NotNone] Bytes curve) {
public void load_cert_chain(CodeContext context, string certfile, string keyfile = null, object password = null) {
if (keyfile is not null) throw new NotImplementedException(nameof(keyfile));
if (password is not null) throw new NotImplementedException(nameof(password));
#if NET5_0_OR_GREATER
#if NET
_cert = X509Certificate2.CreateFromPemFile(certfile, keyfile);
#else
_cert = ReadCertificate(context, certfile, readKey: true);
Expand All @@ -224,7 +224,7 @@ public void load_verify_locations(CodeContext context, object cafile = null, str
} else {
throw PythonOps.TypeError("cafile should be a valid filesystem path");
}
#if NET5_0_OR_GREATER
#if NET
_cert_store.ImportFromPemFile(_cafile);
#else
_cert_store.Add(ReadCertificate(context, _cafile));
Expand All @@ -239,7 +239,7 @@ public void load_verify_locations(CodeContext context, object cafile = null, str
if (cadata is string s) {
if (!StringOps.TryEncodeAscii(s, out Bytes ascii))
throw PythonOps.ValueError("cadata should be an ASCII string or a bytes-like object");
#if NET5_0_OR_GREATER
#if NET
_cert_store.ImportFromPem(s);
#else
string line;
Expand All @@ -254,7 +254,7 @@ public void load_verify_locations(CodeContext context, object cafile = null, str
using IPythonBuffer buf = cabuf.GetBuffer();
var contents = buf.AsReadOnlySpan();
while (contents.Length > 0) {
#if NET5_0_OR_GREATER
#if NET
var cert = new X509Certificate2(contents);
#else
var cert = new X509Certificate2(contents.ToArray());
Expand Down Expand Up @@ -949,7 +949,7 @@ private static PythonTuple IssuerFieldToPython(CodeContext context, string p) {
}

private static X509Certificate2 ReadCertificate(CodeContext context, string filename, bool readKey = false) {
#if NET5_0_OR_GREATER
#if NET
if (readKey) {
return X509Certificate2.CreateFromPemFile(filename);
}
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython.SQLite/IronPython.SQLite.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp3.1;netstandard2.0;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp3.1;netstandard2.0;net6.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SQLiteCommon>SQLITE_DEBUG;TRUE;WIN32;_MSC_VER;SQLITE_ASCII;SQLITE_MEM_POOL;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_OS_WIN;SQLITE_SYSTEM_MALLOC;VDBE_PROFILE_OFF</SQLiteCommon>
<SQLiteCommonOmit>SQLITE_OMIT_AUTHORIZATION;SQLITE_OMIT_DEPRECATED;SQLITE_OMIT_GET_TABLE;SQLITE_OMIT_INCRBLOB;SQLITE_OMIT_LOOKASIDE;SQLITE_OMIT_SHARED_CACHE;SQLITE_OMIT_UTF16;SQLITE_OMIT_WAL</SQLiteCommonOmit>
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython.Wpf/IronPython.Wpf.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop" >

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp3.1;net5.0-windows;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp3.1;net6.0-windows</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<StoreInDLLs>true</StoreInDLLs>
<UseWPF>true</UseWPF>
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython/IronPython.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp3.1;netstandard2.0;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp3.1;netstandard2.0;net6.0</TargetFrameworks>
<BaseAddress>879755264</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
12 changes: 6 additions & 6 deletions Src/IronPython/Lib/iptest/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
is_netcoreapp = False
is_netcoreapp21 = False
is_netcoreapp31 = False
is_net50 = False
is_net60 = False
is_net70 = False
is_mono = False
is_netstandard = False
if is_ironpython:
import clr
is_netcoreapp = clr.IsNetCoreApp
is_netcoreapp21 = clr.FrameworkDescription.startswith(".NET Core 2.x")
is_netcoreapp31 = clr.FrameworkDescription.startswith(".NET Core 3.1")
is_net50 = clr.FrameworkDescription.startswith(".NET 5.0")
is_net60 = clr.FrameworkDescription.startswith(".NET 6.0")
is_net70 = clr.FrameworkDescription.startswith(".NET 7.0")
is_mono = clr.IsMono
is_netstandard = clr.TargetFramework.startswith(".NETStandard")

Expand All @@ -43,7 +43,7 @@
if not is_ironpython:
import struct
ptr_size = struct.calcsize('P')
is_32, is_64 = (ptr_size == 4), (ptr_size == 8)
is_32, is_64 = (ptr_size == 4), (ptr_size == 8)

#--CLR version we're running on (if any)

Expand All @@ -57,7 +57,7 @@
is_net40 = version.Major == 4
is_net45 = is_net40 and version.Minor == 0 and version.Build == 30319 and version.Revision < 42000
is_net45Or46 = is_net40 and version.Minor == 0 and version.Build == 30319
is_net46 = is_net40 and version.Minor == 0 and version.Build == 30319 and version.Revision == 42000
is_net46 = is_net40 and version.Minor == 0 and version.Build == 30319 and version.Revision == 42000

#--Newlines
if is_ironpython:
Expand All @@ -73,11 +73,11 @@
#--Are we using peverify to check that all IL generated is valid?
is_peverify_run = False
if is_cli:
is_peverify_run = is_debug and "-X:SaveAssemblies" in System.Environment.CommandLine
is_peverify_run = is_debug and "-X:SaveAssemblies" in System.Environment.CommandLine

#--We only run certain time consuming test cases in the stress lab
is_stress = False
# if get_env_var("THISISSTRESS")!=None:
# if get_env_var("THISISSTRESS")!=None:
# is_stress = True

#------------------------------------------------------------------------------
2 changes: 1 addition & 1 deletion Src/IronPythonConsole/IronPythonConsole.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.1;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp2.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<OutputType>Exe</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPythonTest/IronPythonTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net46;netcoreapp2.1;netcoreapp3.1;net6.0</TargetFrameworks>
<!-- EOL netcoreapp2.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
Expand Down
10 changes: 5 additions & 5 deletions Tests/test_codecs_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import codecs
import sys

from iptest import run_test, is_mono, is_netcoreapp31, is_net50, is_net60
from iptest import run_test, is_mono, is_netcoreapp31, is_net60

import test.test_codecs

Expand All @@ -28,7 +28,7 @@ def load_tests(loader, standard_tests, pattern):
suite.addTest(test.test_codecs.CP65001Test('test_bug1098990_a'))
suite.addTest(test.test_codecs.CP65001Test('test_bug1098990_b'))
suite.addTest(test.test_codecs.CP65001Test('test_bug1175396'))
if is_netcoreapp31 or is_net50 or is_net60:
if is_netcoreapp31 or is_net60:
suite.addTest(test.test_codecs.CP65001Test('test_decode'))
else:
suite.addTest(unittest.expectedFailure(test.test_codecs.CP65001Test('test_decode'))) # '[��]' != '[���]' (bug in .NET: dotnet/corefx#36163, fixed in .NET Core 3.x)
Expand Down Expand Up @@ -206,7 +206,7 @@ def load_tests(loader, standard_tests, pattern):
suite.addTest(test.test_codecs.UTF8SigTest('test_bug1175396'))
suite.addTest(test.test_codecs.UTF8SigTest('test_bug1601501'))
suite.addTest(test.test_codecs.UTF8SigTest('test_decoder_state'))
if is_netcoreapp31 or is_net50 or is_net60:
if is_netcoreapp31 or is_net60:
suite.addTest(test.test_codecs.UTF8SigTest('test_lone_surrogates'))
else:
suite.addTest(unittest.expectedFailure(test.test_codecs.UTF8SigTest('test_lone_surrogates'))) # AssertionError: '\ud803\udfff��A' != '\ud803\udfff���A'
Expand All @@ -221,7 +221,7 @@ def load_tests(loader, standard_tests, pattern):
suite.addTest(test.test_codecs.UTF8Test('test_bug1098990_b'))
suite.addTest(test.test_codecs.UTF8Test('test_bug1175396'))
suite.addTest(test.test_codecs.UTF8Test('test_decoder_state'))
if is_netcoreapp31 or is_net50 or is_net60:
if is_netcoreapp31 or is_net60:
suite.addTest(test.test_codecs.UTF8Test('test_lone_surrogates'))
else:
suite.addTest(unittest.expectedFailure(test.test_codecs.UTF8Test('test_lone_surrogates'))) # AssertionError: '\ud803\udfff��A' != '\ud803\udfff���A'
Expand All @@ -243,7 +243,7 @@ def load_tests(loader, standard_tests, pattern):
suite.addTest(test.test_codecs.WithStmtTest('test_encodedfile'))
suite.addTest(test.test_codecs.WithStmtTest('test_streamreaderwriter'))
return suite

else:
return loader.loadTestsFromModule(test.test_codecs, pattern)

Expand Down
2 changes: 1 addition & 1 deletion make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Param(
[Parameter(Position=1)]
[String] $target = "build",
[String] $configuration = "Release",
[String[]] $frameworks=@('net46','netcoreapp2.1','netcoreapp3.1','net5.0','net6.0'),
[String[]] $frameworks=@('net46','netcoreapp2.1','netcoreapp3.1','net6.0'),
[String] $platform = "x64",
[switch] $runIgnored,
[int] $jobs = [System.Environment]::ProcessorCount
Expand Down