← Back to issue list

charmcraft installation via PIP started failing recently

View original Github issue

Metadata

Project
charmcraft
Number
#758
Type
issue
State
closed
Author
EMCP
Labels
Created
Updated
Closed

Current evaluation

A newer craft-parts release broke compatibility with the pinned pydantic version, failing charmcraft pip installs. The issue was fixed by updating dependency constraints and merged in PR #765.

Suggested action:

No scores available.

Issue body

I utilize charmcraft inside a docker container... which rebuilds every 30 days.. or so. Anyway, it was working fine until a day ago ``` FROM ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt update RUN apt upgrade -y RUN apt install python3 python3-pip libffi-dev libapt-pkg-dev libssl-dev python3-venv -y RUN pip3 install https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.2.1/python-apt_2.2.1.tar.xz RUN pip3 install charmcraft RUN charmcraft version RUN python3 --version ``` The main error I see is the following ``` Step 8/9 : RUN charmcraft version ---> Running in d2c85fdeb3a6 Traceback (most recent call last): File "/usr/local/bin/charmcraft", line 5, in <module> from charmcraft.main import main File "/usr/local/lib/python3.8/dist-packages/charmcraft/main.py", line 36, in <module> from charmcraft import config, __version__, env, utils File "/usr/local/lib/python3.8/dist-packages/charmcraft/config.py", line 81, in <module> from charmcraft.parts import validate_part File "/usr/local/lib/python3.8/dist-packages/charmcraft/parts.py", line 26, in <module> from craft_parts import LifecycleManager, Step, plugins File "/usr/local/lib/python3.8/dist-packages/craft_parts/__init__.py", line 21, in <module> from . import plugins File "/usr/local/lib/python3.8/dist-packages/craft_parts/plugins/__init__.py", line 20, in <module> from .plugins import ( File "/usr/local/lib/python3.8/dist-packages/craft_parts/plugins/plugins.py", line 34, in <module> from .rust_plugin import RustPlugin File "/usr/local/lib/python3.8/dist-packages/craft_parts/plugins/rust_plugin.py", line 35, in <module> UniqueStrList = conlist(str, unique_items=True) File "pydantic/types.py", line 509, in pydantic.types.conlist TypeError: conlist() got an unexpected keyword argument 'unique_items' The command '/bin/sh -c charmcraft version' returned a non-zero code: 1 ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 A newer craft-parts release broke compatibility with the pinned pydantic version, failing charmcraft pip installs. The issue was fixed by updating dependency constraints and merged in PR #765.
qwen/qwen3.6-35b-a3b charmcraft pip installation failed due to craft-parts using an unsupported pydantic conlist argument. Fixed and merged in PR #765 by updating dependency constraints. Users can temporarily pin craft-parts to 1.4.2.
qwen3.6-35b-a3b-mtp-q6 charmcraft pip installation failed due to craft-parts using an incompatible Pydantic feature. The issue was closed after merging PR #765, which pins compatible dependencies.
qwen3.6-35b-a3b-mtp-q6 pip installation failed due to a craft-parts pydantic compatibility issue. Maintainers provided a version pin workaround and fixed the dependency conflict in PR #765.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#615 Can't pip install charmcraft on latest Ubuntu charmcraft closed Closed. PyPI installation instructions were added to the README to resolve pip install failures on newer Ubuntu versions caused by python-apt dependency conflicts.
76%
#816 pip install charmcraft installs v1.0 charmcraft closed Closed as expected behavior. Python 3.6 on Ubuntu 18.04 forced pip to install an older compatible version due to dependency constraints. Resolved after the user upgraded to Ubuntu Focal with Python 3.7+.
73%
#1781 charmcraft `3.1.1` "successfully" packs charm, but python packages are missing in the venv charmcraft closed Missing Python packages in charmcraft 3.1.1 venvs resulted from a strict dependencies bug. The developer identified the missing pip check step, implemented a fix, and closed the report after updating validation logic.
72%
#738 Crash with `charmcraft pack` charmcraft closed Closed. The crash stemmed from outdated setuptools and pip failing to build jinja2. Resolved via a workaround specifying newer setuptools and pip in charmcraft.yaml. Maintainers attributed the error to upstream packaging and pip limitations.
71%
#1472 charmcraft 2.5.2 on PyPi doesn't install on jammy/py310 (at least) - error "ModuleNotFoundError: No module named 'tools'" charmcraft closed Packaging error in charmcraft 2.5.2 caused install failures due to the missing tools module. The bug was fixed in Charmcraft 3.0. A backport to the 2.x branch was requested but not implemented.
71%
#1456 Strict dependencies prevents charm from building charmcraft closed Strict dependencies build failed due to outdated pip. Maintainers identified pip>=23.2.1 as required. The issue was closed without a fix, as the reporter confirmed charmcraft 2.7.1 still lacks the update.
70%