Skip to content

Commit 27d3b26

Browse files
authored
Merge pull request #963 from effigies/ci/39pre
CI: Test on Python 3.9 with numpy nightly wheels
2 parents 7753793 + 986af0b commit 27d3b26

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ env:
1616
- DEPENDS="numpy scipy matplotlib h5py pillow pydicom indexed_gzip"
1717
- INSTALL_TYPE="setup"
1818
- CHECK_TYPE="test"
19-
- EXTRA_WHEELS="https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com"
2019
- NIGHTLY_WHEELS="https://pypi.anaconda.org/scipy-wheels-nightly/simple"
21-
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
22-
- PRE_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --extra-index-url $NIGHTLY_WHEELS"
20+
- PRE_PIP_FLAGS="--pre --extra-index-url $NIGHTLY_WHEELS"
2321

2422
python:
2523
- 3.7
@@ -30,7 +28,7 @@ jobs:
3028
- arch: arm64
3129
python: 3.6
3230
env:
33-
- DEPENDS="numpy"
31+
- DEPENDS="numpy scipy pillow pydicom"
3432
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
3533
# Basic dependencies only
3634
- python: 3.6
@@ -62,6 +60,11 @@ jobs:
6260
- python: 3.8
6361
env:
6462
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
63+
# test 3.9 against pre-release builds of numpy
64+
- python: 3.9
65+
env:
66+
- DEPENDS="numpy"
67+
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
6568
# OSX Python support is basically accidental. Take whatever version we can
6669
# get and test with full dependencies...
6770
- os: osx

nibabel/externals/netcdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class netcdf_file(object):
219219
220220
>>> data = time[:]
221221
>>> data.base.base # doctest: +ELLIPSIS
222-
<mmap.mmap object at 0x...>
222+
<mmap.mmap ...>
223223
224224
If the data is to be processed after the file is closed, it needs
225225
to be copied to main memory:

nibabel/nicom/ascconv.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ def assign2atoms(assign_ast, default_class=int):
8989
target = target.value
9090
prev_target_type = OrderedDict
9191
elif isinstance(target, ast.Subscript):
92-
index = target.slice.value.n
92+
if isinstance(target.slice, ast.Constant): # PY39
93+
index = target.slice.n
94+
else: # PY38
95+
index = target.slice.value.n
9396
atoms.append(Atom(target, prev_target_type, index))
9497
target = target.value
9598
prev_target_type = list

0 commit comments

Comments
 (0)