-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
category: bugerrors in the code or code behaviorerrors in the code or code behaviorpriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)
Description
What happened?
When running the pynwb tests with Python 3.14.0rc2+ I get the following warnings:
tests/unit/test_icephys_metadata_tables.py::IntracellularRecordingsTableTests::test_basic_write
tests/unit/test_icephys_metadata_tables.py::IntracellularRecordingsTableTests::test_basic_write
/home/thomas/.venvs/ipfx-3.14-dev/lib/python3.14/site-packages/pynwb/icephys.py:749: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:
df["col"][row_indexer] = value
Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
res[('electrodes', 'electrode')] = [e.object_id for e in res[('electrodes', 'electrode')]]
tests/unit/test_icephys_metadata_tables.py::IntracellularRecordingsTableTests::test_basic_write
tests/unit/test_icephys_metadata_tables.py::IntracellularRecordingsTableTests::test_basic_write
/home/thomas/.venvs/ipfx-3.14-dev/lib/python3.14/site-packages/pynwb/icephys.py:751: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:
df["col"][row_indexer] = value
Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
res[('stimuli', 'stimulus')] = \
tests/unit/test_icephys_metadata_tables.py::IntracellularRecordingsTableTests::test_basic_write
tests/unit/test_icephys_metadata_tables.py::IntracellularRecordingsTableTests::test_basic_write
/home/thomas/.venvs/ipfx-3.14-dev/lib/python3.14/site-packages/pynwb/icephys.py:756: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:
df["col"][row_indexer] = value
Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
res[('responses', 'response')] = \
Steps to Reproduce
pytest tests
Traceback
Operating System
Linux
Python Executable
Python
Python Version
lower version (unsupported)
Package Versions
Code of Conduct
- I agree to follow this project's Code of Conduct
- Have you checked the Contributing document?
- Have you ensured this bug was not already reported?
Copilot
Metadata
Metadata
Assignees
Labels
category: bugerrors in the code or code behaviorerrors in the code or code behaviorpriority: lowalternative solution already working and/or relevant to only specific user(s)alternative solution already working and/or relevant to only specific user(s)