Skip to content

Commit 077ffda

Browse files
committed
MNT: Remove ArrayProxy.header reference, deprecated in 2.2, expired in 3.0
1 parent b8848fa commit 077ffda

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

nibabel/arrayproxy.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import numpy as np
3232

33-
from .deprecated import deprecate_with_version
3433
from .volumeutils import array_from_file, apply_read_scaling
3534
from .fileslice import fileslice, canonical_slicers
3635
from . import openers
@@ -90,7 +89,6 @@ class ArrayProxy(object):
9089
"""
9190
# Assume Fortran array memory layout
9291
order = 'F'
93-
_header = None
9492

9593
def __init__(self, file_like, spec, *, mmap=True, keep_file_open=None):
9694
"""Initialize array proxy instance
@@ -146,8 +144,6 @@ def __init__(self, file_like, spec, *, mmap=True, keep_file_open=None):
146144
spec.get_data_offset(),
147145
1. if slope is None else slope,
148146
0. if inter is None else inter)
149-
# Reference to original header; we will remove this soon
150-
self._header = spec.copy()
151147
elif 2 <= len(spec) <= 5:
152148
optional = (0, 1., 0.)
153149
par = spec + optional[len(spec) - 2:]
@@ -269,11 +265,6 @@ def _should_keep_file_open(self, file_like, keep_file_open):
269265
persist_opener = keep_file_open or have_igzip
270266
return keep_file_open, persist_opener
271267

272-
@property
273-
@deprecate_with_version('ArrayProxy.header deprecated', '2.2', '3.0')
274-
def header(self):
275-
return self._header
276-
277268
@property
278269
def shape(self):
279270
return self._shape

nibabel/tests/test_proxy_api.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,6 @@ def validate_slope_inter_offset(self, pmaker, params):
323323
with pytest.raises(AttributeError):
324324
setattr(prox, attr_name, expected)
325325

326-
def validate_deprecated_header(self, pmaker, params):
327-
prox, fio, hdr = pmaker()
328-
with pytest.raises(ExpiredDeprecationError):
329-
prox.header
330-
331326

332327
class TestSpm99AnalyzeProxyAPI(TestAnalyzeProxyAPI):
333328
# SPM-type analyze has slope scaling but not intercept

nibabel/tests/test_removalschedule.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
("nibabel.filebasedimages", "FileBasedImage", "filespec_to_files"),
2828
("nibabel.filebasedimages", "FileBasedImage", "to_filespec"),
2929
("nibabel.filebasedimages", "FileBasedImage", "to_files"),
30-
("nibabel.filebasedimages", "FileBasedImage", "from_files")]),
30+
("nibabel.filebasedimages", "FileBasedImage", "from_files"),
31+
("nibabel.arrayproxy", "ArrayProxy", "header")]),
3132
# Verify that the test will be quiet if the schedule outlives the modules
3233
("1.0.0", [("nibabel.nosuchmod", "anyobj", "anyattr"),
3334
("nibabel.nifti1", "nosuchobj", "anyattr"),

0 commit comments

Comments
 (0)