Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
___
Python-bugs-list mailing list
New submission from Barry A. Warsaw:
When sys.path[0] is None, attempting to import a module produces a cryptic
chained traceback. This is a regression from 3.2 where the import would
succeed.
The basic issue is that in 3.2's import.c, non-string/bytes items on sys.path
are essentially
Barry A. Warsaw added the comment:
Patch for 3.3, omitting the requisite importlib.h change.
--
keywords: +patch
Added file: http://bugs.python.org/file28051/16514.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
Barry A. Warsaw added the comment:
Oh, the patch includes the removal of some unused imports from test_path.py,
thanks to pyflakes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +brett.cannon, eric.smith, eric.snow, jason.coombs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
Eric V. Smith added the comment:
I agree it's a bug. And the fix looks good to me.
Having said that: I haven't looked at the import.c version to verify what is
happening. Does the test pass under 3.2?
--
___
Python tracker rep...@bugs.python.org
Barry A. Warsaw added the comment:
Oh, btw, I intend to add documentation that makes explicit:
* sys.path entries must be strings or bytes, everything else is ignored
* path importers should expect strings or bytes
* the encoding of bytes is left to the individual path hooks to define, however
Changes by Chris Jerdonek chris.jerdo...@gmail.com:
--
nosy: +chris.jerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
___
Changes by Barry A. Warsaw ba...@python.org:
--
title: Cryptic traceback when sys.path - Cryptic traceback when sys.path[0] is
None
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
Roundup Robot added the comment:
New changeset 291406748217 by Barry Warsaw in branch '3.3':
- Issue #16514: Fix regression causing a traceback when sys.path[0] is None
http://hg.python.org/cpython/rev/291406748217
New changeset a82ee9a1457a by Barry Warsaw in branch 'default':
- Issue #16514:
Changes by Barry A. Warsaw ba...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16514
___
11 matches
Mail list logo