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

Merge branch 'master' into testbranch · pythonnet/pythonnet@be255ee · GitHub

Repository navigation

Commit be255ee

Browse files
authored
Merge branch 'master' into testbranch
2 parents e986114 + 9a3c04e commit be255ee

92 files changed

Lines changed: 1347 additions & 1719 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/dependabot.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
8+
- package-ecosystem: "nuget"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"

‎.github/workflows/ARM.yml‎

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

‎.github/workflows/docs.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v6
1010
- name: Doxygen Action
11-
uses: mattnotmitt/doxygen-action@1.9.4
11+
uses: mattnotmitt/doxygen-action@1.12.0
1212
with:
1313
working-directory: "doc/"
1414

@@ -19,7 +19,7 @@ jobs:
1919
2020
- name: Upload artifact
2121
# Automatically uploads an artifact from the './_site' directory by default
22-
uses: actions/upload-pages-artifact@v1
22+
uses: actions/upload-pages-artifact@v4
2323
with:
2424
path: doc/build/html/
2525

@@ -37,4 +37,4 @@ jobs:
3737
steps:
3838
- name: Deploy to GitHub Pages
3939
id: deployment
40-
uses: actions/deploy-pages@v1
40+
uses: actions/deploy-pages@v4

‎.github/workflows/main.yml‎

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

2325
- category: windows
2426
platform: x64
2527
instance: windows-latest
2628

2729
- category: ubuntu
2830
platform: x64
29-
instance: ubuntu-latest
31+
instance: ubuntu-22.04
32+
33+
- category: ubuntu
34+
platform: arm64
35+
instance: ubuntu-22.04-arm
3036

3137
- category: macos
3238
platform: x64
3339
instance: macos-13
3440

35-
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
41+
python: ["3.10", "3.11", "3.12", "3.13"]
3642

3743
steps:
3844
- name: Set Environment on macOS
@@ -42,65 +48,52 @@ jobs:
4248
mono-version: latest
4349

4450
- name: Checkout code
45-
uses: actions/checkout@v2
51+
uses: actions/checkout@v6
4652

4753
- name: Setup .NET
48-
uses: actions/setup-dotnet@v1
54+
uses: actions/setup-dotnet@v5
4955
with:
50-
dotnet-version: '6.0.x'
56+
dotnet-version: '8.0.x'
5157

5258
- name: Set up Python ${{ matrix.python }}
53-
uses: actions/setup-python@v2
59+
uses: astral-sh/setup-uv@v7
5460
with:
55-
python-version: ${{ matrix.python }}
5661
architecture: ${{ matrix.os.platform }}
62+
python-version: ${{ matrix.python }}
63+
cache-python: true
64+
activate-environment: true
65+
enable-cache: true
5766

58-
- name: Install dependencies
59-
run: |
60-
pip install --upgrade -r requirements.txt
61-
pip install numpy # for tests
62-
63-
- name: Build and Install
64-
run: |
65-
pip install -v .
66-
67-
- name: Set Python DLL path and PYTHONHOME (non Windows)
68-
if: ${{ matrix.os.category != 'windows' }}
69-
run: |
70-
echo PYTHONNET_PYDLL=$(python -m find_libpython) >> $GITHUB_ENV
71-
echo PYTHONHOME=$(python -c 'import sys; print(sys.prefix)') >> $GITHUB_ENV
67+
- name: Synchronize the virtual environment
68+
run: uv sync --managed-python
7269

73-
- name: Set Python DLL path and PYTHONHOME (Windows)
74-
if: ${{ matrix.os.category == 'windows' }}
75-
run: |
76-
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONNET_PYDLL=$(python -m find_libpython)"
77-
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -InputObject "PYTHONHOME=$(python -c 'import sys; print(sys.prefix)')"
70+
- name: Show pyvenv.cfg
71+
run: cat .venv/pyvenv.cfg
7872

79-
- name: Embedding tests
80-
run: dotnet test --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/embed_tests/
73+
- name: Embedding tests (Mono/.NET Framework)
74+
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/
75+
if: always()
8176
env:
8277
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466
8378

79+
- name: Embedding tests (.NET Core)
80+
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net8.0 --logger "console;verbosity=detailed" src/embed_tests/
81+
if: always()
82+
8483
- name: Python Tests (Mono)
8584
if: ${{ matrix.os.category != 'windows' }}
8685
run: pytest --runtime mono
8786

88-
# TODO: Run these tests on Windows x86
8987
- name: Python Tests (.NET Core)
90-
if: ${{ matrix.os.platform == 'x64' }}
9188
run: pytest --runtime coreclr
9289

9390
- name: Python Tests (.NET Framework)
9491
if: ${{ matrix.os.category == 'windows' }}
9592
run: pytest --runtime netfx
9693

9794
- 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' }}
9899
run: dotnet test --runtime any-${{ matrix.os.platform }} src/python_tests_runner/
99-
100-
- name: Perf tests
101-
if: ${{ (matrix.python == '3.8') && (matrix.os.platform == 'x64') }}
102-
run: |
103-
pip install --force --no-deps --target src/perf_tests/baseline/ pythonnet==2.5.2
104-
dotnet test --configuration Release --runtime any-${{ matrix.os.platform }} --logger "console;verbosity=detailed" src/perf_tests/
105-
106-
# TODO: Run mono tests on Windows?

‎.github/workflows/nuget-preview.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ jobs:
2121
echo "DATE_VER=$(date "+%Y-%m-%d")" >> $GITHUB_ENV
2222
2323
- name: Checkout code
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v6
2525

2626
- name: Setup .NET
27-
uses: actions/setup-dotnet@v1
27+
uses: actions/setup-dotnet@v5
2828
with:
2929
dotnet-version: '6.0.x'
3030

3131
- name: Set up Python 3.8
32-
uses: actions/setup-python@v2
32+
uses: actions/setup-python@v6
3333
with:
3434
python-version: 3.8
3535
architecture: x64

‎AUTHORS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
- Dmitriy Se ([@dmitriyse](https://github.com/dmitriyse))
3939
- Félix Bourbonnais ([@BadSingleton](https://github.com/BadSingleton))
4040
- Florian Treurniet ([@ftreurni](https://github.com/ftreurni))
41+
- Frank Witscher ([@Frawak](https://github.com/Frawak))
4142
- He-chien Tsai ([@t3476](https://github.com/t3476))
4243
- Inna Wiesel ([@inna-w](https://github.com/inna-w))
4344
- Ivan Cronyn ([@cronan](https://github.com/cronan))
@@ -58,6 +59,7 @@
5859
- Peter Kese ([@pkese](https://github.com/pkese))
5960
- Raphael Nestler ([@rnestler](https://github.com/rnestler))
6061
- Rickard Holmberg ([@rickardraysearch](https://github.com/rickardraysearch))
62+
- Roberto Pastor Muela ([@RobPasMue](https://github.com/RobPasMue))
6163
- Sam Winstanley ([@swinstanley](https://github.com/swinstanley))
6264
- Sean Freitag ([@cowboygneox](https://github.com/cowboygneox))
6365
- Serge Weinstock ([@sweinst](https://github.com/sweinst))

‎CHANGELOG.md‎

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,50 @@ project adheres to [Semantic Versioning][].
55

66
This document follows the conventions laid out in [Keep a CHANGELOG][].
77

8-
## [Unreleased][]
8+
## Unreleased
99

1010
### Added
1111

12-
- Added `ToPythonAs<T>()` extension method to allow for explicit conversion using a specific type. ([#2311][i2311])
12+
- Support `del obj[...]` for types derived from `IList<T>` and `IDictionary<K, V>`
1313

14-
- Added `IComparable` and `IEquatable` implementations to `PyInt`, `PyFloat`, and `PyString`
15-
to compare with primitive .NET types like `long`.
14+
### Changed
15+
### Fixed
16+
17+
- Fixed crash when trying to `del clrObj[...]` for non-arrays
18+
- ci: properly exclude job (#2542)
19+
20+
## [3.0.5](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.5) - 2024-12-13
21+
22+
### Added
23+
24+
- Support for Python 3.13 (#2454)
25+
26+
27+
## [3.0.4](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.4) - 2024-09-19
28+
29+
### Added
30+
31+
- Added `ToPythonAs<T>()` extension method to allow for explicit conversion
32+
using a specific type. ([#2311][i2311])
33+
- Added `IComparable` and `IEquatable` implementations to `PyInt`, `PyFloat`,
34+
and `PyString` to compare with primitive .NET types like `long`.
1635

1736
### Changed
18-
- Added a `FormatterFactory` member in RuntimeData to create formatters with parameters. For compatibility, the `FormatterType` member is still present and has precedence when defining both `FormatterFactory` and `FormatterType`
19-
- Added a post-serialization and a pre-deserialization step callbacks to extend (de)serialization process
37+
38+
- Added a `FormatterFactory` member in RuntimeData to create formatters with
39+
parameters. For compatibility, the `FormatterType` member is still present
40+
and has precedence when defining both `FormatterFactory` and `FormatterType`
41+
- Added a post-serialization and a pre-deserialization step callbacks to
42+
extend (de)serialization process
2043
- Added an API to stash serialized data on Python capsules
2144

2245
### Fixed
2346

2447
- Fixed RecursionError for reverse operators on C# operable types from python. See #2240
2548
- Fixed crash when .NET event has no `AddMethod`
26-
- Fixed probing for assemblies in `sys.path` failing when a path in `sys.path` has invalid characters. See #2376
49+
- Fixed probing for assemblies in `sys.path` failing when a path in `sys.path`
50+
has invalid characters. See #2376
51+
- Fixed possible access violation exception on shutdown. See ([#1977][i1977])
2752

2853
## [3.0.3](https://github.com/pythonnet/pythonnet/releases/tag/v3.0.3) - 2023-10-11
2954

@@ -971,3 +996,4 @@ This version improves performance on benchmarks significantly compared to 2.3.
971996
[i1481]: https://github.com/pythonnet/pythonnet/issues/1481
972997
[i1672]: https://github.com/pythonnet/pythonnet/pull/1672
973998
[i2311]: https://github.com/pythonnet/pythonnet/issues/2311
999+
[i1977]: https://github.com/pythonnet/pythonnet/issues/1977

‎Directory.Build.props‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<?xml version="1.0"?>
22
<Project>
33
<PropertyGroup>
4-
<AssemblyCopyright>Copyright (c) 2006-2022 The Contributors of the Python.NET Project</AssemblyCopyright>
4+
<AssemblyCopyright>Copyright (c) 2006-2025 The Contributors of the Python.NET Project</AssemblyCopyright>
55
<AssemblyCompany>pythonnet</AssemblyCompany>
66
<AssemblyProduct>Python.NET</AssemblyProduct>
7-
<LangVersion>10.0</LangVersion>
7+
<LangVersion>12.0</LangVersion>
88
<IsPackable>false</IsPackable>
99
<FullVersion>$([System.IO.File]::ReadAllText("$(MSBuildThisFileDirectory)version.txt").Trim())</FullVersion>
1010
<VersionPrefix>$(FullVersion.Split('-', 2)[0])</VersionPrefix>
1111
<VersionSuffix Condition="$(FullVersion.Contains('-'))">$(FullVersion.Split('-', 2)[1])</VersionSuffix>
12+
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
1213
</PropertyGroup>
1314
<ItemGroup>
1415
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
15-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.0.1">
16+
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.12.0">
1617
<PrivateAssets>all</PrivateAssets>
1718
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1819
</PackageReference>
19-
<PackageReference Include="NonCopyableAnalyzer" Version="0.7.0">
20+
<!-- PackageReference Include="NonCopyableAnalyzer" Version="0.7.0">
2021
<PrivateAssets>all</PrivateAssets>
2122
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22-
</PackageReference>
23+
</PackageReference -->
2324
</ItemGroup>
2425
</Project>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL