Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix outdated "run with inline dependencies" example #1244

Closed
wants to merge 1 commit into from
Closed

docs: fix outdated "run with inline dependencies" example #1244

wants to merge 1 commit into from

Conversation

katrinafyi
Copy link

@katrinafyi katrinafyi commented Feb 5, 2024

Summary of changes

The documentation was not updated since its first implementation in #916. Since then, #1100 and #1180 have changed the syntax in incompatible ways.

This is a really cool feature! It would be nice if a warning was given for using the old syntax, though I understand it was not available for a great deal of time.

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Test plan

Tested by running

cat <<EOF > test.py
# /// script
# requires-python = ">=3.11"
# dependencies = [
#   "requests<3",
#   "rich",
# ]
# ///

import requests
from rich.pretty import pprint

resp = requests.get("https://peps.python.org/api/peps.json")
data = resp.json()
pprint([(k, v["title"]) for k, v in data.items()][:10])
EOF

pipx run file:test.py

as in the updated docs/example.md

The documentation has not been updated since its first implementation. Since then, the PEP 723 updates have changed the syntax in incompatible ways.

It would be nice if a warning was given for using the old syntax, though I understand it was not available for a great deal of time.
@Gitznik
Copy link
Contributor

Gitznik commented Feb 5, 2024

Hi @katrinafyi, thanks for contributing this :) I'm afraid there is already another open PR for updating this. Feel free to add your changes as suggestions there. If that PR goes stale, we can continue here.

@Gitznik Gitznik added the duplicate This issue or pull request already exists label Feb 5, 2024
@katrinafyi
Copy link
Author

katrinafyi commented Feb 5, 2024

Oops! I forgot to check the PRs. It is good you're working on it, you can close this or use its changes if you want.

@Gitznik Gitznik mentioned this pull request Feb 5, 2024
1 task
@Gitznik Gitznik closed this Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants