3 ms·
I was going to mention that an official solution to this problem is around the corner, but the corresponding PEP has been rejected. Anyone know what happened th
by diarrhea 3y ago
I was going to mention that an official solution to this problem is around the corner, but the corresponding PEP has been rejected. Anyone know what happened there?
https://peps.python.org/pep-0722/ https://peps.python.org/pep-0722/
- jefferph 3y agoLooks like https://peps.python.org/pep-0723/ https://peps.python.org/pep-0723/ was accepted instead. See discussion here: https://discuss.python.org/t/pep-722-723-decision/36763 https://discuss.python.org/t/pep-722-723-decision/36763
- Flimm 3y agoFascinating! It looks like PEP 723 (the one that was accepted provisionally) will allow you to embed a comment in your script that looks like this, to specify dependencies on request and rich: # /// pyproject # [run] # 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])