Skip to content

Commit f439973

Browse files
committed
Remove numpy<2 and setuptools<=75.8.2 pins
numpy 2.x is now supported; Brian2 has fixed the distutils._msvccompiler import issue that required capping setuptools (the setuptools constraint was added in commit 68324d3 to work around a Brian2 codegen crash on Windows).
1 parent 88d009f commit f439973

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/full-test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
python-version: ["3.9", "3.10", "3.12"]
2020
os: ["ubuntu-latest", "windows-latest"]
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v6
2323
- uses: mpi4py/setup-mpi@v1
2424
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v5
25+
uses: actions/setup-python@v6
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install Linux system dependencies
@@ -32,14 +32,14 @@ jobs:
3232
- name: Install basic Python dependencies
3333
run: |
3434
python -m pip install --upgrade pip
35-
python -m pip install pytest pytest-cov coveralls flake8 "setuptools<=75.8.2" "numpy<2"
35+
python -m pip install pytest pytest-cov coveralls flake8
3636
- name: Install Brian 2
3737
run: |
38-
python -m pip install brian2 "numpy<2"
38+
python -m pip install brian2
3939
- name: Install NEURON
4040
if: startsWith(matrix.os, 'ubuntu')
4141
run: |
42-
python -m pip install "neuron>=9.0.0" "numpy<2"
42+
python -m pip install "neuron>=9.0.0"
4343
python -m pip install "nrnutils>0.2.0"
4444
- name: Install NEST
4545
if: startsWith(matrix.os, 'ubuntu')
@@ -53,10 +53,10 @@ jobs:
5353
- name: Install Arbor
5454
if: startsWith(matrix.os, 'ubuntu')
5555
run: |
56-
python -m pip install arbor==0.9.0 libNeuroML "numpy<2"
56+
python -m pip install arbor==0.9.0 libNeuroML
5757
- name: Install PyNN itself
5858
run: |
59-
python -m pip install -e ".[test]" "numpy<2"
59+
python -m pip install -e ".[test]"
6060
- name: Test installation has worked (Ubuntu)
6161
# this is needed because the PyNN tests are just skipped if the simulator
6262
# fails to install, so we need to catch import failures separately

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ $(NEST_STAMP): $(NEST_VENV_STAMP) $(NEST_SRC_UNPACKED)
9797
$(CURDIR)/pyNN/nest/extensions
9898
cd $(NEST_BUILD_DIR)/pynn_extensions && make install
9999
$(NEST_PIP) install \
100-
"numpy<2" "neuron>=9.0.0" nrnutils "arbor==0.9.0" \
100+
"neuron>=9.0.0" nrnutils "arbor==0.9.0" \
101101
brian2 libNeuroML scipy matplotlib Cheetah3 h5py Jinja2 \
102102
pytest pytest-xdist pytest-cov flake8
103103
$(NEST_PIP) install -e .

pyNN/brian2/projections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _set(self, attr_name, value):
4949
1,), schema=self.projection.synapse_type.get_schema())
5050
native_ps = self.projection.synapse_type.translate(ps)
5151
native_ps.evaluate()
52-
getattr(self._syn_obj, attr_name)[self.index] = native_ps[attr_name]
52+
getattr(self._syn_obj, attr_name)[self.index] = native_ps[attr_name][0]
5353

5454
def _set_weight(self, w):
5555
self._set("weight", w)

test/environment-nest3.9.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- python=3.12
2323
- nest-simulator=3.9
2424
- brian2
25-
- numpy<2
25+
- numpy
2626
- scipy
2727
- matplotlib
2828
- mpi4py

0 commit comments

Comments
 (0)