dev-python/pebble: Fix uncleared writer_mutex on unlink()

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-07-31 21:13:26 +02:00
parent 5bc868ea5f
commit c4dc2698d6
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
From 711c98f4193f4006f699e3d245d6855385eb267e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 31 Jul 2026 20:25:35 +0200
Subject: [PATCH] fix(channel): fix clearing `writer_mutex`
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix a typo that resulted in `reader_mutex` being cleared twice, leaving
`writer_mutex` assigned to a deleted mutex.
Fixes #164
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
pebble/pool/channel.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pebble/pool/channel.py b/pebble/pool/channel.py
index edd5c1f..76a2359 100644
--- a/pebble/pool/channel.py
+++ b/pebble/pool/channel.py
@@ -196,7 +196,7 @@ class ChannelMutex:
"""Ensure named semaphores are cleaned up on Posix OSes using spawn."""
del self.reader_mutex
del self.writer_mutex
- self.reader_mutex = self.reader_mutex = None
+ self.reader_mutex = self.writer_mutex = None
@property
@contextmanager

View File

@@ -23,3 +23,8 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv
EPYTEST_PLUGINS=()
EPYTEST_RERUNS=5
distutils_enable_tests pytest
PATCHES=(
# https://github.com/noxdafox/pebble/pull/165
"${FILESDIR}/${P}-clear-lock.patch"
)