Skip to content

Use python 3.14 environment in GitHub workflows#2922

Open
antonwolfy wants to merge 7 commits into
masterfrom
use-py3.14-in-gh-workflows
Open

Use python 3.14 environment in GitHub workflows#2922
antonwolfy wants to merge 7 commits into
masterfrom
use-py3.14-in-gh-workflows

Conversation

@antonwolfy

@antonwolfy antonwolfy commented May 18, 2026

Copy link
Copy Markdown
Contributor

This PR updates the remaining GitHub workflows and conda environments to run under python 3.14, and bumps coveralls to 4.1.0 (which supports 3.14).

Version bumps (3.13/3.12 → 3.14)

  • check-onemath.yaml — oneMath interface tests
  • conda-package.yml — array API conformance tests (python-ver)
  • environments/building_docs.yml — docs build
  • environments/upload_cleanup_conda_pkg.yml — conda package upload/cleanup
  • environments/coverage.yml — coverage job (was pinned to 3.12)

Coverage job fixes for python 3.14

Bumping the coverage environment from 3.12 to 3.14 surfaced two failures unrelated to dpnp's runtime code — both stem from how coverage instrumentation interacts with 3.14's sys.monitoring:

1. Build failure — undeclared identifier '__Pyx_MonitoringEventTypes_CyGen_count'

Coverage builds compile every extension with CYTHON_TRACE=1 (DPNP_GENERATE_COVERAGE=ON), but Cython line tracing also needs the matching # cython: linetrace=True directive at cythonize time. Three .pyx files were missing it (_slicing.pyx, _stride_utils.pyx, _types.pyx): without the directive, Cython references __Pyx_MonitoringEventTypes_CyGen_count (from the shared generator/coroutine struct) but never defines it. On python ≤3.12 the guarding CYTHON_USE_SYS_MONITORING macro is 0, so the code was unreachable — which is why the previous 3.12 pin hid this; on 3.13+ it becomes reachable and fails to compile. Added the directive to the three files. As a side effect, these files were previously producing no line-coverage data and are now measured.

2. Test failures — test_dlpack.py::TestDLPack::test_invaid_stream[scalar|dictionary|device]

coverage.py 7.9+ makes the sys.monitoring core (sysmon) the default on python 3.14. That core (a) does not support plugins such as the Cython.Coverage plugin used here, and (b) corrupts the pending exception when a C/Cython function raises — turning dpctl's correct TypeError from usm_ndarray.__dlpack__ into a SystemError, so assert_raises(TypeError, ...) fails. Pinned the measurement core back to ctrace via core = "ctrace" in [tool.coverage.run] (pyproject.toml). ctrace supports both the Cython plugin and branch coverage, so no coverage data is lost.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@antonwolfy antonwolfy added this to the 0.21.0 release milestone May 18, 2026
@antonwolfy antonwolfy self-assigned this May 18, 2026
@antonwolfy antonwolfy changed the title Use python 3.14 environment in GitHub workflows where possible Use python 3.14 environment in GitHub workflows May 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/2922/index.html

@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev2=py314h509198e_29 ran successfully.
Passed: 1372
Failed: 3
Skipped: 5

@antonwolfy antonwolfy marked this pull request as ready for review May 18, 2026 13:18

@vlad-perevezentsev vlad-perevezentsev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you @antonwolfy

@antonwolfy antonwolfy force-pushed the use-py3.14-in-gh-workflows branch from 60bde39 to cded1c6 Compare July 9, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants