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

Ignore DeprecationWarning from Pandas via cachey #682

Merged

Conversation

padraic-shafer
Copy link
Contributor

Calls to cachey.nbytes() issue a DeprecationWarning because of direct access to the deprecated internals of Pandas.

This PR catches those warnings at the corresponding calls in Tiled's object_cache module. It also shows where this could be limited to just the tests instead.

I favor doing this in the code rather than the tests, but it does add some uncertainty for thread safety.

@padraic-shafer
Copy link
Contributor Author

padraic-shafer commented Mar 7, 2024

This no longer feels like a simple lightweight fix. Given that we might replace object_cache in the near future, maybe we should just filter the warning in the tests to indicate that they are known to be not a problem. Warnings from the code base could be human-ignored rather than python-ignored.

I'm probably overthinking this. What do others suggest?

genematx
genematx approved these changes Mar 15, 2024
@danielballan danielballan merged commit 5aae35a into bluesky:main Mar 15, 2024
8 checks passed
hyperrealist pushed a commit to hyperrealist/tiled that referenced this pull request Mar 18, 2024
* Ignore Pandas DeprecationWarning from cachey.nbytes()

* Ignore Pandas DeprecationWarning in tests?

* Subclass warnings.catch_warnings for backward compatibility

* Make catch_warning_msg a utility; use specialized instance forPandas block warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants