Repository: fplll/fpylll (language: python)

Issue:
Python 3.12
No more `setuptools` or `distutils` apparently, and we need to rewrite our `setup.py` :(

```
Traceback (most recent call last):
  File "/home/runner/work/fpylll/fpylll/setup.py", line 25, in <module>
    from setuptools.command.build_ext import build_ext as _build_ext
ModuleNotFoundError: No module named 'setuptools'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/fpylll/fpylll/setup.py", line 30, in <module>
    from distutils.command.build_ext import build_ext as _build_ext
ModuleNotFoundError: No module named 'distutils'
```

https://github.com/fplll/fpylll/actions/runs/6530587177/job/17730158655


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml
index 1474a499..73d3fbfe 100644
--- a/.github/workflows/sdist.yml
+++ b/.github/workflows/sdist.yml
@@ -15,7 +15,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ["3.10", "3.11"]
+        python-version: ["3.10", "3.11", "3.12"]
         have_qd: [yes, no]
         have_numpy: [yes, no]
 
diff --git a/README.rst b/README.rst
index 4d783715..b092edaa 100644
--- a/README.rst
+++ b/README.rst
@@ -296,7 +296,7 @@ from the top-level directory which runs all tests in ``tests/test_*.py``. We run
 
     $ (fpylll) flake8 --max-line-length=120 --max-complexity=16 --ignore=E22,E241 src
 
-Note that **fpylll** supports Python 3. In particular, tests are run using Python 3.8, 3.9 and 3.10. See `.tests.yml <https://github.com/fplll/fpylll/blob/master/.github/workflows/tests.yml>`_ for details on automated testing.
+Note that **fpylll** supports Python 3. In particular, tests are run using Python 3.10, 3.11 and 3.12. See `.tests.yml <https://github.com/fplll/fpylll/blob/master/.github/workflows/tests.yml>`_ for details on automated testing.
 
 
 Attribution & License
diff --git a/docs/example-gauss-circle-problem.rst b/docs/example-gauss-circle-problem.rst
index 94570cac..2915524b 100644
--- a/docs/example-gauss-circle-problem.rst
+++ b/docs/example-gauss-circle-problem.rst
@@ -59,13 +59,11 @@ The parameter `nr_solutions` is by default `1.` If we set say, `{\rm{nr\_solutio
   >>> from fpylll.fplll.gso import MatGSO
   >>> from fpylll.fplll.integer_matrix import IntegerMatrix
   >>> from fpylll import Enumeration, EvaluatorStrategy
-  >>> import numpy as np
+  >>> from math import pi, ceil, sqrt
   >>> def n(radius):
   ...   dim = 2
-  ...   pi = np.pi
-  ...   nr = np.ceil(pi*radius**2 + 2*np.sqrt(2)*pi*radius)
-  ...   B = np.matlib.identity(dim)
-  ...   A = npmat2fpmat(B)   #define the latttice Z^dim
+  ...   nr = ceil(pi*radius**2 + 2*sqrt(2)*pi*radius)
+  ...   A = IntegerMatrix.idenity(dim) 
   ...   M = MatGSO(A)
   ...   _ = M.update_gso()
   ...   enum = Enumeration(M,nr_solutions = nr)
diff --git a/docs/tutorial.rst b/docs/tutorial.rst
index 487c6e59..486d5534 100644
--- a/docs/tutorial.rst
+++ b/docs/tutorial.rst
@@ -195,8 +195,6 @@ To compute the norm of a shortest vector of the lattice generated by the rows of
 ::
 
     >>> from fpylll import SVP
-    >>> from numpy import linalg as LA
-    >>> import numpy as np
     >>> SVP.shortest_vector(A)
     (2, -2, 7, 4, -1)
     >>> print(A[0])
diff --git a/requirements.txt b/requirements.txt
index 245665d7..f1ab6537 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
+setuptools
 Cython>=3.0
 pytest
 cysignals
diff --git a/src/fpylll/fplll/bkz_param.pyx b/src/fpylll/fplll/bkz_param.pyx
index c7205dd1..da3c1827 100644
--- a/src/fpylll/fplll/bkz_param.pyx
+++ b/src/fpylll/fplll/bkz_param.pyx
@@ -96,7 +96,7 @@ cdef class Strategy:
 
             >>> from fpylll import load_strategies_json, BKZ
             >>> print(load_strategies_json(BKZ.DEFAULT_STRATEGY)[50].dict()) # doctest: +ELLIPSIS
-            OrderedDict([('block_size', 50), ('preprocessing_block_sizes', (26,)), ('pruning_parameters', ...)])
+            OrderedDict...
             >>> print(load_strategies_json(BKZ.DEFAULT_STRATEGY)[50])
             Strategy< 50, (26), 0.52-0.55, {}>
 


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 789ef319..d32dcb76 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -16,7 +16,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ["3.10", "3.11"]
+        python-version: ["3.10", "3.11", "3.12"]
         have_qd: [yes, no]
         have_ld: [yes, no]
         have_numpy: [yes, no]