FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge branch 'master' into testbranch · pythonnet/pythonnet@1dfa942 · GitHub

Repository navigation

Commit 1dfa942

Browse files
authored
Merge branch 'master' into testbranch
2 parents be255ee + a67d1a0 commit 1dfa942

33 files changed

Lines changed: 1028 additions & 618 deletions

‎.git-blame-ignore-revs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Line endings normalization
2+
fd7c7e1cbd8e1d7bdb2ec2423c3cf9f95a3abed1

‎.github/workflows/docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
steps:
3838
- name: Deploy to GitHub Pages
3939
id: deployment
40-
uses: actions/deploy-pages@v4
40+
uses: actions/deploy-pages@v5

‎.github/workflows/main.yml‎

Lines changed: 56 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,84 +16,109 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os:
19-
# Disabled for now, will require some work (#2653)
20-
#
21-
# - category: windows
22-
# platform: x86
23-
# instance: windows-latest
19+
- category: windows
20+
platform: x86
21+
instance: windows-latest
22+
suffix: -windows-x86-none
2423

2524
- category: windows
2625
platform: x64
2726
instance: windows-latest
27+
suffix: -windows-x86_64-none
2828

2929
- category: ubuntu
3030
platform: x64
3131
instance: ubuntu-22.04
32+
suffix: ""
3233

3334
- category: ubuntu
3435
platform: arm64
3536
instance: ubuntu-22.04-arm
37+
suffix: ""
3638

3739
- category: macos
3840
platform: x64
39-
instance: macos-13
40-
41-
python: ["3.10", "3.11", "3.12", "3.13"]
41+
instance: macos-15
42+
suffix: -macos-x86_64-none
4243

44+
- category: macos
45+
platform: arm64
46+
instance: macos-15
47+
suffix: -macos-aarch64-none
48+
49+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
50+
51+
exclude:
52+
# Fails with initfs_encoding error
53+
- os:
54+
category: windows
55+
platform: x86
56+
python: "3.10"
57+
58+
# Fails to find pytest
59+
- os:
60+
category: windows
61+
platform: x64
62+
python: '3.10'
63+
64+
# fails to call mono methods
65+
- os:
66+
category: windows
67+
platform: x86
68+
python: '3.13'
69+
70+
env:
71+
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
4372
steps:
44-
- name: Set Environment on macOS
45-
uses: maxim-lobanov/setup-xamarin@v1
46-
if: ${{ matrix.os.category == 'macos' }}
47-
with:
48-
mono-version: latest
49-
5073
- name: Checkout code
5174
uses: actions/checkout@v6
5275

76+
# Use main until support for architecture lands
5377
- name: Setup .NET
54-
uses: actions/setup-dotnet@v5
78+
uses: actions/setup-dotnet@main
79+
with:
80+
dotnet-version: '10.0'
81+
architecture: ${{ matrix.os.platform }}
82+
83+
- run: dotnet restore
84+
85+
- name: Install Mono
86+
uses: pythonnet/clr-loader/.github/actions/install-mono@main
5587
with:
56-
dotnet-version: '8.0.x'
88+
arch: ${{ matrix.os.platform }}
5789

5890
- name: Set up Python ${{ matrix.python }}
5991
uses: astral-sh/setup-uv@v7
6092
with:
61-
architecture: ${{ matrix.os.platform }}
62-
python-version: ${{ matrix.python }}
93+
python-version: cpython-${{ matrix.python }}${{ matrix.os.suffix }}
6394
cache-python: true
6495
activate-environment: true
6596
enable-cache: true
6697

6798
- name: Synchronize the virtual environment
6899
run: uv sync --managed-python
69100

70-
- name: Show pyvenv.cfg
71-
run: cat .venv/pyvenv.cfg
72-
73101
- name: Embedding tests (Mono/.NET Framework)
74-
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/
75102
if: always()
103+
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/
76104
env:
77105
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466
78106

79107
- name: Embedding tests (.NET Core)
80-
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net8.0 --logger "console;verbosity=detailed" src/embed_tests/
81108
if: always()
82-
83-
- name: Python Tests (Mono)
84-
if: ${{ matrix.os.category != 'windows' }}
85-
run: pytest --runtime mono
109+
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net10.0 --logger "console;verbosity=detailed" src/embed_tests/
86110

87111
- name: Python Tests (.NET Core)
112+
if: always()
88113
run: pytest --runtime coreclr
89114

115+
- name: Python Tests (Mono)
116+
if: always()
117+
run: pytest --runtime mono
118+
90119
- name: Python Tests (.NET Framework)
91120
if: ${{ matrix.os.category == 'windows' }}
92121
run: pytest --runtime netfx
93122

94123
- name: Python tests run from .NET
95-
# For some reason, it won't find pytest on the Windows + 3.10
96-
# combination, which hints that it does not handle the venv properly in
97-
# this combination.
98-
if: ${{ matrix.os.category != 'windows' || matrix.python != '3.10' }}
99124
run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/

‎Directory.Build.props‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
1313
</PropertyGroup>
1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
16-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.12.0">
15+
<PackageReference Include="Microsoft.CSharp" Version="4.*" />
16+
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="5.*">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1919
</PackageReference>

‎doc/make.bat‎

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
@ECHO OFF
2-
3-
pushd %~dp0
4-
5-
REM Command file for Sphinx documentation
6-
7-
if "%SPHINXBUILD%" == "" (
8-
set SPHINXBUILD=sphinx-build
9-
)
10-
set SOURCEDIR=source
11-
set BUILDDIR=build
12-
13-
%SPHINXBUILD% >NUL 2>NUL
14-
if errorlevel 9009 (
15-
echo.
16-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17-
echo.installed, then set the SPHINXBUILD environment variable to point
18-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19-
echo.may add the Sphinx directory to PATH.
20-
echo.
21-
echo.If you don't have Sphinx installed, grab it from
22-
echo.https://www.sphinx-doc.org/
23-
exit /b 1
24-
)
25-
26-
if "%1" == "" goto help
27-
28-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29-
goto end
30-
31-
:help
32-
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33-
34-
:end
35-
popd
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

‎pyproject.toml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,21 @@ license = "MIT"
1010
readme = "README.rst"
1111

1212
dependencies = [
13-
"clr_loader>=0.2.7,<0.3.0"
13+
"clr_loader>=0.3.1,<0.4.0"
1414
]
1515

16-
requires-python = ">=3.10, <3.14"
16+
requires-python = ">=3.10, <3.15"
1717

1818
classifiers = [
1919
"Development Status :: 5 - Production/Stable",
2020
"Intended Audience :: Developers",
2121
"Programming Language :: C#",
2222
"Programming Language :: Python :: 3",
23-
"Programming Language :: Python :: 3.7",
24-
"Programming Language :: Python :: 3.8",
25-
"Programming Language :: Python :: 3.9",
2623
"Programming Language :: Python :: 3.10",
2724
"Programming Language :: Python :: 3.11",
2825
"Programming Language :: Python :: 3.12",
2926
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
3028
"Operating System :: Microsoft :: Windows",
3129
"Operating System :: POSIX :: Linux",
3230
"Operating System :: MacOS :: MacOS X",
@@ -40,7 +38,6 @@ dev = [
4038
"find_libpython >= 0.3",
4139
"numpy >=2 ; python_version >= '3.10'",
4240
"numpy <2 ; python_version < '3.10'",
43-
"psutil"
4441
]
4542

4643
[[project.authors]]

‎requirements.txt‎

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

‎src/embed_tests/Codecs.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ public void IterableDecoderTest()
280280

281281
// regression for https://github.com/pythonnet/pythonnet/issues/1427
282282
[Test]
283+
[Ignore("Broken, the list_encoder object ends up in builtins and fails during GC")]
283284
public void PythonRegisteredDecoder_NoStackOverflowOnSystemType()
284285
{
285286
const string PyCode = @"

‎src/embed_tests/Python.EmbeddingTest.csproj‎

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

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net10.0</TargetFrameworks>
55
<AssemblyOriginatorKeyFile>..\pythonnet.snk</AssemblyOriginatorKeyFile>
66
<SignAssembly>true</SignAssembly>
77
</PropertyGroup>
@@ -29,13 +29,13 @@
2929
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3030
<PrivateAssets>all</PrivateAssets>
3131
</PackageReference -->
32-
<PackageReference Include="NUnit3TestAdapter" Version="6.0.0">
32+
<PackageReference Include="NUnit3TestAdapter" Version="6.*">
3333
<PrivateAssets>all</PrivateAssets>
3434
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3535
</PackageReference>
3636
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" />
3737
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Condition="$(MSBuildRuntimeType) == 'Core'">
38-
<Version>1.0.0</Version>
38+
<Version>1.*</Version>
3939
<PrivateAssets>all</PrivateAssets>
4040
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
4141
</PackageReference>

‎src/python_tests_runner/Python.PythonTestsRunner.csproj‎

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

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net472;net10.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>
@@ -11,7 +11,7 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="NUnit" Version="4.*" />
14-
<PackageReference Include="NUnit3TestAdapter" Version="5.*">
14+
<PackageReference Include="NUnit3TestAdapter" Version="6.*">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL