This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrewonboe
Recipients andrewonboe, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-06-21.15:06:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624287996.71.0.124244983784.issue44475@roundup.psfhosted.org>
In-reply-to
Content
Hello,

When given a `Field` on a Dataclass, the `__repr__` throws an infinite recursive error when the data type is bytes.

In the `Field` class, the __repr__ is as follows:

```
    def __repr__(self):
        return (
            'Field('
            f'name={self.name!r},'
            f'type={self.type!r},'
            f'default={self.default!r},'
            f'default_factory={self.default_factory!r},'
            f'init={self.init!r},'
            f'repr={self.repr!r},'
            f'hash={self.hash!r},'
            f'compare={self.compare!r},'
            f'metadata={self.metadata!r},'
            f'_field_type={self._field_type}'
            ')'
        )
```

The issue is the f'type={self.type!r}, part of the code.
History
Date User Action Args
2021-06-21 15:06:36andrewonboesetrecipients: + andrewonboe, paul.moore, tim.golden, zach.ware, steve.dower
2021-06-21 15:06:36andrewonboesetmessageid: <1624287996.71.0.124244983784.issue44475@roundup.psfhosted.org>
2021-06-21 15:06:36andrewonboelinkissue44475 messages
2021-06-21 15:06:36andrewonboecreate