-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stefan, Tests are blowing up on that box becaues the 'encodings' module has no attribute 'aliases': AFAICT, that doesn't happen on a "standard" build of Python: is there something weird about your setup? Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIrFr++gerLs4ltQ4RArW6AKCKRbzeFvOkI8bWuJLHswuIYeMELQCfSLB0 a3pJHstsrL2JMsZXpJRJqUw= =mAA8 -----END PGP SIGNATURE-----
It is a "hand-compiled" Python 2.3, not the one coming with the distro. I'll have to look into it, maybe ./configure missed something... Stefan On 20. Aug 2008, at 19:57, Tres Seaver wrote:
Tests are blowing up on that box becaues the 'encodings' module has no attribute 'aliases': AFAICT, that doesn't happen on a "standard" build of Python: is there something weird about your setup?
-- Anything that, in happening, causes something else to happen, causes something else to happen. --Douglas Adams
The Python 2.3 on that box hasn't changed in a while, and the encodings module works, at least interactively. $ /usr/local/python2.3/bin/python Python 2.3.6 (#1, Nov 11 2006, 11:08:56) [GCC 4.0.2 (Debian 4.0.2-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import encodings encodings.aliases.aliases {'iso_ir_6': 'ascii', 'maccyrillic': 'mac_cyrillic', 'iso_celtic': 'iso8859_14', 'ebcdic_cp_wt': 'cp037', ...
On 20. Aug 2008, at 19:57, Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Stefan,
Tests are blowing up on that box becaues the 'encodings' module has no attribute 'aliases': AFAICT, that doesn't happen on a "standard" build of Python: is there something weird about your setup?
Tres.
-- Anything that, in happening, causes something else to happen, causes something else to happen. --Douglas Adams
What I have found out now is that in my Python 2.3.6 encodings/ __init__.py does not contain 'import aliases' at module level, whereas the Python 2.4 lib has this import. The patch does this: import encodings encodings._aliases = encoding.aliases.aliases which does therefore not work in 2.3. So, now I am curious how your Python 2.3 differs, and why you don't see the error locally :-) Cheers, Stefan -- It doesn't necessarily do it in chronological order, though. --Douglas Adams
On Fri, Aug 29, 2008 at 14:05, Stefan H. Holek <stefan@epy.co.at> wrote:
What I have found out now is that in my Python 2.3.6 encodings/ __init__.py does not contain 'import aliases' at module level, whereas the Python 2.4 lib has this import. The patch does this:
import encodings encodings._aliases = encoding.aliases.aliases
which does therefore not work in 2.3. So, now I am curious how your Python 2.3 differs, and why you don't see the error locally :-)
The 1.1 version of the hotfix corrected this. -- Martijn Pieters
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martijn Pieters wrote:
On Fri, Aug 29, 2008 at 14:05, Stefan H. Holek <stefan@epy.co.at> wrote:
What I have found out now is that in my Python 2.3.6 encodings/ __init__.py does not contain 'import aliases' at module level, whereas the Python 2.4 lib has this import. The patch does this:
import encodings encodings._aliases = encoding.aliases.aliases
which does therefore not work in 2.3. So, now I am curious how your Python 2.3 differs, and why you don't see the error locally :-)
The 1.1 version of the hotfix corrected this.
Maybe, but the integration of it into the Zope-2.8 branch didn't solve the problem. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIuCIj+gerLs4ltQ4RAkMVAJsGeKUZtakPRHxZ0lM78mNBf+1acACgqhSt MJgLf+FVjSuwXaHDdfTZnC0= =AaEv -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stefan H. Holek wrote:
What I have found out now is that in my Python 2.3.6 encodings/ __init__.py does not contain 'import aliases' at module level, whereas the Python 2.4 lib has this import. The patch does this:
import encodings encodings._aliases = encoding.aliases.aliases
which does therefore not work in 2.3. So, now I am curious how your Python 2.3 differs, and why you don't see the error locally :-)
On my system, the aliases get imported during a codec lookup for 'iso-8869-1': not at Python startup, but early in the test run, while finding tests. - ------------------- %< ------------------------------ - --- encodings/__init__.py 2008-08-29 12:18:18.000000000 -0400 +++ encodings/__init__.py.debug 2008-08-29 12:18:13.000000000 -0400 @@ -83,6 +83,7 @@ mod = __import__('encodings.' + modname, globals(), locals(), _import_tail) except ImportError: + import pdb; pdb.set_trace() import aliases modname = (aliases.aliases.get(modname) or aliases.aliases.get(modname.replace('.', '_')) or @@ -125,6 +126,7 @@ except AttributeError: pass else: + import pdb; pdb.set_trace() import aliases for alias in codecaliases: if not aliases.aliases.has_key(alias): - ------------------- %< ------------------------------ At that point, 'aliases' is added to the module's globals. Maybe this doesn't happen for you because you have a different 'site.py' which pre-establishes that codec? At any rate, we should make the patch harder against this case. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIuCHf+gerLs4ltQ4RAtMCAKC0fBvDBNoR0NC4qwGKM3Fvqo7SDgCfZXfQ mKLNaD78vXiUTDCZVRb/+NQ= =YxJH -----END PGP SIGNATURE-----
participants (3)
-
Martijn Pieters -
Stefan H. Holek -
Tres Seaver