Skip to content

Parse Python optional dependencies#17

Merged
andrew merged 1 commit intomainfrom
python-optional-deps
Feb 27, 2026
Merged

Parse Python optional dependencies#17
andrew merged 1 commit intomainfrom
python-optional-deps

Conversation

@andrew
Copy link
Contributor

@andrew andrew commented Feb 26, 2026

PEP 621 [project.optional-dependencies] was decoded from TOML but never iterated, so projects like rs-graph that define most deps as optional showed only runtime deps. Now each optional group is parsed and assigned a scope based on the group name (dev/lint to development, test/testing to test, everything else to optional).

The setup.py extras_require parser had inverted logic that skipped actual package requirements and kept group names. Replaced with a proper regex that matches each group key and its list of requirements.

Fixes git-pkgs/git-pkgs#130

PEP 621 optional-dependencies were decoded from TOML but never iterated,
so projects like rs-graph that define most deps as optional showed only
runtime deps. Now each optional group is parsed and assigned a scope
based on the group name (dev/lint -> development, test/testing -> test,
everything else -> optional).

The setup.py extras_require parser had inverted logic that skipped
actual package requirements and kept group names. Replaced with a
proper regex that matches each group key and its list of requirements.

Fixes git-pkgs/git-pkgs#130
@andrew andrew merged commit 01359de into main Feb 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Optional Dependencies for Python

1 participant