Skip to content

Commit

Permalink
Drop support for python 3.6
Browse files Browse the repository at this point in the history
Add support for python 3.9/3.10
  • Loading branch information
drasmuss committed May 2, 2022
1 parent d34e3e4 commit dee0423
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
strategy:
matrix:
include:
- python_version: 3.7
- python_version: "3.9"
numpy_version: numpy
tf_version: tensorflow
nengo_version: nengo[tests]
- python_version: 3.8
- python_version: "3.10"
numpy_version: numpy
tf_version: tensorflow --pre
nengo_version: git+https://github.com/nengo/nengo.git#egg=nengo[tests]
- python_version: 3.6
- python_version: "3.7"
numpy_version: numpy==1.16.0
tf_version: tensorflow==2.2.0
nengo_version: nengo[tests]==3.0.0
Expand All @@ -32,5 +32,5 @@ jobs:
pip freeze
- name: Run tests
run: |
pytest -n 2 -v --durations 20 nengo_dl
pytest -n 2 -v --durations 20 --pyargs nengo
pytest -v -n 2 --color=yes --durations 20 nengo_dl
pytest -v -n 2 --color=yes --durations 20 --pyargs nengo
16 changes: 10 additions & 6 deletions .nengobones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ description: Deep learning integration for Nengo
copyright_start: 2015
license: abr-free

min_python: "3.7"

license_rst: {}

contributing_rst: {}
Expand Down Expand Up @@ -238,7 +240,7 @@ ci_scripts:
- template: deploy

travis_yml:
python: 3.7
python: "3.9"
global_vars:
NUMPY_VERSION: numpy>=1.16.0
TF_VERSION: tensorflow
Expand All @@ -253,18 +255,19 @@ travis_yml:
NENGO_VERSION: git+https://github.com/nengo/nengo.git#egg=nengo[tests]
TF_VERSION: tensorflow<2.3.0
NUMPY_VERSION: numpy<1.20.0
python: "3.8"
- script: test-coverage
env:
NENGO_VERSION: git+https://github.com/nengo/nengo.git#egg=nengo[tests]
SCIPY_VERSION: scipy
dist: bionic
python: 3.8
python: "3.10"
- script: test-coverage
env:
NENGO_VERSION: nengo[tests]==3.0.0
TF_VERSION: tensorflow==2.2.0
NUMPY_VERSION: numpy==1.16.0
python: 3.6
python: "3.7"
- script: test-coverage
test_args: --graph-mode
- stage: advanced
Expand Down Expand Up @@ -323,9 +326,10 @@ setup_py:
- "Operating System :: Microsoft :: Windows"
- "Operating System :: POSIX :: Linux"
- "Programming Language :: Python"
- "Programming Language :: Python :: 3.6"
- "Programming Language :: Python :: 3.7"
- "Programming Language :: Python :: 3.8"
- "Programming Language :: Python :: 3.9"
- "Programming Language :: Python :: 3.10"
- "Topic :: Scientific/Engineering"
- "Topic :: Scientific/Engineering :: Artificial Intelligence"

Expand All @@ -339,6 +343,6 @@ pre_commit_config_yaml:

version_py:
major: 3
minor: 4
patch: 5
minor: 5
patch: 0
release: false
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Automatically generated by nengo-bones, do not edit this file directly

language: python
python: 3.7
python: 3.9
notifications:
email:
on_success: change
Expand Down Expand Up @@ -42,20 +42,21 @@ jobs:
TF_VERSION="tensorflow<2.3.0"
NUMPY_VERSION="numpy<1.20.0"
SCRIPT="remote-test"
python: 3.8
-
env:
NENGO_VERSION="git+https://github.com/nengo/nengo.git#egg=nengo[tests]"
SCIPY_VERSION="scipy"
SCRIPT="test-coverage"
dist: bionic
python: 3.8
python: 3.10
-
env:
NENGO_VERSION="nengo[tests]==3.0.0"
TF_VERSION="tensorflow==2.2.0"
NUMPY_VERSION="numpy==1.16.0"
SCRIPT="test-coverage"
python: 3.6
python: 3.7
-
env:
SCRIPT="test-coverage"
Expand Down
12 changes: 11 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@ Release history
- Deprecated
- Removed
3.4.5 (unreleased)
3.5.0 (unreleased)
------------------

*Compatible with Nengo 3.0 - 3.2*

*Compatible with TensorFlow 2.2 - 2.9*

**Added**

- Added support for Python 3.9/3.10. (`#224`_)

**Removed**

- Dropped support for Python 3.6. (`#224`_)

.. _#224: https://github.com/nengo/nengo-dl/pull/224

3.4.4 (February 10, 2022)
-------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ That's it!

Requirements
------------
NengoDL works with Python 3.6 or later. ``pip`` will do its best to install
NengoDL works with Python 3.7 or later. ``pip`` will do its best to install
all of NengoDL's requirements when it installs NengoDL. However, if anything
goes wrong during this process you can install the requirements manually and
then try to ``pip install nengo-dl`` again.
Expand Down
3 changes: 1 addition & 2 deletions nengo_dl/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ def get_effective_source_map(self):

# Nengo compatibility

# TODO: change to `>= version.parse(3.2.0)` once NengoCore 3.2.0 is released
HAS_NENGO_3_2_0 = version.parse(nengo.__version__) > version.parse("3.1.0")
HAS_NENGO_3_2_0 = version.parse(nengo.__version__) >= version.parse("3.2.0")
HAS_NENGO_3_1_0 = version.parse(nengo.__version__) >= version.parse("3.1.0")

if HAS_NENGO_3_2_0: # pragma: no cover
Expand Down
3 changes: 0 additions & 3 deletions nengo_dl/tests/test_tensor_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,6 @@ class MyOp(dummies.Op): # pylint: disable=abstract-method
tensor_graph.TensorGraph(model, None, None, None, None, None, None)


@pytest.mark.skipif(
sys.version_info < (3, 6, 0), reason="order is not deterministic in python<3.6"
)
@pytest.mark.parametrize(
"planner", ("greedy_planner", "tree_planner", "transitive_planner", "noop_planner")
)
Expand Down
2 changes: 1 addition & 1 deletion nengo_dl/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
a release version. Release versions are git tagged with the version.
"""

version_info = (3, 4, 5)
version_info = (3, 5, 0)

name = "nengo-dl"
dev = 0
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
requires = ["setuptools", "wheel"]

[tool.black]
target-version = ['py36']
target-version = ['py37']
exclude = '''
(
'*/whitepaper2018_code.py'
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def read(*filenames, **kwargs):
"optional": optional_req,
"tests": tests_req,
},
python_requires=">=3.6",
python_requires=">=3.7",
entry_points={
"nengo.backends": [
"dl = nengo_dl:Simulator",
Expand All @@ -136,9 +136,10 @@ def read(*filenames, **kwargs):
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
Expand Down

0 comments on commit dee0423

Please sign in to comment.