Revert breaking change of TypeMap.get_container_cls
function header
#590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
#555 introduced a breaking change in the function header for
TypeMap.get_container_cls
, where the namespace and data_type arguments were swapped and namespace was made optional. Initially, this was thought to be OK for a minor release because this undocumented function is used internally within HDMF and externally only bypynwb.get_class
. Given the tight relationship between our development of HDMF and PyNWB, we thought we would simply update PyNWB to address this breaking change. Although we are doing that, the versions of HDMF (>=2.1.0, <3) allowed by the current release of PyNWB (1.4.0) rely on the fact that all releases of HDMF up to version 3 would be compatible with this release of PyNWB. In other words, dependency versioning in PyNWB relies on the policy that breaking changes would occur only in major version bumps. Since that policy was not followed strictly, now PyNWB 1.4.0 is broken for all versions of HDMF 2.5.0 and up and users would not know that when they update HDMF but not PyNWB.Proposed solution (this PR): Effectively revert these breaking changes for now and re-add them for the next major release. These breaking changes are not critical and we can add the new function as
get_dt_container_cls
before changing or removing the oldget_container_cls
. Make a new bugfix release 2.5.1 and perhaps remove 2.5.0 from PyPI and conda-forge.See also #580 and AllenInstitute/AllenSDK#2098 .
Checklist
flake8
from the source directory.