Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15", "3.15t"]
config:
- {
name: "Ubuntu (GCC-14)",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15", "3.15t"]
config:
- {
name: "macOS (Clang)",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nonvendored_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
python-version: '3.11'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==3.4.1
run: python -m pip install cibuildwheel==4.3.1

- name: Build wheel
run: python -m cibuildwheel --output-dir wheelhouse
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
cancel_others: 'true'
cancel_others: "true"
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
build:
name: Valgrind
Expand All @@ -39,7 +39,7 @@ jobs:

- uses: actions/setup-python@v7
with:
python-version: '3.10'
python-version: "3.10"

- name: Install dependencies on ubuntu
run: |
Expand All @@ -57,6 +57,7 @@ jobs:

- name: Configure
run: |
export CXXFLAGS="${CXXFLAGS} -march=x86-64-v3"
cmake -S . -G Ninja -B build \
-DSKBUILD_PROJECT_NAME="diptest" \
-DSKBUILD_PROJECT_VERSION="0.0.0" \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX="$HOME/.local/libomp"
cmake --build openmp_build --target install --config Release

- uses: pypa/cibuildwheel@v3.4.1
- uses: pypa/cibuildwheel@v4.3.1
env:
CIBW_ENVIRONMENT: CMAKE_ARGS="-DDIPTEST_ENABLE_ARCH_FLAGS=OFF -DDIPTEST_ENABLE_OPENMP=ON"
CIBW_TEST_COMMAND: pytest {project}/tests && python -c "from diptest import _has_openmp_support; assert _has_openmp_support"
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX="/usr/local"
cmake --build openmp_build --target install --config Release

- uses: pypa/cibuildwheel@v3.4.1
- uses: pypa/cibuildwheel@v4.3.1
env:
# only build for x86_64, arm wheels are build seperately
CIBW_ARCHS: "x86_64"
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Diptest Changelog

## Unreleased

### Changes

* BLD: Support free-threaded CPython; ship cp314t, cp315 and cp315t wheels
* BLD: Drop psutil dependency, the number of cores is now determined with `os.process_cpu_count`/`os.cpu_count`
* BLD: Drop cp38 wheels, the sdist still supports Python 3.8
* BLD: Fix sdist include path for the C++ sources
* CICD: Bump cibuildwheel from 3.4.1 to 4.3.1

## 0.11.0 -- April 2026

This release significantly improves bootstrapping performance by avoiding the sorting of the generated uniform sample.
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["scikit-build-core>=0.3.3", "pybind11"]
requires = ["scikit-build-core>=0.3.3", "pybind11>=2.13"]
build-backend = "scikit_build_core.build"


Expand All @@ -15,7 +15,7 @@ authors = [
requires-python = ">=3.8"
license = { text = "GPLv2+" }

dependencies = ["psutil", "numpy>=1.18"]
dependencies = ["numpy>=1.18"]

[project.optional-dependencies]
test = ["pytest"]
Expand All @@ -29,7 +29,7 @@ Issues = "https://github.com/RUrlus/diptest/issues"
wheel.expand-macos-universal-tags = true
sdist.include = [
"src/diptest",
"src/diptest_core",
"src/diptest-core",
"src/external",
"CMakeLists.txt",
]
Expand Down Expand Up @@ -58,7 +58,7 @@ test-extras = ["test"]

archs = ["auto64"]
skip = ["*-win32", "*-manylinux_i686", "*-musllinux_x86_64"]
build = ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"]
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*", "cp314t-*", "cp315-*", "cp315t-*"]

# make sure to build generic wheels
environment = { CMAKE_ARGS = "-DDIPTEST_ENABLE_ARCH_FLAGS=OFF" }
Expand Down
2 changes: 1 addition & 1 deletion src/diptest-core/src/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace diptest {
namespace bindings {

PYBIND11_MODULE(_diptest_core, m) {
PYBIND11_MODULE(_diptest_core, m, py::mod_gil_not_used()) {
bind_diptest(m);
bind_diptest_full(m);
bind_diptest_pval(m);
Expand Down
6 changes: 4 additions & 2 deletions src/diptest/diptest.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
from __future__ import annotations

import os
import warnings
from typing import TYPE_CHECKING

import numpy as np
import psutil

from diptest.consts import Consts
from diptest.lib import _diptest_core as _diptest

if TYPE_CHECKING:
from typing import Any

_N_CORES = psutil.cpu_count(logical=False)
# ``process_cpu_count`` respects the CPU affinity mask but is only available
# on Python 3.13+
_N_CORES = (getattr(os, "process_cpu_count", None) or os.cpu_count)() or 1
_N_CORES_MIN1 = _N_CORES - 1

_DEFAULT_N_THREADS = min(_N_CORES_MIN1, 4) if _diptest._has_openmp_support else 1
Expand Down
Loading