Skip to content

Releases: RazerM/represent

2.1.0

09 Dec 21:36

Choose a tag to compare

Released 2024-01-23

Added

  • Support for rich.pretty to autorepr and ReprHelperMixin.
  • RichReprHelper.

2.0.0

09 Dec 21:36

Choose a tag to compare

Released 2023-12-30

Changed

  • Dropped support for Python < 3.8

Removed

  • All previously deprecated items.
  • represent.__version__ etc. use importlib.metadata instead.

1.6.0.post0

22 Dec 00:51

Choose a tag to compare

Changed

  • Modernised packaging and ensure Python 3.8-3.9 are tested on CI. No
    functional changes.

1.6.0

22 Dec 00:40

Choose a tag to compare

Added

Changed

  • autorepr now assigns one namedtuple to cls._represent instead of using
    three different class variables as before.

Fixed

  • Deprecation warnings were always raised instead of only when deprecated
    names were imported.

1.5.1

30 May 19:59

Choose a tag to compare

Added

  • More tests for areas missing from code coverage.
  • Links in the README to readthedocs and codecov.

Fixed

  • autorepr wouldn't create methods if a subclass had the same name as its
    parent. This check has been removed.

1.5.0

30 May 19:58

Choose a tag to compare

Added

  • autorepr class decorator to replace ReprMixin. autorepr is a much
    cleaner solution, moving errors to class creation time instead of during
    __init__. There are no caveats with pickling anymore.

Deprecated

The following names will raise deprecation warnings. They will be removed
completely in 2.0.0.

  • ReprMixin
  • ReprMixinBase

1.4.1

30 May 19:58

Choose a tag to compare

Fixed

  • __slots__ added to ReprHelperMixin to allow subclasses to use __slots__.

1.4.0

30 May 19:58

Choose a tag to compare

Added

  • BaseReprHelper, base class for ReprHelper and PrettyReprHelper to handle common functionality and enforce same API and docstrings.
  • BaseReprHelper.parantheses tuple can be set to something other than normal brackets, e.g. ('<', '>')

Fixed

  • BaseReprHelper.keyword_from_attr parameter names swapped. attr_name used to refer to keyword name, which doesn't make sense.

1.3.0

07 May 01:00

Choose a tag to compare

Added

Fixed

  • PrettyReprHelper.positional_from_attr() didn't check for cycle, causing recursion limit to be reached for self-referential objects.

1.2.1

07 May 00:59

Choose a tag to compare

Fixed

  • __init__.py was missing from represent.compat, so wasn't packaged for PyPI.