[issue29695] Weird keyword parameter names in builtins

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +847

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 58d23e68068996c76cac78887ec67dee68cdbc72 by Serhiy Storchaka in 
branch 'master':
bpo-29695: Deprecated using bad named keyword arguments in builtings: (#486)
https://github.com/python/cpython/commit/58d23e68068996c76cac78887ec67dee68cdbc72


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 2e5642422f6234fd8d0c082142b27340e588f96e by Serhiy Storchaka in 
branch 'master':
bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() and 
tuple(). (#518)
https://github.com/python/cpython/commit/2e5642422f6234fd8d0c082142b27340e588f96e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-24 Thread Brett Cannon

Brett Cannon added the comment:


New changeset d908fd9ee1c307f7066023eb2031c0f509036cbc by Brett Cannon (Serhiy 
Storchaka) in branch 'master':
bpo-29695: Fixed tests after removing keyword args support in some basic type 
constructors. (GH-520)
https://github.com/python/cpython/commit/d908fd9ee1c307f7066023eb2031c0f509036cbc


--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-17 Thread Larry Hastings

Changes by Larry Hastings :


--
pull_requests: +589

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +430

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread STINNER Victor

STINNER Victor added the comment:

Unhappy buildbot.

http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/456/steps/test/logs/stdio

==
ERROR: test_keyword_arguments (test.test_descr.ClassPropertiesAndMethods)
--
Traceback (most recent call last):
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_descr.py", line 
3451, in test_keyword_arguments
list.__init__(a, sequence=[0, 1, 2])
TypeError: list() does not take keyword arguments

==
ERROR: test_keywords (test.test_descr.ClassPropertiesAndMethods)
--
Traceback (most recent call last):
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_descr.py", line 
2888, in test_keywords
self.assertEqual(int(x=1), 1)
TypeError: 'x' is an invalid keyword argument for this function

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks all!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread R. David Murray

R. David Murray added the comment:

If Raymond is on the side of skipping the deprecation than I'm good with it.  
Like I said, this is a marginal case.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +428

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If David agrees with this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread STINNER Victor

STINNER Victor added the comment:

> If you think that it would be better to remove without deprecation, the 
> following patch does this.

@Serhiy: Can you please create a PR for it?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I do think it would be better to not have the deprecation.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I already merged the patch as 58d23e68068996c76cac78887ec67dee68cdbc72.

If you think that it would be better to remove without deprecation, the 
following patch does this.

--
Added file: http://bugs.python.org/file46702/remove-bad-keywords.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I concur with Victor and Serhiy that we can bypass a deprecation phase here and 
just get it done.  In the rare case of int(x=3.14), the fix is trivial.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-05 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +399

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you David! Updated warning messages for your suggestion and added entries 
in Misc/NEWS and What's New.

--
Added file: http://bugs.python.org/file46686/deprecate-bad-keywords.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue20283. Obviously wrong keyword parameter names in regex methods 
were deprecated in 2.7, 3.3 and 3.4 and removed in 3.6.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread R. David Murray

R. David Murray added the comment:

So these will become positional only?  In that case I'd say "Using 'x' as a 
keyword argument is deprecated; specify the value as a positional argument 
instead"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread STINNER Victor

STINNER Victor added the comment:

"What's New in Python 3.7" has a section for such changes: "Porting to
Python 3.7: Changes to the Python API".
https://docs.python.org/dev/whatsnew/3.7.html#porting-to-python-3-7

Oh, I see that you already made a similar change but this one had a
deprecation period of 2 releases (3.5 and 3.6): "A format string
argument for string.Formatter.format() is now positional-only."

See also the positional-only arguments discussion on python-ideas:
* https://mail.python.org/pipermail/python-ideas/2017-February/044879.html
* https://mail.python.org/pipermail/python-ideas/2017-March/044956.html

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Well, I was feeling the same, but asked just for the case.

Could you then look at deprecation messages? I'm sure that 'The "x" keyword 
argument of int() is deprecated' is not the best wording, and may be even ugly 
wording. Could you please suggest better wording David?

Patches don't document new deprecations because it is not documented that 
keyword arguments are supported either. Is mentioning in What's New enough?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread STINNER Victor

STINNER Victor added the comment:

R. David Murray added the comment:
> I don't think we should do it without deprecation, since it could break 
> working code.  But it certainly sounds like a marginal case: I doubt there is 
> *much* code that uses the existing keyword names.

I'm not sure that it's worth it to add a deprecation warning in Python
3.7. It's trivial to fix code passing an argument by keyword rather
than by position.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patches deprecate the "x" keyword parameter in int(), bool() and 
float() and the "sequence" keyword parameter in list() and tuple(). Name "x" is 
meaningless, and name "sequence" is misleading (any iterable is accepted, not 
just sequence). The documentation uses name "iterable" for list() and tuple().

It is never documented that any of these parameters are accepted by keywords. 
There was only a test for int(), but it was added just for increasing coverity, 
not to test intended behavior. Does this mean that the support of keyword 
arguments can be removed without deprecation?

The general idea got preliminary approval from Guido 
(https://mail.python.org/pipermail/python-ideas/2017-March/044959.html).

--
components: Interpreter Core
files: deprecate-keyword-x.patch
keywords: patch
messages: 288802
nosy: gvanrossum, haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Weird keyword parameter names in builtins
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46684/deprecate-keyword-x.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file46685/deprecate-keyword-sequence.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread R. David Murray

R. David Murray added the comment:

I don't think we should do it without deprecation, since it could break working 
code.  But it certainly sounds like a marginal case: I doubt there is *much* 
code that uses the existing keyword names.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com