[3.14] gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.create()` (GH-152642) (#152672)
gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.create()` (GH-152642)
Previously, an allocation failure when creating
the lock for a channel in `_interpchannels` would trigger an assert.
Caused by `handle_channel_error` being passed an error code of -1
which is only allowed if an exception has been set.
(in this case, no exception was set)
`channelsmod_create` now forwards the error code from `channel_create`
which `handle_channel_error` already handled.
(cherry picked from commit
b383aa6e1a8ea53fdeed88c71fbc34d8b2d1fde9)
Co-authored-by: Steve Stagg <stestagg@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>