From d708c129851845092074af13d783cf502f2056e7 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sat, 12 Sep 2026 15:14:57 +0200 Subject: [PATCH 1/6] temporarily remove '-Werror' from CMAKE_REQUIRED_FLAGS for header checks Removed the '-Werror' flag from CMAKE_REQUIRED_FLAGS to avoid treating warnings as errors. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ff3c430..dcf14ab8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -613,7 +613,7 @@ if (NOT "${CMAKE_REQUIRED_INCLUDES}" STREQUAL "") endif() foreach(file ${PyPartMC_headers}) set(CMAKE_REQUIRED_INCLUDES "${PYPARTMC_INCLUDE_DIRS};${Python_INCLUDE_DIRS}") - set(CMAKE_REQUIRED_FLAGS "-Werror") + set(CMAKE_REQUIRED_FLAGS "") # TODO #555 "-Werror" string(REGEX REPLACE "[\-./:]" "_" file_var ${file}) check_cxx_source_compiles(" // https://github.com/nlohmann/json/issues/1408 From c1780966b1b7a09101091b4cbd6955669696fdf2 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sat, 12 Sep 2026 17:17:28 +0200 Subject: [PATCH 2/6] disable it also for the main compilation Updated compiler options for non-MSVC compilers to remove -Werror flag. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcf14ab8..8713f1e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -591,7 +591,7 @@ endif() foreach(target _PyPartMC) target_compile_options(${target} PRIVATE $<$:/W4 /WX> - $<$>:-Wall -Wextra -Wpedantic -Werror -Wno-unused-parameter> + $<$>:-Wall -Wextra -Wpedantic -Wno-unused-parameter> # TODO #555 -Werror ) endforeach() From 0ba8af99749e45c37c8d175515ae9c70faac6b64 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sat, 12 Sep 2026 18:49:51 +0200 Subject: [PATCH 3/6] Update CIBW_SKIP to exclude cp314-macosx_x86_64 build --- .github/workflows/buildwheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index 2d7acaae..0980d385 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -70,7 +70,7 @@ jobs: - name: Build and test wheels env: # skip 32-bit, musllinux, and free-threaded builds - CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* cp3??t-*" + CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* cp3??t-* cp314-macosx_x86_64" CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DCMAKE_MAKE_PROGRAM=D:/a/_temp/msys64/mingw64/bin/ninja.exe" CMAKE_PROGRAM_PATH="D:/a/_temp/msys64/usr/bin" CMAKE_GENERATOR="Ninja" TEMP="D:/a/_temp/" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair -w {dest_dir} {wheel} From 383bf0d6c03bf9ba11f89ec4ffe7ede3a8400ec0 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sat, 12 Sep 2026 22:53:06 +0200 Subject: [PATCH 4/6] refactor to do the temporary change only for P3.15 and only on Linux --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8713f1e6..b15456c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -588,10 +588,16 @@ endif() ### pedantics ###################################################################################### +# temporarily disable -Werror specifically for Linux + Python 3.15 TODO #555 +set(PYPARTMC_WERROR "-Werror") +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND Python_VERSION VERSION_EQUAL "3.15") + set(PYPARTMC_WERROR "") +endif() + foreach(target _PyPartMC) target_compile_options(${target} PRIVATE $<$:/W4 /WX> - $<$>:-Wall -Wextra -Wpedantic -Wno-unused-parameter> # TODO #555 -Werror + $<$>:-Wall -Wextra -Wpedantic ${PYPARTMC_WERROR} -Wno-unused-parameter> ) endforeach() @@ -613,7 +619,7 @@ if (NOT "${CMAKE_REQUIRED_INCLUDES}" STREQUAL "") endif() foreach(file ${PyPartMC_headers}) set(CMAKE_REQUIRED_INCLUDES "${PYPARTMC_INCLUDE_DIRS};${Python_INCLUDE_DIRS}") - set(CMAKE_REQUIRED_FLAGS "") # TODO #555 "-Werror" + set(CMAKE_REQUIRED_FLAGS "${PYPARTMC_WERROR}") string(REGEX REPLACE "[\-./:]" "_" file_var ${file}) check_cxx_source_compiles(" // https://github.com/nlohmann/json/issues/1408 From adbe08908f21886a3f92e28d5972ed944d9a606a Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sat, 12 Sep 2026 23:49:27 +0200 Subject: [PATCH 5/6] skip also cp315-macosx_x86_64 --- .github/workflows/buildwheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildwheels.yml b/.github/workflows/buildwheels.yml index 0980d385..68169218 100644 --- a/.github/workflows/buildwheels.yml +++ b/.github/workflows/buildwheels.yml @@ -70,7 +70,7 @@ jobs: - name: Build and test wheels env: # skip 32-bit, musllinux, and free-threaded builds - CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* cp3??t-* cp314-macosx_x86_64" + CIBW_SKIP: "*-win32 *-manylinux_i686 *musllinux* cp3??t-* cp314-macosx_x86_64 cp315-macosx_x86_64" CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel CIBW_ENVIRONMENT_WINDOWS: CMAKE_ARGS="-DCMAKE_MAKE_PROGRAM=D:/a/_temp/msys64/mingw64/bin/ninja.exe" CMAKE_PROGRAM_PATH="D:/a/_temp/msys64/usr/bin" CMAKE_GENERATOR="Ninja" TEMP="D:/a/_temp/" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair -w {dest_dir} {wheel} From 90fc6cae961b75602c8d1abe74d48519d4d457b2 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sun, 13 Sep 2026 01:10:17 +0200 Subject: [PATCH 6/6] refactor urllib imports in notebooks --- examples/additive_coag_comparison.ipynb | 4 ++-- examples/particle_simulation_with_camp.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/additive_coag_comparison.ipynb b/examples/additive_coag_comparison.ipynb index 2a87648b..2da7753b 100644 --- a/examples/additive_coag_comparison.ipynb +++ b/examples/additive_coag_comparison.ipynb @@ -94,7 +94,7 @@ "source": [ "from collections import namedtuple\n", "from functools import partial\n", - "import urllib\n", + "from urllib import request\n", "import json\n", "import platform\n", "import subprocess\n", @@ -518,7 +518,7 @@ " 'src/SDfunc/constants.jl', 'src/SDfunc/binning.jl', 'src/SDfunc/coalescence.jl',\n", " ):\n", " with open('Droplets.jl-' + path.replace('/','-'), 'w', encoding='utf-8') as fout:\n", - " with urllib.request.urlopen(BASE_URL + path) as fin:\n", + " with request.urlopen(BASE_URL + path) as fin:\n", " fout.write(fin.read().decode('utf-8'))\n", "\n", " code_to_write = \"\"\"\n", diff --git a/examples/particle_simulation_with_camp.ipynb b/examples/particle_simulation_with_camp.ipynb index fa29c80b..57480897 100644 --- a/examples/particle_simulation_with_camp.ipynb +++ b/examples/particle_simulation_with_camp.ipynb @@ -52,7 +52,7 @@ "outputs": [], "source": [ "import json\n", - "import urllib\n", + "from urllib import request\n", "from collections import defaultdict\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", @@ -119,7 +119,7 @@ "for path in PATHS:\n", " print(path)\n", " with open(path, 'w', encoding='utf-8') as fout:\n", - " with urllib.request.urlopen(CAMP_URL + path.replace('-', '/')) as fin:\n", + " with request.urlopen(CAMP_URL + path.replace('-', '/')) as fin:\n", " json.dump(\n", " json.loads(fin.read().decode('utf-8').replace('TO' + 'DO', 'TO-DO')),\n", " fout,\n",