Skip to content

Commit

Permalink
Build with .NET 9 SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
slozier committed Jun 27, 2024
1 parent db150c0 commit b60f62f
Show file tree
Hide file tree
Showing 31 changed files with 71 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer 'AsSpan' over '
dotnet_diagnostic.CA1847.severity = none # CA1847: Use char literal for a single character lookup
dotnet_diagnostic.CA1852.severity = suggestion # CA1852: Seal internal types
dotnet_diagnostic.CA1859.severity = suggestion # CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1863.severity = none # CA1863: Use 'CompositeFormat'
dotnet_diagnostic.CA1861.severity = suggestion # CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1863.severity = none # CA1863: Use 'CompositeFormat'
dotnet_diagnostic.CA2101.severity = suggestion # CA2101: Specify marshaling for P/Invoke string arguments
dotnet_diagnostic.CA2201.severity = none # CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2208.severity = suggestion # CA2208: Instantiate argument exceptions correctly
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-latest-large]

steps:
- name: Install tools
Expand All @@ -35,6 +35,11 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0.x'
include-prerelease: true
- name: Version Information
run: |
dotnet --info
Expand All @@ -58,9 +63,6 @@ jobs:
- name: Test (net6.0)
run: ./make.ps1 -frameworks net6.0 test-all
shell: pwsh
- name: Test (net7.0)
run: ./make.ps1 -frameworks net7.0 test-all
shell: pwsh
- name: Test (net8.0)
run: ./make.ps1 -frameworks net8.0 test-all
shell: pwsh
9 changes: 0 additions & 9 deletions Build/net7.0-windows.props

This file was deleted.

9 changes: 9 additions & 0 deletions Build/net9.0-windows.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IntermediateOutputPath Condition=" '$(TargetFramework)' == 'net9.0-windows' ">$(BaseIntermediateOutputPath)$(Configuration)\net9.0</IntermediateOutputPath>
<OutputPath Condition=" '$(TargetFramework)' == 'net9.0-windows' ">$(BaseOutputPath)\net9.0</OutputPath>
</PropertyGroup>

<Import Project="net9.0.props" />
</Project>
3 changes: 0 additions & 3 deletions Build/net7.0.props → Build/net9.0.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@
<Features>$(Features);FEATURE_ASSEMBLY_GETFORWARDEDTYPES</Features>
<Features>$(Features);FEATURE_ASSEMBLY_RESOLVE</Features>
<Features>$(Features);FEATURE_ASSEMBLYBUILDER_DEFINEDYNAMICASSEMBLY</Features>
<Features>$(Features);FEATURE_BASIC_CONSOLE</Features>
<Features>$(Features);FEATURE_CODEDOM</Features>
<Features>$(Features);FEATURE_COM</Features>
<Features>$(Features);FEATURE_CONFIGURATION</Features>
<Features>$(Features);FEATURE_CTYPES</Features>
<Features>$(Features);FEATURE_CUSTOM_TYPE_DESCRIPTOR</Features>
<Features>$(Features);FEATURE_EXCEPTION_STATE</Features>
<Features>$(Features);FEATURE_FILESYSTEM</Features>
<Features>$(Features);FEATURE_FULL_CONSOLE</Features>
<Features>$(Features);FEATURE_FULL_CRYPTO</Features>
<Features>$(Features);FEATURE_FULL_NET</Features>
<Features>$(Features);FEATURE_LCG</Features>
Expand All @@ -32,7 +30,6 @@
<Features>$(Features);FEATURE_REGISTRY</Features>
<Features>$(Features);FEATURE_RUNTIMEINFORMATION</Features>
<Features>$(Features);FEATURE_SECURITY_RULES</Features>
<Features>$(Features);FEATURE_SERIALIZATION</Features>
<Features>$(Features);FEATURE_STACK_TRACE</Features>
<Features>$(Features);FEATURE_SYNC_SOCKETS</Features>
<Features>$(Features);FEATURE_THREAD</Features>
Expand Down
11 changes: 9 additions & 2 deletions Build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@ steps:
version: '7.0.x'

- task: UseDotNet@2
displayName: Install .NET 8.0 SDK for build
displayName: Install .NET 8.0 runtime for testing
inputs:
packageType: 'sdk'
packageType: 'runtime'
version: '8.0.x'

- task: UseDotNet@2
displayName: Install .NET 9.0 SDK for build
inputs:
packageType: 'sdk'
version: '9.0.x'
includePreviewVersions: true

# Set Mono version on macOS
- ${{ if eq(parameters.os, 'macOS') }}:
- task: Bash@3
Expand Down
4 changes: 2 additions & 2 deletions IronPython.sln
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{17737ACB
Build\net462.props = Build\net462.props
Build\net6.0-windows.props = Build\net6.0-windows.props
Build\net6.0.props = Build\net6.0.props
Build\net7.0-windows.props = Build\net7.0-windows.props
Build\net7.0.props = Build\net7.0.props
Build\net8.0-windows.props = Build\net8.0-windows.props
Build\net8.0.props = Build\net8.0.props
Build\net9.0-windows.props = Build\net9.0-windows.props
Build\net9.0.props = Build\net9.0.props
Build\netcoreapp3.1.props = Build\netcoreapp3.1.props
Build\netstandard2.0.props = Build\netstandard2.0.props
Build\steps.yml = Build\steps.yml
Expand Down
10 changes: 7 additions & 3 deletions Package/nuget/IronPython.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ This package contains the IronPython interpreter engine.</description>
<dependency id="DynamicLanguageRuntime" version="1.3.4" />
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" />
</group>
<group targetFramework="net8.0">
<dependency id="DynamicLanguageRuntime" version="1.3.4" />
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" />
</group>
</dependencies>
</metadata>
<files>
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll;netcoreapp3.1\**\*;net7.0*\**\*;net8.0*\**\*" />
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb;netcoreapp3.1\**\*;net7.0*\**\*;net8.0*\**\*" />
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml;netcoreapp3.1\**\*;net7.0*\**\*;net8.0*\**\*" />
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll;netcoreapp3.1\**\*;net9.0*\**\*" />
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb;netcoreapp3.1\**\*;net9.0*\**\*" />
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml;netcoreapp3.1\**\*;net9.0*\**\*" />
<file src="LICENSE" />
<file src="..\..\..\nuget\README.md" target="" />
<file src="..\..\..\..\Documentation\logo.png" target="" />
Expand Down
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)\README.md;$(StageDir)\**\*.pdb;$(StageDir)\netstandard2.0\**\*;$(StageDir)\netcoreapp3.1\**\*;$(StageDir)\net7.0*\**\*;$(StageDir)\net8.0*\**\*" />
<ZipFiles Include="$(StageDir)\**\*.*" Exclude="$(StageDir)\README.md;$(StageDir)\**\*.pdb;$(StageDir)\netstandard2.0\**\*;$(StageDir)\netcoreapp3.1\**\*;$(StageDir)\net9.0*\**\*" />
<ZipFiles Include="README.md" Link="$(MSBuildThisFileDirectory)README.md" />
<ZipFiles Include="scripts/Enter-IronPythonEnvironment.ps1" Link="$(RootDir)Src\Scripts\Enter-IronPythonEnvironment.ps1" />
<ZipFiles Include="scripts/Install-IronPython.ps1" Link="$(RootDir)Src\Scripts\Install-IronPython.ps1" />
Expand Down
2 changes: 1 addition & 1 deletion Src/DLR
Submodule DLR updated 40 files
+7 −2 .editorconfig
+16 −1 .github/workflows/main.yml
+1 −1 Build.proj
+37 −0 Build/net8.0.props
+37 −0 Build/net9.0.props
+26 −29 Build/steps.yml
+2 −0 Dlr.sln
+6 −3 Package/nuget/DynamicLanguageRuntime.nuspec
+1 −1 Src/Microsoft.Dynamic/Actions/Calls/ArgumentBinding.cs
+1 −1 Src/Microsoft.Dynamic/Actions/MemberTracker.cs
+10 −12 Src/Microsoft.Dynamic/Actions/NamespaceTracker.cs
+4 −0 Src/Microsoft.Dynamic/ComInterop/ComInterop.cs
+1 −1 Src/Microsoft.Dynamic/ComInterop/ComParamDesc.cs
+4 −4 Src/Microsoft.Dynamic/ComInterop/ComRuntimeHelpers.cs
+1 −1 Src/Microsoft.Dynamic/ComInterop/ComTypeEnumDesc.cs
+2 −2 Src/Microsoft.Dynamic/ComInterop/ExcepInfo.cs
+1 −1 Src/Microsoft.Dynamic/ComInterop/IDispatchComObject.cs
+2 −2 Src/Microsoft.Dynamic/ComInterop/Variant.cs
+1 −1 Src/Microsoft.Dynamic/Debugging/ThreadLocal.cs
+3 −3 Src/Microsoft.Dynamic/Hosting/Shell/ConsoleHostOptionsParser.cs
+1 −1 Src/Microsoft.Dynamic/Interpreter/LightCompiler.cs
+1 −1 Src/Microsoft.Dynamic/Microsoft.Dynamic.csproj
+1 −1 Src/Microsoft.Dynamic/Runtime/SavableScriptCode.cs
+31 −0 Src/Microsoft.Dynamic/SerializationStubs.cs
+24 −0 Src/Microsoft.Dynamic/StringExtensions.cs
+2 −2 Src/Microsoft.Dynamic/Utils/CollectionExtensions.cs
+1 −1 Src/Microsoft.Dynamic/Utils/ReflectionUtils.cs
+1 −1 Src/Microsoft.Dynamic/Utils/ThreadLocal.cs
+2 −2 Src/Microsoft.Dynamic/Utils/WeakDictionary.cs
+8 −1 Src/Microsoft.Scripting/Microsoft.Scripting.csproj
+1 −1 Src/Microsoft.Scripting/Runtime/LanguageContext.cs
+1 −1 Src/Microsoft.Scripting/Runtime/ScopeExtension.cs
+0 −32 Src/Microsoft.Scripting/Stubs.cs
+2 −2 Src/Microsoft.Scripting/Utils/CollectionExtensions.cs
+1 −1 Tests/Metadata/Metadata.csproj
+1 −1 Tests/Metadata/TypeNestings.cs
+1 −1 Tests/Microsoft.Dynamic.Test/InterpreterTest.cs
+1 −1 Tests/Microsoft.Dynamic.Test/Microsoft.Dynamic.Test.csproj
+1 −1 Tests/Microsoft.Scripting.Test/Microsoft.Scripting.Test.csproj
+1 −1 make.ps1
2 changes: 1 addition & 1 deletion 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>net462;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<BaseAddress>885063680</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython.Modules/_operator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private static object GetOneAttr(CodeContext context, object param, object val)
int dotPos = s.IndexOf('.');
if (dotPos >= 0) {
object nextParam = GetOneAttr(context, param, s.Substring(0, dotPos));
return GetOneAttr(context, nextParam, s.Substring(dotPos + 1, s.Length - dotPos - 1));
return GetOneAttr(context, nextParam, s.Substring(dotPos + 1));
}
return PythonOps.GetBoundAttr(context, param, s);
}
Expand Down
16 changes: 6 additions & 10 deletions Src/IronPython.Modules/_socket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2215,10 +2215,6 @@ internal struct WSAData {
[DllImport("ws2_32.dll", SetLastError = true)]
private static extern Int32 WSACleanup();

private static T PtrToStructure<T>(IntPtr result) {
return (T)Marshal.PtrToStructure(result, typeof(T))!;
}

public static string GetServiceByPort(ushort port, string? protocol) {
if (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX)
return GetServiceByPortNonWindows(port, protocol);
Expand All @@ -2235,9 +2231,9 @@ static string GetServiceByPortWindows(ushort port, string? protocol) {
throw new SocketUtilException(string.Format("Could not resolve service for port {0}", port));

if (Environment.Is64BitProcess)
return PtrToStructure<servent64>(result).s_name;
return Marshal.PtrToStructure<servent64>(result).s_name;
else
return PtrToStructure<servent>(result).s_name;
return Marshal.PtrToStructure<servent>(result).s_name;
}

static string GetServiceByPortNonWindows(ushort port, string? protocol) {
Expand All @@ -2248,7 +2244,7 @@ static string GetServiceByPortNonWindows(ushort port, string? protocol) {
string.Format("Could not resolve service for port {0}", port));
}

return PtrToStructure<servent>(result).s_name;
return Marshal.PtrToStructure<servent>(result).s_name;
}
}

Expand All @@ -2267,9 +2263,9 @@ static ushort GetServiceByNameWindows(string service, string? protocol) {

ushort port;
if (Environment.Is64BitProcess)
port = PtrToStructure<servent64>(result).s_port;
port = Marshal.PtrToStructure<servent64>(result).s_port;
else
port = PtrToStructure<servent>(result).s_port;
port = Marshal.PtrToStructure<servent>(result).s_port;

var hostport = IPAddress.NetworkToHostOrder(unchecked((short)port));
return unchecked((ushort)hostport);
Expand All @@ -2282,7 +2278,7 @@ static ushort GetServiceByNameNonWindows(string service, string? protocol) {
string.Format("Could not resolve port for service {0}", service));
}

ushort port = PtrToStructure<servent>(result).s_port;
ushort port = Marshal.PtrToStructure<servent>(result).s_port;
var hostport = IPAddress.NetworkToHostOrder(unchecked((short)port));
return unchecked((ushort)hostport);
}
Expand Down
4 changes: 2 additions & 2 deletions Src/IronPython.Modules/array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public PythonTuple buffer_info() {
}

public void byteswap() {
Stream s = ToStream();
MemoryStream s = ToStream();
byte[] bytes = new byte[s.Length];
s.Read(bytes, 0, bytes.Length);

Expand Down Expand Up @@ -618,7 +618,7 @@ public PythonList tolist() {
}

public Bytes tobytes() {
Stream s = ToStream();
MemoryStream s = ToStream();
byte[] bytes = new byte[s.Length];
s.Read(bytes, 0, (int)s.Length);
return Bytes.Make(bytes);
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython.Modules/binascii.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static Bytes a2b_uu_impl(CodeContext/*!*/ context, ReadOnlySpan<byte> data) {
}

using MemoryStream res = DecodeWorker(context, data, true, UuDecFunc);
if (suffix == null) {
if (suffix.IsEmpty) {
var pad = new byte[lenDec - res.Length];
res.Write(pad, 0, pad.Length);
} else {
Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython.Modules/grp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ internal struct_group(string gr_name, string gr_passwd, int gr_gid, PythonList g
}

private static struct_group Make(IntPtr pwd) {
group g = (group)Marshal.PtrToStructure(pwd, typeof(group));
group g = Marshal.PtrToStructure<group>(pwd);
return new struct_group(g.gr_name, g.gr_passwd, g.gr_gid, PythonList.FromEnumerable(MarshalStringArray(g.gr_mem)));
}

Expand Down
4 changes: 2 additions & 2 deletions Src/IronPython.Modules/pwd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ internal struct_passwd(string pw_name, string pw_passwd, int pw_uid, int pw_gid,
private static struct_passwd Make(IntPtr pwd) {
struct_passwd res = null;
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
passwd_osx p = (passwd_osx)Marshal.PtrToStructure(pwd, typeof(passwd_osx));
passwd_osx p = Marshal.PtrToStructure<passwd_osx>(pwd);
res = new struct_passwd(p.pw_name, p.pw_passwd, p.pw_uid, p.pw_gid, p.pw_gecos, p.pw_dir, p.pw_shell);
} else {
passwd_linux p = (passwd_linux)Marshal.PtrToStructure(pwd, typeof(passwd_linux));
passwd_linux p = Marshal.PtrToStructure<passwd_linux>(pwd);
res = new struct_passwd(p.pw_name, p.pw_passwd, p.pw_uid, p.pw_gid, p.pw_gecos, p.pw_dir, p.pw_shell);
}

Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython.Modules/spwd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ internal struct_spwd(string sp_nam, string sp_pwd, int sp_lstchg, int sp_min, in
}

private static struct_spwd Make(IntPtr pwd) {
spwd p = (spwd)Marshal.PtrToStructure(pwd, typeof(spwd));
spwd p = Marshal.PtrToStructure<spwd>(pwd);
return new struct_spwd(p.sp_namp, p.sp_pwdp, p.sp_lstchg, p.sp_min, p.sp_max, p.sp_warn, p.sp_inact, p.sp_expire, p.sp_flag);
}

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>net462;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.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.SQLite/c#sqlite/tokenize_c.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ static int sqlite3RunParser( Parse pParse, string zSql, ref string pzErrMsg )
}
}
abort_parse:
pParse.zTail = new StringBuilder( zSql.Length <= i ? "" : zSql.Substring( i, zSql.Length - i ) );
pParse.zTail = new StringBuilder( zSql.Length <= i ? "" : zSql.Substring( i ) );
if ( zSql.Length >= i && nErr == 0 && pParse.rc == SQLITE_OK )
{
if ( lastTokenParsed != TK_SEMI )
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>net462;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net6.0-windows;net8.0-windows</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<StoreInDLLs>true</StoreInDLLs>
<UseWPF>true</UseWPF>
Expand Down
2 changes: 2 additions & 0 deletions Src/IronPython/Compiler/Ast/FunctionDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -696,13 +696,15 @@ private LightLambdaExpression CreateFunctionLambda() {
// wrap a scope if needed
bodyStmt = Ast.Block(locals.ToReadOnlyCollection(), bodyStmt);

#pragma warning disable CA2263 // Prefer generic overload when type is known
return AstUtils.LightLambda(
typeof(object),
delegateType,
AddDefaultReturn(bodyStmt, typeof(object)),
Name + "$" + Interlocked.Increment(ref _lambdaId),
parameters
);
#pragma warning restore CA2263 // Prefer generic overload when type is known
}

internal override LightLambdaExpression GetLambda() => EnsureFunctionLambda();
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>net462;netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<BaseAddress>879755264</BaseAddress>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 2 additions & 0 deletions Src/IronPython/Lib/iptest/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
is_net60 = False
is_net70 = False
is_net80 = False
is_net90 = False
is_mono = False
is_netstandard = False
if is_ironpython:
Expand All @@ -32,6 +33,7 @@
is_net60 = clr.FrameworkDescription.startswith(".NET 6.0")
is_net70 = clr.FrameworkDescription.startswith(".NET 7.0")
is_net80 = clr.FrameworkDescription.startswith(".NET 8.0")
is_net90 = clr.FrameworkDescription.startswith(".NET 9.0")
is_mono = clr.IsMono
is_netstandard = clr.TargetFramework.startswith(".NETStandard")

Expand Down
2 changes: 1 addition & 1 deletion Src/IronPython/Runtime/NewStringFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private StringFormatParser(string/*!*/ text) {
if (_index == -1) {
// no more formats, send the remaining text.
yield return PythonTuple.MakeTuple(
_str.Substring(lastTextStart, _str.Length - lastTextStart),
_str.Substring(lastTextStart),
null,
null,
null);
Expand Down
2 changes: 2 additions & 0 deletions Src/IronPython/Runtime/Operations/PythonOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4222,13 +4222,15 @@ public static List<FunctionStack> PushFrame(CodeContext/*!*/ context, FunctionCo
}

internal static LightLambdaExpression ToGenerator(this LightLambdaExpression code, bool shouldInterpret, bool debuggable, int compilationThreshold) {
#pragma warning disable CA2263 // Prefer generic overload when type is known
return Utils.LightLambda(
typeof(object),
code.Type,
new GeneratorRewriter(code.Name, code.Body).Reduce(shouldInterpret, debuggable, compilationThreshold, code.Parameters, x => x),
code.Name,
code.Parameters
);
#pragma warning restore CA2263 // Prefer generic overload when type is known
}

public static void UpdateStackTrace(Exception e, CodeContext context, FunctionCode funcCode, int line) {
Expand Down
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>net462;netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<OutputType>Exe</OutputType>
Expand Down
Loading

0 comments on commit b60f62f

Please sign in to comment.