Skip to content

Conversation

@benkehoe
Copy link
Contributor

@benkehoebenkehoe commented Jan 9, 2022

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

@the-knights-who-say-ni
Copy link

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!

Copy link
Member

@sobolevnsobolevn left a 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:

@sobolevnsobolevn added the type-feature A feature request or enhancement label Jan 9, 2022
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Copy link
Member

@warsawwarsaw left a 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!

@bedevere-bot
Copy link

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.

@benkehoe
Copy link
ContributorAuthor

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

@bedevere-bot
Copy link

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.

@warsaw
Copy link
Member

@benkehoe Have you signed the CLA?

@benkehoe
Copy link
ContributorAuthor

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.

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

@warsaw
Copy link
Member

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

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

@benkehoe
Copy link
ContributorAuthor

Added the versionadded info to the docs.

Copy link
Member

@warsawwarsaw left a 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.

@benkehoe
Copy link
ContributorAuthor

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

@miss-islington
Copy link
Contributor

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

@miss-islingtonmiss-islington merged commit dce642f into python:mainJan 11, 2022
@warsaw
Copy link
Member

Well done @benkehoe !

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-featureA feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@benkehoe@the-knights-who-say-ni@bedevere-bot@warsaw@miss-islington@sobolevn