Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Stephen J. Turnbull
Oleg Broytman writes: > > Back on the topic, I don't think a drop-down list of all modules is > > workable even in browsers that display them as combo boxes. How many > > modules do we have in std lib? About 100? Maybe more. What if the > > bug affects several modules? What if the patch mo

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Stephen J. Turnbull
R. David Murray writes: > During the most recent discussion I can remember, I thought I remembered > Stephen Trumble saying that they'd tried that in xemacs and it really > hadn't worked very well. Since he now says he thinks it's a good idea > (or more likely I misremembered what he said the

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Ray Allen
> > I don't see what would be so bad about adding a new function for this. Think of it as correcting the mistake of not making makedirs() behave this way from the beginning. If you want to add a new function, then what its name should be? I guess it should be too similar as existing ones. It'

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Greg Ewing
Steven D'Aprano wrote: Perhaps all we need is a recipe in the docs: try: os.makedirs(path) except OSError, e: if e.errno != 17: raise I don't like writing code that depends on particular errno values, because I don't trust it to work cross- platform. Also it seems suboptimal t

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Greg Ewing
岳帅杰 wrote: Sorry, I don't know what is the "no constant arguments" guideline refers to. Could you give me some more explanation? It's a rule of thumb that Guido says he uses when designing an API. If in the majority of use cases for a proposed function, one of its arguments would always be a co

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Georg Brandl
Am 20.07.2010 23:09, schrieb Terry Reedy: > In any case, a module list should be separate from components. > > On 7/20/2010 4:43 PM, Oleg Broytman wrote: > >> In this particular case I'd rather tend to agree - an editable >> single-line box to enter space-*and*-comma-separated modules list wo

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Guido van Rossum
On Tue, Jul 20, 2010 at 11:35 PM, Cameron Simpson wrote: > On 20Jul2010 17:49, Michael Foord wrote: > | On 20/07/2010 14:43, Nick Coghlan wrote: > | >On Tue, Jul 20, 2010 at 11:09 PM, Steven D'Aprano   > wrote: > | >>I'm -0 on adding an argument to os.makedirs, +0 on adding a variant > | >>functi

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Cameron Simpson
On 20Jul2010 17:49, Michael Foord wrote: | On 20/07/2010 14:43, Nick Coghlan wrote: | >On Tue, Jul 20, 2010 at 11:09 PM, Steven D'Aprano wrote: | >>I'm -0 on adding an argument to os.makedirs, +0 on adding a variant | >>function to os, and +0.5 on adding the variant to the shutil module. | >shut

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Nick Coghlan
On Wed, Jul 21, 2010 at 4:53 AM, Alexander Belopolsky wrote: > The only problem I can see with this feature is how to design a usable > UI.  Have you ever cursed these extra clever address forms that make > you select a state from a drop-down list of 50 if not a country from > the list of 100+?  A

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Nick Coghlan
On Wed, Jul 21, 2010 at 4:18 AM, Alexander Belopolsky wrote: > On Tue, Jul 20, 2010 at 2:12 PM, Reid Kleckner > wrote: > .. >> IMO you should just rename test_trace.py to test_settrace.py, and put >> the trace.py tests in test_trace.py. > > +1 Yep, we're pretty free to rename stuff as required

Re: [Python-Dev] MSDN subscription extensions?

2010-07-20 Thread Brian Curtin
On Tue, Jul 20, 2010 at 16:53, David Bolen wrote: > As one of the beneficiaries of the efforts (much appreciated) last > year to obtain Microsoft MSDN subscriptions for developers/testers (in > my case, primarily buildbot operation), I was wondering if anyone > might know if those subscriptions w

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Terry Reedy
In any case, a module list should be separate from components. On 7/20/2010 4:43 PM, Oleg Broytman wrote: In this particular case I'd rather tend to agree - an editable single-line box to enter space-*and*-comma-separated modules list would be the best interface. An interesting idea. In a

[Python-Dev] MSDN subscription extensions?

2010-07-20 Thread David Bolen
As one of the beneficiaries of the efforts (much appreciated) last year to obtain Microsoft MSDN subscriptions for developers/testers (in my case, primarily buildbot operation), I was wondering if anyone might know if those subscriptions will be able to be renewed this year? -- David

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Oleg Broytman
On Tue, Jul 20, 2010 at 04:27:45PM -0400, Alexander Belopolsky wrote: > On Tue, Jul 20, 2010 at 3:38 PM, Oleg Broytman wrote: > .. > >> Really?  What smartphone are you using?  :-) > > > >   Are you developing an interface for smartphones? Wouldn't it hurt > > usability for desktops/notebooks? >

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 3:38 PM, Oleg Broytman wrote: .. >> Really?  What smartphone are you using?  :-) > >   Are you developing an interface for smartphones? Wouldn't it hurt > usability for desktops/notebooks? You missed the smiley in my response. But seriously, I do find the interfaces that

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Oleg Broytman
On Tue, Jul 20, 2010 at 03:13:41PM -0400, Alexander Belopolsky wrote: > On Tue, Jul 20, 2010 at 3:05 PM, Oleg Broytman wrote: > .. > >   Well, I have never, because in any of these drop-down lists I can press > > a few first letters of the name and the cursor jumps to the country. I > > often sele

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 3:05 PM, Oleg Broytman wrote: .. >   Well, I have never, because in any of these drop-down lists I can press > a few first letters of the name and the cursor jumps to the country. I > often select countries in such lists in web browsers. Really? What smartphone are you us

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Oleg Broytman
On Tue, Jul 20, 2010 at 02:53:53PM -0400, Alexander Belopolsky wrote: > Have you ever cursed these extra clever address forms that make > you select a state from a drop-down list of 50 if not a country from > the list of 100+? Well, I have never, because in any of these drop-down lists I can pr

Re: [Python-Dev] Python-dev signal-to-noise processing question

2010-07-20 Thread Oleg Broytman
On Tue, Jul 20, 2010 at 01:51:07PM -0400, Terry Reedy wrote: > On 7/20/2010 6:59 AM, Oleg Broytman wrote: > 1. I suggested one improvement to the canned response in my previous > post: expand 'using' to 'using or understanding'. I changed wording to "if you're having problems learning, unders

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 2:16 PM, R. David Murray wrote: .. > During the most recent discussion I can remember, I thought I remembered > Stephen Trumble saying that they'd tried that in xemacs and it really > hadn't worked very well.  Since he now says he thinks it's a good idea > (or more likely I

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Ron Adam
On 07/20/2010 12:00 PM, Fred Drake wrote: On Tue, Jul 20, 2010 at 12:47 PM, Ron Adam wrote: It doesn't fall under the single constant rule if done this way. If the value for 'allow' were almost always given as a constant, this would be an argument for three functions instead of one. The gu

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 2:12 PM, Reid Kleckner wrote: .. > IMO you should just rename test_trace.py to test_settrace.py, and put > the trace.py tests in test_trace.py. +1 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/l

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread R. David Murray
On Tue, 20 Jul 2010 17:45:42 +0200, wrote: On 18/07/2010 23:17, Alexander Belopolsky wrote: > On Sun, Jul 18, 2010 at 5:02 PM, Mark Lawrence > wrote: >> Maybe going off on a tangent, but I find it frustrating because you (plural) >> can't find a given module on the issue tracker. Say I'm looki

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Bill Janssen
Michael Foord wrote: > On 20/07/2010 14:43, Nick Coghlan wrote: > > On Tue, Jul 20, 2010 at 11:09 PM, Steven D'Aprano > > wrote: > > > >> I'm -0 on adding an argument to os.makedirs, +0 on adding a variant > >> function to os, and +0.5 on adding the variant to the shutil module. > >>

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Reid Kleckner
On Tue, Jul 20, 2010 at 10:51 AM, Eli Bendersky wrote: > As Terry wrote in the beginning of this thread, Lib/test/test_trace.py > currently tests the sys.settrace module, so the tests of trace.py > should find a new home. Does Lib/test/test_trace_module.py make sense > or is something else prefera

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Terry Reedy
On 7/20/2010 12:49 PM, Michael Foord wrote: On 20/07/2010 14:43, Nick Coghlan wrote: On Tue, Jul 20, 2010 at 11:09 PM, Steven D'Aprano wrote: I'm -0 on adding an argument to os.makedirs, +0 on adding a variant function to os, and +0.5 on adding the variant to the shutil module. shutil seems li

Re: [Python-Dev] Python-dev signal-to-noise processing question

2010-07-20 Thread Terry Reedy
On 7/20/2010 6:59 AM, Oleg Broytman wrote: I know, the task of sending answers like I've sent is quite unappreciated. *I* appreciate it. I mostly do not respond to such because I expect you or Aahz will. I know, the meaning of my answer is rude because, in short, it's simply "Please, g

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Eli Bendersky
I've opened issue 9315 (http://bugs.python.org/issue9315) to address the lack of unit tests for the trace.py module. I hope to get to it in a few days and add some tests. As Terry wrote in the beginning of this thread, Lib/test/test_trace.py currently tests the sys.settrace module, so the tests of

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Éric Araujo
> Sorry to add the third way to the mix, but shouldn't the recommended > way to run a module as a script be python -m modname? As in > > $ python -m test.regrtest test_spam This is true but orthogonal to our problem, which is that :program:`python -m thing` is wrong if I understood the doc right

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Fred Drake
Switching to "python -m" is generally good where it applies (as in this case). The original intent for :option: and :program: were in their use as references rather than in sample command lines. Georg should be the final arbiter, but I'd be in favor of ``...`` for command lines. _

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 1:16 PM, Eli Bendersky wrote: .. > > ``python regrtest.py test_spam.py`` > > Which way to choose? I will update my patch to reflect this. Sorry to add the third way to the mix, but shouldn't the recommended way to run a module as a script be python -m modname? As in $ py

[Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Eli Bendersky
While fixing the :option: markup in the library docs (http://bugs.python.org/issue9312), another question came up: In a few places, documenting a program execution with options was made with: :program:`python regrtest.py` :option:`test_spam.py` Since my patch had the :option: markup removed, thi

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Fred Drake
On Tue, Jul 20, 2010 at 12:47 PM, Ron Adam wrote: > It doesn't fall under the single constant rule if done this way. If the value for 'allow' were almost always given as a constant, this would be an argument for three functions instead of one. The guideline has little to do with the type of the

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Ron Adam
On 07/20/2010 11:47 AM, Ron Adam wrote: On 07/20/2010 10:43 AM, Fred Drake wrote: On Tue, Jul 20, 2010 at 9:09 AM, Steven D'Aprano wrote: It refers to the guideline that you shouldn't have a single function with two (or more) different behaviour and an argument that does nothing but select

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Michael Foord
On 20/07/2010 14:43, Nick Coghlan wrote: On Tue, Jul 20, 2010 at 11:09 PM, Steven D'Aprano wrote: I'm -0 on adding an argument to os.makedirs, +0 on adding a variant function to os, and +0.5 on adding the variant to the shutil module. shutil seems like the place for it to me. The sub

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Ron Adam
On 07/20/2010 10:43 AM, Fred Drake wrote: On Tue, Jul 20, 2010 at 9:09 AM, Steven D'Aprano wrote: It refers to the guideline that you shouldn't have a single function with two (or more) different behaviour and an argument that does nothing but select between them. In particular, when that a

Re: [Python-Dev] Curious datetime method

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 9:57 AM, Anders Sandvig wrote: >> I wonder why would anyone want to use datetime.today() instead of >> datetime.now()? > > Because this method is also present in datetime.date. Thus, you can > reference stuff like  d.today().day without caring whether d is a date > or a dat

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Éric Araujo
Le 18/07/2010 23:17, Alexander Belopolsky a écrit : > On Sun, Jul 18, 2010 at 5:02 PM, Mark Lawrence > wrote: >> Maybe going off on a tangent, but I find it frustrating because you (plural) >> can't find a given module on the issue tracker. Say I'm looking for issues >> relating to smtplib, all

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Fred Drake
On Tue, Jul 20, 2010 at 9:09 AM, Steven D'Aprano wrote: > It refers to the guideline that you shouldn't have a single function > with two (or more) different behaviour and an argument that does > nothing but select between them. In particular, when that argument is almost never given a variable v

Re: [Python-Dev] Python-dev signal-to-noise processing question

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 6:59 AM, Oleg Broytman wrote: .. >   I know, the task of sending answers like I've sent is quite > unappreciated. I know, the meaning of my answer is rude because, in short, > it's simply "Please, go away", and however I stress the "please" part it's > still "go away". If I

Re: [Python-Dev] Python-dev signal-to-noise processing question

2010-07-20 Thread Steve Holden
On 7/20/2010 11:59 AM, Oleg Broytman wrote: > On Mon, Jul 19, 2010 at 04:08:00PM -0600, average wrote: >> Wha? How could this not be the right place? He's not asking about >> USING python, but asking: WHERE in the PYTHON CODE BASE does the >> signal get checked? >> >> A-bit-miffed-at-the-cold-sho

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread R. David Murray
I'd go with putting it in shutil. We could also add a function there that wraps up the recipe in issue 9311 to work around the quirks of os.access on FreeBSD (and possibly other platforms). -- R. David Murray www.bitdance.com __

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Isaac Morland
On Tue, 20 Jul 2010, Steven D'Aprano wrote: I tend to agree. Perhaps all we need is a recipe in the docs: try: os.makedirs(path) except OSError, e: if e.errno != 17: raise What if the path or a parent of it already exists as a file? If one has requested -p I believe one typical

Re: [Python-Dev] Curious datetime method

2010-07-20 Thread Anders Sandvig
> I wonder why would anyone want to use datetime.today() instead of > datetime.now()? Because this method is also present in datetime.date. Thus, you can reference stuff like d.today().day without caring whether d is a date or a datetime object. Anders __

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Nick Coghlan
On Tue, Jul 20, 2010 at 11:09 PM, Steven D'Aprano wrote: > I'm -0 on adding an argument to os.makedirs, +0 on adding a variant > function to os, and +0.5 on adding the variant to the shutil module. shutil seems like the place for it to me. The subtlety of getting the error suppression correct mak

Re: [Python-Dev] tracker contribution

2010-07-20 Thread R. David Murray
On Mon, 19 Jul 2010 00:06:32 +0100, Mark Lawrence wrote: > You all might have gathered that I'm very dispirited by the negative > attitudes that I get from a relatively small minority of Python people. > I might as well quit because it doesn't do my mental health a great > deal of good. Tha

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread Steven D'Aprano
On Tue, 20 Jul 2010 06:49:44 pm 岳帅杰 wrote: > Sorry, I don't know what is the "no constant arguments" guideline > refers to. Could you give me some more explanation? It refers to the guideline that you shouldn't have a single function with two (or more) different behaviour and an argument that doe

Re: [Python-Dev] mkdir -p in python

2010-07-20 Thread 岳帅杰
Sorry, I don't know what is the "no constant arguments" guideline refers to. Could you give me some more explanation? By the way, I feel adding separate functions is not quiet worthy for such a function. On Tue, Jul 20, 2010 at 7:11 AM, Greg Ewing wrote: > Ray Allen wrote: > > I think both os.m

Re: [Python-Dev] OpenID login for Roundup bug trackers

2010-07-20 Thread Martin v. Löwis
Thanks for drawing my attention to that; if the people who made OpenID auth happen are observing this, then thank you all very much! You're welcome! Any hope of feeding those changes back upstream so it's available to all Roundup users at some point? Hope dies last. It's main foundation is

Re: [Python-Dev] Python-dev signal-to-noise processing question

2010-07-20 Thread Oleg Broytman
On Mon, Jul 19, 2010 at 04:08:00PM -0600, average wrote: > Wha? How could this not be the right place? He's not asking about > USING python, but asking: WHERE in the PYTHON CODE BASE does the > signal get checked? > > A-bit-miffed-at-the-cold-shoulderly yours, > > Marcos (wink wink) I know

[Python-Dev] OpenID login for Roundup bug trackers (was: What to do with languishing patches?)

2010-07-20 Thread Ben Finney
"Stephen J. Turnbull" writes: > Mark Lawrence writes: > > > On 18/07/2010 23:38, Alexander Belopolsky wrote: > > > The direct link [to the “meta-tracker”] is > > > http://psf.upfronthosting.co.za/roundup/meta/ > > > > Is this the same login as for the issue tracker or is a new one > > needed? >

Re: [Python-Dev] What to do with languishing patches?

2010-07-20 Thread Georg Brandl
Am 20.07.2010 06:37, schrieb Stephen J. Turnbull: > Mark Lawrence writes: > > > Is this the same login as for the issue tracker or is a new one needed? > > It's different. Both trackers are supposed to support OpenID logins, > I believe. (However, there are somewhat frequent reports of > diffi