Skip to content

Commit cf4734d

Browse files
Make interpreters.*Channel shareable again.
1 parent a53d7cb commit cf4734d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Lib/test/support/interpreters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,4 @@ def close(self):
241241

242242

243243
# XXX This is causing leaks (gh-110318):
244-
#_channels._register_end_types(SendChannel, RecvChannel)
244+
_channels._register_end_types(SendChannel, RecvChannel)

Lib/test/test_interpreters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,6 @@ def test_list_all(self):
833833
after = set(interpreters.list_all_channels())
834834
self.assertEqual(after, created)
835835

836-
@unittest.expectedFailure # See gh-110318:
837836
def test_shareable(self):
838837
rch, sch = interpreters.create_channel()
839838

Modules/_xxinterpchannelsmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ _get_current_module_state(void)
441441
static int
442442
traverse_module_state(module_state *state, visitproc visit, void *arg)
443443
{
444+
/* external types */
445+
Py_VISIT(state->send_channel_type);
446+
Py_VISIT(state->recv_channel_type);
447+
444448
/* heap types */
445449
Py_VISIT(state->ChannelIDType);
446450
Py_VISIT(state->XIBufferViewType);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy