Back to Dagger

V0.13.0

sdk/python/.changes/v0.13.0.md

0.20.71.9 KB
Original Source

sdk/python/v0.13.0 - 2024-09-11

This SDK uses šŸš™ Engine + šŸš— CLI version v0.13.0. See what changed in that release.

šŸ https://pypi.org/project/dagger-io/v0.13.0/ šŸ“– https://dagger-io.readthedocs.io/en/sdk-python-v0.13.0/

Changed

  • Use uv.lock by default in new Dagger Modules by @helderco in https://github.com/dagger/dagger/pull/8311
    Simpler workflow with uv:

    dagger init --sdk=python my-module
    cd my-module
    uv run vim .
    

    To replace uv.lock with requirements.lock:

    uv export --no-dev --no-emit-workspace --no-emit-package=dagger-io -o requirements.lock
    uv remove dagger-io
    rm uv.lock
    

    To migrate an existing module to uv.lock:

    dagger develop
    uv add --editable ./sdk
    uv run vim .
    

    If both files exist, uv.lock will take precedence.

  • Modules run in Python 3.12 by default by @helderco in https://github.com/dagger/dagger/pull/8311
    To pin to Python 3.11 in a module, either change requires-python = ">=3.11" in pyproject.toml or create a .python-version file with 3.11 as the content.

Fixed

  • Fix adding documentation to a constructor-only argument (dataclasses.InitVar) by @helderco in https://github.com/dagger/dagger/pull/8357
    Note that InitVar should be the outer most type in order to be processed correctly by dataclasses.dataclass():
    python
    >>> url: dataclasses.InitVar[Annotated[str, Doc("Some URL")]]
    
  • Fix dagger.Ignore when used in object attributes (dataclass field) by @helderco in https://github.com/dagger/dagger/pull/8359

Dependencies

What to do next