adafruit / adafruit/circup

Python 3.12 does not provide setuptools, and circup needs it

Open
#213 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
172
Forks
41
Avg merge
1d 20h
Merged PRs (30d)
1

Description

I installed circup 1.8.0 in a venv with Python 3.12.3 on Ubuntu 24.04. A ~~Two~~ problem arose:

1. circup expects `setuptools` to be installed because it uses `pkg_resources`. `pkg_resources` is deprecated. From https://setuptools.pypa.io/en/latest/pkg_resources.html:
> Use of pkg_resources is deprecated in favor of [importlib.resources](https://docs.python.org/3.11/library/importlib.resources.html#module-importlib.resources), [importlib.metadata](https://docs.python.org/3.11/library/importlib.metadata.html#module-importlib.metadata) and their backports ([importlib_resources](https://pypi.org/project/importlib_resources), [importlib_metadata](https://pypi.org/project/importlib_metadata)). Some useful APIs are also provided by [packaging](https://pypi.org/project/packaging) (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

~~2. After installing `setuptools` to work around problem 1, I got this when trying a simple install:~~
[deleted; my PATH was wrong]

Contributor guide

Open the contributing guide

Research direction

Start by locating circup's use of pkg_resources and checking how its dependencies are declared. Verify the replacement works in a Python 3.12 virtual environment without installing setuptools, then confirm that a simple circup install works on Ubuntu 24.04.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.