Re: [Python-Dev] typeshed for 3rd party packages

2015-04-24 Thread Steven D'Aprano
On Fri, Apr 24, 2015 at 03:44:45PM +0100, Cory Benfield wrote: > On 24 April 2015 at 15:21, Steven D'Aprano wrote: > > > If the type hints are wrong, there are two errors: false positives, when > > code which should be allowed is flagged as a type error; and false > > negatives, when code which s

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-24 Thread Cory Benfield
On 24 April 2015 at 15:21, Steven D'Aprano wrote: > If the type hints are wrong, there are two errors: false positives, when > code which should be allowed is flagged as a type error; and false > negatives, when code which should be flagged as an error is not. > Ideally, there should be no false

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-24 Thread Steven D'Aprano
On Wed, Apr 22, 2015 at 11:26:14AM -0500, Ian Cordasco wrote: > On a separate thread Cory provided an example of what the hints would look > like for *part* of one function in the requests public functional API. > While our API is outwardly simple, the values we accept in certain cases > are actua

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread Guido van Rossum
On Wed, Apr 22, 2015 at 9:26 AM, Ian Cordasco wrote: > As the other maintainer of requests, I think having hints *might* help > some developers, but looking at what Cory generated (which looks to be > valid), I'm wondering about something else with Type Hints. > > I've heard several people say "J

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread Guido van Rossum
On Wed, Apr 22, 2015 at 9:12 AM, Skip Montanaro wrote: > > On Wed, Apr 22, 2015 at 10:43 AM, Guido van Rossum > wrote: > >> For Requests, it looks like it may be better not to have stubs at all. > > > Can you expand on this? Why would Requests be any different than any other > module/package? >

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread Ian Cordasco
On Wed, Apr 22, 2015 at 11:30 AM, Skip Montanaro wrote: > > > On Wed, Apr 22, 2015 at 11:26 AM, Ian Cordasco > wrote: > >> On a separate thread Cory provided an example of what the hints would >> look like for *part* of one function in the requests public functional API. >> > > Thanks. That enco

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread Ian Cordasco
On Wed, Apr 22, 2015 at 11:12 AM, Skip Montanaro wrote: > > On Wed, Apr 22, 2015 at 10:43 AM, Guido van Rossum > wrote: > >> For Requests, it looks like it may be better not to have stubs at all. > > > Can you expand on this? Why would Requests be any different than any other > module/package? >

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread Skip Montanaro
On Wed, Apr 22, 2015 at 10:43 AM, Guido van Rossum wrote: > For Requests, it looks like it may be better not to have stubs at all. Can you expand on this? Why would Requests be any different than any other module/package? As for versioning, I think stub files would absolutely have to declare t

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread Guido van Rossum
I definitely think that we shouldn't jump the gun here and tread carefully. Both Marc-André and Cory brought up good things to watch out for. For closed-source software the only way to obtain stubs is presumably from the author, if they care. As Gregory Smith said in another thread, the tooling wi

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread Cory Benfield
On 22 April 2015 at 11:46, M.-A. Lemburg wrote: > Unlike with translations, where missing or poor ones don't have > much effect on the usefulness of the software, a type checker > would complain loudly and probably show lots of false positives > (if you read a type bug as "positive"), causing the

Re: [Python-Dev] typeshed for 3rd party packages

2015-04-22 Thread M.-A. Lemburg
On 21.04.2015 18:08, Guido van Rossum wrote: > On Tue, Apr 21, 2015 at 12:33 AM, M.-A. Lemburg wrote: > >> On 21.04.2015 05:37, Guido van Rossum wrote: >>> On Mon, Apr 20, 2015 at 4:41 PM, Jack Diederich >> wrote: * Uploading stubs for other people's code is a terrible idea. Who do I c

Re: [Python-Dev] typeshed for 3rd party packages (was: Type hints -- a mediocre programmer's reaction)

2015-04-21 Thread Guido van Rossum
On Tue, Apr 21, 2015 at 12:33 AM, M.-A. Lemburg wrote: > On 21.04.2015 05:37, Guido van Rossum wrote: > > On Mon, Apr 20, 2015 at 4:41 PM, Jack Diederich > wrote: > >> * Uploading stubs for other people's code is a terrible idea. Who do I > >> contact when I update the interface to my library? T

Re: [Python-Dev] typeshed for 3rd party packages (was: Type hints -- a mediocre programmer's reaction)

2015-04-21 Thread M.-A. Lemburg
On 21.04.2015 05:37, Guido van Rossum wrote: > On Mon, Apr 20, 2015 at 4:41 PM, Jack Diederich wrote: >> * Uploading stubs for other people's code is a terrible idea. Who do I >> contact when I update the interface to my library? The random Joe who >> "helped" by uploading annotations three months