Skip to content

Please use the warnings library for selfcheck #64

@dsjstc

Description

@dsjstc

On Ubuntu 21.04 (a very common docker environment), the easily available version of libeccodes is version 2.20.0. Any pip-installed version of eccodes-python newer than 1.1.0 gives the following warning at import time:

Warning: ecCodes 2.21.0 or higher is recommended. You are running version 2.20.0

It would be really nice if this warning could be emitted by the warnings library, so it would be possible to catch it if desired, with code like this:

import warnings
with warnings.catch_warnings():
    import eccodes

In the meantime, if I don't want this (practically unaddressable) warning emitted by my script, I see no choice but to revert to pip install eccodes==1.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions