Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13", "3.14"]
python-version: ["3.9", "3.13", "3.14", "3.14t"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand All @@ -51,7 +51,12 @@ jobs:
run: python -m pip install . --group test

- name: Test package
run: pytest
if: ${{ !endsWith(matrix.python-version , 't') }}
run: python -m pytest -ra

- name: Test package (parallel)
if: endsWith(matrix.python-version , 't')
run: python -Xgil=0 -m pytest -ra --parallel-threads=16 --iterations=10
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.

Maybe this is too many threads? Idk how many threads the CI workers have. Numpy tests with 4 but they have a much larger test suite. Maybe 8 would be good here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It all runs so fast it probably doesn't matter.

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.

One final comment I have is that I don't know if we should have -Xgil=0 here. This forces the gil to be disabled even if a module requires it because it cannot run without it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's awkward array and a few other packages. If you try to import without this is switches away from no-gil mode, destroying the efficacy of the tests.

Copy link
Copy Markdown
Contributor Author

@lgray lgray Feb 27, 2026

Choose a reason for hiding this comment

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

If it's a per-module re-instantiation of the gil, then that is a different matter. My understanding is that this globally re-enables the GIL behavior of all modules.

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.

Really? But we do test free-threaded awkward. This was my source:
https://py-free-threading.github.io/running-gil-disabled/#force-the-gil-to-be-disabled

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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


checkroot:
name: Check ROOT bindings
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ test = [
"requests",
"scipy",
"pytest >=6.0",
"pytest-run-parallel",
"awkward >=2.2.2",
"dask-awkward >=2024.1.1",
]
Expand Down Expand Up @@ -143,7 +144,6 @@ BUILD_DEMO = "OFF"
write_to = "src/correctionlib/version.py"

[tool.cibuildwheel]
skip = ["cp314t-*"]
test-groups = ["test"]
test-command = "python -m pytest {package}/tests"
test-skip = ["*-musllinux_*", "cp3{10,11,12}-win32"]
Expand Down
2 changes: 1 addition & 1 deletion src/python.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace {
return output;
}
}
PYBIND11_MODULE(_core, m) {
PYBIND11_MODULE(_core, m, py::mod_gil_not_used()) {
m.doc() = "python binding for corrections evaluator";

py::class_<Variable>(m, "Variable")
Expand Down
Loading