Re: [Python-Dev] Python-versus-CPython question for __mul__ dispatch
Hi Nick, On 16 May 2015 at 10:31, Nick Coghlan wrote: > Oh, that's rather annoying that the PyPy team implemented bug-for-bug > compatibility there, and didn't follow up on the operand precedence > bug report to say that they had done so. It's sadly not the only place, by far, where a behavior of CPython could be considered an implementation detail, but people rely on it and so we need to write a workaround. We don't report all of them, particularly not the ones that are clearly of the kind "won't be changed in CPython 2.7". Maybe we should? Another example where this same bug occurs is: class T(tuple): def __radd__(self, other): return 42 lst = [ ] lst += T() which calls T.__radd__ in contradiction to all the general rules. (Yes, if you print(lst) afterwards, you get 42. And oops, trying this out on PyPy does not give 42; only "lst + T()" does. Probably another corner case to fix...) A bientôt, Armin. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Automated testing of patches from bugs.python.org
Hi, With the help of CentOS project I am happy to announce an automated system [1] to test patches from bugs.python.org. This can be fully automated to test the patches whenever someone uploads a patch in the roundup, but for now it accepts IRC commands on #python-dev channel. I worked on a docker based prototype during sprints in PyCon. How to use it? --- 1. Join #python-dev on irc.freenode.net. 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer 3. They will issue a simple command. #add: YOUR_NICK_NAME 4. You can then test by issuing the following command in the channel: #test: BUGNUMBER like #test: 21271 This will do the following: Start a new job on ci.centos.org, announce it on the channel, and announce the result also. I will be working on a minimal lint for patches, and include it the workflow. The current steps can be found at [2]. Each build is happening on a fresh system. Limitations --- 1. It excepts one single patch to contain all the required changes (instead of a series of patches). 2. It runs only on x86_64 architecture, CentOS7 based systems. [1] https://ci.centos.org/job/cPython-build-patch/ [2] https://github.com/kushaldas/pypatcher/blob/master/pypatcher.sh Kushal -- Fedora Cloud Engineer CPython Core Developer Director @ Python Software Foundation http://kushaldas.in ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Automated testing of patches from bugs.python.org
On Tue, May 19, 2015 at 6:02 PM, Kushal Das wrote: > Hi, > > With the help of CentOS project I am happy to announce an automated > system [1] to test patches from bugs.python.org. This can be fully automated > to test the patches whenever someone uploads a patch in the roundup, but > for now it accepts IRC commands on #python-dev channel. I worked on a > docker based prototype during sprints in PyCon. > > How to use it? > --- > > 1. Join #python-dev on irc.freenode.net. > 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer > 3. They will issue a simple command. #add: YOUR_NICK_NAME > 4. You can then test by issuing the following command in the channel: > > #test: BUGNUMBER > like #test: 21271 > > This will do the following: > Start a new job on ci.centos.org, announce it on the channel, and > announce the result also. Hi Kushal, Looks great, thanks! :) Two comments: * It would be good to have a pypatcher repository at hg.python.org (at least a mirror), so we can work on it together without dealing with "add me to the repo" messages on GitHub. * Do you have a roadmap or a TODO list? For example, I think downloading a tarball of the default branch every time (or is it cached?) would be a little bit slow. Do you have a plan to make the workflow Mercurial based (e.g. "hg pull -u, hg imp --no-c issue.diff, compile" instead of "wget tarball, extract it, apply patch, compile")? > I will be working on a minimal lint for patches, and include it > the workflow. Could you give more details about the linter? Can we use Tools/scripts/patchcheck.py? Thanks! --Berker ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Automated testing of patches from bugs.python.org
On 19/05/15, Berker Peksağ wrote: > On Tue, May 19, 2015 at 6:02 PM, Kushal Das wrote: > > Hi, > > > > With the help of CentOS project I am happy to announce an automated > > system [1] to test patches from bugs.python.org. This can be fully automated > > to test the patches whenever someone uploads a patch in the roundup, but > > for now it accepts IRC commands on #python-dev channel. I worked on a > > docker based prototype during sprints in PyCon. > > > > How to use it? > > --- > > > > 1. Join #python-dev on irc.freenode.net. > > 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer > > 3. They will issue a simple command. #add: YOUR_NICK_NAME > > 4. You can then test by issuing the following command in the channel: > > > > #test: BUGNUMBER > > like #test: 21271 > > > > This will do the following: > > Start a new job on ci.centos.org, announce it on the channel, and > > announce the result also. > > Hi Kushal, > > Looks great, thanks! :) > > Two comments: > > * It would be good to have a pypatcher repository at hg.python.org (at > least a mirror), so we can work on it together without dealing with > "add me to the repo" messages on GitHub. We can surely do this. I started with github as generally most people are already there. Do you know what is the procedure for creating a new repo in hg.python.org? > * Do you have a roadmap or a TODO list? For example, I think > downloading a tarball of the default branch every time (or is it > cached?) would be a little bit slow. Do you have a plan to make the > workflow Mercurial based (e.g. "hg pull -u, hg imp --no-c > issue.diff, compile" instead of "wget tarball, extract it, apply > patch, compile")? I will have to work on the TODO list, I will post it on the repo itself. The downloading tarball currently takes around 15-16 seconds, which I found fast enough to start with. I personally always use standard patch command, that is why I chose this approach instead of hg. We can always improve the workflow :) > > I will be working on a minimal lint for patches, and include it > > the workflow. > > Could you give more details about the linter? Can we use > Tools/scripts/patchcheck.py? For this I really never thought much. We should discuss more on this to find out what all we can do. Kushal -- Fedora Cloud Engineer CPython Core Developer Director @ Python Software Foundation http://kushaldas.in ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Automated testing of patches from bugs.python.org
Cool! Thanks! BuildBot integration? * http://docs.buildbot.net/latest/full.html#source-stamps * http://docs.buildbot.net/latest/full.html#enabling-the-irc-bot * http://docs.buildbot.net/latest/full.html#choosing-a-change-source https://github.com/audreyr/cookiecutter-pypackage (requirements.txt, setup.py, Makefile) pip install cookiecutter cookiecutter gh:audreyr/cookiecutter-pypackage On Tue, May 19, 2015 at 10:02 AM, Kushal Das wrote: > Hi, > > With the help of CentOS project I am happy to announce an automated > system [1] to test patches from bugs.python.org. This can be fully > automated > to test the patches whenever someone uploads a patch in the roundup, but > for now it accepts IRC commands on #python-dev channel. I worked on a > docker based prototype during sprints in PyCon. > > How to use it? > --- > > 1. Join #python-dev on irc.freenode.net. > 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer > 3. They will issue a simple command. #add: YOUR_NICK_NAME > 4. You can then test by issuing the following command in the channel: > > #test: BUGNUMBER > like #test: 21271 > > This will do the following: > Start a new job on ci.centos.org, announce it on the channel, and > announce the result also. > > I will be working on a minimal lint for patches, and include it > the workflow. > > The current steps can be found at [2]. Each build is happening on a > fresh system. > > Limitations > --- > > 1. It excepts one single patch to contain all the required changes > (instead of a series of patches). > 2. It runs only on x86_64 architecture, CentOS7 based systems. > > > > [1] https://ci.centos.org/job/cPython-build-patch/ > [2] https://github.com/kushaldas/pypatcher/blob/master/pypatcher.sh > > Kushal > -- > Fedora Cloud Engineer > CPython Core Developer > Director @ Python Software Foundation > http://kushaldas.in > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Automated testing of patches from bugs.python.org
In the airport but I wanted to say thanks for this! On Tue, May 19, 2015, 11:03 Kushal Das wrote: > Hi, > > With the help of CentOS project I am happy to announce an automated > system [1] to test patches from bugs.python.org. This can be fully > automated > to test the patches whenever someone uploads a patch in the roundup, but > for now it accepts IRC commands on #python-dev channel. I worked on a > docker based prototype during sprints in PyCon. > > How to use it? > --- > > 1. Join #python-dev on irc.freenode.net. > 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer > 3. They will issue a simple command. #add: YOUR_NICK_NAME > 4. You can then test by issuing the following command in the channel: > > #test: BUGNUMBER > like #test: 21271 > > This will do the following: > Start a new job on ci.centos.org, announce it on the channel, and > announce the result also. > > I will be working on a minimal lint for patches, and include it > the workflow. > > The current steps can be found at [2]. Each build is happening on a > fresh system. > > Limitations > --- > > 1. It excepts one single patch to contain all the required changes > (instead of a series of patches). > 2. It runs only on x86_64 architecture, CentOS7 based systems. > > > > [1] https://ci.centos.org/job/cPython-build-patch/ > [2] https://github.com/kushaldas/pypatcher/blob/master/pypatcher.sh > > Kushal > -- > Fedora Cloud Engineer > CPython Core Developer > Director @ Python Software Foundation > http://kushaldas.in > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/brett%40python.org > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Automated testing of patches from bugs.python.org
http://docs.buildbot.net/latest/search.html?q=docker ... Here's a BuildBot Dockerfile: http://docs.buildbot.net/latest/manual/cfg-buildslaves-docker.html#image-creation On Tue, May 19, 2015 at 1:22 PM, Wes Turner wrote: > Cool! Thanks! > > BuildBot integration? > > * http://docs.buildbot.net/latest/full.html#source-stamps > * http://docs.buildbot.net/latest/full.html#enabling-the-irc-bot > * http://docs.buildbot.net/latest/full.html#choosing-a-change-source > > https://github.com/audreyr/cookiecutter-pypackage (requirements.txt, > setup.py, Makefile) > >pip install cookiecutter >cookiecutter gh:audreyr/cookiecutter-pypackage > > > On Tue, May 19, 2015 at 10:02 AM, Kushal Das wrote: > >> Hi, >> >> With the help of CentOS project I am happy to announce an automated >> system [1] to test patches from bugs.python.org. This can be fully >> automated >> to test the patches whenever someone uploads a patch in the roundup, but >> for now it accepts IRC commands on #python-dev channel. I worked on a >> docker based prototype during sprints in PyCon. >> >> How to use it? >> --- >> >> 1. Join #python-dev on irc.freenode.net. >> 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer >> 3. They will issue a simple command. #add: YOUR_NICK_NAME >> 4. You can then test by issuing the following command in the channel: >> >> #test: BUGNUMBER >> like #test: 21271 >> >> This will do the following: >> Start a new job on ci.centos.org, announce it on the channel, and >> announce the result also. >> >> I will be working on a minimal lint for patches, and include it >> the workflow. >> >> The current steps can be found at [2]. Each build is happening on a >> fresh system. >> >> Limitations >> --- >> >> 1. It excepts one single patch to contain all the required changes >> (instead of a series of patches). >> 2. It runs only on x86_64 architecture, CentOS7 based systems. >> >> >> >> [1] https://ci.centos.org/job/cPython-build-patch/ >> [2] https://github.com/kushaldas/pypatcher/blob/master/pypatcher.sh >> >> Kushal >> -- >> Fedora Cloud Engineer >> CPython Core Developer >> Director @ Python Software Foundation >> http://kushaldas.in >> ___ >> Python-Dev mailing list >> Python-Dev@python.org >> https://mail.python.org/mailman/listinfo/python-dev >> Unsubscribe: >> https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com >> > > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Automated testing of patches from bugs.python.org
Here's a GerritChangeSource for BuildBot events: http://docs.buildbot.net/latest/full.html#chsrc-GerritChangeSource Great idea, thanks again! On Tue, May 19, 2015 at 1:25 PM, Wes Turner wrote: > http://docs.buildbot.net/latest/search.html?q=docker ... > > Here's a BuildBot Dockerfile: > http://docs.buildbot.net/latest/manual/cfg-buildslaves-docker.html#image-creation > > On Tue, May 19, 2015 at 1:22 PM, Wes Turner wrote: > >> Cool! Thanks! >> >> BuildBot integration? >> >> * http://docs.buildbot.net/latest/full.html#source-stamps >> * http://docs.buildbot.net/latest/full.html#enabling-the-irc-bot >> * http://docs.buildbot.net/latest/full.html#choosing-a-change-source >> >> https://github.com/audreyr/cookiecutter-pypackage (requirements.txt, >> setup.py, Makefile) >> >>pip install cookiecutter >>cookiecutter gh:audreyr/cookiecutter-pypackage >> >> >> On Tue, May 19, 2015 at 10:02 AM, Kushal Das wrote: >> >>> Hi, >>> >>> With the help of CentOS project I am happy to announce an automated >>> system [1] to test patches from bugs.python.org. This can be fully >>> automated >>> to test the patches whenever someone uploads a patch in the roundup, but >>> for now it accepts IRC commands on #python-dev channel. I worked on a >>> docker based prototype during sprints in PyCon. >>> >>> How to use it? >>> --- >>> >>> 1. Join #python-dev on irc.freenode.net. >>> 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer >>> 3. They will issue a simple command. #add: YOUR_NICK_NAME >>> 4. You can then test by issuing the following command in the channel: >>> >>> #test: BUGNUMBER >>> like #test: 21271 >>> >>> This will do the following: >>> Start a new job on ci.centos.org, announce it on the channel, and >>> announce the result also. >>> >>> I will be working on a minimal lint for patches, and include it >>> the workflow. >>> >>> The current steps can be found at [2]. Each build is happening on a >>> fresh system. >>> >>> Limitations >>> --- >>> >>> 1. It excepts one single patch to contain all the required changes >>> (instead of a series of patches). >>> 2. It runs only on x86_64 architecture, CentOS7 based systems. >>> >>> >>> >>> [1] https://ci.centos.org/job/cPython-build-patch/ >>> [2] https://github.com/kushaldas/pypatcher/blob/master/pypatcher.sh >>> >>> Kushal >>> -- >>> Fedora Cloud Engineer >>> CPython Core Developer >>> Director @ Python Software Foundation >>> http://kushaldas.in >>> ___ >>> Python-Dev mailing list >>> Python-Dev@python.org >>> https://mail.python.org/mailman/listinfo/python-dev >>> Unsubscribe: >>> https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com >>> >> >> > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Automated testing of patches from bugs.python.org
On 5/19/2015 11:02 AM, Kushal Das wrote: Hi, With the help of CentOS project I am happy to announce an automated system [1] to test patches from bugs.python.org. This can be fully automated to test the patches whenever someone uploads a patch in the roundup, but for now it accepts IRC commands on #python-dev channel. I worked on a docker based prototype during sprints in PyCon. How to use it? --- 1. Join #python-dev on irc.freenode.net. 2. Ask for test privilege from any one of kushal,Taggnostr,bitdancer 3. They will issue a simple command. #add: YOUR_NICK_NAME 4. You can then test by issuing the following command in the channel: #test: BUGNUMBER like #test: 21271 What if there are multiple patches on the issue? Pick the latest? This is not correct if someone follows up a patch with a 2.7 backport, or if there are competing patches. This will do the following: Start a new job on ci.centos.org, announce it on the channel, and announce the result also. I will be working on a minimal lint for patches, and include it the workflow. The current steps can be found at [2]. Each build is happening on a fresh system. Limitations --- 1. It excepts one single patch to contain all the required changes (instead of a series of patches). 2. It runs only on x86_64 architecture, CentOS7 based systems. [1] https://ci.centos.org/job/cPython-build-patch/ [2] https://github.com/kushaldas/pypatcher/blob/master/pypatcher.sh Kushal -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python-versus-CPython question for __mul__ dispatch
We have a similar experience -- Pyston runs into a similar issue with sqlalchemy (with "str() + foo" calling foo.__radd__ before str.sq_concat) and we are working to match CPython's behavior. On Tue, May 19, 2015 at 7:00 AM, Armin Rigo wrote: > Hi Nick, > > On 16 May 2015 at 10:31, Nick Coghlan wrote: > > Oh, that's rather annoying that the PyPy team implemented bug-for-bug > > compatibility there, and didn't follow up on the operand precedence > > bug report to say that they had done so. > > It's sadly not the only place, by far, where a behavior of CPython > could be considered an implementation detail, but people rely on it > and so we need to write a workaround. We don't report all of them, > particularly not the ones that are clearly of the kind "won't be > changed in CPython 2.7". Maybe we should? > > Another example where this same bug occurs is: > > class T(tuple): >def __radd__(self, other): > return 42 > > lst = [ ] > lst += T() > > which calls T.__radd__ in contradiction to all the general rules. > (Yes, if you print(lst) afterwards, you get 42. And oops, trying this > out on PyPy does not give 42; only "lst + T()" does. Probably another > corner case to fix...) > > > A bientôt, > > Armin. > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/kevmod%40gmail.com > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com