8000 gh-86457: Fix signature for code.replace(). by serhiy-storchaka · Pull Request #23199 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-86457: Fix signature for code.replace(). #23199

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

Merged
merged 7 commits into from
Aug 7, 2023

Conversation

serhiy-storchaka
Copy link
Member
@serhiy-storchaka serhiy-storchaka commented Nov 8, 2020

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Dec 16, 2020
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Jul 31, 2022
Copy link
Member
@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

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

This has merge conflicts now.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@netlify
Copy link
netlify bot commented Dec 7, 2022

Deploy Preview for python-cpython-preview ready!

Name Link
🔨 Latest commit 748a7e8
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/6390d92ee0f8950008cc428e
😎 Deploy Preview https://deploy-preview-23199--python-cpython-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Dec 7, 2022
@serhiy-storchaka serhiy-storchaka marked this pull request as ready for review December 7, 2022 14:06
@iritkatriel iritkatriel dismissed their stale review December 7, 2022 14:25

conflicts were resolved.

Copy link
Member
@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

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

I don't understand the clinic code, but the rest LGTM.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jun 29, 2023
@AlexWaygood AlexWaygood dismissed iritkatriel’s stale review June 29, 2023 14:38

merge conflicts were fixed

@erlend-aasland
Copy link
Contributor

I will have a look, but it may take some days before I find time. Thanks for the ping, @serhiy-storchaka

if self.forced_text_signature:
add(self.forced_text_signature)
else:
add('(')
Copy link
Member Author

Choose a reason for hiding this comment

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

All following lines just increase indentation. GitHub is not good in showing such case.

Copy link
Contributor

Choose a reason for hiding this comment

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

For the record, I plan to refactor the signature generation into a helper function. See #107623

@erlend-aasland
Copy link
Contributor

It would be better if Argument Clinic could handle this by itself, without the need for the @text_signature override. However, this is a good workaround. It also unblocks cases in the code base where we could not apply clinic because of signature issues.

@erlend-aasland erlend-aasland changed the title bpo-42291: Fix signature for code.replace(). gh-86457: Fix signature for code.replace(). Aug 7, 2023
@serhiy-storchaka serhiy-storchaka merged commit 0e6e32f into python:main Aug 7, 2023
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the clinic-code-replace branch August 7, 2023 20:34
@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 0e6e32fb84b2f7cb668e0b9927637587081e38cd 3.12

@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 0e6e32fb84b2f7cb668e0b9927637587081e38cd 3.11

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 7, 2023
Also add support of @text_signature in Argument Clinic..
(cherry picked from commit 0e6e32f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-107744 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Aug 7, 2023
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Aug 7, 2023
Also add support of @text_signature in Argument Clinic..
(cherry picked from commit 0e6e32f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-107746 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 7, 2023
@serhiy-storchaka
Copy link
Member Author

I am sorry for creating conflicts with your PR, but this PR was planned for backporting, and your refactoring seems is not purposed for backporting.

@erlend-aasland
Copy link
Contributor

I am sorry for creating conflicts with your PR, but this PR was planned for backporting, and your refactoring seems is not purposed for backporting.

No worries; I'll handle that :)

serhiy-storchaka added a commit that referenced this pull request Aug 9, 2023
Also add support of @text_signature in Argument Clinic.
(cherry picked from commit 0e6e32f)
Yhg1s pushed a commit that referenced this pull request Aug 16, 2023
* [3.12] gh-86457: Fix signature for code.replace() (GH-23199)

Also add support of @text_signature in Argument Clinic..
(cherry picked from commit 0e6e32f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Update 2023-08-07-16-30-48.gh-issue-95065.-im4R5.rst
@serhiy-storchaka serhiy-storchaka removed their assignment Sep 8, 2023
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.

7 participants
0