-
Notifications
You must be signed in to change notification settings - Fork 141
Unicode encoding error #627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
3d6b955
b41c07a
c07d438
4d552bc
2d37a21
805700d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| This change addresses an issue in pluggy that occured when running pytest with any pluggy tracing enabled when parametrized values contained surrogate escape characters. | ||
| Before, pluggy attempted to write trace messages using UTF-8 enconding, which fails for lone surrogates. Tracing now encodes lone surrogates with errors="replace" in order | ||
| to ensure that trace logging will not crash hook execution in the future. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,8 @@ def _format_message(self, tags: Sequence[str], args: Sequence[object]) -> str: | |
|
|
||
| def _processmessage(self, tags: tuple[str, ...], args: tuple[object, ...]) -> None: | ||
| if self._writer is not None and args: | ||
| self._writer(self._format_message(tags, args)) | ||
| msg = self._format_message(tags, args) | ||
| self._writer(msg.encode("utf-8", "replace").decode("utf-8")) | ||
|
||
| try: | ||
| processor = self._tags2proc[tags] | ||
| except KeyError: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.