[ubuntu/raring-proposed] python-apt 0.8.8ubuntu5 (Accepted)

Barry Warsaw barry at ubuntu.com
Tue Nov 20 15:18:51 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Nov 20, 2012, at 11:05 AM, Martin Pitt wrote:

>python-apt (0.8.8ubuntu5) raring; urgency=low
>
>  * tests/*.py: Do not prepend None to sys.path, Python 3.3 redeems that with
>    an unintelligible crash.

When you do this, you get a chained traceback, which does somewhat make sense
if you understand how Python's import system work at the level of quantum
particles[1]. :)

In Python 3.2, non-string/bytes entries on sys.path are essentially ignored I
believe.  They should probably also be ignored in 3.3, but aren't so what
you're seeing is a traceback in the zipimporter constructor, which by default
is the first importer on sys.path_hooks.  The logic is considerably different
between 3.3 and 3.2 since the former now uses the all-Python importlib
implementation, while the latter used a C implementation of the import
system.

The bottom line is that you shouldn't put None on sys.path, but I think it's a
bug that you get the traceback.  It's definitely a change in behavior.
Upstream bug tracker issue for those who are interested:

http://bugs.python.org/issue16514

Cheers,
- -Barry

[1] http://docs.python.org/3/reference/import.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJQq59cAAoJEBJutWOnSwa/TBEP/1VBzSMBrZbGhk9/0bWoMFl4
rSi/Lb0ZjIKwjG3yfaFGZjpZr2DTIkGa7ZYCu/zF8rbnob2uOTxe0UxOqP2aHXIH
bKmBD9d/MhzX5KCk0EKj8YFEHMmEItdUMt7Z3vZqREhu96xhcmsoUzTBdaUAC+dR
xGU45OK6LNR+IfBPHOvL7eRzNaVNbsjmEa4XeGfHH3FPcdUVJBoIIh6vmMx4vmW1
uVnnHkSC+ux6ehwedxDnRLlVKAtfgAen/6b9vXZHoscpz3H2dm8fYSyG/ZyRem02
UklYnLLAWCkdjfmm1o/RMZu69c/jKhggIegB+2ca1aURw5t5cym13uLUeDyXgQoZ
Hiodr7OUI+YxsMtU1hNUWEbrZ2QahR9Bu1hvt5SysZTG1kRLyvGJX96dC7DBkg7X
OHIeeo5kV64gTdc7HIIa7PCM0GSTJcoEasHyoOGgMrjrCEtet1l/areL/KuSoFqK
r4VNTADpLZE57wjpl9HNeTUhzAQrlYn3EFvwduN0Ty/8SgnQD4WJ2OiTcZ/i4guB
hPF26toYdN3wZKtGoxMv584P/j2SMZYySxB1OlwayUVC9pU7JZgVebjocbOoe/h2
geSEpSEq2Zq3TEfDBTpAztmQMiaBM987kRGql6++DsZTJHHFPnCtrwleN0ElS88h
WrqdyHg2GU9x/F6yA6/H
=W/HQ
-----END PGP SIGNATURE-----


More information about the ubuntu-devel mailing list