flosell / flosell/trailscraper

Migrate from `pkg_resources` to `importlib`

Open
#602 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
838
Forks
38
Avg merge
2m
Merged PRs (30d)
14

Description

👋 Hello, I have been working on migrating Python-based projects in homebrew-core to use explicitly-declared resources. Just wanted to flag that I noticed trailscraper depends on `pkg_resources`, which is removed in Python 3.12 with the removal of `distutils`. In the upstream Homebrew formula we'll explicitly add `setuptools` as a required dependency so that installation with Python 3.12 continues to work.

Some more resources:

* [pkg_resources to importlib_resources migration guide](https://importlib-resources.readthedocs.io/en/latest/migration.html)
* [PEP-517](https://peps.python.org/pep-0517/)

Contributor guide

Open the contributing guide

Research direction

Start by locating the Python dependency declarations and every use of pkg_resources in the repository. Compare those uses with the linked importlib_resources migration guide, then verify that installation and execution continue to work on Python 3.12; the issue names no specific files or tests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.