Re: [Python-Dev] [Python-ideas] Show more info when `python -vV`

2016-10-17 Thread Nick Coghlan
On 17 October 2016 at 16:18, INADA Naoki  wrote:
> (Added python-dev in CC list, because there are enough +1 already).

(switching entirely to python-dev)

Context for python-dev folks:

* Inada-san would like to enable "python -VV" to print the full REPL
header for improved debugging information
* we don't want to mess with "-V" because external scripts may be
relying on it (e.g. to figure out filenames)
* "python -VV" is already permitted, but just means the same thing as
"python -V"

I think this is a good idea, but this is a CPython-the-implementation
feature, rather than a Python-the-language feature, so it isn't clear
what rules apply to adding it.

As a pragmatic matter, I think it would be worth applying it to all
active maintenance branches, as:

- that dramatically reduces the deployment term for it to start being
useful for troubleshooting
- the SSL/TLS changes mean that some redistributed versions of Python
2.7 are starting to accumulate significant backports that aren't
indicated in the nominal upstream version number, but are conveyed in
the full REPL header (which has redistributor build info in it)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython (3.5): remove extra PyErr_Format arguments (closes #28454)

2016-10-17 Thread Jeremy Kloth
On Sun, Oct 16, 2016 at 4:42 PM, benjamin.peterson
 wrote:
> --- a/Objects/unicodeobject.c
> +++ b/Objects/unicodeobject.c
> @@ -3009,7 +3009,7 @@
>   "'%.400s' decoder returned '%.400s' instead of 'str'; "
>   "use codecs.decode() to decode to arbitrary types",
>   encoding,
> - Py_TYPE(unicode)->tp_name, Py_TYPE(unicode)->tp_name);
> + Py_TYPE(unicode)->tp_name);
>  Py_DECREF(unicode);
>  goto onError;
>  }

Um, isn't that now an error?  There are 2 format sequences, but only 1 argument.

-- 
Jeremy Kloth
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython (3.5): remove extra PyErr_Format arguments (closes #28454)

2016-10-17 Thread Berker Peksağ
On Mon, Oct 17, 2016 at 12:43 PM, Jeremy Kloth  wrote:
> On Sun, Oct 16, 2016 at 4:42 PM, benjamin.peterson
>  wrote:
>> --- a/Objects/unicodeobject.c
>> +++ b/Objects/unicodeobject.c
>> @@ -3009,7 +3009,7 @@
>>   "'%.400s' decoder returned '%.400s' instead of 'str'; "
>>   "use codecs.decode() to decode to arbitrary types",
>>   encoding,
>> - Py_TYPE(unicode)->tp_name, Py_TYPE(unicode)->tp_name);
>> + Py_TYPE(unicode)->tp_name);
>>  Py_DECREF(unicode);
>>  goto onError;
>>  }
>
> Um, isn't that now an error?  There are 2 format sequences, but only 1 
> argument.

Hi Jeremy,

It doesn't look like an error to me. The first argument is 'encoding'
and the second one is 'Py_TYPE(unicode)->tp_name'.

--Berker
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython (3.5): remove extra PyErr_Format arguments (closes #28454)

2016-10-17 Thread Jeremy Kloth
Oops, you are right. Silly little comma...

-- 
Jeremy Kloth
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-ideas] Show more info when `python -vV`

2016-10-17 Thread Barry Warsaw
On Oct 17, 2016, at 05:01 PM, Nick Coghlan wrote:

>* Inada-san would like to enable "python -VV" to print the full REPL
>header for improved debugging information
>* we don't want to mess with "-V" because external scripts may be
>relying on it (e.g. to figure out filenames)
>* "python -VV" is already permitted, but just means the same thing as
>"python -V"
>
>I think this is a good idea

So do I.

>, but this is a CPython-the-implementation feature, rather than a
>Python-the-language feature, so it isn't clear what rules apply to adding it.

Certainly add it to 3.7.  I think the decision whether to add it to 3.6 and
the stable releases should be up to the respective release managers.  As you
say, it's not a language feature, but it's still a new feature and as such it
does fall within a gray area.

I'd personally have no problem with adding it to 3.6 and possibly earlier
stable releases, but I'm not an RM of any active releases any more.  I'd say,
open a bug, post the patch against the versions you want to see it applied to,
go through the review process, and let the RMs decide if its worth the risk.

Cheers,
-Barry
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-ideas] Show more info when `python -vV`

2016-10-17 Thread Larry Hastings


It is a New Feature and therefore ineligible for adding to 3.5 or 3.4.


//arry/


On 10/17/2016 08:05 PM, Barry Warsaw wrote:

On Oct 17, 2016, at 05:01 PM, Nick Coghlan wrote:


* Inada-san would like to enable "python -VV" to print the full REPL
header for improved debugging information
* we don't want to mess with "-V" because external scripts may be
relying on it (e.g. to figure out filenames)
* "python -VV" is already permitted, but just means the same thing as
"python -V"

I think this is a good idea

So do I.


, but this is a CPython-the-implementation feature, rather than a
Python-the-language feature, so it isn't clear what rules apply to adding it.

Certainly add it to 3.7.  I think the decision whether to add it to 3.6 and
the stable releases should be up to the respective release managers.  As you
say, it's not a language feature, but it's still a new feature and as such it
does fall within a gray area.

I'd personally have no problem with adding it to 3.6 and possibly earlier
stable releases, but I'm not an RM of any active releases any more.  I'd say,
open a bug, post the patch against the versions you want to see it applied to,
go through the review process, and let the RMs decide if its worth the risk.

Cheers,
-Barry
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/larry%40hastings.org


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-ideas] Show more info when `python -vV`

2016-10-17 Thread Ned Deily
On 2016-10-17 15:05, Barry Warsaw wrote:
> On Oct 17, 2016, at 05:01 PM, Nick Coghlan wrote: 
>> * Inada-san would like to enable "python -VV" to print the full REPL
>> header for improved debugging information
[...]
> I'd personally have no problem with adding it to 3.6 and possibly earlier
> stable releases, but I'm not an RM of any active releases any more.  I'd say,
> open a bug, post the patch against the versions you want to see it applied to,
> go through the review process, and let the RMs decide if its worth the risk.

I agree with Barry.  I'm open to adding this feature to 3.6.0b3 but
first we need an issue and a final patch to review.



___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com