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

PEP 501: Re-open and revise in consideration of PEP 701 #3047

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

nhumrich
Copy link

@nhumrich nhumrich commented Mar 9, 2023


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

@nhumrich nhumrich requested a review from ncoghlan as a code owner March 9, 2023 04:03
@cpython-cla-bot
Copy link

cpython-cla-bot bot commented Mar 9, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@nhumrich nhumrich force-pushed the main branch 4 times, most recently from e5ab736 to 586afe7 Compare March 9, 2023 04:58
@CAM-Gerlach CAM-Gerlach changed the title Re-open PEP 501 in consideration of PEP 701 PEP 501: Re-open and revise in consideration of PEP 701 Mar 9, 2023
@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Mar 9, 2023

It would be helpful to provide some important context when re-opening and making major changes to someone else's deferred PEP. In particular, before considering re-opening this PEP and reviewing this PR, it seems at least the following key information should be provided:

  • Confirmation from @ncoghlan that he's okay with you adopting and re-writing his PEP

  • Link to a discussion thread on, e.g. the Ideas or Core Development Discourse categories or mailing lists where this revised proposal was posted and discussed and there was at least some consensus in favor of going ahead with a PEP

  • At least a brief rationale for why it would be better to overhaul this existing PEP with major changes, as opposed to proposing a new fresh PEP with your own ideas that references the old one as direct inspiration—per PEP 1:

    Occasionally, a Deferred or even a Withdrawn PEP may be resurrected with major updates, but it is often better to just propose a new one.

Thanks!

@CAM-Gerlach CAM-Gerlach marked this pull request as draft March 9, 2023 08:21
@hugovk
Copy link
Member

hugovk commented Mar 9, 2023

For reference: https://discuss.python.org/t/pep-501-reopen-general-purpose-string-template-literals/24625

@CAM-Gerlach
Copy link
Member

Thanks; it would have been very helpful and germane to include in the original OP, and in the PEP itself. That answers most of my questions above, thanks.

@nhumrich is it ready for our review, then?

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

Standard reminder: You can directly apply all the suggestions you want in one go with Files changed -> Add to batch -> Commit

I need to sleep now and will follow up with more fixes on the rest later, but I added some suggestions and one larger comment on the headers and Abstract. I suggest batch-applying the suggestions first before making the larger changes recommended by the comment, to avoid them getting lost. Thanks.

pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

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

Thanks again for tackling the update of this PEP to reflect the changes that have taken place since PEP 498 was accepted!

The minor comments I mentioned via email have been made inline, but I also added a few more substantive ones that didn't occur to me until either seeing @CAM-Gerlach's comments or simply reading it in this format rather than on my phone.

No fundamental changes, just cleaning up a few things that either I had missed back in the original PEP text, or else notes that made sense back before PEP 498 was accepted, but aren't relevant now.

pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

Standard reminder: You can directly apply all the suggestions you want in one go with Files changed -> Add to batch -> Commit I suggest applying the suggestions first before considering the recommended reorganization changes.

Also, there appear to be a number of instances where what you now call "template literals" or "template strings" are still referred to as "interpolation templates", despite other instances being changed. You might want to consider whether those should be updated too for consistency.

pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Mar 11, 2023

Just to be clear, you don't need to (and shouldn't) apply all these suggestions manually. Instead, apply all the suggestions you want in one go by navigating to the Files changed tab clicking Add to batch on each suggestion, and once you've added all of them, clicking Commit**, entering a commit message and committing. Alternatively, we can do it for you, if you prefer.

⚠️ Important ⚠️ : You should apply our suggestions first before considering the recommended reorganization changes, or they will likely get out of date otherwise. Also, make sure to pull your remote branch into your local one first after applying the suggestions and before making any additional local changes.

Also, it looks like you mistakenly made these changes in the main branch of your fork rather than first creating a topic branch, which will lead to problems for you down the road on future PRs. You SHOULD NOT do anything about this now, as it will invalidate this PR and all our review suggestions, but ONLY AFTER THIS PR IS MERGED you can fix this with the following options:

Do not proceed until AFTER this PR is merged!
  • Delete your fork and recreate it, or

  • Do a bit of git surgery

    git switch master
    git fetch --all
    git reset --hard upstream/master
    git push -f origin master

@ncoghlan
Copy link
Contributor

ncoghlan commented Mar 11, 2023

Thanks for the thorough review @CAM-Gerlach! (as well as the recommendations on applying the change suggestions cleanly)

The missing context is on me - I asked @nhumrich to make the PR so I could provide my own line-by-line review, but didn't consider how the PR would look to the PEP editors without knowing we had already been chatting about the update via email!

If I had thought about it, I would have suggested making sure our prior email discussion was mentioned in the PR description.

@CAM-Gerlach
Copy link
Member

I asked @nhumrich to make the PR so I could provide my own line-by-line review, but didn't consider how the PR would look to the PEP editors without knowing we had already been chatting about the update via email!

Another alternative approach to consider for any future such situations is suggesting the contributor make a PR on their fork instead for your initial review, and then iterating together there until it is ready to submit to the upstream PEPs repo for PEP editor review and publication. That way, you (and others you invite/are interested) can more easily iterate on the PEP and work on it together first to get it ready for review, and it avoids pinging all the PEP editors and the many other folks watching this repo before with every comment and change on the PR.

If I had thought about it, I would have suggested making sure our prior email discussion was mentioned in the PR description.

Yeah, the lack of a PR description, explanation, discussion links or other context made me concerned that this might be a PEP hijacking attempt (albeit a presumably unintentional one) 😂 , i.e.

image

pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
nhumrich and others added 4 commits March 14, 2023 12:18
Co-authored-by: C.A.M. Gerlach <[email protected]>
Co-authored-by: Nick Coghlan <[email protected]>
* Added abstract
* added __eq__ and __bool__ to TemplateLiteral
* formated code
* updated copyright
@nhumrich
Copy link
Author

Thank you for all your suggestions and reviews. I believe I have resolved them, and am ready for another review. @ncoghlan @CAM-Gerlach
Please let me know if I missed anything.

@CAM-Gerlach CAM-Gerlach self-requested a review March 15, 2023 01:34
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

Looking pretty good, thanks! Just a handful of relatively minor followup suggestions, and one comment/request from my side.

pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
pep-0501.txt Outdated Show resolved Hide resolved
@CAM-Gerlach CAM-Gerlach marked this pull request as ready for review March 15, 2023 02:51
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM so far from a PEP editor perspective, thanks @nhumrich ! I'll leave it to @ncoghlan to review further and approve, of course.

@hugovk
Copy link
Member

hugovk commented Nov 4, 2023

(Merge conflict resolved)

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.

None yet

6 participants