"xmlcharrefreplace", and "surrogatepass" error handlers.
Core and Builtins
-----------------
+ - Issue #22518: Fixed integer overflow issues in "backslashreplace",
+ "xmlcharrefreplace", and "surrogatepass" error handlers.
+
+- Issue #22540: speed up `PyObject_IsInstance` and `PyObject_IsSubclass` in the
+ common case that the second argument has metaclass `type`.
+
+- Issue #18711: Add a new `PyErr_FormatV` function, similar to `PyErr_Format`
+ but accepting a `va_list` argument.
+
- Issue #22520: Fix overflow checking when generating the repr of a unicode
object.
}
code = get_standard_encoding(encoding, &bytelength);
Py_DECREF(encode);
+ if (code == ENC_UNKNOWN) {
+ /* Not supported, fail with original exception */
+ PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
+ Py_DECREF(object);
+ return NULL;
+ }
+ if (end - start > PY_SSIZE_T_MAX / bytelength)
+ end = start + PY_SSIZE_T_MAX / bytelength;
res = PyBytes_FromStringAndSize(NULL, bytelength*(end-start));
if (!res) {
Py_DECREF(object);