diff --git a/CHANGES.rst b/CHANGES.rst index d6eaf63..955a11b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,7 @@ Minor changes: - Move pip caching into Python setup action. - Check that issue #165 can be closed. - Updated about.rst for issue #527 +- Avoid ``vText.__repr__`` BytesWarning. Breaking changes: diff --git a/docs/credits.rst b/docs/credits.rst index 9b91839..1343193 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -43,6 +43,7 @@ icalendar contributors - Thomas Bruederli - Thomas Weißschuh - Victor Varvaryuk +- Ville Skyttä - Wichert Akkerman - cillianderoiste - fitnr diff --git a/src/icalendar/prop.py b/src/icalendar/prop.py index f322f65..2231416 100644 --- a/src/icalendar/prop.py +++ b/src/icalendar/prop.py @@ -719,7 +719,7 @@ class vText(str): return self def __repr__(self): - return f"vText('{self.to_ical()}')" + return f"vText('{self.to_ical()!r}')" def to_ical(self): return escape_char(self).encode(self.encoding)