[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f1ec3cefad4639797c37eaa8c074830188fa0a44 by Serhiy Storchaka in branch 'master': bpo-35634: Raise an error when first passed kwargs contains duplicated keys. (GH-11438)

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch, patch pull_requests: +10875, 10876 stage: test needed -> patch review ___ Python tracker ___

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch, patch, patch pull_requests: +10875, 10876, 10877 stage: test needed -> patch review ___ Python tracker ___

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +10875 stage: test needed -> patch review ___ Python tracker ___

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > (Just curious, what does d['a'] return?) I was curious too and some results $ python Python 3.7.1rc2 (v3.7.1rc2:6c06ef7dc3, Oct 13 2018, 05:10:29) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ammar is right. This is a consequence of issue27358. Issue27358 was merely an optimization necessary for bytecode changes in 3.6. It was not noticed that it changes also the behavior for multidict kwargs. But I think that it was correct change. Specifying

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, nosying you because Ammar identified your commit as relevant. https://github.com/python/cpython/commit/e036ef8fa29f27d57fe9f8cef8d931d4122d8223 --- 3.6 is also security-fix only. Normally, code bug reports need a minimal, reproducible,

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-02 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I prepared a patch to make the check when there is only one dict, it may be the less surprising change. BTW, I got lost when looking for the root cause of this change because grepping for the error message did not work as it has line breaks: -

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-02 Thread iceboy
iceboy added the comment: I feel like we should not check the argument and allow overriding. If the argument checking is desired, can we also check when there is only a single kwargs? Currently `foo(**d)` still works in Python 3.6 with duplicated keys. --

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-02 Thread Ammar Askar
Ammar Askar added the comment: This change in difference is caused by https://github.com/python/cpython/commit/e036ef8fa29f27d57fe9f8cef8d931d4122d8223 The old code checked for duplicate arguments by essentially running `set().intersection(d)` and since `set().intersection(['a', 'a'])` is

[issue35634] kwargs regression when there are multiple entries with the same key

2019-01-01 Thread iceboy
New submission from iceboy : Using the multidict package on pypi to illustrate the problem. Python 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import multidict >>> d =