[issue3475] _elementtree.c import can fail silently

2010-03-11 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

Fixed with latest xml.etree.

--
dependencies:  -Update ElementTree with upstream changes
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
superseder:  - Update ElementTree with upstream changes
versions:  -Python 2.6, Python 3.1

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



[issue3475] _elementtree.c import can fail silently

2010-02-13 Thread Florent Xicluna

Changes by Florent Xicluna la...@yahoo.fr:


--
dependencies: +Update ElementTree with upstream changes

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



[issue3475] _elementtree.c import can fail silently

2010-02-13 Thread Florent Xicluna

Changes by Florent Xicluna la...@yahoo.fr:


--
nosy: +flox
priority:  - normal
type:  - behavior

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



[issue3475] _elementtree.c import can fail silently

2009-11-08 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

For 2.5, this will not be fixed, as it is not security-critical.

--
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5

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



[issue3475] _elementtree.c import can fail silently

2009-11-08 Thread Fredrik Lundh

Fredrik Lundh fred...@effbot.org added the comment:

Note that fail silently is a bit of a misnomer - if the embedded import 
doesn't work, portions of the library will fail pretty loudly.  Feel free 
to use some variation of the suggested patch, or just wait until the next 
upstream release gets imported (if ever).

--

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



[issue3475] _elementtree.c import can fail silently

2009-11-07 Thread Brian Harring

Brian Harring ferri...@gmail.com added the comment:

At this point, this affects 2.5, 2.6, and 3.1 (and the normal 1.0.5
release of cElementTree); what's required to get this fixed and queued
up for micro/minor releases?

Sidenote, the patch posted above still leaks a reference-

--
keywords: +patch
nosy: +ferringb
Added file: http://bugs.python.org/file15290/fix-celementtree.patch

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



[issue3475] _elementtree.c import can fail silently

2008-08-03 Thread Fredrik Lundh

Fredrik Lundh [EMAIL PROTECTED] added the comment:

This is fixed in the ET 1.3-compatible codebase.  Since it's too late to
add ET 1.3 to 2.6, I guess it's time to make a new 1.2 bugfix release
for 2.6.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3475
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3475] _elementtree.c import can fail silently

2008-07-31 Thread Matteo Bertini

New submission from Matteo Bertini [EMAIL PROTECTED]:

Playing with PyInstaller I have found that the final part of 
_elementtree.c:

Index: Modules/_elementtree.c
===
--- Modules/_elementtree.c  (revisione 59540)
+++ Modules/_elementtree.c  (copia locale)
@@ -2780,7 +2780,10 @@

   );

-PyRun_String(bootstrap, Py_file_input, g, NULL);
+if (PyRun_String(bootstrap, Py_file_input, g, NULL) == NULL)
+return;

elementpath_obj = PyDict_GetItemString(g, ElementPath);

execute a bit of python code without checking the return value.
That can lead to weird things playing with import hooks,
for example an assert like this can fail:

Index: Lib/test/test_elemettree.py
===
--- Lib/test/test_elemettree.py (revisione 0)
+++ Lib/test/test_elemettree.py (revisione 0)
@@ -0,0 +1,21 @@
+#! /usr/bin/env python
+
+def importHook(*args, **kwargs):
+if 'xml.etree' in args:
+raise ImportError
+else:
+return __real__import__(*args, **kwargs)
+
+import os
+import __builtin__
+__real__import__ = __builtin__.__import__
+__builtin__.__import__ = importHook
+
+try:
+import xml.etree.cElementTree as cET
+except ImportError:
+pass
+else:
+out = os.popen(python -c 'import xml.etree.cElementTree as cET; 
print dir(cET)').read().strip()
+assert str(dir(cET)) == out, (str(dir(cET)), out)
+

--
components: XML
messages: 70488
nosy: naufraghi
severity: normal
status: open
title: _elementtree.c import can fail silently
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3475
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3475] _elementtree.c import can fail silently

2008-07-31 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Fredrik, can you take a look?

--
assignee:  - effbot
nosy: +effbot, loewis

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3475
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com