You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide machine-readable optional dependencies? #5793
Downstream on conda-forge, noted that markdown is needed for the test suite to run. Exciting!
However, it would be lovely to have a centralized place for this kind of information, and future optional dependencies changes.
This would certainly make it easier for downstreams such as conda-forge, but could also provide a actionable user messages
Design ideas:
One approach would be to leverage python's optional dependencies, which could be captured in various schemes with the robotframework[extra1,extra2] syntax.
this would also work if moving all of the setup.py content over to pyproject.toml, with a tiny setup.py of __import__('setuptools').setup() which wouldn't require any docs changes... though maybe some automation
I'd be happy to work up a strawman PR for either approach, if desired.
Handling dependencies is something we've discussed few times lately and using Python's optional dependencies sounds like a good step into right direction. The hard part is decising what names we want to use (e.g. do we want markdown and gfm separately) because changing them later is backwards incompatible. Do you want to make a proposal?
We plan to move to pyproject.toml fully and to redo packaging in RF 8, but there's still going to be RF 7.6 before that. It's thus probably best to do this using setup.py now.
It looks like the two lists mostly agree, with the following exceptions:
telnet: (i missed telnetlib-313-and-up); and agree on not porting a deprecated one
screenshots: yep, a total mess
pillow:a fine upstream, too bad it doesn't work everywhere
pygtk: only releases .exe on PyPI apparently, so not even really very useful to pip or uv
wx is absent, and doesn't ship linux wheels
there is a PEP for [external-depednencies], but it won't help end users much, yet
I guess for file formats, perhaps the shortest-possible, yet widely-recognized extension names are best, so perhaps:
md
yaml (even though yml is technically shorter)
xml
rst
pygments is also used in several places, so would still keep it as a separate thing, used by the others, but perhaps it could be highlight.
I'd exclude dev and test requirements from this list.
With setup.py[extras], there are clear downsides of having development-focused things "leaking" into userspace/downstream dependencies. The exception to this is when there is overlap where a test group refines an extra with some unknown wisdom which would be helpful to include in the user-facing ones, e.g. pillow >=7.1.0 in atest.
clear benefits
For pyproject.toml, kind of a lot...
[dependency-groups] along with [build-system.requires] and requires-python, finally provides a single source of truth for all dependency information, avoiding -r .../../ kind of stuff, duplication of key constraints, circular nonsense with setup_requires, and custom path knowledge.
Contributors would be able to use:
pip install -e . --group atest
Reviewers would be able to see changes to this important, well-known file.
Any lockfile-based tool would know what to do with these.
Selfishly, as a downstream repackager, I'd be able to look at a short command (or write a script) to keep things synced:
The above builds and does a dev install for python 3.9-3.14:
3.8: no version of a compatible pip which supports dependency-groups
3.15rc: pyyaml doesn't yet ship 3.15 wheels
This is all based on manual inspection of the .txt, some references in docs, etc. Again, happy to start a PR where it might be easier to discuss particular lines.
Activity
pekkaklarck commentedon Sep 22, 2026
Handling dependencies is something we've discussed few times lately and using Python's optional dependencies sounds like a good step into right direction. The hard part is decising what names we want to use (e.g. do we want
markdownandgfmseparately) because changing them later is backwards incompatible. Do you want to make a proposal?We plan to move to pyproject.toml fully and to redo packaging in RF 8, but there's still going to be RF 7.6 before that. It's thus probably best to do this using
setup.pynow.bollwyvl commentedon Sep 23, 2026
Sure, here's a stab at splitting things like
pygmentsout as ahighlightfunction thing, with certain "brands" named explicitly:... in
setup.pywith all as[extras]...... or, for comparison,
pyproject.tomlwith somedependency-groups...Some more thoughts:
toxor the lockfile-enableduv/piximight make exercising these locally more reasonableAs for timeline:
dependency-groupsaren't exposed to end users, so could be adopted before moving everything topyproject.toml[project.optional-dependencies]could already be inpyproject.toml, would have to check building some wheelspekkaklarck commentedon Sep 24, 2026
Let's first agree on the extras we provide and then plan how to get this implemented. Some general thins first:
markdownandscreenshotinstead of specific module names (even through withmarkdownthat's also the module name).My initial proposal for the actual extras are these:
bollwyvl commentedon Sep 24, 2026
It looks like the two lists mostly agree, with the following exceptions:
telnet: (i missed telnetlib-313-and-up); and agree on not porting a deprecated onescreenshots: yep, a total messpillow:a fine upstream, too bad it doesn't work everywherepygtk: only releases.exeon PyPI apparently, so not even really very useful topiporuvwxis absent, and doesn't ship linux wheels[external-depednencies], but it won't help end users much, yetI guess for file formats, perhaps the shortest-possible, yet widely-recognized extension names are best, so perhaps:
mdyaml(even thoughymlis technically shorter)xmlrstpygmentsis also used in several places, so would still keep it as a separate thing, used by the others, but perhaps it could behighlight.With
setup.py[extras], there are clear downsides of having development-focused things "leaking" into userspace/downstream dependencies. The exception to this is when there is overlap where a test group refines an extra with some unknown wisdom which would be helpful to include in the user-facing ones, e.g.pillow >=7.1.0inatest.For
pyproject.toml, kind of a lot...[dependency-groups]along with[build-system.requires]andrequires-python, finally provides a single source of truth for all dependency information, avoiding-r .../../kind of stuff, duplication of key constraints, circular nonsense withsetup_requires, and custom path knowledge.pip install -e . --group atestSo taking all of the above together...
...here's what that would look like as a PR:
The above builds and does a dev install for python 3.9-3.14:
pipwhich supportsdependency-groupspyyamldoesn't yet ship 3.15 wheelsThis is all based on manual inspection of the
.txt, some references in docs, etc. Again, happy to start a PR where it might be easier to discuss particular lines.