Skip to content

Releases: RazerM/represent

1.6.0.post0

22 Dec 00:51
Compare
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
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare

Fixed

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

1.4.0

30 May 19:58
Compare
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
Compare
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
Compare
Choose a tag to compare

Fixed

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

1.2.0

02 May 02:05
Compare
Choose a tag to compare

Changed

  • RepresentationMixin has been renamed to ReprMixin.
  • RepresentationHelper has been renamed to ReprHelper.
  • PrettyRepresentationHelper has been renamed to PrettyReprHelper.

Added

  • ReprMixinBase is available if user does not want to inherit __getstate__ and __setstate__ from ReprMixin.
  • Documentation about Pickle support for ReprMixin (#2)

Deprecated

These aliases will raise deprecation warnings:

  • RepresentationMixin
  • RepresentationHelper
  • PrettyRepresentationHelper

1.1.0

02 May 00:38
Compare
Choose a tag to compare
  • Add pickle support by instantiating RepresentationMixin in __setstate__.