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

fix: use modern PEP 723 syntax, fix mistake in name #1180

Merged
merged 5 commits into from
Jan 5, 2024

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Dec 31, 2023

  • I have added an entry to docs/changelog.md

Summary of changes

PEP 723 has been updated to use a scripts block and no run section. This updates to the new syntax, but still runs with the old syntax, producing a warning. This can be upgraded to an error (but with a nice message) later (or now, if you prefer, as it's still undocumented).

Edit: the old form used the wrong name (requirements instead of dependencies) so I went ahead and made it an error now. I can still do the soft deprecation instead though if that’s preferred.

Test plan

Tested by running

nox -s tests-3.11

There were 18 failures before this PR, and 18 after, so hoped that was good! :)

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
dukecat0
dukecat0 previously approved these changes Jan 4, 2024
@dukecat0
Copy link
Member

dukecat0 commented Jan 4, 2024

Please add a changelog entry.

@flying-sheep
Copy link
Contributor

flying-sheep commented Jan 4, 2024

@henryiii would it be possible to make the tracebacks friendlier? Currently they show

Traceback (most recent call last):
  File "<string>", line 11, in <module>
ModuleNotFoundError: No module named 'requests'

Would be nice if that read File "actual-file-name.py", line 11, in __main__

@henryiii
Copy link
Contributor Author

henryiii commented Jan 5, 2024

would it be possible to make the tracebacks friendlier?

I can look into that.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
CHANGELOG.md Show resolved Hide resolved
@henryiii henryiii changed the title fix: use modern PEP 723 syntax fix: use modern PEP 723 syntax, fix mistake in name Jan 5, 2024
@dukecat0 dukecat0 merged commit c703618 into pypa:main Jan 5, 2024
14 checks passed
@Gitznik Gitznik mentioned this pull request Jan 11, 2024
1 task
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.

4 participants