Skip to content

Conversation

jb2170
Copy link

@jb2170 jb2170 commented Apr 11, 2025

Draft PR for new PEP 791

Sponsor Pending

There is a TODO section in the PEP that shall perish as the PEP is tweaked before even considering merging

Relevant discussions, issues, PRs linked

https://discuss.python.org/t/implement-precision-format-spec-for-int-type-data/80760
python/cpython#131926
python/cpython#74756

Basic requirements (all PEP Types)

  • Read and followed PEP 1 & PEP 12
  • File created from the latest PEP template
  • PEP has next available number, & set in filename (pep-NNNN.rst), PR title (PEP 123: <Title of PEP>) and PEP header
  • Title clearly, accurately and concisely describes the content in 79 characters or less
  • Core dev/PEP editor listed as Author or Sponsor, and formally confirmed their approval: sponsor pending
  • Author, Status (Draft), Type and Created headers filled out correctly
  • PEP-Delegate, Topic, Requires and Replaces headers completed if appropriate
  • Required sections included
    • Abstract (first section)
    • Copyright (last section; exact wording from template required)
  • Code is well-formatted (PEP 7/PEP 8) and is in code blocks, with the right lexer names if non-Python: everything but 80-column line length, so as to avoid tedious re-aligning during this draft stage
  • PEP builds with no warnings, pre-commit checks pass and content displays as intended in the rendered HTML
  • Authors/sponsor added to .github/CODEOWNERS for the PEP: sponsor pending

Standards Track requirements

  • PEP topic discussed in a suitable venue with general agreement that a PEP is appropriate
  • Suggested sections included (unless not applicable)
    • Motivation: included in Rationale
    • Rationale
    • Specification: on the TODO list if an RFC 2119 style summary is needed
    • Backwards Compatibility
    • Security Implications: not needed?
    • How to Teach This: Examples And Teaching section
    • Reference Implementation
    • Rejected Ideas
    • Open Issues: None so far
  • Python-Version set to valid (pre-beta) future Python version, if relevant: pending
  • Any project stated in the PEP as supporting/endorsing/benefiting from the PEP formally confirmed such: none
  • Right before or after initial merging, PEP discussion thread created and linked to in Discussions-To and Post-History

📚 Documentation preview 📚: https://pep-previews--4365.org.readthedocs.build/

@jb2170 jb2170 requested a review from a team as a code owner April 11, 2025 18:55
@AA-Turner AA-Turner marked this pull request as draft April 11, 2025 19:37
@AA-Turner AA-Turner changed the title PEP 791: Precision and Modulo-Precision Flag format specifiers for integer fields [DRAFT][Pending Sponsor] PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [DRAFT][Pending Sponsor] Apr 11, 2025
@@ -0,0 +1,360 @@
PEP: 791
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you get a sponsor, the next number is either 785 or 786.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I didn't see the original Discourse thread, I've definitely been bitten by the # vs field width problem, so I'd be happy to be listed as a PEP sponsor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, let's use 785 for #4357 and 786 here.

@AA-Turner AA-Turner added the new-pep A new draft PEP submitted for initial review label Apr 11, 2025
@hugovk hugovk changed the title PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [DRAFT][Pending Sponsor] PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] Apr 11, 2025
@hugovk hugovk changed the title PEP NNNN: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] Apr 12, 2025
@hugovk hugovk changed the title PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields [Pending Sponsor] PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields Apr 12, 2025
@AA-Turner
Copy link
Member

@jb2170 are you able to make the relevant updates here?

@jb2170 jb2170 closed this May 8, 2025
@jb2170 jb2170 deleted the pep-791-precision branch May 8, 2025 00:33
@AA-Turner
Copy link
Member

Do you intend to open a new PR, or should we un-reserve the PEP number?

Thank you for your work on the draft PEP!

A

@jb2170
Copy link
Author

jb2170 commented May 8, 2025

Opening a new PR with the correct branch name, one minute 😅

@jb2170
Copy link
Author

jb2170 commented May 8, 2025

New PR open here (sorry GitHub doesn't allow the renaming of the source branch for an open PR; I want it to be correct to avoid confusion 791 786).

@ncoghlan
I'd be happy to be listed as a PEP sponsor.

That's brilliant thank you! I wish I'd checked up on this PR earlier: I left it for a bit as I thought I'd have to go e-door to e-door asking around for a sponsor lol 😅 but you'd picked it up the following day!

Last week I was full of a cold so I couldn't have done much then anyways, but now let's get it!

@jb2170 jb2170 changed the title PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields [Old] PEP 786: Precision and Modulo-Precision Flag format specifiers for integer fields May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-pep A new draft PEP submitted for initial review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants