[Python] UV showing warning of incorrect Python version

Discussão em 'Python' iniciado por Stack, Abril 1, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using uv to manage my Python version and dependencies in a project I'm working on.

    When I run uv run pytest to test said project I get the following:

    ============================================================================= test session starts =============================================================================
    platform darwin -- Python 3.12.5, pytest-8.3.3, pluggy-1.5.0
    ...
    (test output)
    ...
    ============================================================================== warnings summary ===============================================================================
    ../../../../../usr/local/lib/python3.9/site-packages/certifi/core.py:36
    /usr/local/lib/python3.9/site-packages/certifi/core.py:36: DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    _CACERT_CTX = get_path("certifi", "cacert.pem")

    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html


    I don't understand what's going on.

    First it says it's using Python3.12.5 which is the version I specified for this project, but then the warning is coming from Python3.9 ?

    How can I get rid of this message?

    Continue reading...

Compartilhe esta Página