Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Please remove FutureWarning when importing uproot3 (for now) #533

Closed
HDembinski opened this issue Feb 4, 2021 · 2 comments
Closed

Please remove FutureWarning when importing uproot3 (for now) #533

HDembinski opened this issue Feb 4, 2021 · 2 comments

Comments

@HDembinski
Copy link
Member

HDembinski commented Feb 4, 2021

uproot3 raises a Warning when you import it, please remove this warning.

Currently there is no way to drop uproot3, because uproot4 cannot write files. Since it is impossible to port all code to uproot4, it is safe to assume that a user who does import uproot3 does so intentionally. It then does not make sense to warn that user that this package is deprecated.

I suggest to hold back on the warning until uproot4 can really replace uproot3 completely. Then reinstate it.

@tamasgal
Copy link
Contributor

tamasgal commented Feb 4, 2021

Just a side-note, meanwhile you can go with the snippet below, but I also think that import uproot3 is intentional enough :)

import warnings
with warnings.catch_warnings():
    warnings.simplefilter("ignore", category=FutureWarning)
    import uproot3

Edit: btw. I also added a filter for DeprecationWarning which is shown from uproot3 while it's importing awkward0...

@jpivarski
Copy link
Member

Okay, you've convinced me. I think those warnings were put there before the name change, encouraging people to opt into the new versions when it still had to be done intentionally (and then the names were changed in the warning message without removing the warning message). But it does make sense that if someone has gone out of their way to pip install uproot3 and then import uproot3, they know about the existence of Uproot 4.

There are new versions of uproot3 and awkward0 in PyPI without warnings (uproot3-methods didn't have a warning).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants