Skip to content

Commit 8b76a8b

Browse files
committed
Merge remote-tracking branch 'upstream/main' into HEAD
2 parents f349183 + b2b71f4 commit 8b76a8b

39 files changed

Lines changed: 813 additions & 118 deletions

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "monthly"
12+
groups:
13+
actions:
14+
patterns:
15+
- "*"
16+
update-types:
17+
- "version-update:semver-patch"
18+
- "version-update:semver-minor"

.github/workflows/buildwheel.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-13, macos-14]
13+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, macos-15-intel, macos-14]
1414

1515
steps:
16-
- uses: actions/checkout@v5
16+
- uses: actions/checkout@v6.0.1
1717

18-
- uses: actions/setup-python@v5
18+
- uses: actions/setup-python@v6
1919
with:
2020
python-version: '3.13'
2121

@@ -35,12 +35,12 @@ jobs:
3535
if: ${{ startsWith( matrix.os , 'windows' ) }}
3636

3737
- name: Build wheels
38-
uses: pypa/cibuildwheel@c923d83ad9c1bc00211c5041d0c3f73294ff88f6 # v3.1.4
38+
uses: pypa/cibuildwheel@63fd63b352a9a8bdcc24791c9dbee952ee9a8abc # v3.3.0
3939
env:
4040
# override setting in pyproject.toml to use msys2 instead of msys64 bash
4141
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh
4242

43-
- uses: actions/upload-artifact@v4
43+
- uses: actions/upload-artifact@v5
4444
with:
4545
name: wheels-${{ matrix.os }}
4646
path: wheelhouse/*.whl
@@ -50,17 +50,17 @@ jobs:
5050
runs-on: ubuntu-22.04
5151

5252
steps:
53-
- uses: actions/checkout@v5
53+
- uses: actions/checkout@v6.0.1
5454

55-
- uses: actions/setup-python@v5
55+
- uses: actions/setup-python@v6
5656
with:
5757
python-version: '3.13'
5858

5959
- run: bin/install_latest_flint_ubuntu.sh
6060
- run: pip install build
6161
- run: python -m build --sdist
6262

63-
- uses: actions/upload-artifact@v4
63+
- uses: actions/upload-artifact@v5
6464
with:
6565
name: sdist
6666
path: dist/*.tar.gz
@@ -78,19 +78,19 @@ jobs:
7878
ubuntu-24.04-arm,
7979
windows-2022,
8080
windows-2025,
81-
macos-13,
81+
macos-15-intel,
8282
macos-14,
8383
macos-15,
8484
]
8585
# This list to be kept in sync with python-requires in pyproject.toml.
8686
python-version: ['3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t', 'pypy3.11']
8787

8888
steps:
89-
- uses: actions/setup-python@v5
89+
- uses: actions/setup-python@v6
9090
with:
9191
python-version: ${{ matrix.python-version }}
9292
allow-prereleases: true
93-
- uses: actions/download-artifact@v5
93+
- uses: actions/download-artifact@v7
9494
with:
9595
path: wheelhouse
9696
merge-multiple: true
@@ -115,8 +115,8 @@ jobs:
115115
matrix:
116116
os: [ubuntu-24.04]
117117
steps:
118-
- uses: actions/checkout@v5
119-
- uses: actions/setup-python@v5
118+
- uses: actions/checkout@v6.0.1
119+
- uses: actions/setup-python@v6
120120
with:
121121
python-version: '3.13'
122122
- run: sudo apt-get update
@@ -128,8 +128,8 @@ jobs:
128128
name: Test docs (build and doctest)
129129
runs-on: ubuntu-24.04
130130
steps:
131-
- uses: actions/checkout@v5
132-
- uses: actions/setup-python@v5
131+
- uses: actions/checkout@v6.0.1
132+
- uses: actions/setup-python@v6
133133
with:
134134
python-version: '3.13'
135135
- run: bin/install_latest_flint_ubuntu.sh
@@ -143,8 +143,8 @@ jobs:
143143
name: 'Test old Cython/meson-python'
144144
runs-on: ubuntu-24.04
145145
steps:
146-
- uses: actions/checkout@v5
147-
- uses: actions/setup-python@v5
146+
- uses: actions/checkout@v6.0.1
147+
- uses: actions/setup-python@v6
148148
with:
149149
python-version: '3.13'
150150
- run: sudo apt-get update
@@ -170,8 +170,8 @@ jobs:
170170
# Supported Flint versions:
171171
flint-tag: ['v3.0.1', 'v3.1.3-p1', 'v3.2.2', 'v3.3.1']
172172
steps:
173-
- uses: actions/checkout@v5
174-
- uses: actions/setup-python@v5
173+
- uses: actions/checkout@v6.0.1
174+
- uses: actions/setup-python@v6
175175
with:
176176
python-version: '3.13'
177177
- run: bin/install_flint_ubuntu.sh ${{ matrix.flint-tag }}
@@ -183,8 +183,8 @@ jobs:
183183
name: Test flint main Linux x86-64
184184
runs-on: ubuntu-24.04
185185
steps:
186-
- uses: actions/checkout@v5
187-
- uses: actions/setup-python@v5
186+
- uses: actions/checkout@v6.0.1
187+
- uses: actions/setup-python@v6
188188
with:
189189
python-version: '3.13'
190190
- run: bin/install_flint_ubuntu.sh main
@@ -197,8 +197,8 @@ jobs:
197197
name: Test flint main Linux ARM
198198
runs-on: ubuntu-24.04-arm
199199
steps:
200-
- uses: actions/checkout@v5
201-
- uses: actions/setup-python@v5
200+
- uses: actions/checkout@v6.0.1
201+
- uses: actions/setup-python@v6
202202
with:
203203
python-version: '3.13'
204204
- run: bin/install_flint_ubuntu.sh main
@@ -211,8 +211,8 @@ jobs:
211211
name: Test coverage setuptools build
212212
runs-on: ubuntu-24.04
213213
steps:
214-
- uses: actions/checkout@v5
215-
- uses: actions/setup-python@v5
214+
- uses: actions/checkout@v6.0.1
215+
- uses: actions/setup-python@v6
216216
with:
217217
python-version: '3.13'
218218
- run: sudo apt-get update
@@ -225,8 +225,8 @@ jobs:
225225
name: Test coverage meson build
226226
runs-on: ubuntu-24.04
227227
steps:
228-
- uses: actions/checkout@v5
229-
- uses: actions/setup-python@v5
228+
- uses: actions/checkout@v6.0.1
229+
- uses: actions/setup-python@v6
230230
with:
231231
python-version: '3.12' # does not work with 3.13
232232
- run: sudo apt-get update
@@ -243,8 +243,8 @@ jobs:
243243
matrix:
244244
sympy-version: ['1.13.1', '1.14.0']
245245
steps:
246-
- uses: actions/checkout@v5
247-
- uses: actions/setup-python@v5
246+
- uses: actions/checkout@v6.0.1
247+
- uses: actions/setup-python@v6
248248
with:
249249
python-version: '3.13'
250250
- run: sudo apt-get update
@@ -259,8 +259,8 @@ jobs:
259259
name: Test SymPy master
260260
runs-on: ubuntu-24.04
261261
steps:
262-
- uses: actions/checkout@v5
263-
- uses: actions/setup-python@v5
262+
- uses: actions/checkout@v6.0.1
263+
- uses: actions/setup-python@v6
264264
with:
265265
python-version: '3.13'
266266
- run: sudo apt-get update
@@ -285,7 +285,7 @@ jobs:
285285
steps:
286286
# Downloads all artifacts
287287
- name: Download release artifacts
288-
uses: actions/download-artifact@v5
288+
uses: actions/download-artifact@v7
289289
with:
290290
path: wheelhouse
291291
merge-multiple: true
@@ -318,7 +318,7 @@ jobs:
318318
steps:
319319
# Downloads all artifacts
320320
- name: Download release artifacts
321-
uses: actions/download-artifact@v5
321+
uses: actions/download-artifact@v7
322322
with:
323323
path: wheelhouse
324324
merge-multiple: true
@@ -330,7 +330,7 @@ jobs:
330330
# It is recommended to pin a commit hash here for security but it
331331
# should be kept up to date. Possibly all actions and dependencies used
332332
# by the build script should be pinned...
333-
uses: pypa/gh-action-pypi-publish@fb13cb306901256ace3dab689990e13a5550ffaa # v1.11.0
333+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
334334

335335
# Make a GitHub release
336336

@@ -342,10 +342,10 @@ jobs:
342342
contents: write
343343

344344
steps:
345-
- uses: actions/checkout@v5
345+
- uses: actions/checkout@v6.0.1
346346

347347
- name: Download sdist
348-
uses: actions/download-artifact@v5
348+
uses: actions/download-artifact@v7
349349
with:
350350
name: sdist
351351
path: dist

.github/workflows/ci-emscripten.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
EMSCRIPTEN_VERSION: 4.0.9
2121
NODE_VERSION: 22
2222
steps:
23-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
2424

2525
- name: Set up Python ${{ env.PYTHON_VERSION }}
26-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
26+
uses: actions/setup-python@2e3e4b15a884dc73a63f962bff250a855150a234 # v5.4.0
2727
with:
2828
python-version: ${{ env.PYTHON_VERSION }}
2929

@@ -34,7 +34,7 @@ jobs:
3434
actions-cache-folder: emsdk-cache
3535

3636
- name: Set up Node.js
37-
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
37+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
3838
with:
3939
node-version: ${{ env.NODE_VERSION }}
4040

@@ -45,7 +45,7 @@ jobs:
4545
4646
- name: Restore WASM library directory from cache
4747
id: cache-wasm-library-dir
48-
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
48+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
4949
with:
5050
path: ${{ github.workspace }}/wasm-library-dir
5151
key: wasm-library-dir-${{ hashFiles('bin/pyodide_build_dependencies.sh', 'bin/build_variables.sh') }}-0
@@ -57,13 +57,13 @@ jobs:
5757
run: bin/pyodide_build_dependencies.sh --wasm-library-dir ${{ github.workspace }}/wasm-library-dir
5858

5959
- name: Persist WASM library directory to cache
60-
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
60+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
6161
with:
6262
path: ${{ github.workspace }}/wasm-library-dir
6363
key: wasm-library-dir-${{ hashFiles('bin/pyodide_build_dependencies.sh', 'bin/build_variables.sh') }}-0
6464

6565
- name: Restore python-flint build directory from cache
66-
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
66+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
6767
with:
6868
path: ${{ github.workspace }}/flint_wasm_build
6969
key: flint-wasm-build-${{ hashFiles('**/meson.build', '**/pyproject.toml', '**/setup.py') }}
@@ -87,7 +87,7 @@ jobs:
8787
pyodide build -Cbuild-dir=flint_wasm_build -Csetup-args="-Dflint_version_check=false"
8888
8989
- name: Persist python-flint build directory to cache
90-
uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
90+
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
9191
with:
9292
path: ${{ github.workspace }}/flint_wasm_build
9393
key: flint-wasm-build-${{ hashFiles('**/meson.build', '**/pyproject.toml', '**/setup.py') }}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
matrix:
1010
python-version: ["3.12"]
1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@v6.0.1
1313

1414
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v5
15+
uses: actions/setup-python@v6
1616
with:
1717
python-version: ${{ matrix.python-version }}
1818

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,16 @@ Compatible versions:
144144

145145
| python-flint | Release date | CPython | FLINT | Cython |
146146
|--------------|---------------|-------------|------------|------------------|
147+
| `0.9.0` | ??? | `3.11-3.14` | `3.0-3.3` | `3.1-3.2?` |
147148
| `0.8.0` | 29th Aug 2025 | `3.11-3.14` | `3.0-3.3` | `3.1` only |
148149
| `0.7.0` | 16th Mar 2025 | `3.11-3.13` | `3.0-3.2` | `3.0.11-3.1.0a1` |
149150
| `0.6.0` | 1st Feb 2024 | `3.9-3.12` | `3.0` only | `3.0` only |
150151

151152
The requirement for Cython 3.1 is only for CPython's free-threaded build.
152-
Otherwise Cython 3.0 is fine. As of python-flint 0.7.0, CPython 3.13 [PEP
153+
Otherwise Cython 3.0 is fine. Cython 3.2 is required for a stable ABI build of
154+
python-flint.
155+
156+
As of python-flint 0.7.0, CPython 3.13 [PEP
153157
703](https://peps.python.org/pep-0703/) free-threaded (no-GIL) builds of
154158
python-flint are provided. In the the free-threaded build, mutating matrices or
155159
polynomials from multiple threads can lead to memory corruption. There are some
@@ -167,9 +171,13 @@ Contributors (0.9.0):
167171
- Rémy Oudompheng (RO)
168172
- Agriya Khetarpal (AK)
169173
- Oscar Benjamin (OB)
174+
- Daniel Simmons-Marengo (DSM)
170175

171176
Changes (0.9.0):
172177

178+
- [gh-322](https://github.com/flintlib/python-flint/pull/322),
179+
Add `mul_low` and `pow_trunc` methods to `fmpz_poly`, `fmpq_poly` and
180+
`nmod_poly`. (RO)
173181
- [gh-318](https://github.com/flintlib/python-flint/pull/318),
174182
Add emscripten build in CI. Polynomial factors and roots are
175183
now sorted into a consistent order for `nmod_poly` and
@@ -178,6 +186,12 @@ Changes (0.9.0):
178186
- [gh-312](https://github.com/flintlib/python-flint/pull/312),
179187
Add `discriminant` method to `fmpz_poly`, `fmpq_poly` and
180188
`nmod_poly`. (RO)
189+
- [gh-336](https://github.com/flintlib/python-flint/pull/336),
190+
Fixed a bug in `arb.neg()` which caused it to return its input
191+
without negating it. (DSM)
192+
- [gh-339](https://github.com/flintlib/python-flint/pull/339),
193+
Add `fmpq.__float__` method so that `float(fmpq)` and `complex(fmpq)`
194+
work. (OB)
181195

182196
0.8.0
183197
-----

bin/build_dependencies_unix.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,15 @@ else
273273
echo --------------------------------------------
274274
echo
275275

276-
curl -O https://ftp.gnu.org/gnu/mpfr/mpfr-$MPFRVER.tar.gz
276+
if [ $USE_GMP_GITHUB_MIRROR = "yes" ]; then
277+
if [ ! -d "gmp_mirror" ] ; then
278+
git clone https://github.com/oscarbenjamin/gmp_mirror.git
279+
fi
280+
cp gmp_mirror/mpfr-$MPFRVER.tar.gz .
281+
else
282+
curl -O https://ftp.gnu.org/gnu/mpfr/mpfr-$MPFRVER.tar.gz
283+
fi
284+
277285
tar xf mpfr-$MPFRVER.tar.gz
278286
cd mpfr-$MPFRVER
279287
./configure --prefix=$PREFIX\

bin/coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pip uninstall -y cython
1818
pip install --pre cython # unpinned to pick up new releases in CI
1919
# pip install cython==3.1.0a1 # known working version for Python < 3.13
2020

21-
meson setup build -Dcoverage=true
21+
meson setup build -Dcoverage=true -Dflint_version_check=false
2222
spin run -- coverage run $RC -m flint.test $@
2323
coverage report $RC -m --sort=cover
2424
coverage html $RC

0 commit comments

Comments
 (0)