Closed danielhollas closed 1 month ago
@sphuber any idea what this is and why we are only seeing this with 2.5 and not 2.1?
https://github.com/aiidateam/aiida-core/pull/6192
TLDR: warning is correctly emitted by sqlalchemy, but how AiiDA is built it is not of any real consequence. A real solution would have been too complicated so I worked around it to just silence it. See PR and commit message for details
Great, that's a relief, thank you for the info. However, I am confused, based on the linked PR I would think that we shouldn't see these warnings here since they should be filtered out?
You are right to be confused, so was I 😅 The problem is that you are seeing this when running pytest
. This is because pytest
messes with the warning configuration and basically undoes the filtering...
You have to manually filter it again in the pytest ini options, see:
https://github.com/aiidateam/aiida-core/blob/589a3b2c03d44cebd26e88243ca34fcdb0e23ff4/pyproject.toml#L365
I couldn't find a way to have this always respected, so unfortunately all plugins using pytest
for testing have to manually add this ignore rule
Aha, good to know, thank you for explaining. :+1:
Since we started testing AWB with aiida-core 2.5, we now have a ton of warnings coming from sqlalchemy
It's not clear where this is coming from.
Full stack trace
```python ________________________ test_structure_browser_widget _________________________ structure_data_object =