[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-29 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: Better late than never. I only took 15 years to fix this old bug :-D -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2 ___ Python tracker

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 94d19f606fa18a1c4d2faca1caf2f470a8ce6d46 by Victor Stinner in branch '3.9': bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) (GH-28589) https://github.com/python/cpython/commit/94d19f606fa18a1c4d2faca1caf2f470a8ce6d46

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread miss-islington
miss-islington added the comment: New changeset 38c67738c64304928c68d5c2bd78bbb01d979b94 by Miss Islington (bot) in branch '3.10': bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) https://github.com/python/cpython/commit/38c67738c64304928c68d5c2bd78bbb01d979b94

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26971 pull_request: https://github.com/python/cpython/pull/28589 ___ Python tracker ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 15.0 -> 16.0 pull_requests: +26970 pull_request: https://github.com/python/cpython/pull/28588 ___ Python tracker

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 95d31370829b7d729667588e0a9943217401ea5b by Victor Stinner in branch 'main': bpo-1596321: Fix threading._shutdown() for the main thread (GH-28549) https://github.com/python/cpython/commit/95d31370829b7d729667588e0a9943217401ea5b --

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-24 Thread STINNER Victor
STINNER Victor added the comment: I proposed PR 28549 to fix this very old threading issue. A C extension can spawn threads without using the threading module and then then run Python code which imports the threading module. In this case, threading._main_thread is the thread which imported

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-09-24 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch nosy: +vstinner nosy_count: 14.0 -> 15.0 pull_requests: +26932 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28549 ___ Python tracker

[issue1596321] KeyError at exit after 'import threading' in other thread

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: The output is different now. I update the script for python 3: - import _thread as thread import time def start(): print("Secondary thread ID:", thread.get_ident()) import threading print("Main

[issue1596321] KeyError at exit after 'import threading' in other thread

2020-01-10 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1596321] KeyError at exit after 'import threading' in other thread

2019-12-20 Thread Eric Snow
Eric Snow added the comment: related: issue #39042 "Use the runtime's main thread ID in the threading module." -- nosy: +eric.snow ___ Python tracker ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2013-08-07 Thread Thomas Guettler
Thomas Guettler added the comment: Only few people seem to use daemon threads. We do and see this problem often with Python 2.7. How difficult is it to get this fixed for 2.7? Is there a way to work around this problem? -- nosy: +guettli ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2012-07-09 Thread Alexis Metaireau
Changes by Alexis Metaireau ale...@notmyidea.org: -- nosy: +alexis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1596321 ___ ___ Python-bugs-list

[issue1596321] KeyError at exit after 'import threading' in other thread

2011-04-05 Thread hasenpfeffer
hasenpfeffer hasenpfef...@rabbittsoup.com added the comment: I encountered this issue recently in Python 3.2 and wanted to make some observations about it. The real problem here is not the KeyError. Though the suggested patches would fix the KeyError symptom, they do not fix the underlying

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-07-13 Thread Laurent Mazuel
Laurent Mazuel laurent.maz...@gmail.com added the comment: Another solution for cx-freeze problem: http://code.google.com/p/modwsgi/issues/detail?id=197#c5 Which can be added in ConsoleKeepPath.c for instance -- nosy: +Laurent.Mazuel ___ Python

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-07-01 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au added the comment: A follow-on re the cx_Freeze issue: I looked at the source code, and found it doesn't seem to be doing any thread creation. But I found that in the initscripts/Console.py, there are the following lines: if sys.version_info[:2] =

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-06-15 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au added the comment: From my limited experience using cx_Freeze 4.1.2 with Python 2.6.5, it seems that this issue is triggered in a cx_Frozen program simply by having `import threading` in the program. I'm not sure what cx_Freeze is doing that makes this

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-06-15 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au added the comment: Sorry I should have said, I'm running on Windows 2000 SP4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1596321 ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-03-29 Thread Torsten Bronger
Changes by Torsten Bronger bron...@physik.rwth-aachen.de: -- nosy: +bronger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1596321 ___ ___

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-03-29 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think the fix to Christian's issue is just: Index: Lib/threading.py === --- Lib/threading.py(révision 79470) +++ Lib/threading.py(copie de travail) @@ -579,7 +579,7 @@

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-01-18 Thread Christian Walther
Christian Walther cwalt...@users.sourceforge.net added the comment: I have the impression we're tracking two completely unrelated problems in this tracker item. As to needs patch regarding my problem: Here's the solution I proposed in my original post in patch form - I'm just not sure if it

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-01-17 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: FWIW, Amaury's example runs without error on trunk and py3k (OS X 10.5). 2.6 prints the following: Exception in thread Thread-1 (most likely raised during interpreter shutdown) 3.1 seg faults -- nosy: +brian.curtin stage: - needs patch

[issue1596321] KeyError at exit after 'import threading' in other thread

2008-01-18 Thread Christian Walther
Christian Walther added the comment: Is the bug avoided if you import threading first and use it instead of thread? Yes. The bug happens when the (first) import of threading and the call to Py_Finalize() happen in different threads. To reproduce the problem in pure Python, I therefore have

[issue1596321] KeyError at exit after 'import threading' in other thread

2008-01-17 Thread Christian Walther
Christian Walther added the comment: I'm not sure what you mean by doesn't fail - from the output you quote, I'd say that it does fail. It's in fact the same output as I get right now with Python 2.5.1 on Mac OS X. Would you classify that KeyError as expected behavior?

[issue1596321] KeyError at exit after 'import threading' in other thread

2008-01-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: gah, sorry i misread the report. you are correct. -- versions: +Python 2.4, Python 2.5, Python 2.6 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1596321 _

[issue1596321] KeyError at exit after 'import threading' in other thread

2008-01-17 Thread Adam Olsen
Adam Olsen added the comment: Is the bug avoided if you import threading first and use it instead of thread? I'd like to see thread removed in 3.0 (renamed to _thread or the like.) -- nosy: +Rhamphoryncus _ Tracker [EMAIL PROTECTED]

[issue1596321] KeyError at exit after 'import threading' in other thread

2008-01-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: If a python daemon thread is still running when the interpreter exits, it is likely to fail in random ways. Here is another example, which does not use imports. I run the script many times, with latest version in trunk, on Windows XP, debug build. In the