Is there an existing issue for this?
Feature description
Hello Dependabot maintainers! Thank you for creating Dependabot, it's a fantastic tool.
This is similar to #10478, but not the same: #10478 concerns uv and uv.lock specifically, while this is about inline script metadata, which is not specific to uv and involves individual Python source files, not uv.lock files.
TL;DR: Inline script metadata is a Python packaging standard that specifies an inline metadata format for Python scripts, which appears as a contiguous preamble comment at the head of a Python file (after the shebang). For example:
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "pre-commit==4.2.0",
# "pytz==2025.2",
# "requests==2.32.3",
# "requests-cache==1.2.1",
# ]
# ///
This preamble comment is formatted as TOML and contains much of the same information as a pyproject.toml would, which Dependabot already supports. In particular, it supports a dependencies key that behaves the same as in pyproject.toml, and as exemplified above.
I would like Dependabot to support this preamble (detect /// script and /// as delimiters) for version updating purposes! Doing so should be able to reuse most of the existing pyproject.toml machinery; the main change is probably a small amount of pre- and post-processing to mold the dependency changes back into the comment preamble format.
Supporting this would be a huge boon for the Python ecosystem, which has increasingly come to rely on inline script metadata as a replacement for "sidecar" requirements.txt files.
Additional resources:
Is there an existing issue for this?
Feature description
Hello Dependabot maintainers! Thank you for creating Dependabot, it's a fantastic tool.
This is similar to #10478, but not the same: #10478 concerns
uvanduv.lockspecifically, while this is about inline script metadata, which is not specific touvand involves individual Python source files, notuv.lockfiles.TL;DR: Inline script metadata is a Python packaging standard that specifies an inline metadata format for Python scripts, which appears as a contiguous preamble comment at the head of a Python file (after the shebang). For example:
This preamble comment is formatted as TOML and contains much of the same information as a
pyproject.tomlwould, which Dependabot already supports. In particular, it supports adependencieskey that behaves the same as inpyproject.toml, and as exemplified above.I would like Dependabot to support this preamble (detect
/// scriptand///as delimiters) for version updating purposes! Doing so should be able to reuse most of the existingpyproject.tomlmachinery; the main change is probably a small amount of pre- and post-processing to mold the dependency changes back into the comment preamble format.Supporting this would be a huge boon for the Python ecosystem, which has increasingly come to rely on inline script metadata as a replacement for "sidecar"
requirements.txtfiles.Additional resources: