Skip to content

Commit 1051697

Browse files
generatedunixname1734921407115435meta-codesync[bot]
authored andcommitted
Sync pre-release CPython 3.15 branch from GitHub (2026-05-17)
Summary: Imported python/cpython `3.15.0b1+` from upstream rev [`42ff9b4`](https://www.github.com/python/cpython/commit/42ff9b4959667cf31bde13a53fca01b1ec381168) (committed 2026-05-17 11:01:15+00:00). # Commit Info Base: (`3.15.0b1+`) - [`ec3aa6a`](https://www.github.com/python/cpython/commit/ec3aa6ab4847ebd6f8f3e9b2b7023c5ab3a6e39a) (commit date: 2026-05-16 09:06:14+00:00) Imported: (`3.15.0b1+`) - [`42ff9b4`](https://www.github.com/python/cpython/commit/42ff9b4959667cf31bde13a53fca01b1ec381168) (commit date: 2026-05-17 11:01:15+00:00) # Noteworthy file changes - Low-signal files (1 added) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GCp6CieCjr1S-3MDAER1nbt-InNIbr0LAAAz Differential Revision: D105521759 fbshipit-source-id: f0b4e91a72baf915c4cdde1f8d37f343cf409965
1 parent 9437003 commit 1051697

4 files changed

Lines changed: 7 additions & 11 deletions

File tree

Lib/test/test_email/test_email.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4995,15 +4995,8 @@ def test_body_encode(self):
49954995
# Try the convert argument, where input codec != output codec
49964996
c = Charset('euc-jp')
49974997
# With apologies to Tokio Kikuchi ;)
4998-
# XXX FIXME
4999-
## try:
5000-
## eq('\x1b$B5FCO;~IW\x1b(B',
5001-
## c.body_encode('\xb5\xc6\xc3\xcf\xbb\xfe\xc9\xd7'))
5002-
## eq('\xb5\xc6\xc3\xcf\xbb\xfe\xc9\xd7',
5003-
## c.body_encode('\xb5\xc6\xc3\xcf\xbb\xfe\xc9\xd7', False))
5004-
## except LookupError:
5005-
## # We probably don't have the Japanese codecs installed
5006-
## pass
4998+
eq('\x1b$B5FCO;~IW\x1b(B',
4999+
c.body_encode('\u83ca\u5730\u6642\u592b'))
50075000
# Testing SF bug #625509, which we have to fake, since there are no
50085001
# built-in encodings where the header encoding is QP but the body
50095002
# encoding is not.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix reference leaks in error paths of the :mod:`!_interpchannels` and
2+
:mod:`!_interpqueues` extension modules.

Modules/_interpchannelsmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,6 +2586,7 @@ static PyObject *
25862586
_channelid_from_xid(_PyXIData_t *data)
25872587
{
25882588
struct _channelid_xid *xid = (struct _channelid_xid *)_PyXIData_DATA(data);
2589+
PyObject *cidobj = NULL;
25892590

25902591
// It might not be imported yet, so we can't use _get_current_module().
25912592
PyObject *mod = PyImport_ImportModule(MODULE_NAME_STR);
@@ -2595,11 +2596,10 @@ _channelid_from_xid(_PyXIData_t *data)
25952596
assert(mod != Py_None);
25962597
module_state *state = get_module_state(mod);
25972598
if (state == NULL) {
2598-
return NULL;
2599+
goto done;
25992600
}
26002601

26012602
// Note that we do not preserve the "resolve" flag.
2602-
PyObject *cidobj = NULL;
26032603
int err = newchannelid(state->ChannelIDType, xid->cid, xid->end,
26042604
_global_channels(), 0, 0,
26052605
(channelid **)&cidobj);

Modules/_interpqueuesmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,7 @@ _queueobj_from_xid(_PyXIData_t *data)
13631363
if (mod == NULL) {
13641364
mod = PyImport_ImportModule(MODULE_NAME_STR);
13651365
if (mod == NULL) {
1366+
Py_DECREF(qidobj);
13661367
return NULL;
13671368
}
13681369
}

0 commit comments

Comments
 (0)