Issue 33517: dataclasses: Add the field type to Field repr
Created on 2018-05-15 12:01 by eric.smith, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 6858 | merged | eric.smith, 2018-05-15 12:17 | |
| PR 6859 | merged | miss-islington, 2018-05-15 12:37 | |
| Messages (3) | |||
|---|---|---|---|
| msg316644 - (view) | Author: Eric V. Smith (eric.smith) * ![]() |
Date: 2018-05-15 12:01 | |
With the recent (and ongoing) change to string annotations, it's no longer obvious what the type of a field is (normal, ClassVar, or InitVar). I propose exposing the heretofore undocumented _field_type to the repr. Instead of writing it directly, I'm going to make it say one of: _field_type=_FIELD _field_type=_FIELD_CLASSVAR _field_type=_FIELD_INITVAR This is because it's an object reference, and would otherwise look like: _field_type=<object object at 0x10cc5f1f0> Which is all but useless. |
|||
| msg316651 - (view) | Author: Eric V. Smith (eric.smith) * ![]() |
Date: 2018-05-15 12:36 | |
New changeset 01abc6ec3a61769c55ee86834a432fb97801d28f by Eric V. Smith in branch 'master': bpo-33517: dataclasses: Add the field type to Field repr (GH-6858) https://github.com/python/cpython/commit/01abc6ec3a61769c55ee86834a432fb97801d28f |
|||
| msg316652 - (view) | Author: miss-islington (miss-islington) | Date: 2018-05-15 13:01 | |
New changeset 5c7e079158db869c9ede1ac9b5b9735091d3ffb6 by Miss Islington (bot) in branch '3.7': bpo-33517: dataclasses: Add the field type to Field repr (GH-6858) https://github.com/python/cpython/commit/5c7e079158db869c9ede1ac9b5b9735091d3ffb6 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:00 | admin | set | github: 77698 |
| 2018-05-15 13:08:55 | eric.smith | set | priority: release blocker -> status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-05-15 13:01:54 | miss-islington | set | nosy:
+ miss-islington messages: + msg316652 |
| 2018-05-15 12:37:33 | miss-islington | set | pull_requests: + pull_request6533 |
| 2018-05-15 12:36:30 | eric.smith | set | messages: + msg316651 |
| 2018-05-15 12:17:03 | eric.smith | set | keywords:
+ patch stage: patch review pull_requests: + pull_request6532 |
| 2018-05-15 12:01:16 | eric.smith | create | |
