GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-46307: Add string.Template.get_identifiers() method by benkehoe · Pull Request #30493 · python/cpython

Conversation

@benkehoe

@benkehoe benkehoe commented Jan 9, 2022 •
edited by miss-islington
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Add string.Template.get_identifiers() method that returns the identifiers within the template. By default, raises an error if it encounters an invalid identifier (like substitute()). The keyword-only argument raise_on_invalid can be set to False to ignore invalid identifiers (like safe_substitute()).

https://bugs.python.org/issue46307

Automerge-Triggered-By: GH:warsaw

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@the-knights-who-say-ni

the-knights-who-say-ni commented Jan 9, 2022

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@benkehoe

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jan 9, 2022
@bedevere-bot bedevere-bot added the awaiting review label Jan 9, 2022
@benkehoe
benkehoe force-pushed the fix-issue-46307 branch from 3f90667 to fc9ac1f Compare January 9, 2022 04:38
sobolevn
sobolevn reviewed Jan 9, 2022
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Hi! Thanks for the patch!

Since this is your first PR to CPython, you would need to:

  • Sign CLA agreement, just follow the process in the reply above. If you have any questions - feel free to ping me 🙂
  • Add NEWS entry. With https://blurb-it.herokuapp.com/ or CLI tool: https://github.com/larryhastings/blurb

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@benkehoe
benkehoe force-pushed the fix-issue-46307 branch from fc9ac1f to 0ce4073 Compare January 9, 2022 12:42
@sobolevn sobolevn added the type-feature A feature request or enhancement label Jan 9, 2022
@benkehoe
bpo-46307: Add string.Template.get_identifiers() method
319c8d7
@benkehoe
benkehoe force-pushed the fix-issue-46307 branch from 0ce4073 to 319c8d7 Compare January 10, 2022 14:52
sobolevn
sobolevn reviewed Jan 10, 2022
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2022-01-10-07-51-43.bpo-46307.SKvOIY.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn sobolevn mentioned this pull request Jan 10, 2022
Should triage team members be allowed to "Approve GitHub Actions workflow run"? python/core-workflow#423
Closed
@benkehoe @sobolevn
Update Misc/NEWS.d/next/Library/2022-01-10-07-51-43.bpo-46307.SKvOIY.rst
b14f8bc
Co-authored-by: Nikita Sobolev <[email protected]>
warsaw
warsaw requested changes Jan 10, 2022
View reviewed changes

@warsaw warsaw left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for creating this PR!

Please be sure to update the string module's documentation too!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/string.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting review labels Jan 10, 2022
@bedevere-bot

bedevere-bot commented Jan 10, 2022

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-knights-who-say-ni the-knights-who-say-ni added CLA signed and removed CLA not signed labels Jan 10, 2022
@benkehoe

benkehoe commented Jan 10, 2022

Copy link
Copy Markdown
Author

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Jan 10, 2022
@bedevere-bot

bedevere-bot commented Jan 10, 2022

Copy link
Copy Markdown

Thanks for making the requested changes!

@warsaw: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from warsaw January 10, 2022 23:04
warsaw
warsaw requested changes Jan 11, 2022
View reviewed changes
Comment thread Doc/library/string.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/string.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_string.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_string.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_string.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting change review labels Jan 11, 2022
@bedevere-bot

bedevere-bot commented Jan 11, 2022

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@warsaw

warsaw commented Jan 11, 2022

Copy link
Copy Markdown
Member

@benkehoe Have you signed the CLA?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@benkehoe
bpo-46307: Add string.Template.is_valid method
e80bb26
@benkehoe
benkehoe force-pushed the fix-issue-46307 branch from 185c309 to e80bb26 Compare January 11, 2022 02:04
@benkehoe
bpo-46307: Update documentation
f40258e
@benkehoe

benkehoe commented Jan 11, 2022

Copy link
Copy Markdown
Author

Do I need to put .. versionadded:: 3.11 on the new methods? I have signed the CLA. I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Jan 11, 2022
@bedevere-bot

bedevere-bot commented Jan 11, 2022

Copy link
Copy Markdown

Thanks for making the requested changes!

@warsaw: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from warsaw January 11, 2022 03:42
@warsaw

warsaw commented Jan 11, 2022

Copy link
Copy Markdown
Member

Do I need to put .. versionadded:: 3.11 on the new methods?

Yes, please. Sorry, I should have mentioned that earlier.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@benkehoe
bpo-46307: Update documentation
2c7e74d
@benkehoe

benkehoe commented Jan 11, 2022

Copy link
Copy Markdown
Author

Added the versionadded info to the docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@warsaw warsaw added the 🤖 automerge label Jan 11, 2022
warsaw
warsaw approved these changes Jan 11, 2022
View reviewed changes

@warsaw warsaw left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks @benkehoe for working on this! I'm approving it. I've also set CI to run and automerge label, so if that passes, this should land.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

benkehoe reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels Jan 11, 2022
@benkehoe

benkehoe commented Jan 11, 2022

Copy link
Copy Markdown
Author

Awesome! Thanks @warsaw for helping me make my first contribution to Python!

AlexWaygood reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington

miss-islington commented Jan 11, 2022

Copy link
Copy Markdown
Contributor

@benkehoe: Status check is done, and it's a success ✅ .

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington
miss-islington merged commit dce642f into python:main Jan 11, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Jan 11, 2022
@warsaw

warsaw commented Jan 11, 2022

Copy link
Copy Markdown
Member

Well done @benkehoe !

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CAM-Gerlach CAM-Gerlach mentioned this pull request Oct 16, 2022
gh-95913 Add string section to Whatsnew with new Template methods #98311
Merged
@benkehoe benkehoe mannequin mentioned this pull request Apr 10, 2022
string.Template should allow inspection of identifiers #90465
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sobolevn sobolevn sobolevn left review comments
@warsaw warsaw warsaw approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

type-feature A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@benkehoe @the-knights-who-say-ni @bedevere-bot @warsaw @miss-islington @sobolevn
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.