Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
For me, the personal benefit of getting a patch applied would be so that I didn't have to keep re-applying it to new versions of Python, and that I could distribute code relying on the patch to others without requiring *them* to use a patched version of Python as well. What you describe is pro

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Greg Ewing
Miguel Lobo wrote: > In fact I'm probably the person the > patch will benefit least, because I have already run into the problem > and know how to solve it. For me, the personal benefit of getting a patch applied would be so that I didn't have to keep re-applying it to new versions of Python, an

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Martin v. Löwis
Miguel Lobo schrieb: > Perhaps one example would help to clarify what I mean. I see that there > is an xml.parsers.expat module, with the following content: > > > > """Interface to the Expat non-validating XML parser.""" > __version__ = '$Revision: 17640 $' > > from pyexpat import * > >

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
Normally, the builtin modules are the ones that are shipped in Python core. I know you can get a bigger builtins list through freeze, or through a custom Setup.local, but it is fairly uncommon to do that. Also, having extension modules in a namespace is something that I would normally not do. I

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Martin v. Löwis
Miguel Lobo schrieb: > It won't benefit the Python core either, because we just don't use > builtin submodules. In fact, I find the notion of builtin submodules > somewhat strange. > > > Please excuse my curiosity, but why do you find it strange? Normally, the builtin modules are the

Re: [Python-Dev] Python-3000 upgrade path

2007-03-12 Thread Collin Winter
On 3/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On 10:22 pm, [EMAIL PROTECTED] wrote: [snip] > >I'm hoping Collin will continue his excellent work on 2to3. Hopefully > >he'll get help from others in writing docs aimed at teaching the > >c.l.py crowd how to use it and what to expect. > > I

Re: [Python-Dev] Fwd: Re: [Python-3000] Removing functions from the operator module

2007-03-12 Thread Armin Rigo
Hi Collin, On Mon, Mar 12, 2007 at 11:19:26AM -0500, Collin Winter wrote: > iter() is part of every syntactic construction that takes an iterator > argument (for, listcomps, gencomps, ...). Should it go in operator as > well? Historically, things that have a slot go in 'operator'. So that would

Re: [Python-Dev] Fwd: Re: [Python-3000] Removing functions from the operator module

2007-03-12 Thread Guido van Rossum
Yes. On 3/12/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 3/11/07, Armin Rigo <[EMAIL PROTECTED]> wrote: > > Hi Collin, > > > > On Wed, Mar 07, 2007 at 11:53:45PM -0600, Collin Winter wrote: > > > bool() and abs() aren't syntax, so I would never look in operator. > > > > abs() is not syntax b

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
It won't benefit the Python core either, because we just don't use builtin submodules. In fact, I find the notion of builtin submodules somewhat strange. Please excuse my curiosity, but why do you find it strange? P.S. Thanks to all for the considerate responses. Regards, Miguel ___

Re: [Python-Dev] Import APIs

2007-03-12 Thread Georg Brandl
IMHO yes, for all occurences in the core code. Guido van Rossum schrieb: > what's the situation for Py3k? Should it always use absolute import there? > > On 3/10/07, Georg Brandl <[EMAIL PROTECTED]> wrote: >> Currently, all C code that needs to import a module uses >> PyImport_ImportModule which

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Martin v. Löwis
Miguel Lobo schrieb: > I need to integrate the extra test file into a project file (probably > pythoncore). > > > The change to pythoncore.vcproj is already in the patch I posted. > Otherwise I wouldn't have been able to run my test under Windows. Ah, ok, I misremembered. It is the UNI

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Mike Klaas
On 3/12/07, Miguel Lobo <[EMAIL PROTECTED]> wrote: > > Yet, the same can be said for most other patches: they are all for the > > benefit of users running into the same respective problems. > > Agreed. What I mean is that this fasttrack system where the submitter has > to do some extra work seem

Re: [Python-Dev] Python-3000 upgrade path

2007-03-12 Thread Guido van Rossum
Absolutely right. I'll withdraw the lightweight version. It's done enough damage. On 3/11/07, Andrew McNamara <[EMAIL PROTECTED]> wrote: > >I wrote two versions of the dict views refactoring. One that turns > >d.keys() into list(d.keys()) and d.iterkeys() into iter(d.keys()). > >This one is pretty

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread dustin
On Mon, Mar 12, 2007 at 07:20:56PM +0100, Miguel Lobo wrote: >I'm not complaining or anything, and no offence meant to anyone, just >explaining my point of view. I might still try to do the 5 patch >review thing, depending on how long it takes me. But if I choose not >to do so, le

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
I need to integrate the extra test file into a project file (probably pythoncore). The change to pythoncore.vcproj is already in the patch I posted. Otherwise I wouldn't have been able to run my test under Windows. Yet, the same can be said for most other patches: they are all for the benef

Re: [Python-Dev] Import APIs

2007-03-12 Thread Guido van Rossum
what's the situation for Py3k? Should it always use absolute import there? On 3/10/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > Currently, all C code that needs to import a module uses > PyImport_ImportModule which > (1) calls __builtin__.__import__ > (2) attempts relative imports > > Most of the

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Martin v. Löwis
Miguel Lobo schrieb: > My own patch does not include documentation. I assume documentation > would only be needed for patches that add new functionality (as opposed > to fixing problems)? Typically, yes. If the bug fix would also change the behavior of existing programs, that change should be d

Re: [Python-Dev] Fwd: Re: [Python-3000] Removing functions from the operator module

2007-03-12 Thread Collin Winter
On 3/11/07, Armin Rigo <[EMAIL PROTECTED]> wrote: > Hi Collin, > > On Wed, Mar 07, 2007 at 11:53:45PM -0600, Collin Winter wrote: > > bool() and abs() aren't syntax, so I would never look in operator. > > abs() is not syntax but bool() is part of every syntactic construction > that takes a truth va

[Python-Dev] [ 1673007 ] urllib2 requests history + HEAD support

2007-03-12 Thread Facundo Batista
This patch was posted by "koder_ua". I think that Request must have a "request type" parameters, so people can send "HEAD" requests easily. But it seems to me that keeping a request history in the module is bad, because it can easily grow up to thousands and explode (a.k.a. consume too much memor

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Martin v. Löwis
Miguel Lobo schrieb: > Personally, I can't apply it as-is right now, since a) I would have to > check that the test case conditionalization works fine, and b) I would > have to come up with a patch for the Windows build process. > > > Sorry, I couldn't understand the second point. Wh

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
This is how we suck you in... ;) I see :-). Funny I didn't see this procedure mentioned in the patch submission guidelines ;-) You don't have to be an expert to review patches. The following procedure would qualify you: 1. Find a patch that it appears no one has ever touched (0 comments

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Jason Orendorff
On 3/12/07, Miguel Lobo <[EMAIL PROTECTED]> wrote: > Anyway, I'm intrigued about this "review 5 other patches" procedure you > suggest. What exactly would be involved in such a review? Please note that > I hadn't touched CPython code before I wrote my patch and I haven't been > following CPython

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
Personally, I can't apply it as-is right now, since a) I would have to check that the test case conditionalization works fine, and b) I would have to come up with a patch for the Windows build process. Sorry, I couldn't understand the second point. Why would you have to patch the Windows buil

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Martin v. Löwis
Miguel Lobo schrieb: > Also, seeing that there are almost 400 open patches in the patch > tracker, I'm concerned that this patch will be forgotten and left to > rot, which would be a pity IMO. Of course, the submitters of the 300 other patches say the same. It is just too difficult to catch up,

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
No; basically, you just need to be patient now. Do you have an urgent need to get this patch included? Well, not personally, but I suspect that it is quite possible that other people will waste time trying to figure out why their imports don't work. Also, seeing that there are almost 400 open

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Martin v. Löwis
> Sorry for the repetition, but since nobody has commented on patch > 1644818 for about a week I thought perhaps I should ask again. > > Is there anything I need to do before the patch is ready for inclusion? No; basically, you just need to be patient now. Do you have an urgent need to get this

Re: [Python-Dev] Patch 1644818: Allow importing built-in submodules

2007-03-12 Thread Miguel Lobo
Hi list, Sorry for the repetition, but since nobody has commented on patch 1644818 for about a week I thought perhaps I should ask again. Is there anything I need to do before the patch is ready for inclusion? As a remainder, this patch (which can be seen at https://sourceforge.net/tracker/?fun

Re: [Python-Dev] Python version incorrect on website?

2007-03-12 Thread Martin v. Löwis
Rajstennaj Barrabas schrieb: > I have an application which runs on 2.4.4 and is known not to run on 2.4.1 or > 2.5, and I'm trying to install 2.4.4 from the website. > > Whenever I download and compile the 2.4.4 sources, the executable shows up as > 2.4.1 which will not work for my application. >

Re: [Python-Dev] Backports of standard library modules

2007-03-12 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > This does raise an interesting question, though, since I'm about to get > into PEP authorship myself. Have I missed an official way to propose > alternatives or resurrect a languishing PEP? See PEP 1. The PEP champion is obliged to integrate feedback into the PEP,

Re: [Python-Dev] Backports of standard library modules

2007-03-12 Thread Martin v. Löwis
Patrick Maupin schrieb: > Although it is often quite easy to find and download a module for use > with a prior version of Python, it would be really convenient if all > of these modules were bundled up together and available as a single > download, especially when it comes to Windows users and exte