[Python-Dev] Re: PEP 654: Exception Groups and except* [REPOST]
On Thu, Apr 29, 2021 at 9:14 AM Yury Selivanov wrote: > Nathaniel, at this point it's clear that this thread somehow does not > help us understand what you want. Could you please just write your own > PEP clearly outlining your proposal, its upsides and downsides? > Without a PEP from you this thread is just a distraction. If that's the best way to move forward, then ok. My main thing is just that I don't want to make this some antagonistic me-vs-you thing. After all, we all want the best design to be chosen, and none of us know what that is yet, so there's no need for conflict :-). Irit, Yury, would you be interested in co-authoring a PEP for the "flat EG" approach? Basically trying to set down the best possible version of each approach, so that we can put them next to each other? -n -- Nathaniel J. Smith -- https://vorpus.org ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/LZBM5F6SAULEN7KEYNHBCLUPTB4JHBGO/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: PEP 654: Exception Groups and except* [REPOST]
On Thu, May 6, 2021 at 2:17 AM Nathaniel Smith wrote: > > On Thu, Apr 29, 2021 at 9:14 AM Yury Selivanov > wrote: > > Nathaniel, at this point it's clear that this thread somehow does not > > help us understand what you want. Could you please just write your own > > PEP clearly outlining your proposal, its upsides and downsides? > > Without a PEP from you this thread is just a distraction. > > If that's the best way to move forward, then ok. My main thing is just > that I don't want to make this some antagonistic me-vs-you thing. > After all, we all want the best design to be chosen, and none of us > know what that is yet, so there's no need for conflict :-). > > Irit, Yury, would you be interested in co-authoring a PEP for the > "flat EG" approach? Basically trying to set down the best possible > version of each approach, so that we can put them next to each other? Uh, probably this is obvious, but I mean "co-authoring with me". I'm not suggesting you two go off to do it without me :-) -- Nathaniel J. Smith -- https://vorpus.org ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/5TFK5LEMDQ7GNYFKNS7QO7GGT33M6KAP/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: PEP 654: Exception Groups and except* [REPOST]
Hi Nathaniel, Philosophy of Science 101: nobody knows what TheBestSolution is and nobody ever will. That said, when we decided to submit PEP 654, that was a point in time when we came to believe that we found the right solution. We made significant changes later following feedback we agreed with, but in the case of "flat EG" I see several disadvantages and don't quite understand what the win is. I appreciate the invitation, but I don't want to work on that idea (nor am I the right person to push it forward). However, I think it's fantastic if you and others do pursue alternative options (independently of my biases). You will either find something better or validate PEP 654, and in either case the world wins. Feel free to adapt our implementation if that helps. You have a year before we have our next chance to commit to PEP 654. Irit On Thu, May 6, 2021 at 10:18 AM Nathaniel Smith wrote: > On Thu, Apr 29, 2021 at 9:14 AM Yury Selivanov > wrote: > > Nathaniel, at this point it's clear that this thread somehow does not > > help us understand what you want. Could you please just write your own > > PEP clearly outlining your proposal, its upsides and downsides? > > Without a PEP from you this thread is just a distraction. > > If that's the best way to move forward, then ok. My main thing is just > that I don't want to make this some antagonistic me-vs-you thing. > After all, we all want the best design to be chosen, and none of us > know what that is yet, so there's no need for conflict :-). > Irit, Yury, would you be interested in co-authoring a PEP for the > "flat EG" approach? Basically trying to set down the best possible > version of each approach, so that we can put them next to each other? > > -n > > -- > Nathaniel J. Smith -- https://vorpus.org > ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/BOSMGZQHX3OHXEVRMEJXY6FONIJT7MNP/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Can't sync cpython main to my fork
(Sorry, this is probably not really python-dev material, but I'm stuck trying to bring my fork into sync with python/cpython.) I don't know if I did something to my fork or if the master->main change did something to me, but I am unable to sync my smontanaro/cpython main with the python/cpython main. The dev guide gives this simple recipe: git checkout main git pull upstream main git push origin main Here's how that goes: (python39) rvm% git co main Already on 'main' Your branch is up to date with 'upstream/main'. (python39) rvm% git pull upstream main >From git://github.com/python/cpython * branch main -> FETCH_HEAD Already up to date. (python39) rvm% git push origin main To github.com:smontanaro/cpython.git ! [rejected] main -> main (non-fast-forward) error: failed to push some refs to 'github.com:smontanaro/cpython.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. I looked at the fast-forward stuff in 'git push --help' but couldn't decipher what it told me, or more importantly, how it related to my problem. It's not clear to me how python/cpython:main can be behind smontanaro/cpython:main. I've attached my .git/config file in case that provides clues to the Git aficionados. Thx... Skip config Description: Binary data ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/J6GGEKUBMPU3X3WNKUG2XUD3GDV7L2FK/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
Your main branch in GitHub has some commits they are not in python/cpython. https://github.com/smontanaro/cpython/commits/main If you don't mind to trash all changes in your local and Github main branch, you can sync main branches by: # delete all changes in your worktree and main branch. $ git reset --hard upstream/main # delete all changes in your Github main branch. $ git push --force origin main On Thu, May 6, 2021 at 9:41 PM Skip Montanaro wrote: > > (Sorry, this is probably not really python-dev material, but I'm stuck > trying to bring my fork into sync with python/cpython.) > > I don't know if I did something to my fork or if the master->main > change did something to me, but I am unable to sync my > smontanaro/cpython main with the python/cpython main. The dev guide > gives this simple recipe: > > git checkout main > git pull upstream main > git push origin main > > Here's how that goes: > > (python39) rvm% git co main > Already on 'main' > Your branch is up to date with 'upstream/main'. > (python39) rvm% git pull upstream main > From git://github.com/python/cpython > * branch main -> FETCH_HEAD > Already up to date. > (python39) rvm% git push origin main > To github.com:smontanaro/cpython.git > ! [rejected] main -> main (non-fast-forward) > error: failed to push some refs to 'github.com:smontanaro/cpython.git' > hint: Updates were rejected because the tip of your current branch is behind > hint: its remote counterpart. Integrate the remote changes (e.g. > hint: 'git pull ...') before pushing again. > hint: See the 'Note about fast-forwards' in 'git push --help' for details. > > I looked at the fast-forward stuff in 'git push --help' but couldn't > decipher what it told me, or more importantly, how it related to my > problem. It's not clear to me how python/cpython:main can be behind > smontanaro/cpython:main. I've attached my .git/config file in case > that provides clues to the Git aficionados. > > Thx... > > Skip > ___ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/J6GGEKUBMPU3X3WNKUG2XUD3GDV7L2FK/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Inada Naoki ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/EWSK2TM4QD3BM5G2CMEIJB6PVFO3FNSO/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
On Thu, May 6, 2021 at 2:46 PM Skip Montanaro wrote: > > I looked at the fast-forward stuff in 'git push --help' but couldn't > decipher what it told me, or more importantly, how it related to my > problem. It's not clear to me how python/cpython:main can be behind > smontanaro/cpython:main. Just open it in a browser, and it says: "This branch is 186 commits ahead, 120 commits behind python:main" ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/OBC4G2XIRS56CVEW37IKRBVXLUDL27PW/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
Thanks for the recipe to fix my problem. Your main branch in GitHub has some commits they are not in python/cpython. > https://github.com/smontanaro/cpython/commits/main Is there a way to easily tell how they differ? My (obvious to me, but wrong) guess was git diff upstream/main origin/main Then I went to Github and compared my fork with python/cpython: https://github.com/python/cpython/compare/main...smontanaro:main It appears I might have screwed the pooch by accepting Github's recent pull request. I'm just a gitiot. How am I supposed to know not to accept their PRs? Skip ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/SLTBCXF5S4S54F2VKQJZGOGWYNCR34PE/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
> Your main branch in GitHub has some commits they are not in python/cpython. > https://github.com/smontanaro/cpython/commits/main Regarding this. How else am I to keep my fork in sync with python/cpython other than by the occasional pull upstream/push origin process? That's what all those merges are. Is that first commit (Github (un)Dependabot) the culprit, or are all the other git merge results also problematic? Skip ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/AGUYBV54ZOBH6LJGABMOTLA4MEAXPWWY/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Documenting collections.abc __class_getitem__ type hints
Hello, Paul. The docs for __class_getitem__ are here: https://docs.python.org/3/reference/datamodel.html#emulating-generic-types I think the Data Model chapter is the right place for it. Cheers, Luciano On Thu, May 6, 2021 at 2:14 AM Paul Bryan wrote: > > I'm looking through the documentation, and not finding any good reference for > type hints for __class_getitem__ in the collections.abc module. > > I do see some of it covered in the typing module documentation, but those are > deprecated, and some are somewhat cryptic (e.g. Coroutine). > > Make sense to open a BPO and start a PR for doc updates? > > Paul > > ___ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/U3QIWBXHKRSWNVE6F4QKOT2OJULNZBWY/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Luciano Ramalho | Author of Fluent Python (O'Reilly, 2015) | http://shop.oreilly.com/product/0636920032519.do | Technical Principal at ThoughtWorks | Twitter: @ramalhoorg ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/4W7L3WX73VQHGCWCRFABH3JF45WWY7NW/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
El jue, 6 may 2021 a las 6:58, Skip Montanaro () escribió: > > Your main branch in GitHub has some commits they are not in > python/cpython. > > https://github.com/smontanaro/cpython/commits/main > > Regarding this. How else am I to keep my fork in sync with > python/cpython other than by the occasional pull upstream/push origin > process? That's what all those merges are. Is that first commit > (Github (un)Dependabot) the culprit, or are all the other git merge > results also problematic? > Maybe others have different workflows, but I don't see much of a need for keeping your fork's main branch up to date. My workflow is something like this: % git remote -v origin g...@github.com:JelleZijlstra/cpython.git (fetch) origin g...@github.com:JelleZijlstra/cpython.git (push) upstream https://github.com/python/cpython.git (fetch) upstream https://github.com/python/cpython.git (push) % git checkout main Already on 'main' Your branch is up to date with 'upstream/main'. % git pull ... get new changes from upstream % git checkout -b myfeature ... write my code % git push -u origin myfeature ... open a pull request So my local main branch tracks upstream/main (the real CPython repo), not origin/main (my fork). > > Skip > ___ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/AGUYBV54ZOBH6LJGABMOTLA4MEAXPWWY/ > Code of Conduct: http://python.org/psf/codeofconduct/ > ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/PQU2PWUG2WUHL44QKSIEC3BPUOZAZG6M/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
I also don't keep my fork in sync, and never needed to. I use the same workflow as Jelle. On Thu., May 6, 2021, 7:18 a.m. Jelle Zijlstra, wrote: > > > El jue, 6 may 2021 a las 6:58, Skip Montanaro () > escribió: > >> > Your main branch in GitHub has some commits they are not in >> python/cpython. >> > https://github.com/smontanaro/cpython/commits/main >> >> Regarding this. How else am I to keep my fork in sync with >> python/cpython other than by the occasional pull upstream/push origin >> process? That's what all those merges are. Is that first commit >> (Github (un)Dependabot) the culprit, or are all the other git merge >> results also problematic? >> > > Maybe others have different workflows, but I don't see much of a need for > keeping your fork's main branch up to date. My workflow is something like > this: > > % git remote -v > origin g...@github.com:JelleZijlstra/cpython.git (fetch) > origin g...@github.com:JelleZijlstra/cpython.git (push) > upstream https://github.com/python/cpython.git (fetch) > upstream https://github.com/python/cpython.git (push) > % git checkout main > Already on 'main' > Your branch is up to date with 'upstream/main'. > % git pull > ... get new changes from upstream > % git checkout -b myfeature > ... write my code > % git push -u origin myfeature > ... open a pull request > > So my local main branch tracks upstream/main (the real CPython repo), not > origin/main (my fork). > > >> >> Skip >> ___ >> Python-Dev mailing list -- python-dev@python.org >> To unsubscribe send an email to python-dev-le...@python.org >> https://mail.python.org/mailman3/lists/python-dev.python.org/ >> Message archived at >> https://mail.python.org/archives/list/python-dev@python.org/message/AGUYBV54ZOBH6LJGABMOTLA4MEAXPWWY/ >> Code of Conduct: http://python.org/psf/codeofconduct/ >> > ___ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/PQU2PWUG2WUHL44QKSIEC3BPUOZAZG6M/ > Code of Conduct: http://python.org/psf/codeofconduct/ > ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/IBL7MJIEBM36GW6QTN45HPEI2LT5Q4ZY/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Documenting collections.abc __class_getitem__ type hints
I should have probably written my message more clearly. I'm referring to the specific expected parameters for generic types, especially those in collections.abc (e.g. Callable, Coroutine, ...). Each expects different parameters depending on its type. Other examples, where are the (non-deprecated) generic type signatures for dict, list, etc. defined? Data model seems appropriate for covering how to expose generic types, but the type-specific signatures should be defined closer to there types? Paul On Thu, 2021-05-06 at 11:10 -0300, Luciano Ramalho wrote: > Hello, Paul. > > The docs for __class_getitem__ are here: > > https://docs.python.org/3/reference/datamodel.html#emulating-generic-types > > I think the Data Model chapter is the right place for it. > > Cheers, > > Luciano > > On Thu, May 6, 2021 at 2:14 AM Paul Bryan wrote: > > > > I'm looking through the documentation, and not finding any good > > reference for type hints for __class_getitem__ in the > > collections.abc module. > > > > I do see some of it covered in the typing module documentation, but > > those are deprecated, and some are somewhat cryptic (e.g. > > Coroutine). > > > > Make sense to open a BPO and start a PR for doc updates? > > > > Paul > > > > ___ > > Python-Dev mailing list -- python-dev@python.org > > To unsubscribe send an email to python-dev-le...@python.org > > https://mail.python.org/mailman3/lists/python-dev.python.org/ > > Message archived at > > https://mail.python.org/archives/list/python-dev@python.org/message/U3QIWBXHKRSWNVE6F4QKOT2OJULNZBWY/ > > Code of Conduct: http://python.org/psf/codeofconduct/ > > > ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/X2WORI3U3STO4TU6CE3KCJWUFEGAJJ6Y/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
> Maybe others have different workflows, but I don't see much of a need for > keeping your fork's main branch up to date. My workflow is something like > this: > > % git remote -v > origin g...@github.com:JelleZijlstra/cpython.git (fetch) > origin g...@github.com:JelleZijlstra/cpython.git (push) > upstream https://github.com/python/cpython.git (fetch) > upstream https://github.com/python/cpython.git (push) > % git checkout main > Already on 'main' > Your branch is up to date with 'upstream/main'. > % git pull > ... get new changes from upstream > % git checkout -b myfeature > ... write my code > % git push -u origin myfeature > ... open a pull request > > So my local main branch tracks upstream/main (the real CPython repo), not > origin/main (my fork). Thanks. Up until the 3.10 split I was tracking main from a development branch in my fork, and trying — lately pretty much unsuccessfully — to drink from the firehose of changes to the virtual machine code. It made sense to me to keep my fork's main up-to-date with upstream/main. Now that I have diverged to follow the 3.10 branch for now, that's less of an issue. Skip ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/Y6KZJPLQJNGXII7YBHTU7ICESICELL7V/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
On 5/6/21 7:14 AM, Jelle Zijlstra wrote: > Maybe others have different workflows, but I don't see much of a need > for keeping your fork's main branch up to date. I will occasionally do a `git push origin main` just to shut up the messages about being behind/ahead; other than that, I have no idea why I would need origin to be up to date. -- ~Ethan~ ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/CCOTW2ILRNTFIXRMWLVWDBT2FBANZ2Q4/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] Re: Can't sync cpython main to my fork
Just today, GitHub launched a new feature to sync a branch with upstream via the web UI. https://github.blog/changelog/2021-05-06-sync-an-out-of-date-branch-of-a-fork-from-the-web On Thu., May 6, 2021, 15:16 Ethan Furman, wrote: > On 5/6/21 7:14 AM, Jelle Zijlstra wrote: > > > Maybe others have different workflows, but I don't see much of a need > > for keeping your fork's main branch up to date. > > I will occasionally do a `git push origin main` just to shut up the > messages about being behind/ahead; other than that, > I have no idea why I would need origin to be up to date. > > -- > ~Ethan~ > ___ > Python-Dev mailing list -- python-dev@python.org > To unsubscribe send an email to python-dev-le...@python.org > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/python-dev@python.org/message/CCOTW2ILRNTFIXRMWLVWDBT2FBANZ2Q4/ > Code of Conduct: http://python.org/psf/codeofconduct/ > ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/N2HVBYVYVEFT7I4PFV2G7MD6JND45A3D/ Code of Conduct: http://python.org/psf/codeofconduct/