Skip to content

Commit

Permalink
MAINT: Bump minimum versions
Browse files Browse the repository at this point in the history
Bump minimum versions
Switch to Cython 3 branch
Fix deprecations
  • Loading branch information
bashtage committed May 10, 2023
1 parent 778e203 commit 6d0e5f0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion arch/bootstrap/_samplers.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!python
#cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True, binding=True


import numpy as np

Expand Down
8 changes: 5 additions & 3 deletions arch/univariate/recursions.pyx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!python
#cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True, binding=True


import numpy as np

cimport numpy as np
from libc.float cimport DBL_MAX
from libc.math cimport exp, fabs, lgamma, log, sqrt

DEF SQRT2_OV_PI = 0.79788456080286535587989211
cdef:
double SQRT2_OV_PI = 0.79788456080286535587989211


__all__ = [
"harch_recursion",
Expand All @@ -34,7 +36,7 @@ cdef double LNSIGMA_MAX = log(DBL_MAX)

np.import_array()

cdef inline void bounds_check(double* sigma2, double* var_bounds):
cdef inline void bounds_check(double* sigma2, const double* var_bounds):
if sigma2[0] < var_bounds[0]:
sigma2[0] = var_bounds[0]
elif sigma2[0] > var_bounds[1]:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ requires = [
"setuptools_scm[toml]>=7,<8",
"oldest-supported-numpy",
"numpy; python_version>='3.12'",
"Cython>=0.29.32"
"cython>=3.0.0b2"
]
build-backend = "setuptools.build_meta"

Expand Down
9 changes: 4 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# versioning
setuptools_scm>=6.4.2,<7.0.0
setuptools_scm[toml]>=7,<8
packaging

# Performance
cython>=0.29.30
cython>=3.0.0b2
numba>=0.49,!=0.50.*

# Graphics
Expand All @@ -23,12 +23,11 @@ mypy

# Documentation
ipython>=7
sphinx >=5,<6
sphinx>=7
sphinx_immaterial
nbsphinx
jupyter
notebook
nbconvert
numpydoc>=0.9.2
sphinx-autodoc-typehints
pygments>=2.7.4 # not directly required, pinned by Snyk to avoid a vulnerability

8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy>=1.17
scipy>=1.3
pandas>=1.0
statsmodels>=0.11
numpy>=1.19
scipy>=1.5
pandas>=1.1
statsmodels>=0.12
property_cached>=1.6.4
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def run_setup(binary: bool = True) -> None:
"""
)
else:
directives = {"linetrace": CYTHON_COVERAGE}
directives = {'language_level' : "3", "cpow": True, "linetrace": CYTHON_COVERAGE,
"boundscheck": False, "wraparound": False, "cdivision":True, "binding":True}
macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
if CYTHON_COVERAGE:
macros.append(("CYTHON_TRACE", "1"))
Expand Down Expand Up @@ -178,9 +179,10 @@ def run_setup(binary: bool = True) -> None:
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Financial and Insurance Industry",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
Expand Down

0 comments on commit 6d0e5f0

Please sign in to comment.