Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461740 - dev-lang/python-2.7.3-r2 does not include python threading fix (Python issue 14308)
Summary: dev-lang/python-2.7.3-r2 does not include python threading fix (Python issue ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-14 17:02 UTC by smkbot
Modified: 2018-04-21 18:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description smkbot 2013-03-14 17:02:23 UTC
Python has a bug in the threading module which produces exceptions in some cases. For information, see these links:

http://bugs.python.org/issue14308

http://stackoverflow.com/questions/13193278/understand-python-threading-bug



I have patched Python in a local overlay with the following patch in ${FILESDIR}:



diff --git a/dev-lang/python/files/python-2.7.3-r2-threading-fix.patch b/dev-lang/python/files/python-2.7.3-r2-threading-fix.patch
new file mode 100644
index 0000000..7d6fdb5
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.3-r2-threading-fix.patch
@@ -0,0 +1,14 @@
+diff -Naur Python-2.7.3/Lib/threading.py Python-2.7.3-patched/Lib/threading.py
+--- Python-2.7.3/Lib/threading.py    2012-04-09 16:07:32.000000000 -0700
++++ Python-2.7.3-patched/Lib/threading.py    2013-01-27 12:05:55.388399814 -0800
+@@ -605,6 +605,10 @@
+                     pass
+ 
+     def __stop(self):
++        # DummyThreads delete self.__block, but they have no waiters to
++        # notify anyway (join() is forbidden on them).
++        if not hasattr(self, '_Thread__block'):
++            return
+         self.__block.acquire()
+         self.__stopped = True
+         self.__block.notify_all()




Could this patch be added to the Portage tree for this ebuild?

Reproducible: Always

Steps to Reproduce:
1. emerge =dev-python/python-2.7.3-r2
2. Follow repro steps in Python issue (http://bugs.python.org/issue14308)
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2013-03-16 11:20:56 UTC
Note:

diff --git a/dev-lang/python/files/
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-21 18:10:18 UTC
This is present in current versions.