diff --git a/.github/workflows/c_actions.yml b/.github/workflows/c_actions.yml index 9a24941bdc..bdf13de1f6 100644 --- a/.github/workflows/c_actions.yml +++ b/.github/workflows/c_actions.yml @@ -29,11 +29,11 @@ jobs: with: repository: SpiNNakerManchester/SupportScripts path: support - - name: Set up Python 3.8 + - name: Set up Python 3.12 # Note: Python is needed for spinn_utilities.make_tools when building uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.12 - name: Install Ubuntu dependencies uses: ./support/actions/apt-get-install with: diff --git a/.github/workflows/python_actions.yml b/.github/workflows/python_actions.yml index 60b8fb67f4..e71eff045d 100644 --- a/.github/workflows/python_actions.yml +++ b/.github/workflows/python_actions.yml @@ -30,7 +30,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - name: Checkout @@ -78,7 +78,7 @@ jobs: uses: ./support/actions/pytest with: tests: unittests - coverage: ${{ matrix.python-version == 3.8 }} + coverage: ${{ matrix.python-version == 3.12 }} cover-packages: ${{ env.BASE_PKG }} coveralls-token: ${{ secrets.GITHUB_TOKEN }} @@ -99,7 +99,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8"] + python-version: [3.12] steps: - name: Checkout uses: actions/checkout@v4 @@ -144,7 +144,7 @@ jobs: with: base-path: ${{ env.BASE_PKG }} - - name: Build documentation with sphinx (3.8 only) + - name: Build documentation with sphinx (3.12 only) uses: ./support/actions/sphinx with: directory: doc/source diff --git a/doc/source/conf.py b/doc/source/conf.py index f01eed8930..7119f34e0c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -58,7 +58,7 @@ spinnaker_doc_version = "latest" intersphinx_mapping = { - 'python': ('https://docs.python.org/3.8', None), + 'python': ('https://docs.python.org/3.12', None), 'numpy': ("https://numpy.org/doc/1.20/", None), 'matplotlib': ('https://matplotlib.org', None), 'pynn': ("https://neuralensemble.github.io/docs/PyNN/", None), diff --git a/setup.cfg b/setup.cfg index 1f551380a8..10233fa2f6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,11 +30,11 @@ classifiers = Operating System :: Microsoft :: Windows Operating System :: MacOS Programming Language :: Python :: 3 - 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 + Programming Language :: Python :: 3.12 maintainer = SpiNNakerTeam maintainer_email = spinnakerusers@googlegroups.com keywords = @@ -42,7 +42,7 @@ keywords = pynn [options] -python_requires = >=3.7, <4 +python_requires = >=3.8, <4 packages = find: zip_safe = True include_package_data = True @@ -51,13 +51,9 @@ install_requires = matplotlib pyparsing>=2.2.1,<3.0.0 quantities - pynn >= 0.11, != 0.12.0; python_version >= '3.8' - neo; python_version >= '3.8' - lazyarray; python_version >= '3.8' - # python 3.7 is no longer officially supported - pynn >= 0.9.1, < 0.10.0; python_version == '3.7' - neo >= 0.5.2, < 0.10.0; python_version == '3.7' - lazyarray >= 0.2.9, <= 0.4.0; python_version == '3.7' + pynn >= 0.11, != 0.12.0 + neo + lazyarray # below may fail for read the docs scipy csa diff --git a/setup.py b/setup.py index bb8feb390a..3592e5ffd8 100644 --- a/setup.py +++ b/setup.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import distutils.dir_util from setuptools import setup +import shutil import os import sys @@ -26,8 +26,8 @@ this_dir = os.path.dirname(os.path.abspath(__file__)) build_dir = os.path.join(this_dir, "build") if os.path.isdir(build_dir): - distutils.dir_util.remove_tree(build_dir) + shutil.rmtree(build_dir) egg_dir = os.path.join(this_dir, "sPyNNaker.egg-info") if os.path.isdir(egg_dir): - distutils.dir_util.remove_tree(egg_dir) + shutil.rmtree(egg_dir) setup() diff --git a/spynnaker/pyNN/models/neural_projections/connectors/pool_dense_connector.py b/spynnaker/pyNN/models/neural_projections/connectors/pool_dense_connector.py index 7e1af06728..286d0c54d3 100644 --- a/spynnaker/pyNN/models/neural_projections/connectors/pool_dense_connector.py +++ b/spynnaker/pyNN/models/neural_projections/connectors/pool_dense_connector.py @@ -15,13 +15,13 @@ # limitations under the License. from __future__ import annotations -from collections.abc import Iterable +from collections.abc import Iterable, Sized import numpy from numpy import integer, floating, float64, uint16, uint32 from numpy.typing import ArrayLike, NDArray from pyNN.random import RandomDistribution from typing import ( - Optional, Tuple, Union, cast, TYPE_CHECKING, Sized) + Optional, Tuple, Union, cast, TYPE_CHECKING) from spinn_utilities.overrides import overrides from pacman.model.graphs.common import Slice from spinn_front_end_common.utilities.constants import ( diff --git a/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py b/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py index 7854a52970..b7d5409edc 100644 --- a/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py +++ b/spynnaker/pyNN/models/spike_source/spike_source_poisson_machine_vertex.py @@ -12,12 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. from __future__ import annotations +from collections.abc import Sized from enum import IntEnum import numpy from numpy import uint16, uint32 import struct from typing import ( - Iterable, List, Optional, Sequence, Sized, TypeVar, Union, + Iterable, List, Optional, Sequence, TypeVar, Union, cast, TYPE_CHECKING) from spinn_utilities.overrides import overrides diff --git a/spynnaker/pyNN/models/spike_source/spike_source_poisson_vertex.py b/spynnaker/pyNN/models/spike_source/spike_source_poisson_vertex.py index 7180edb9a4..8216acf70a 100644 --- a/spynnaker/pyNN/models/spike_source/spike_source_poisson_vertex.py +++ b/spynnaker/pyNN/models/spike_source/spike_source_poisson_vertex.py @@ -13,10 +13,11 @@ # limitations under the License. from __future__ import annotations from collections.abc import Sequence as Seq +from collections.abc import Sized import logging import math from typing import ( - Any, Collection, Dict, List, Optional, Sequence, Sized, Tuple, Union, + Any, Collection, Dict, List, Optional, Sequence, Tuple, Union, cast, TYPE_CHECKING) from typing_extensions import TypeGuard import numpy diff --git a/spynnaker/pyNN/setup_pynn.py b/spynnaker/pyNN/setup_pynn.py index a60dcfff9d..58a0f1d256 100644 --- a/spynnaker/pyNN/setup_pynn.py +++ b/spynnaker/pyNN/setup_pynn.py @@ -22,7 +22,7 @@ import os # TODO: switch to packaging.version -from distutils.version import StrictVersion as Version # pylint: disable=all +from packaging.version import Version import pyNN # The version of PyNN that we really want