Skip to content

Commit f610b3d

Browse files
committed
Merge branch 'main' into 3.6
2 parents 9d3e6f6 + 819bccb commit f610b3d

File tree

16 files changed

+77
-87
lines changed

16 files changed

+77
-87
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ jobs:
1919
- uses: actions/checkout@v4
2020
with:
2121
submodules: true
22-
- name: Setup .NET Core 3.1
23-
uses: actions/setup-dotnet@v4
24-
with:
25-
dotnet-version: '3.1.x'
2622
- name: Setup .NET 6.0
2723
uses: actions/setup-dotnet@v4
2824
with:
@@ -31,6 +27,10 @@ jobs:
3127
uses: actions/setup-dotnet@v4
3228
with:
3329
dotnet-version: '8.0.x'
30+
- name: Setup .NET 9.0
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: '9.0.x'
3434
- name: Version Information
3535
run: |
3636
dotnet --info
@@ -48,9 +48,6 @@ jobs:
4848
- name: Test (net462)
4949
run: ./make.ps1 -frameworks net462 test-all
5050
shell: pwsh
51-
- name: Test (netcoreapp3.1)
52-
run: ./make.ps1 -frameworks netcoreapp3.1 test-all
53-
shell: pwsh
5451
- name: Test (net6.0)
5552
run: ./make.ps1 -frameworks net6.0 test-all
5653
shell: pwsh

Build/netcoreapp3.1.props

Lines changed: 0 additions & 38 deletions
This file was deleted.

Build/steps.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ steps:
2525
displayName: Grab Package Version
2626
2727
- task: UseDotNet@2
28-
displayName: Install .NET Core 3.1 runtime for testing
28+
displayName: Install .NET 6.0 runtime for testing
2929
inputs:
3030
packageType: 'runtime'
31-
version: '3.1.x'
31+
version: '6.0.x'
3232

3333
- task: UseDotNet@2
34-
displayName: Install .NET 6.0 runtime for testing
34+
displayName: Install .NET 8.0 runtime for testing
3535
inputs:
3636
packageType: 'runtime'
37-
version: '6.0.x'
37+
version: '8.0.x'
3838

3939
- task: UseDotNet@2
40-
displayName: Install .NET 8.0 SDK for build
40+
displayName: Install .NET 9.0 SDK for build
4141
inputs:
4242
packageType: 'sdk'
43-
version: '8.0.x'
43+
version: '9.0.x'
4444

4545
# Set Mono version on macOS
4646
- ${{ if eq(parameters.os, 'macOS') }}:

IronPython.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{17737ACB
4141
Build\net8.0.props = Build\net8.0.props
4242
Build\net9.0-windows.props = Build\net9.0-windows.props
4343
Build\net9.0.props = Build\net9.0.props
44-
Build\netcoreapp3.1.props = Build\netcoreapp3.1.props
4544
Build\netstandard2.0.props = Build\netstandard2.0.props
4645
Build\steps.yml = Build\steps.yml
4746
Build\Tasks.Targets = Build\Tasks.Targets

Package/nuget/IronPython.nuspec

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,16 @@ This package contains the IronPython interpreter engine.</description>
2929
<dependency id="Microsoft.Win32.Registry" version="4.7.0" />
3030
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" />
3131
</group>
32-
<group targetFramework="net6.0">
33-
<dependency id="DynamicLanguageRuntime" version="1.3.5" />
34-
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" />
35-
</group>
3632
<group targetFramework="net8.0">
3733
<dependency id="DynamicLanguageRuntime" version="1.3.5" />
3834
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" />
3935
</group>
4036
</dependencies>
4137
</metadata>
4238
<files>
43-
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll;netcoreapp3.1\**\*;net9.0*\**\*" />
44-
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb;netcoreapp3.1\**\*;net9.0*\**\*" />
45-
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml;netcoreapp3.1\**\*;net9.0*\**\*" />
39+
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll;net6.0\**\*;net9.0*\**\*" />
40+
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb;net6.0\**\*;net9.0*\**\*" />
41+
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml;net6.0\**\*;net9.0*\**\*" />
4642
<file src="LICENSE" />
4743
<file src="..\..\..\nuget\README.md" target="" />
4844
<file src="..\..\..\..\Documentation\logo.png" target="" />

Package/zip/Zip.Packaging.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<MakeDir Directories="$(PackageDir)" Condition="!Exists('$(PackageDir)')"/>
55

66
<ItemGroup>
7-
<ZipFiles Include="$(StageDir)\**\*.*" Exclude="$(StageDir)\README.md;$(StageDir)\**\*.pdb;$(StageDir)\netstandard2.0\**\*;$(StageDir)\netcoreapp3.1\**\*;$(StageDir)\net9.0*\**\*" />
7+
<ZipFiles Include="$(StageDir)\**\*.*" Exclude="$(StageDir)\README.md;$(StageDir)\**\*.pdb;$(StageDir)\netstandard2.0\**\*;$(StageDir)\net6.0\**\*;$(StageDir)\net9.0*\**\*" />
88
<ZipFiles Include="README.md" Link="$(MSBuildThisFileDirectory)README.md" />
99
<ZipFiles Include="scripts/Enter-IronPythonEnvironment.ps1" Link="$(RootDir)Src\Scripts\Enter-IronPythonEnvironment.ps1" />
1010
<ZipFiles Include="scripts/Install-IronPython.ps1" Link="$(RootDir)Src\Scripts\Install-IronPython.ps1" />

Src/IronPythonConsole/IronPythonConsole.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
5-
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
6-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
4+
<TargetFrameworks>net462;net6.0;net8.0</TargetFrameworks>
75
<OutputType>Exe</OutputType>
86
<RootNamespace>IronPythonConsole</RootNamespace>
97
<AssemblyName>ipy</AssemblyName>
@@ -20,12 +18,6 @@
2018
<OutputItemType>Content</OutputItemType>
2119
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2220
</ProjectReference>
23-
<!-- add reference so it gets copied to the netcoreapp3.1 folder for testing -->
24-
<ProjectReference Include="..\IronPython.SQLite\IronPython.SQLite.csproj" Condition="$(TargetFramework) == 'netcoreapp3.1'">
25-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
26-
<OutputItemType>Content</OutputItemType>
27-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
28-
</ProjectReference>
2921
</ItemGroup>
3022

3123
<ItemGroup Condition=" '$(IsFullFramework)' == 'true' AND !$([MSBuild]::IsOSPlatform('WINDOWS')) ">

Src/IronPythonTest/IronPythonTest.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net462;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
5-
<!-- EOL netcoreapp3.1 is used to test netstandard2.0 assemblies -->
6-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
4+
<TargetFrameworks>net462;net6.0;net8.0</TargetFrameworks>
75
<PreventStaging>true</PreventStaging>
86
</PropertyGroup>
97

Tests/modules/network_related/test__socket.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import time
1414
import unittest
1515

16-
from iptest import IronPythonTestCase, is_cli, is_osx, is_linux, is_windows, is_cpython, run_test
16+
from iptest import IronPythonTestCase, is_cli, is_mono, is_osx, is_linux, is_windows, is_cpython, run_test
1717

1818
AF_DICT = {"AF_APPLETALK" : 5,
1919
"AF_DECnet" : 12,
@@ -432,7 +432,6 @@ def test_cp5814(self):
432432
HOST = 'localhost'
433433
PORT = 0
434434
s = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM)
435-
s.setsockopt(_socket.SOL_SOCKET, _socket.SO_REUSEADDR, 1) # prevents an "Address already in use" error when the socket is in a TIME_WAIT state
436435
s.settimeout(20) # prevents the server from staying open if the client never connects
437436
s.bind((HOST, PORT))
438437
s.listen(1)
@@ -534,15 +533,14 @@ def test_misc(self):
534533
def test_makefile_refcount(self):
535534
"Ensures that the _socket stays open while there's still a file associated"
536535

537-
GPORT = None
536+
PORT = None
538537
def echoer():
539-
nonlocal GPORT
538+
nonlocal PORT
540539
s = socket.socket()
541-
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # prevents an "Address already in use" error when the socket is in a TIME_WAIT state
542540
s.settimeout(15) # prevents the server from staying open if the client never connects
543541
s.bind(('localhost', 0))
544-
GPORT = s.getsockname()[1]
545542
s.listen(5)
543+
PORT = s.getsockname()[1]
546544
(s2, _) = s.accept()
547545
s2.send(s2.recv(10))
548546
s2.close()
@@ -551,11 +549,16 @@ def echoer():
551549
_thread.start_new_thread(echoer, ())
552550
for _ in range(20):
553551
time.sleep(0.5)
554-
if GPORT is not None:
552+
if PORT is not None:
555553
break
556554

555+
if is_mono:
556+
# Warm up Mono to connecting sockets
557+
dummy = socket.socket()
557558
s = socket.socket()
558-
s.connect(('localhost', GPORT))
559+
if is_mono:
560+
dummy.close()
561+
s.connect(('localhost', PORT))
559562
f1 = s.makefile('r')
560563
f2 = s.makefile('w')
561564
s.close()
@@ -582,7 +585,6 @@ def test_cp7451(self):
582585
HOST = 'localhost'
583586
PORT = 0
584587
s = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM)
585-
s.setsockopt(_socket.SOL_SOCKET, _socket.SO_REUSEADDR, 1) # prevents an "Address already in use" error when the socket is in a TIME_WAIT state
586588
s.settimeout(20) # prevents the server from staying open if the client never connects
587589
s.bind((HOST, PORT))
588590
s.listen(1)

0 commit comments

Comments
 (0)