diff --git a/.github/workflows/pip_install_gmpy2.yml b/.github/workflows/pip_install_gmpy2.yml index 82c02b53..b48203f8 100644 --- a/.github/workflows/pip_install_gmpy2.yml +++ b/.github/workflows/pip_install_gmpy2.yml @@ -63,14 +63,6 @@ jobs: PYTHONPATH=`pwd`/gmpy2 python test_cython/runtests.py lcov --capture --directory . --no-external --output-file build/coverage.info genhtml build/coverage.info --output-directory build/coverage - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - gcov: true - gcov_include: src/*.c - gcov_args: --no-external - fail_ci_if_error: false - token: ${{ secrets.CODECOV_TOKEN }} - name: Archive build artifacts uses: actions/upload-artifact@v4 if: matrix.python-version == 3.11 diff --git a/.gitignore b/.gitignore index 60d139d4..9c4f2751 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ gmpy2/mpc.h gmpy2/mpc.lib gmpy2/mpfr.h gmpy2/mpfr.lib +# per-project directories for virtual environments +venv/ +.venv/ diff --git a/docs/install.rst b/docs/install.rst index 086c97a5..3fa67c5d 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -1,7 +1,7 @@ Installation ============ -gmpy2 requires CPython 3.7 or above. Pre-compiled binary wheels are available +gmpy2 requires CPython 3.8 or above. Pre-compiled binary wheels are available on PyPI. You can install latest release with pip:: pip install gmpy2 diff --git a/pyproject.toml b/pyproject.toml index 7b2176c0..2956a749 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = 'setuptools.build_meta' [project] name = 'gmpy2' version = '2.2.1' -description = 'gmpy2 interface to GMP, MPFR, and MPC for Python 3.7+' +description = 'gmpy2 interface to GMP, MPFR, and MPC for Python 3.8+' keywords = ['gmp', 'mpfr', 'mpc', 'multiple-precision', 'arbitrary-precision', 'precision', 'bignum'] license = {text = 'LGPL-3.0+'} @@ -21,7 +21,6 @@ classifiers = ['Development Status :: 5 - Production/Stable', 'Operating System :: POSIX', 'Programming Language :: C', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', @@ -31,7 +30,7 @@ classifiers = ['Development Status :: 5 - Production/Stable', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Scientific/Engineering :: Mathematics', 'Topic :: Software Development :: Libraries :: Python Modules'] -requires-python = '>=3.7' +requires-python = '>=3.8' [project.readme] file = 'README.rst' diff --git a/src/gmpy2.c b/src/gmpy2.c index 9c02a427..0179a5e8 100644 --- a/src/gmpy2.c +++ b/src/gmpy2.c @@ -161,7 +161,6 @@ static gmpy_global global = { }; /* Support for context manager using context vars. - * Requires Python 3.7 or later. */ static PyObject *current_context_var = NULL; diff --git a/src/gmpy2.h b/src/gmpy2.h index 03a8443d..9195eeb5 100644 --- a/src/gmpy2.h +++ b/src/gmpy2.h @@ -67,8 +67,8 @@ extern "C" { /* Check for minimum Python version requirements. */ -#if PY_VERSION_HEX < 0x03070000 -# error "GMPY2 requires Python 3.7 or later." +#if PY_VERSION_HEX < 0x03080000 +# error "GMPY2 requires Python 3.8 or later." #endif /* Include headers for GMP, MPFR, and MPC. */ diff --git a/src/gmpy2_format.c b/src/gmpy2_format.c index 3c9565eb..fcb447a5 100644 --- a/src/gmpy2_format.c +++ b/src/gmpy2_format.c @@ -721,7 +721,7 @@ GMPy_MPC_Digits_Method(PyObject *self, PyObject *args) } PyDoc_STRVAR(GMPy_doc_context_digits, -"digits(x, base=10, prec=0, /) -> str\n\n" +"digits(x, base=10, prec=0, /) -> str | tuple\n\n" "Return string representing a number x."); static PyObject * diff --git a/src/gmpy2_mpz_misc.c b/src/gmpy2_mpz_misc.c index 88b1e5b2..c3597807 100644 --- a/src/gmpy2_mpz_misc.c +++ b/src/gmpy2_mpz_misc.c @@ -2178,7 +2178,7 @@ GMPy_MPZ_Method_Array(PyObject *self, PyObject *const *args, Py_ssize_t i, nkws = 0; int argidx[2] = {-1, -1}; const char* kwname; - PyObject *dtype = Py_None, *copy = Py_None; + PyObject *dtype = Py_None; if (nargs > 2) { TYPE_ERROR("__array__() takes at most 2 positional arguments"); @@ -2227,9 +2227,6 @@ GMPy_MPZ_Method_Array(PyObject *self, PyObject *const *args, if (argidx[0] >= 0) { dtype = args[argidx[0]]; } - if (argidx[1] >= 0) { - copy = args[argidx[1]]; - } PyObject *mod = PyImport_ImportModule("numpy");