From fc37eedf16943a967501fb4ec88633534aab107a Mon Sep 17 00:00:00 2001 From: giacomopope Date: Sat, 16 Sep 2023 10:49:47 +0100 Subject: [PATCH 1/7] Bump to version 0.4.5 --- README.md | 1 + bin/build_mingw64_wheel.sh | 4 ++-- doc/source/conf.py | 4 ++-- setup.py | 2 +- src/flint/__init__.py | 2 +- src/flint/test/test.py | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0ef8de85..f3de858c 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ CHANGELOG 0.5.0 - gh-63: The `roots` method of `arb_poly`, and `nmod_poly` is no longer supported. Use `acb_roots(p).roots()` to get the old behaviour of returning the roots as `acb`. Note that the `roots` method of `fmpz_poly` and `fmpq_poly` currently returns the complex roots of the polynomial. +- gh-72: The roots method of `arb_poly` is not supported. Use either the `complex_roots` method or `acb_roots(p).roots()` to get the old behaviour of returning the complex roots. The `roots` method on `fmpz_poly` and `fmpq_poly` now return integer and rational roots respectively. To access complex roots on these types, use the `complex_roots` method. For `acb_poly`, both `roots` and `complex_roots` behave the same. License ------------ diff --git a/bin/build_mingw64_wheel.sh b/bin/build_mingw64_wheel.sh index bcce1b82..80584561 100755 --- a/bin/build_mingw64_wheel.sh +++ b/bin/build_mingw64_wheel.sh @@ -44,7 +44,7 @@ fi PYTHON=$PYTHONDIR/python VER="${PYTHONVER//./}" -WHEELNAME=python_flint-0.4.4-cp$VER-cp$VER-win_amd64.whl +WHEELNAME=python_flint-0.4.5-cp$VER-cp$VER-win_amd64.whl $PYTHON -c 'print("hello world")' @@ -90,7 +90,7 @@ wheel pack python_flint-* cd .. # Make the wheel relocatable -delvewheel repair dist/python_flint-0.4.4-cp$VER-cp$VER-win_amd64.whl \ +delvewheel repair dist/python_flint-0.4.5-cp$VER-cp$VER-win_amd64.whl \ --add-path .local/bin:.local/lib/ # Make a virtual enironment to test the wheel diff --git a/doc/source/conf.py b/doc/source/conf.py index a12026ce..a1e3d619 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -51,9 +51,9 @@ # built documents. # # The short X.Y version. -version = '0.4.4' +version = '0.4.5' # The full version, including alpha/beta/rc tags. -release = '0.4.4' +release = '0.4.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 1972be10..523624a3 100644 --- a/setup.py +++ b/setup.py @@ -128,7 +128,7 @@ description='Bindings for FLINT and Arb', long_description=open('README.md').read(), long_description_content_type='text/markdown', - version='0.4.4', + version='0.4.5', url='https://github.com/flintlib/python-flint', author='Fredrik Johansson', author_email='fredrik.johansson@gmail.com', diff --git a/src/flint/__init__.py b/src/flint/__init__.py index ef3f78e9..c16505d8 100644 --- a/src/flint/__init__.py +++ b/src/flint/__init__.py @@ -25,4 +25,4 @@ from .types.dirichlet import * from .functions.showgood import showgood -__version__ = '0.4.4' +__version__ = '0.4.5' diff --git a/src/flint/test/test.py b/src/flint/test/test.py index 8121d1ed..0a299ff4 100644 --- a/src/flint/test/test.py +++ b/src/flint/test/test.py @@ -30,7 +30,7 @@ def raises(f, exception): def test_pyflint(): - assert flint.__version__ == "0.4.4" + assert flint.__version__ == "0.4.5" ctx = flint.ctx assert str(ctx) == repr(ctx) == _default_ctx_string From c9042d868111b28e612423b0ea18b24d2651f8c6 Mon Sep 17 00:00:00 2001 From: giacomopope Date: Sat, 16 Sep 2023 10:50:43 +0100 Subject: [PATCH 2/7] Remove fmpz_mod from todo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3de858c..ae85cc5f 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ To do ------------------------------------- * Write more tests and add missing docstrings -* Wrap missing flint types: finite fields, p-adic numbers, multiprecision integer mods, rational functions +* Wrap missing flint types: finite fields, p-adic numbers, rational functions * Vector or array types (maybe) * Many convenience methods * Write generic implementations of functions missing for specific FLINT types From 05a2e33ac2618ee36437ace33e94ee1713907ef6 Mon Sep 17 00:00:00 2001 From: giacomopope Date: Sat, 16 Sep 2023 16:33:08 +0100 Subject: [PATCH 3/7] Add more detailed changelog --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae85cc5f..09015921 100644 --- a/README.md +++ b/README.md @@ -125,10 +125,35 @@ To do CHANGELOG ------------- -0.5.0 +0.4.5 + +- gh-83: Introduces the `fmpz_mod` and `fmpz_mod_ctx` types for multi-precision integer mods +- gh-80: Switch from Flint 2.9 to Flint 3.0.0.alpha1 + +0.4.4 + +- gh-78, gh-79: minor fixes for the `nmod` type for compatibility with Sympy +- gh-75, gh-77: finish bulk of the work in refactoring `python-flint` into submodules +- gh-72: The roots method of `arb_poly` is not supported. Use either the `complex_roots` method or `acb_roots(p).roots()` to get the old behaviour of returning the complex roots. The `roots` method on `fmpz_poly` and `fmpq_poly` now return integer and rational roots respectively. To access complex roots on these types, use the `complex_roots` method. For `acb_poly`, both `roots` and `complex_roots` behave the same +- gh-71: Include files in sdist and fix issue gh-70 +- gh-67: Continue refactoring job to introduce submodules into `python-flint` + +0.4.3 - gh-63: The `roots` method of `arb_poly`, and `nmod_poly` is no longer supported. Use `acb_roots(p).roots()` to get the old behaviour of returning the roots as `acb`. Note that the `roots` method of `fmpz_poly` and `fmpq_poly` currently returns the complex roots of the polynomial. -- gh-72: The roots method of `arb_poly` is not supported. Use either the `complex_roots` method or `acb_roots(p).roots()` to get the old behaviour of returning the complex roots. The `roots` method on `fmpz_poly` and `fmpq_poly` now return integer and rational roots respectively. To access complex roots on these types, use the `complex_roots` method. For `acb_poly`, both `roots` and `complex_roots` behave the same. +- gh-61: Start refactoring job to introduce submodules into `python-flint` + +0.4.2 + +- gh-57: Adds manylinux wheels + +0.4.1 + +- gh-47: Removes Linux wheels, updates instructions for building from source. + +0.4.0 + +- gh-45: Adds wheels for Windows, OSX and manylinux but the Linux wheels are broken. License ------------ From fd20135a964881e42090e88a84b58252d2b34fff Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 21 Oct 2023 13:12:21 +0100 Subject: [PATCH 4/7] Bump version to 0.5.0 --- README.md | 56 +++++++++++++++++++++++++++----------- bin/build_mingw64_wheel.sh | 4 +-- doc/source/conf.py | 4 +-- setup.py | 2 +- src/flint/__init__.py | 2 +- src/flint/test/test.py | 2 +- 6 files changed, 47 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 09015921..7d32549d 100644 --- a/README.md +++ b/README.md @@ -28,20 +28,18 @@ Alternatively python-flint can be installed using `conda` conda install -c conda-forge python-flint +Note that currently python-flint does not support Python 3.12 (gh-52). + Build from source ----------------- For other platforms or architectures installation needs to build from source. -First install both FLINT 2.9.0 and Arb 2.23. Note that for python-flint 0.4 -only these *exact* versions of FLINT and Arb will work. While some Linux -distributions may provide FLINT and Arb it is unlikely that they will provide -the exact versions required (e.g. for Ubuntu only Ubuntu 23.04 provides these -versions at the time of writing). +First install FLINT 3.0.0. Note that as of python-flint 0.5.0 only this *exact* +version of FLINT will work. -See here for instructions on building FLINT and Arb: +See here for instructions on building FLINT: * http://flintlib.org/ -* http://arblib.org/ The latest release of Python-FLINT can then be built and installed using: @@ -116,7 +114,8 @@ To do * Vector or array types (maybe) * Many convenience methods * Write generic implementations of functions missing for specific FLINT types -* Proper handling of special values in various places (throwing Python exceptions instead of aborting, etc.) +* Proper handling of special values in various places (throwing Python + exceptions instead of aborting, etc.) * Various automatic conversions * Conversions to and from external types (numpy, sage, sympy, mpmath, gmpy) * Improved printing and string input/output @@ -125,22 +124,46 @@ To do CHANGELOG ------------- -0.4.5 +0.5.0 + +One important change in 0.5.0 is that now python-flint requires Flint 3.0.0 +instead of Flint 2.9 and Arb 2.23 (Arb has now been merged into Flint). + +Important compatibility change: + +- gh-80, gh-94, gh-98: Switch from Flint 2.9 to Flint 3. + +New features: + +- gh-87: Adds `fmpz_mod_poly` type for polynomials over `fmpz_mod`. +- gh-85: Adds discrete logarithms to `fmpz_mod`. +- gh-83: Introduces the `fmpz_mod` type for multi-precision integer mods. + +Bug fixes: -- gh-83: Introduces the `fmpz_mod` and `fmpz_mod_ctx` types for multi-precision integer mods -- gh-80: Switch from Flint 2.9 to Flint 3.0.0.alpha1 +- gh-93: Fixes a bug with `pow(int, int, fmpz)` which previously gave incorrect + results. +- gh-78, gh-79: minor fixes for the `nmod` type. 0.4.4 -- gh-78, gh-79: minor fixes for the `nmod` type for compatibility with Sympy -- gh-75, gh-77: finish bulk of the work in refactoring `python-flint` into submodules -- gh-72: The roots method of `arb_poly` is not supported. Use either the `complex_roots` method or `acb_roots(p).roots()` to get the old behaviour of returning the complex roots. The `roots` method on `fmpz_poly` and `fmpq_poly` now return integer and rational roots respectively. To access complex roots on these types, use the `complex_roots` method. For `acb_poly`, both `roots` and `complex_roots` behave the same +- gh-75, gh-77: finish bulk of the work in refactoring `python-flint` into + submodules +- gh-72: The roots method of `arb_poly` is not supported. Use either the + `complex_roots` method or `acb_roots(p).roots()` to get the old behaviour of + returning the complex roots. The `roots` method on `fmpz_poly` and + `fmpq_poly` now return integer and rational roots respectively. To access + complex roots on these types, use the `complex_roots` method. For `acb_poly`, + both `roots` and `complex_roots` behave the same - gh-71: Include files in sdist and fix issue gh-70 - gh-67: Continue refactoring job to introduce submodules into `python-flint` 0.4.3 -- gh-63: The `roots` method of `arb_poly`, and `nmod_poly` is no longer supported. Use `acb_roots(p).roots()` to get the old behaviour of returning the roots as `acb`. Note that the `roots` method of `fmpz_poly` and `fmpq_poly` currently returns the complex roots of the polynomial. +- gh-63: The `roots` method of `arb_poly`, and `nmod_poly` is no longer + supported. Use `acb_roots(p).roots()` to get the old behaviour of returning + the roots as `acb`. Note that the `roots` method of `fmpz_poly` and + `fmpq_poly` currently returns the complex roots of the polynomial. - gh-61: Start refactoring job to introduce submodules into `python-flint` 0.4.2 @@ -153,7 +176,8 @@ CHANGELOG 0.4.0 -- gh-45: Adds wheels for Windows, OSX and manylinux but the Linux wheels are broken. +- gh-45: Adds wheels for Windows, OSX and manylinux but the Linux wheels are + broken. License ------------ diff --git a/bin/build_mingw64_wheel.sh b/bin/build_mingw64_wheel.sh index 80584561..4b38f59b 100755 --- a/bin/build_mingw64_wheel.sh +++ b/bin/build_mingw64_wheel.sh @@ -44,7 +44,7 @@ fi PYTHON=$PYTHONDIR/python VER="${PYTHONVER//./}" -WHEELNAME=python_flint-0.4.5-cp$VER-cp$VER-win_amd64.whl +WHEELNAME=python_flint-0.5.0-cp$VER-cp$VER-win_amd64.whl $PYTHON -c 'print("hello world")' @@ -90,7 +90,7 @@ wheel pack python_flint-* cd .. # Make the wheel relocatable -delvewheel repair dist/python_flint-0.4.5-cp$VER-cp$VER-win_amd64.whl \ +delvewheel repair dist/python_flint-0.5.0-cp$VER-cp$VER-win_amd64.whl \ --add-path .local/bin:.local/lib/ # Make a virtual enironment to test the wheel diff --git a/doc/source/conf.py b/doc/source/conf.py index a1e3d619..dfcddb90 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -51,9 +51,9 @@ # built documents. # # The short X.Y version. -version = '0.4.5' +version = '0.5.0' # The full version, including alpha/beta/rc tags. -release = '0.4.5' +release = '0.5.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 523624a3..bb4db69f 100644 --- a/setup.py +++ b/setup.py @@ -128,7 +128,7 @@ description='Bindings for FLINT and Arb', long_description=open('README.md').read(), long_description_content_type='text/markdown', - version='0.4.5', + version='0.5.0', url='https://github.com/flintlib/python-flint', author='Fredrik Johansson', author_email='fredrik.johansson@gmail.com', diff --git a/src/flint/__init__.py b/src/flint/__init__.py index c16505d8..0fb5000e 100644 --- a/src/flint/__init__.py +++ b/src/flint/__init__.py @@ -25,4 +25,4 @@ from .types.dirichlet import * from .functions.showgood import showgood -__version__ = '0.4.5' +__version__ = '0.5.0' diff --git a/src/flint/test/test.py b/src/flint/test/test.py index 0a299ff4..dde4f5e7 100644 --- a/src/flint/test/test.py +++ b/src/flint/test/test.py @@ -30,7 +30,7 @@ def raises(f, exception): def test_pyflint(): - assert flint.__version__ == "0.4.5" + assert flint.__version__ == "0.5.0" ctx = flint.ctx assert str(ctx) == repr(ctx) == _default_ctx_string From 2e3e15640c4f821cc6322c295686d14ac2d87145 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 21 Oct 2023 13:16:57 +0100 Subject: [PATCH 5/7] Update pip install CI test --- bin/pip_install_ubuntu.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/pip_install_ubuntu.sh b/bin/pip_install_ubuntu.sh index 49930ade..0ad1ee42 100755 --- a/bin/pip_install_ubuntu.sh +++ b/bin/pip_install_ubuntu.sh @@ -19,12 +19,12 @@ sudo apt-get update sudo apt-get install libgmp-dev libmpfr-dev xz-utils # Only Flint 3 or newer will work. -FLINTVER=3.0.0-alpha1 +FLINTVER=3.0.0 # This will default to installing in /usr/local. If you want to install in a # non-standard location then configure flint with # ./configure --disable-static --prefix=$PREFIX -# If $PREFIX is no in default search paths, then at build time set +# If $PREFIX is not in default search paths, then at build time set # export C_INCLUDE_PATH=$PREFIX/include # and at runtime set # export LD_LIBRARY_PATH=$PREFIX/lib @@ -41,7 +41,7 @@ cd .. ls -l /usr/local/lib sudo ldconfig /usr/local/lib -# Python build requirements. Ideally these would be in pyprojec.toml, but +# Python build requirements. Ideally these would be in pyproject.toml, but # first need to migrate from setup.py to pyproject.toml. pip install 'cython>=3' numpy wheel @@ -49,8 +49,8 @@ pip install 'cython>=3' numpy wheel echo ----------------------------------------------------------- echo echo Running: -echo $ pip install --no-build-isolation $1 +echo $ pip install --no-build-isolation --no-binary $1 echo echo ----------------------------------------------------------- -pip install --no-build-isolation $1 +pip install --no-build-isolation --no-binary $1 From f75f2f6281b94a5878238989df0baadd0f5f7453 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 21 Oct 2023 13:36:13 +0100 Subject: [PATCH 6/7] Use :all: in pip test --- bin/pip_install_ubuntu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/pip_install_ubuntu.sh b/bin/pip_install_ubuntu.sh index 0ad1ee42..649e8904 100755 --- a/bin/pip_install_ubuntu.sh +++ b/bin/pip_install_ubuntu.sh @@ -49,8 +49,8 @@ pip install 'cython>=3' numpy wheel echo ----------------------------------------------------------- echo echo Running: -echo $ pip install --no-build-isolation --no-binary $1 +echo $ pip install --no-binary :all: --no-build-isolation $1 echo echo ----------------------------------------------------------- -pip install --no-build-isolation --no-binary $1 +pip install --no-binary :all: --no-build-isolation $1 From 05f57cdd1717a4665d30543e425785cfcad2aa2b Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 22 Oct 2023 00:15:02 +0100 Subject: [PATCH 7/7] Update README --- README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7d32549d..0448771a 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ Author: Fredrik Johansson Installation ------------ -For Windows (x86-64) or OSX (x86-64 or arm64) or Linux (x86-64 -`manylinux_2_17`) there are binary wheels for python-flint on PyPI. For these -platforms python-flint can be installed simply with `pip` +Currently python-flint supports CPython versions 3.9-3.12. For Windows (x86-64) +or OSX (x86-64 or arm64) or Linux (x86-64 `manylinux_2_17`) there are CPython +binary wheels for python-flint on PyPI. For these platforms python-flint can be +installed simply with `pip` pip install python-flint @@ -28,14 +29,18 @@ Alternatively python-flint can be installed using `conda` conda install -c conda-forge python-flint -Note that currently python-flint does not support Python 3.12 (gh-52). +It is also possible to use python-flint with some PyPy versions. Binary wheels +are not provided for this on PyPI but can be installed with conda. Build from source ----------------- For other platforms or architectures installation needs to build from source. First install FLINT 3.0.0. Note that as of python-flint 0.5.0 only this *exact* -version of FLINT will work. +version of FLINT will work. In future it is hoped that the version requirement +for python-flint will be FLINT >= 3.0.0 but at the time of writing 3.0.0 is the +newest version of FLINT that has only been released recently and is the only +version that is supported by python-flint. See here for instructions on building FLINT: @@ -52,13 +57,13 @@ as follows: pip install 'cython>=3' numpy wheel pip install --no-build-isolation . -A script that builds and installs FLINT, Arb and Python-FLINT that is tested on +A script that builds and installs FLINT and python-flint that is tested on Ubuntu can be found in the git repo here: * https://github.com/flintlib/python-flint/blob/master/bin/pip_install_ubuntu.sh See the documentation for further notes on building and installing -Python-FLINT: +python-flint: * https://fredrikj.net/python-flint/setup.html @@ -126,12 +131,10 @@ CHANGELOG 0.5.0 -One important change in 0.5.0 is that now python-flint requires Flint 3.0.0 -instead of Flint 2.9 and Arb 2.23 (Arb has now been merged into Flint). - -Important compatibility change: +Important compatibility changes: - gh-80, gh-94, gh-98: Switch from Flint 2.9 to Flint 3. +- gh-100: Supports Python 3.12 by using setuptools instead of numpy.distutils. New features: