Skip to content

Commit

Permalink
Merge branch 'main' into virtual-arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
ikrommyd authored Feb 14, 2025
2 parents 375094c + e2f61af commit aebfcfc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ jobs:
python-architecture: x64
runs-on: ubuntu-latest
dependencies-kind: ml
- python-version: '3.13t'
python-architecture: x64
runs-on: ubuntu-latest
dependencies-kind: nogil
- python-version: '3.13t'
python-architecture: x64
runs-on: windows-latest
dependencies-kind: nogil

runs-on: ${{ matrix.runs-on }}

Expand All @@ -81,7 +89,7 @@ jobs:
submodules: true

- name: 'Python ${{ matrix.python-version }}'
uses: actions/setup-python@v5
uses: Quansight-Labs/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
architecture: '${{ matrix.python-architecture }}'
Expand Down
1 change: 1 addition & 0 deletions awkward-cpp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ cmake.version = ">=3.29"

[tool.cibuildwheel]
build-frontend = "build[uv]"
free-threaded-support = true
test-requires = ["pytest>=6", "."]
test-command = ["echo {project}:", "ls {project}", "echo {package}:", "ls {package}",
"""
Expand Down
2 changes: 1 addition & 1 deletion awkward-cpp/src/python/_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "awkward/python/forth.h"

namespace py = pybind11;
PYBIND11_MODULE(_ext, m) {
PYBIND11_MODULE(_ext, m, py::mod_gil_not_used()) {
#ifdef VERSION_INFO
m.attr("__version__") = VERSION_INFO;
#else
Expand Down
10 changes: 8 additions & 2 deletions dev/generate-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import json
import os
import shutil
import sys
import time
from collections import OrderedDict
from itertools import product
Expand All @@ -17,6 +18,11 @@

CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))

try:
yaml_loader = yaml.CSafeLoader if sys._is_gil_enabled() else yaml.SafeLoader
except AttributeError:
yaml_loader = yaml.CSafeLoader


def reproducible_datetime():
import sys
Expand Down Expand Up @@ -203,7 +209,7 @@ def readspec():
specdict = {}
specdict_unit = {}
with open(os.path.join(CURRENT_DIR, "..", "kernel-specification.yml")) as f:
loadfile = yaml.load(f, Loader=yaml.CSafeLoader)
loadfile = yaml.load(f, Loader=yaml_loader)

indspec = loadfile["kernels"]
with open(os.path.join(CURRENT_DIR, "..", "kernel-test-data.json")) as f:
Expand Down Expand Up @@ -392,7 +398,7 @@ def awkward_ListArray_combinations_step(
with open(
os.path.join(CURRENT_DIR, "..", "kernel-specification.yml")
) as specfile:
indspec = yaml.load(specfile, Loader=yaml.CSafeLoader)["kernels"]
indspec = yaml.load(specfile, Loader=yaml_loader)["kernels"]
for spec in indspec:
if "def " in spec["definition"]:
outfile.write(spec["definition"] + "\n")
Expand Down
5 changes: 5 additions & 0 deletions requirements-test-nogil.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fsspec>=2022.11.0;sys_platform != "win32"
pandas>=0.24.0;sys_platform != "win32"
pytest>=6
pytest-cov
pytest-xdist

0 comments on commit aebfcfc

Please sign in to comment.