Skip to content

Commit

Permalink
Merge pull request #554 from scop/patch-1
Browse files Browse the repository at this point in the history
Fix `vText.__repr__` `BytesWarning`
  • Loading branch information
jacadzaca authored Sep 17, 2023
2 parents 923666a + c13af2b commit 52d5cea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
1 change: 1 addition & 0 deletions docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ icalendar contributors
- Thomas Bruederli <thomas@roundcube.net>
- Thomas Weißschuh <thomas@t-8ch.de>
- Victor Varvaryuk <victor.varvariuc@gmail.com>
- Ville Skyttä <ville.skytta@iki.fi>
- Wichert Akkerman <wichert@wiggy.net>
- cillianderoiste <cillian.deroiste@gmail.com>
- fitnr <fitnr@fakeisthenewreal>
Expand Down
2 changes: 1 addition & 1 deletion src/icalendar/prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def __new__(cls, value, encoding=DEFAULT_ENCODING):
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)
Expand Down

0 comments on commit 52d5cea

Please sign in to comment.