Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Nick Coghlan
On 17 July 2015 at 09:35, Alexander wrote: >> By the way, I've also been bitten by this several times, so I >> appreciate the desire to at least warn users (or raise an exception, or >> whatever). > > It is not an intention to make tests more robust. It is the > implementation, which is questionab

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Nick Coghlan
On 17 July 2015 at 08:30, Ben Finney wrote: > By definition, advocating to not add cruft to an API is going to be in > advance of being bitten by those additions. That's not what people are doing. Folks are actually arguing for *restoring* the ability to mock out method names starting with "assre

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Robert Collins
On 17 Jul 2015 08:34, "Michael Foord" wrote: > > > > On Wednesday, 15 July 2015, Robert Collins wrote: > > On 15 July 2015 at 12:59, Nick Coghlan wrote: > >> > >> There is zero urgency here, so nothing needs to change for 3.5. > >> Robert's plan is a fine one to propose for 3.6 (and the PyPI moc

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Ethan Furman
On 07/16/2015 04:48 PM, Antoine Pitrou wrote: On Fri, 17 Jul 2015 11:35:53 +1200 Alexander wrote: I do not want to read mistyped code from other developers and try to guess whether it will work properly or not. You don't have to guess anything. If it's mistyped, either it raises AttributeErro

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Antoine Pitrou
On Fri, 17 Jul 2015 11:35:53 +1200 Alexander wrote: > > I do not want to read mistyped code from other developers and try to > guess whether it will work properly or not. You don't have to guess anything. If it's mistyped, either it raises AttributeError (because it starts with "assert_"), or it

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Alexander
> By the way, I've also been bitten by this several times, so I > appreciate the desire to at least warn users (or raise an exception, or > whatever). It is not an intention to make tests more robust. It is the implementation, which is questionable at least. I actually still hope that the whole th

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Antoine Pitrou
On Wed, 15 Jul 2015 07:40:57 +1200 Robert Collins wrote: > On 15 July 2015 at 07:39, Paul Moore wrote: > > On 14 July 2015 at 20:27, Robert Collins wrote: > > >>> In effect, this patch is "reserving" all attributes starting with > >>> "assert" or "assret" as actual methods of the mock object,

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Antoine Pitrou
On Wed, 15 Jul 2015 20:39:37 +1200 Robert Collins wrote: > On 15 July 2015 at 19:17, Antoine Pitrou wrote: > > On Wed, 15 Jul 2015 10:22:14 +1200 > > Robert Collins wrote: > >> > >> For clarity, I think we should: > >> - remove the assret check, it is I think spurious. > >> - add a set of func

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Antoine Pitrou
On Fri, 17 Jul 2015 08:30:59 +1000 Ben Finney wrote: > Antoine Pitrou writes: > > > On Fri, 17 Jul 2015 06:59:16 +1000 > > Ben Finney wrote: > > > > > > +1. > > > > > > These checks are a good thing, but they belong in a linter tool not as > > > aliases in the API. > > > > Practicality beats

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread ISAAC J SCHWABACHER
From: Python-Dev on behalf of Ben Finney Sent: Thursday, July 16, 2015 15:59 To: python-dev@python.org Subject: Re: [Python-Dev] How far to go with user-friendliness > Ethan Furman writes: > > > On 07/16/2015 01:29 PM, Michael Foord wrote: > > > On Tuesday, 14 July 2015, Christie Wilson wrote

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Ben Finney
Antoine Pitrou writes: > On Fri, 17 Jul 2015 06:59:16 +1000 > Ben Finney wrote: > > > > +1. > > > > These checks are a good thing, but they belong in a linter tool not as > > aliases in the API. > > Practicality beats purity. Unless you have been actually *bitten* by > those checks I don't thi

Re: [Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread Ryan Gonzalez
Response from the Chrome devs: This site has JS that reacts to the viewport resize event from top controls showing by scrolling to the top. I guess the intent might be to scroll to the top when the phone rotates, and it overtriggers here. I don't think there's a short-term fix, but this seems li

Re: [Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread Greg Ewing
R. David Murray wrote: python.org bugs are *not* reported on bugs.python.org. I don't remember where they are reported...it's on github somewhere I think. The fact that it isn't obvious may be a good candidate for a bug report :) But... which bug tracker should it be reported to? :-) -- Greg

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Antoine Pitrou
On Fri, 17 Jul 2015 06:59:16 +1000 Ben Finney wrote: > > +1. > > These checks are a good thing, but they belong in a linter tool not as > aliases in the API. Practicality beats purity. Unless you have been actually *bitten* by those checks I don't think there's any serious reason to complain.

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Ben Finney
Ethan Furman writes: > On 07/16/2015 01:29 PM, Michael Foord wrote: > > On Tuesday, 14 July 2015, Christie Wilson wrote: > > >> Unless the line silently executes and they don't notice the mistake for > >> years :'( > > > > Indeed. This has been a problem with mock, misspelled (usually > > misre

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Ethan Furman
On 07/16/2015 01:29 PM, Michael Foord wrote: On Tuesday, 14 July 2015, Christie Wilson wrote: Unless the line silently executes and they don't notice the mistake for years :'( Indeed. This has been a problem with mock, misspelled (usually misremembered) assert methods silently did nothing.

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Michael Foord
On Wednesday, 15 July 2015, Robert Collins wrote: > On 15 July 2015 at 12:59, Nick Coghlan wrote: >> >> There is zero urgency here, so nothing needs to change for 3.5. >> Robert's plan is a fine one to propose for 3.6 (and the PyPI mock >> backport). > > Right - the bad API goes back to the very

Re: [Python-Dev] How far to go with user-friendliness

2015-07-16 Thread Michael Foord
On Tuesday, 14 July 2015, Christie Wilson wrote: >> If people do misspell it, I think they do learn not to in after it happens a few times. > > Unless the line silently executes and they don't notice the mistake for years :'( Indeed. This has been a problem with mock, misspelled (usually misremem

Re: [Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread R. David Murray
On Thu, 16 Jul 2015 12:24:45 -0700, Glenn Linderman wrote: > On 7/16/2015 12:11 PM, Ryan Gonzalez wrote: > > I have encountered this weird issue on Chrome for Android where > > scrolling up just a little causes the page to dart to the top. I was > > going to report it in the bug tracker, but I

Re: [Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread Berker Peksağ
On Thu, Jul 16, 2015 at 10:11 PM, Ryan Gonzalez wrote: > I have encountered this weird issue on Chrome for Android where scrolling up > just a little causes the page to dart to the top. I was going to report it > in the bug tracker, but I didn't see a label for the web site itself. > > Worst part

Re: [Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread Skip Montanaro
It's a known issue -- which I thought was fixed recently. I would have responded sooner, but I couldn't remember where website bugs are to be reported and figured someone would chime in with the link. I *don't* think it's bugs.python.org, though I could be wrong. Skip _

Re: [Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread Glenn Linderman
On 7/16/2015 12:11 PM, Ryan Gonzalez wrote: I have encountered this weird issue on Chrome for Android where scrolling up just a little causes the page to dart to the top. I was going to report it in the bug tracker, but I didn't see a label for the web site itself. Worst part is, this is stop

[Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread Ryan Gonzalez
I have encountered this weird issue on Chrome for Android where scrolling up just a little causes the page to dart to the top. I was going to report it in the bug tracker, but I didn't see a label for the web site itself. Worst part is, this is stopping me from reading the humor page! -- Sent

Re: [Python-Dev] documentation / implementation question for subprocess.check_output

2015-07-16 Thread Nick Coghlan
On 16 July 2015 at 20:35, Guido van Rossum wrote: > In which version? I don't see that phrase in the 3.5 docs. The equivalent note in 3.x is "Do not use stdout=PIPE or stderr=PIPE with this function. The child process will block if it generates enough output to a pipe to fill up the OS pipe buffe

Re: [Python-Dev] documentation / implementation question for subprocess.check_output

2015-07-16 Thread Guido van Rossum
In which version? I don't see that phrase in the 3.5 docs. On Thu, Jul 16, 2015 at 9:52 AM, Chris Withers wrote: > Hi All, > > Curious to see this in the docs for subprocess.check_output: "Do not use > stderr=PIPE with this function as that can deadlock based on the child > process error volume.

[Python-Dev] documentation / implementation question for subprocess.check_output

2015-07-16 Thread Chris Withers
Hi All, Curious to see this in the docs for subprocess.check_output: "Do not use stderr=PIPE with this function as that can deadlock based on the child process error volume. Use Popen with the communicate() method when you need a stderr pipe." Given that check_output's implementation uses co