Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated container class has incorrect additional __fields__ #447

Open
5 tasks done
rly opened this issue Nov 2, 2020 · 0 comments · May be fixed by #448
Open
5 tasks done

Generated container class has incorrect additional __fields__ #447

rly opened this issue Nov 2, 2020 · 0 comments · May be fixed by #448
Labels
category: bug errors in the code or code behavior

Comments

@rly
Copy link
Contributor

rly commented Nov 2, 2020

Description

In an extension, if there is a new data type B:
data_type_def: B
data_type_inc: A

And type A has attributes, e.g., 'description', and B does not override those attributes, then those attributes should not be included in the __fields__ generated by get_class. Currently, they are duplicated in the child class. A recent change in HDMF raises an error if this occurs.

This is due to a bug in BaseStorageSpec.resolve_spec where attributes are not correctly removed from the set of new attributes.

The recent change that raises an error should instead raise a warning.

Environment

Python Executable: Conda 
Python Version: Python 3.7
Operating System: Windows
HDMF Version: dev

Checklist

  • Have you ensured the feature or change was not already reported ?
  • Have you included a brief and descriptive title?
  • Have you included a clear description of the problem you are trying to solve?
  • Have you included a minimal code snippet that reproduces the issue you are encountering?
  • Have you checked our Contributing document?
@rly rly added the category: bug errors in the code or code behavior label Nov 2, 2020
@rly rly linked a pull request Nov 2, 2020 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant