Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3.12 #1429

Merged
merged 5 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}

Expand All @@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
python-version: [3.12]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -143,7 +143,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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
14 changes: 5 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ 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 =
spinnaker
pynn

[options]
python_requires = >=3.7, <4
python_requires = >=3.8, <4
packages = find:
zip_safe = True
include_package_data = True
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spynnaker/pyNN/setup_pynn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down