summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-10-13 08:18:38 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-10-13 08:18:38 +0200
commit577a9322010b0354ec01df42f72e9b3abff79057 (patch)
treee39fa40b9061165f3d47f3be29c1c749b72c336f
parent899550ca94a00d403f3dc2278c279230d209e64f (diff)
downloadweechat-577a9322010b0354ec01df42f72e9b3abff79057.zip
core: add info about Python 3 and strings in release notes
-rw-r--r--ReleaseNotes.adoc20
1 files changed, 20 insertions, 0 deletions
diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc
index ba7b19b52..8102aaa5a 100644
--- a/ReleaseNotes.adoc
+++ b/ReleaseNotes.adoc
@@ -56,6 +56,26 @@ plugin, using this cmake option:
cmake .. -DENABLE_PHP=OFF
----
+[[v2.7_python3_callbacks_strings]]
+=== Strings received in Python 3 callbacks
+
+The strings sent to script callbacks in Python 3 are now automatically converted
+according to the content:
+
+* if the string is valid UTF-8, it is sent as `str` (legacy behavior)
+* if the string is not valid UTF-8, it is sent as `bytes` (new).
+
+In some cases only, the string may not be valid UTF-8, so it is received as
+`bytes` in the callback, which must take care of that.
+
+For more information, see the WeeChat scripting guide: chapter about strings
+received in callbacks (see also issue #1389).
+
+Note: there are no changes for Python 2 (which is now deprecated and should not
+be used any more), the strings sent to callbacks are always of type `str`, and
+may contain invalid UTF-8 data, in the cases mentioned in the WeeChat scripting
+guide.
+
[[v2.7_irc_message_decoding]]
=== IRC message decoding/encoding