-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
[3.11] gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (#114825) #115311
[3.11] gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (#114825) #115311
Conversation
…rst (pythonGH-114825) (cherry picked from commit e1552fd)
Very close ;) The GitHub issue needs to be used as a prefix to the PR title, and the PR you're backporting needs to be a suffix in brackets to the PR title. Only then will Bedevere correctly recognise which PR you're trying to backport :) I've fixed up the title for you :) |
@AlexWaygood While I have your attention, can you explain how to fix the target branch? I screwed up on this again, couldn't see how to change |
First click the "edit" button at the top: Then toggle the "base" dropdown menu that appears here: |
Thanks! I thought "edit" only pertained to the title (given its placement). |
Yeah, definitely not an intuitive UI from github there :) |
What do you do to get such weird result? Here is my recipe.
It is better to have several workspaces for different versions ( |
There are several places where you manually need to get things right. I'm having trouble getting everything right throughout the full lifetime of a PR. I do have main, 3.12 & 3.11 work trees. That's where I switch to relevant branches for this stuff. So, when creating a PR against main, I work in my "cpython" sandbox, when backporting to 3.11 I use that sandbox, etc. The other thing that's different is I simply don't work on Python day-in/day-out. If I did, I would have many more opportunities to practice this stuff and learn to make the workflow and tooling second nature. Most/all of what seasoned developers take for granted was put in place during the several (ten? fifteen?) years I wasn't actively working on Python. You had the chance to adapt incrementally as workflow changed and new tools were added. For me, it burst forth in full bloom when I returned to messing around a bit with Python after I retired. I still have the much more casual mental model of how the system worked in the "olden days"* ingrained into my mind. It's just taking time to adapt.
|
Hi Skip! Here's my workflow (modern git users probably would balk at this, but it works for me). I still mostly use a single working directory. In there I do I suspect that your problem is that you're trying to backport something from main (or from 3.12?). For that you can use, instead of the "make some edits" step above, One more tip: there's something called |
I was just puzzled what was wrong in Skips environment or our tools that he continues to make the same mistake. My only guess is that Skip did not use |
@serhiy-storchaka Nope, I use the I'm still confused a bit by the required contents of the title in the backport. The comments in the PR creation text area mention two different items (target branch and PR?), but when I look at the title of the PR against main, I see three items. Perhaps a concrete example in that comment would be useful. Consider this PR's title:
There are three keys and a title. Despite my best effort, I seem to screw up transferring the relevant items to the proper slots when creating the new PR against the earlier branch. Maybe the comment should be amended to have a precise example (or construct an example from the current PR – it clearly knows what it wants where). That would avoid the mental translation step for novices like myself trying to figure out what bits go where. |
Also, one can't dismiss the possibility that I'm just an idiot. ;-) |
This looks like you copied and pasted the PR title of gh-115311, but you left out the Here's what the keys mean:
The third key ( I hope this helps! |
But I think you're using https://github.com/python/cherry-picker
The tool takes care of this. It pops open the PR creation page and prefills the correct branch.
The tool also prefills the title field. See #114825 (comment) for an example command. |
Nope:
That seems to be where I'm going wrong. (No PR creation page was automatically opened.) Once the cherry picking is done and I've pushed the change to my fork, I go to GitHub, where it helpfully(?) tells me that pushed changes have been made and offers a handy green button to start the pull request creation process. That always starts with |
👍
Aha! That handy green button is usually fine, but GitHub knows nothing of our intent to open a PR to another branch and defaults to the (surprise!) default branch:
Anyway, it should also print it out the URL. Here's one of mine from today. First step: ❯ cherry_picker 92483b21b30d451586c54dc4923665f7f7eedd7a 3.11
🐍 🍒 ⛏
Now backporting '92483b21b30d451586c54dc4923665f7f7eedd7a' into '3.11'
Error cherry-pick 92483b21b30d451586c54dc4923665f7f7eedd7a.
Auto-merging Doc/library/asyncio-protocol.rst
Auto-merging Doc/library/asyncio-subprocess.rst
Auto-merging Doc/library/msvcrt.rst
CONFLICT (content): Merge conflict in Doc/library/msvcrt.rst
Auto-merging Doc/library/multiprocessing.rst
CONFLICT (content): Merge conflict in Doc/library/multiprocessing.rst
Auto-merging Doc/library/subprocess.rst
Auto-merging Doc/whatsnew/2.6.rst
Auto-merging Doc/whatsnew/2.7.rst
Auto-merging Doc/whatsnew/3.1.rst
Auto-merging Doc/whatsnew/3.2.rst
error: could not apply 92483b21b3... gh-101100: Fix Sphinx warnings in `whatsnew/2.7.rst` and related (#115319)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
Failed to cherry-pick 92483b21b30d451586c54dc4923665f7f7eedd7a into 3.11 ☹
... Stopping here.
To continue and resolve the conflict:
$ cherry_picker --status # to find out which files need attention
# Fix the conflict
$ cherry_picker --status # should now say 'all conflict fixed'
$ cherry_picker --continue
To abort the cherry-pick and cleanup:
$ cherry_picker --abort Then I resolved the conflicts manually, did a ❯ cherry_picker --continue
🐍 🍒 ⛏
Backport PR URL:
https://github.com/python/cpython/compare/3.11...hugovk:backport-92483b2-3.11?expand=1
branch backport-92483b2-3.11 has been deleted.
Backport PR:
[3.11] gh-101100: Fix Sphinx warnings in `whatsnew/2.7.rst` and related (GH-115319)
Co-authored-by: Alex Waygood <[email protected]>.
(cherry picked from commit 92483b21b30d451586c54dc4923665f7f7eedd7a)
Co-authored-by: Hugo van Kemenade <[email protected]> The "Backport PR URL" has If the URL isn't auto-opened, you can click or copy/paste it into your browser. |
Just speculation, but maybe my BROWSER setting ( I've forked and cloned it. Will try using that version with the addition of a few prints to see if something turns up. |
That's not it. I run
I go off to Emacs and fix the conflict, then go back to the shell. Seeing the hints from
So, again, pilot error. |
Oh, now I can definitely see there's room for confusion here: Maybe pilot error, but air traffic control isn't giving the clearest instructions... |
sigh Let's try this again against the proper branch.
📚 Documentation preview 📚: https://cpython-previews--115311.org.readthedocs.build/