Charmcraft 4.2 release notes

17 March 2026

Learn about the new features, changes, and fixes introduced in Charmcraft 4.2.

Requirements and compatibility

For development and testing, Charmcraft requires a host with a minimum of 4GB RAM running a Linux distribution compatible with systemd.

All versions of Charmcraft require the following software:

We recommend you install the Charmcraft snap. It comes bundled with all its dependencies.

Non-snap installations of Charmcraft have the following dependencies:

What’s new

Charmcraft 4.2 brings the following new features.

Init template updates

Charmcraft 4.2 sets Ubuntu 24.04 as the default base for new charms using the machine, kubernetes, django-framework and flask-framework init templates.

The machine and kubernetes templates also now assume Juju 3.6 or newer.

Faster startup for new charms or after cleaning

When installed as a snap, Charmcraft now also injects the core24 snap into the created container from the host machine, speeding up initial builds and reducing the download time.

Compiled bytecode from the uv plugin

The uv plugin now compiles bytecode for installed Python files by default. To disable this for your charm, set UV_COMPILE_BYTECODE: false in the part’s build-environment key.

Updated documentation system

The documentation base is updated to Canonical’s Sphinx Starter Pack 1.5. Going forward, the system will stay in step with the Starter Pack, keeping pace with its features.

The documentation commands that are standard in Canonical products are accessible by prefixing them with docs-:

Command

Result

make docs

Renders the docs as a static set of HTML pages.

make docs-auto

Hosts the docs in a local server you can view in the web browser. When you save a change to a source file, the server updates the doc in real time.

make docs-lint

Checks for problems in the documentation.

make docs-clean

Removes the built docs and temporary files.

make docs-help

See the full list of commands from the Starter Pack.

Documentation improvements

Across the documentation, we made numerous technical corrections, fixed many links, and revised the formatting. We also added:

Known issues

The following issues were reported and are scheduled to be fixed in upcoming patch releases.

See individual issue links for any mitigations.

  • #2078 charmcraft clean does not clean all platforms for a charm

  • #1990 Cannot stage packages with Charmcraft

  • #2493 Packing fails when using a separate metadata.yaml file and the --project-dir argument

  • #2492 Internal error when uploading a charm outside of a project directory

Contributors

We would like to express a big thank you to all the people who contributed to this release:

@activus-d, @alithethird, @arturo-seijas, @bepri, @dwilding, @f-atwi, @jahn-junior, @james-garner-canonical, @javierdelapuente, @jonathan-conder, @lengau, @medubelko, @mr-cal, @smethnani, @tigarmo, @tonyandrewmeyer, and @zhijie-yang