From a55ca09e728b73024aee8f4c325728d020013b07 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:33:03 -0800 Subject: [PATCH] Declare build dependencies, declare Requires-Python, bump dependencies, prepare release (#102) * Declare build dependencies * Requires 3.8 * Don't build 3.6 wheels * Bump dependencies, prepare release * reformat --------- Co-authored-by: Jelle Zijlstra --- .github/workflows/publish.yml | 2 +- CHANGELOG | 5 +++++ pyproject.toml | 8 ++++++++ qcore/decorators.pyi | 4 ++-- qcore/inspection.pyi | 2 +- qcore/testing.pyi | 4 ++-- requirements.txt | 4 ++-- setup.py | 3 +-- tox.ini | 4 ++-- 9 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 348b753..f77e42e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: python-version: "3.11" - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.12.3 + run: python -m pip install cibuildwheel==2.16.5 - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse diff --git a/CHANGELOG b/CHANGELOG index 74ff5c9..2edbe65 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +## 1.10.1 + +* Add minimum version requirement (Python 3.8) to metadata +* Build Python 3.12 wheels + ## 1.10.0 * Drop support for Python 3.7 diff --git a/pyproject.toml b/pyproject.toml index d32d288..5abb4cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,3 +21,11 @@ warn_unused_configs = true [[tool.mypy.overrides]] module = "nose.plugins.skip" ignore_missing_imports = true + +[build-system] +requires = ["setuptools>=64.0", "cython>=3"] +build-backend = "setuptools.build_meta" +requires-python = ">=3.8" + +[tool.cibuildwheel] +build = "cp{38,39,310,311,312}-*" diff --git a/qcore/decorators.pyi b/qcore/decorators.pyi index 3785469..0006e30 100644 --- a/qcore/decorators.pyi +++ b/qcore/decorators.pyi @@ -43,7 +43,7 @@ _InputT = TypeVar("_InputT") _OutputT = TypeVar("_OutputT") def convert_result( - converter: Callable[[_InputT], _OutputT] + converter: Callable[[_InputT], _OutputT], ) -> Callable[[Callable[..., _InputT]], Callable[..., _OutputT]]: ... def retry( exception_cls: Union[Type[BaseException], Tuple[Type[BaseException], ...]], @@ -51,5 +51,5 @@ def retry( sleep: float = ..., ) -> Callable[[_CallableT], _CallableT]: ... def decorator_of_context_manager( - ctxt: Callable[..., ContextManager[Any]] + ctxt: Callable[..., ContextManager[Any]], ) -> Callable[..., Callable[[_CallableT], _CallableT]]: ... diff --git a/qcore/inspection.pyi b/qcore/inspection.pyi index 56c3098..6cc6687 100644 --- a/qcore/inspection.pyi +++ b/qcore/inspection.pyi @@ -24,7 +24,7 @@ def get_function_call_repr( fn: Callable[..., Any], args: Iterable[object], kwargs: Mapping[str, object] ) -> str: ... def getargspec( - func: Union[types.FunctionType, types.MethodType, Callable[..., Any]] + func: Union[types.FunctionType, types.MethodType, Callable[..., Any]], ) -> inspect.ArgSpec: ... def is_cython_or_generator(fn: object) -> bool: ... def is_cython_function(fn: object) -> bool: ... diff --git a/qcore/testing.pyi b/qcore/testing.pyi index 339a35d..56f31e1 100644 --- a/qcore/testing.pyi +++ b/qcore/testing.pyi @@ -9,8 +9,8 @@ class GreaterEq: def disabled(func_or_class: Any) -> Any: ... def decorate_all_test_methods( - decorator: Callable[[Callable[..., Any]], Any] + decorator: Callable[[Callable[..., Any]], Any], ) -> Callable[[Type[object]], Type[object]]: ... def decorate_func_or_method_or_class( - decorator: Callable[[Callable[..., Any]], Any] + decorator: Callable[[Callable[..., Any]], Any], ) -> Callable[[Any], Any]: ... diff --git a/requirements.txt b/requirements.txt index 567e46f..b161478 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pytest==7.4.0 -mypy==1.4.1 -black==23.7.0 +mypy==1.8.0 +black==24.2.0 diff --git a/setup.py b/setup.py index 7c6ef26..f7ce5a6 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ ) -VERSION = "1.10.0" +VERSION = "1.10.1" EXTENSIONS = [ @@ -75,5 +75,4 @@ packages=["qcore", "qcore.tests"], package_data={"qcore": DATA_FILES}, ext_modules=EXTENSIONS, - setup_requires=["Cython"], ) diff --git a/tox.ini b/tox.ini index 8ceba14..0323d88 100644 --- a/tox.ini +++ b/tox.ini @@ -30,5 +30,5 @@ python = 3.8: py38, mypy 3.9: py39 3.10: py310 - 3.11: py311, black - 3.12: py312 + 3.11: py311 + 3.12: py312, black