Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Craig Citro
> This question has an easy answer - can you possibly tell the difference? > Ok, I'm obviously being silly here, but sure you can: >>> dis.dis("raise TypeError()") 0 <114> 26977 3 <115>8293 6 IMPORT_STAR 7 SETUP_EXCEPT25968 (to 259

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Maciej Fijalkowski
On Fri, Jul 2, 2010 at 12:31 AM, Stefan Behnel wrote: > Glyph Lefkowitz, 02.07.2010 06:43: >> >> On Jul 2, 2010, at 12:28 AM, Steven D'Aprano wrote: >> >>> This question was inspired by something asked on #python today. Consider >>> it a hypothetical, not a serious proposal. >>> >>> We know that m

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Stefan Behnel
Glyph Lefkowitz, 02.07.2010 06:43: On Jul 2, 2010, at 12:28 AM, Steven D'Aprano wrote: This question was inspired by something asked on #python today. Consider it a hypothetical, not a serious proposal. We know that many semantic errors in Python lead to runtime errors, e.g. 1 + "1". If an imp

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Glyph Lefkowitz
On Jul 2, 2010, at 12:28 AM, Steven D'Aprano wrote: > This question was inspired by something asked on #python today. Consider > it a hypothetical, not a serious proposal. > > We know that many semantic errors in Python lead to runtime errors, e.g. > 1 + "1". If an implementation rejected them

Re: [Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Martin v. Löwis
> We know that many semantic errors in Python lead to runtime errors, e.g. > 1 + "1". If an implementation rejected them at compile time, would it > still be Python? E.g. if the keyhole optimizer raised SyntaxError (or > some other exception) on seeing this: > > def f(): > return 1 + "1" >

[Python-Dev] Can Python implementations reject semantically invalid expressions?

2010-07-01 Thread Steven D'Aprano
This question was inspired by something asked on #python today. Consider it a hypothetical, not a serious proposal. We know that many semantic errors in Python lead to runtime errors, e.g. 1 + "1". If an implementation rejected them at compile time, would it still be Python? E.g. if the keyhole

Re: [Python-Dev] Mercurial migration readiness

2010-07-01 Thread Dan Buch
> Wouldn't it be cool if we could hook this up to Rietveld? I can also highly recommend ReviewBoard_ since it already speaks Mercurial. My company has been using it since Dec. 2009 as an invaluable addition to in-person code reviews for both Subversion and Mercurial repos. FWIW, I've got an inst

[Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Stephen J. Turnbull
anatoly techtonik writes: > After reading PEP 384 and PEP 385 (finally) I got a strong impression > that they are not ready for the change (read below the line for > details), because they do not propose any workflow. This was deliberate. There are a lot of different workflows, and we are not

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Barry Warsaw
On Jul 01, 2010, at 03:26 PM, Brett Cannon wrote: >On Thu, Jul 1, 2010 at 15:07, Barry Warsaw wrote: >> Other than that, while I sometimes review patches in email, I do not >> think patches in a tracker are the best way to manage these.  A >> dvcs's biggest strength is in branches, so we should

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Tim Delaney
On 2 July 2010 09:08, Tim Delaney wrote: > On 2 July 2010 08:07, Barry Warsaw wrote: > >> >> Other than that, while I sometimes review patches in email, I do not think >> patches in a tracker are the best way to manage these. A dvcs's biggest >> strength is in branches, so we should use those a

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Tim Delaney
On 2 July 2010 08:07, Barry Warsaw wrote: > > Other than that, while I sometimes review patches in email, I do not think > patches in a tracker are the best way to manage these. A dvcs's biggest > strength is in branches, so we should use those as much as possible. > > I changed my team over fro

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Antoine Pitrou
On Thu, 1 Jul 2010 15:26:12 -0700 Brett Cannon wrote: > > As I said, quick-and-dirty. It will take discussion to decide what we > want to ask non-committers to do, I don't think we have to ask them to do anything special, as long as they can submit their contributions under the form of a patch.

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Brett Cannon
On Thu, Jul 1, 2010 at 15:07, Barry Warsaw wrote: > On Jul 01, 2010, at 10:57 PM, Paul Moore wrote: > >>On 1 July 2010 20:58, Brett Cannon wrote: >>> Here is a *really* quick-and-dirty approach for non-committers to >>> create a patch they can submit. This is not extensively tested so >>> some ot

Re: [Python-Dev] Mercurial migration readiness

2010-07-01 Thread Martin v. Löwis
Am 01.07.2010 23:57, schrieb Paul Moore: > will Roundup extract an attachment from an email and add > it to the issue as a file? That would be particularly neat... It actually does. Feel free to try it out on the life system (i.e. not worrying about bogus issues - we have several test issues alrea

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Barry Warsaw
On Jul 01, 2010, at 10:57 PM, Paul Moore wrote: >On 1 July 2010 20:58, Brett Cannon wrote: >> Here is a *really* quick-and-dirty approach for non-committers to >> create a patch they can submit. This is not extensively tested so >> some other Hg expert should back me up on this before telling any

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Paul Moore
On 1 July 2010 20:58, Brett Cannon wrote: > Here is a *really* quick-and-dirty approach for non-committers to > create a patch they can submit. This is not extensively tested so some > other Hg expert should back me up on this before telling anyone that > this is the simplest way. I am also not sa

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Doug Hellmann
On Jul 1, 2010, at 10:31 AM, Daniel Stutzbach wrote: On Thu, Jul 1, 2010 at 7:52 AM, anatoly techtonik wrote: 4. Even if I make patch in my Mercurial clone - you still can't pull it and I have to attach it to tracker. No gain. Was there ever any discussion about hosting the central reposito

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Éric Araujo
The workflow described by Brett looks like a patch-and-email one. It’s used by the Mercurial team itself, and has the advantage of not cluttering the history with lots of changes, since you only apply one patch in the end. However, in the not-so-long run I feel that a simpler and more mercurialic w

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Brett Cannon
On Thu, Jul 1, 2010 at 07:31, R. David Murray wrote: > On Thu, 01 Jul 2010 15:51:06 +0200, Dirkjan Ochtman > wrote: >> On Thu, Jul 1, 2010 at 14:52, anatoly techtonik wrote: >> > Primary concern is that will happen with central Subversion >> > repository. There are a plenty of private tools and

Re: [Python-Dev] How are the bdist_wininst binaries built ?

2010-07-01 Thread David Cournapeau
On Thu, Jul 1, 2010 at 2:00 PM, "Martin v. Löwis" wrote: >>> See PC/bdist_wininst. >> >> Hm, my question may not have been clear: *how* is the wininst-9.0 >> built from the bdist_wininst sources ? I see 6, 7.0, 7.1 and 8.0 >> versions of the visual studio build scripts, but nothing for VS 9.0. > >

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Jesse Noller
On Thu, Jul 1, 2010 at 8:52 AM, anatoly techtonik wrote: > After reading PEP 384 and PEP 385 (finally) I got a strong impression > that they are not ready for the change (read below the line for > details), because they do not propose any workflow. So, instead of > rushing with migration I'd like

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread C. Titus Brown
On Thu, Jul 01, 2010 at 09:31:13AM -0500, Daniel Stutzbach wrote: > On Thu, Jul 1, 2010 at 7:52 AM, anatoly techtonik wrote: > > > 4. Even if I make patch in my Mercurial clone - you still can't pull > > it and I have to attach it to tracker. No gain. > > > > Was there ever any discussion about h

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Dirkjan Ochtman
On Thu, Jul 1, 2010 at 16:31, Daniel Stutzbach wrote: > Was there ever any discussion about hosting the central repository on a site > such as bitbucket or github?  I tried searching the python-dev archives but > was unable to find much. > Anyway... assuming there's a at least a clone of the centr

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Dirkjan Ochtman
On Thu, Jul 1, 2010 at 16:31, Daniel Stutzbach wrote: > The hg-git tool allows Mercurial and git to interoperate, so that's not as > much of an issue as it once was.  It's geared toward using a Mercurial > client to talk to a git server, but I'm told it can work the other way > around with a bit o

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread R. David Murray
On Thu, 01 Jul 2010 15:51:06 +0200, Dirkjan Ochtman wrote: > On Thu, Jul 1, 2010 at 14:52, anatoly techtonik wrote: > > Primary concern is that will happen with central Subversion > > repository. There are a plenty of private tools and automated scripts > > that were written to work with central

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Daniel Stutzbach
On Thu, Jul 1, 2010 at 7:52 AM, anatoly techtonik wrote: > 4. Even if I make patch in my Mercurial clone - you still can't pull > it and I have to attach it to tracker. No gain. > Was there ever any discussion about hosting the central repository on a site such as bitbucket or github? I tried se

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dan Buch
Excellent! Much thanks, Dirkjan. -- ~Dan On Thu, Jul 01, 2010 at 04:14:16PM +0200, Dirkjan Ochtman wrote: > On Thu, Jul 1, 2010 at 15:23, Dan Buch wrote: > > I assume having such a tarball available would be a good thing, but what > > do I know!? :) > > I'm putting one up. I'll email you the

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dirkjan Ochtman
On Thu, Jul 1, 2010 at 15:23, Dan Buch wrote: > I assume having such a tarball available would be a good thing, but what > do I know!? :) I'm putting one up. I'll email you the address privately in order to preserve some bandwidth. Anyone else who wants a copy: just email me. > Are your steps fo

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Dirkjan Ochtman
On Thu, Jul 1, 2010 at 14:52, anatoly techtonik wrote: > Primary concern is that will happen with central Subversion > repository. There are a plenty of private tools and automated scripts > that were written to work with central Subversion repository, so it is > important that central Subversion

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dan Buch
Dirkjan, I assume having such a tarball available would be a good thing, but what do I know!? :) Are your steps for reproducing the referenced problem with cvs2svn-generated revs available on an issue, wiki page or PEP? -- ~Dan On Thu, Jul 01, 2010 at 02:19:06PM +0200, Dirkjan Ochtman wrote: >

[Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread anatoly techtonik
After reading PEP 384 and PEP 385 (finally) I got a strong impression that they are not ready for the change (read below the line for details), because they do not propose any workflow. So, instead of rushing with migration I'd like to propose incremental change rather than revolutionary that will

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dirkjan Ochtman
On Thu, Jul 1, 2010 at 14:09, Dan Buch wrote: > Does anybody know if there's already an issue tracking the failure > so that volunteers can better reproduce the issue?  Is a full checkout > of /projects/python via hgsubversion all that's required, perhaps? I work from a full svnsync of the projec

Re: [Python-Dev] Regarding socket timeouts in httplib

2010-07-01 Thread R. David Murray
On Thu, 01 Jul 2010 10:33:30 +0200, Anders Sandvig wrote: > >From the top of my head, I can come up with three (four) ways of > properly solving the issue: > > 1) Documenting the timeout behavior and describing the above hack in > the httplib documentation. > > 2) Modify HTTPConnection.connect(

Re: [Python-Dev] Taking over the Mercurial Migration

2010-07-01 Thread Dan Buch
On Thu, Jul 01, 2010 at 06:37:22AM +0200, "Martin v. Löwis" wrote: > Am 01.07.2010 02:01, schrieb Dan Buch: > > /me throws hat into ring. I'm in the middle of migrating fairly > > large chunks of an overgrown codebase from Subversion to Mercurial, > > so I might actually have worthwhile input :) >

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-01 Thread Scott Dial
On 6/30/2010 2:53 PM, Barry Warsaw wrote: > It might be amazing, but it's still a significant overhead. As I've > described, multiply that by all the py files in all the distro packages > containing Python source code, and then still try to fit it on a CDROM. I decided to prove to myself that it

Re: [Python-Dev] [pypy-dev] PyPy 1.3 released

2010-07-01 Thread Maciej Fijalkowski
On Wed, Jun 30, 2010 at 3:24 PM, Phyo Arkar wrote: > So far , python-mysql still not working.. > > Anyone had sucessfully got it work? Hey. I'm not aware of anyone who had any success. You can come to #pypy on irc.freenode.net and we can see how to solve the problem. > > On Fri, Jun 25, 2010 at

Re: [Python-Dev] Regarding socket timeouts in httplib

2010-07-01 Thread Simon Cross
On Thu, Jul 1, 2010 at 10:33 AM, Anders Sandvig wrote: > 2) Modify HTTPConnection.connect() to set the timeout on the socket > object after it has been  created (using the same timeout as given on > the HTTPConnection constructor). It looks like urllib2 in trunk and urllib.request in py3k are als

[Python-Dev] Regarding socket timeouts in httplib

2010-07-01 Thread Anders Sandvig
Consider the following code for retreieving a web page using httplib:    def get_url(hostname, port, url, timeout=5):        con = httplib.HTTPConnection(hostname, port, timeout)        con.request("GET", url)        res = con.getresponse()        data = res.read()        return res, data As expe