This is an automated email from the ASF dual-hosted git repository.
adamreeve pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-dotnet.git
The following commit(s) were added to refs/heads/main by this push:
new 5494355 chore: Bump pythonnet from 3.1.0 to 3.2.0 (#457)
5494355 is described below
commit 5494355447120baf07a56269b2e47c4150f79750
Author: Adam Reeve <[email protected]>
AuthorDate: Tue Oct 6 01:07:59 2026 +0100
chore: Bump pythonnet from 3.1.0 to 3.2.0 (#457)
* Updates pythonnet to 3.2.0
* Disables serializing the runtime state on pythonnet shutdown, which broke
in 3.2.0 but isn't needed
* Fix extra `create` venv being created in the test script
---
Directory.Packages.props | 2 +-
ci/scripts/test.sh | 2 +-
test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj | 2 --
test/Apache.Arrow.Tests/PythonNetFixture.cs | 4 ++++
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 4beb5f6..e4c6dd1 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -35,7 +35,7 @@
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.10.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.401" />
- <PackageVersion Include="pythonnet" Version="3.1.0" />
+ <PackageVersion Include="pythonnet" Version="3.2.0" />
<PackageVersion Include="System.Buffers" Version="4.6.1" />
<PackageVersion Include="System.CommandLine" Version="2.0.12" />
<PackageVersion Include="System.Data.Common" Version="4.3" />
diff --git a/ci/scripts/test.sh b/ci/scripts/test.sh
index 5a8d4d6..2de3c9b 100755
--- a/ci/scripts/test.sh
+++ b/ci/scripts/test.sh
@@ -30,7 +30,7 @@ if [ -z "${PYTHON:-}" ]; then
fi
fi
if [ "$(uname)" = "Linux" ]; then
- ${PYTHON} -m venv create arrow-dotnet-dev
+ ${PYTHON} -m venv arrow-dotnet-dev
# shellcheck source=/dev/null
. arrow-dotnet-dev/bin/activate
python3 -m pip install pyarrow find-libpython
diff --git a/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
b/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
index b45a55c..fc04e92 100644
--- a/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
+++ b/test/Apache.Arrow.Tests/Apache.Arrow.Tests.csproj
@@ -4,8 +4,6 @@
<PropertyGroup>
<IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <!-- Required for PythonNET -->
-
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'">
diff --git a/test/Apache.Arrow.Tests/PythonNetFixture.cs
b/test/Apache.Arrow.Tests/PythonNetFixture.cs
index 1d28bbc..71b950a 100644
--- a/test/Apache.Arrow.Tests/PythonNetFixture.cs
+++ b/test/Apache.Arrow.Tests/PythonNetFixture.cs
@@ -41,6 +41,10 @@ namespace Apache.Arrow.Tests
return;
}
+ // Disable stashing the Python.NET runtime on shutdown.
+ // This is only required if we reload the runtime in the same
process.
+ RuntimeData.FormatterType = typeof(NoopFormatter);
+
try
{
PythonEngine.Initialize();