Skip to content

Commit

Permalink
Merge pull request #1378 from takluyver/rm-file-fid
Browse files Browse the repository at this point in the history
Remove deprecated File.fid attribute
  • Loading branch information
aragilar committed Oct 6, 2019
2 parents 0eb30bc + 146d60e commit 3a0155d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
8 changes: 0 additions & 8 deletions h5py/_hl/files.py
Expand Up @@ -242,14 +242,6 @@ def mode(self):
return {h5f.ACC_RDONLY: 'r',
h5f.ACC_RDWR: 'r+'}.get(self.id.get_intent())

@property
@with_phil
def fid(self):
"""File ID (backwards compatibility) """
warn("File.fid has been deprecated. "
"Use File.id instead.", H5pyDeprecationWarning, stacklevel=2)
return self.id

@property
@with_phil
def libver(self):
Expand Down
13 changes: 0 additions & 13 deletions h5py/tests/test_file.py
Expand Up @@ -641,19 +641,6 @@ def test_filename(self):
fid.close()


class TestBackwardsCompat(TestCase):

"""
Feature: Deprecated attributes are included to support 1.3 code
"""

def test_fid(self):
""" File objects provide a .fid attribute aliased to the file ID """
with pytest.warns(H5pyDeprecationWarning):
with File(self.mktemp(), 'w') as hfile:
self.assertIs(hfile.fid, hfile.id)


class TestCloseInvalidatesOpenObjectIDs(TestCase):

"""
Expand Down
29 changes: 29 additions & 0 deletions news/rm-file-fid.rst
@@ -0,0 +1,29 @@
New features
------------

* <news item>

Deprecations
------------

* Removed deprecated File.fid attribute. Use File.id instead.

Exposing HDF5 functions
-----------------------

* <news item>

Bug fixes
---------

* <news item>

Building h5py
-------------

* <news item>

Development
-----------

* <news item>

0 comments on commit 3a0155d

Please sign in to comment.