[issue13668] mute ImportError in __del__ of _threading_local module

2019-03-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

As noted in msg221878 the import statement was removed and the original report 
is not reproducible in latest 2.7. Marking this as out of date. Thanks for the 
details.

--
nosy: +xtreak
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13668] mute ImportError in __del__ of _threading_local module

2019-03-15 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13668] mute ImportError in __del__ of _threading_local module

2014-06-29 Thread Mark Lawrence

Mark Lawrence added the comment:

Can this be closed as a result of #9707 and r64543 ?

--
nosy: +BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13668] mute ImportError in __del__ of _threading_local module

2011-12-28 Thread Zhiping Deng

New submission from Zhiping Deng kofreesty...@gmail.com:

If python was configured without-threads:

% ./python
Python 2.7.2+ (2.7:e71e4bd45c89, Dec 28 2011, 21:03:59) 
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
 import dummy_threading as _threading
 a = _threading.local()
 del a
Exception ImportError: ImportError('No module named thread',) in bound method 
local.__del__ of _threading_local.local object at 0xb7681694 ignored

Patch to mute this Exception:
diff --git a/Lib/_threading_local.py b/Lib/_threading_local.py
--- a/Lib/_threading_local.py
+++ b/Lib/_threading_local.py
@@ -221,7 +221,13 @@
 lock.release()
 
 def __del__(self):
-import threading
+try:
+import threading
+except ImportError:
+import sys
+if '_dummy_threading' in sys.modules:
+return
+raise
 
 key = object.__getattribute__(self, '_local__key')

--
files: _threading_local.mute_ImportError.diff
keywords: patch
messages: 150288
nosy: Zhiping.Deng
priority: normal
severity: normal
status: open
title: mute ImportError in __del__ of _threading_local module
versions: Python 2.7
Added file: 
http://bugs.python.org/file24097/_threading_local.mute_ImportError.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13668
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13668] mute ImportError in __del__ of _threading_local module

2011-12-28 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13668
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com