[issue37163] dataclasses.replace() fails with the field named "obj"

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

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6ef103fbdbc05adbc20838c94b1f0c40fa6c159a by Serhiy Storchaka in branch '3.7': [3.7] bpo-37163: dataclasses.replace() now supports the field named "obj". (GH-13877) (GH-14405) https://github.com/python/cpython/commit/6ef103fbdbc05adbc20838c94b

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +14217 pull_request: https://github.com/python/cpython/pull/14405 ___ Python tracker ___

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2d88e63bfcf7bccba925ab80b3f47ccf8b7aefa8 by Serhiy Storchaka in branch 'master': bpo-37163: Make the obj argument of dataclasses.replace() a positional-only. (GH-14390) https://github.com/python/cpython/commit/2d88e63bfcf7bccba925ab80b3f47ccf

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +14204 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/14390 ___ Python tracker ___

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailin

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-25 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f5b89afde1196ec9f74b7dc0333cec9bc4d4c2db by Serhiy Storchaka in branch '3.8': bpo-37163: Deprecate passing argument obj of dataclasses.replace() by keyword. (GH-13877) https://github.com/python/cpython/commit/f5b89afde1196ec9f74b7dc0333cec9bc

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +13755 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13877 ___ Python tracker ___

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: +1 to Serhiy's proposal -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list ma

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-05 Thread Brett Cannon
Brett Cannon added the comment: +1 for Serhiy's suggestion -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list maili

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I propose to add a deprecation warning in 3.8 and use the PEP 570 syntax in 3.9 (which means a TypeError if obj is passed by keyword argument). -- ___ Python tracker

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-05 Thread Eric V. Smith
Eric V. Smith added the comment: Possibly a use for positional-only parameters. Backward compatibility is the question, of course. -- ___ Python tracker ___ _

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : >>> from dataclasses import * >>> @dataclass ... class D: ... obj: object ... >>> replace(D(123), obj='abc') Traceback (most recent call last): File "", line 1, in TypeError: replace() got multiple values for argument 'obj' -- components: L