diff --git a/.github/workflows/rc.yaml b/.github/workflows/rc.yaml index 810ab2c6..11df6d7f 100644 --- a/.github/workflows/rc.yaml +++ b/.github/workflows/rc.yaml @@ -156,7 +156,7 @@ jobs: - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: 3 + python-version: 3.13 # PythonNet isn't compatible with 3.14 yet (https://github.com/pythonnet/pythonnet/issues/2610) - name: Download uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 69215886..c630334a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -74,7 +74,7 @@ jobs: - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: - python-version: 3 + python-version: 3.13 # PythonNet isn't compatible with 3.14 yet (https://github.com/pythonnet/pythonnet/issues/2610) - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Build diff --git a/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs b/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs index ebd89cce..42760616 100644 --- a/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs +++ b/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs @@ -79,16 +79,16 @@ public CDataSchemaPythonTest(PythonNet pythonNet) { if (!pythonNet.Initialized) { - Skip.If(pythonNet.VersionMismatch, "VM has incompatible version of Python installed; skipping C Data Interface tests."); + var errorReason = pythonNet.VersionMismatch ? "Python version is incompatible with PythonNet" : "PYTHONNET_PYDLL not set"; bool inCIJob = Environment.GetEnvironmentVariable("GITHUB_ACTIONS") == "true"; bool inVerificationJob = Environment.GetEnvironmentVariable("TEST_CSHARP") == "1"; // Skip these tests if this is not in CI or is a verification job and PythonNet couldn't be initialized - Skip.If(inVerificationJob || !inCIJob, "PYTHONNET_PYDLL not set; skipping C Data Interface tests."); + Skip.If(inVerificationJob || !inCIJob, $"{errorReason}; skipping C Data Interface tests."); // Otherwise throw - throw new Exception("PYTHONNET_PYDLL not set; cannot run C Data Interface tests."); + throw new Exception($"{errorReason}; cannot run C Data Interface tests."); } }