Christopher the Magnificent ultimate.mac.fana...@gmail.com added the comment:
ISSUE CONFIRMED FIXED ON MY END, AND MANY THANKS
I downloaded, compiled, and installed the latest Python 3.3 beta on my machine
with Mercurial, and can confirm that the problem is no longer presenting itself.
Thank
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 3987667bf98f by Nick Coghlan in branch 'default':
Take the first step in resolving the messy pkgutil vs importlib edge cases by
basing pkgutil explicitly on importlib, deprecating its internal import
emulation and
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 9101eab6178c by Nick Coghlan in branch 'default':
Issue #15343: Handle importlib.machinery.FileFinder instances in
pkgutil.walk_packages (et al)
http://hg.python.org/cpython/rev/9101eab6178c
--
Nick Coghlan ncogh...@gmail.com added the comment:
Fixing this has uncovered another issue: the old import emulation in PEP 302
ignored encoding cookies, thus merrily decoding everything as utf-8 in
get_source(). importlib is smarter about this, which means the pydoc tests
started failing as
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 7d202353a728 by Nick Coghlan in branch 'default':
Issue #15343: A lot more than just unicode decoding can go wrong when
retrieving a source file
http://hg.python.org/cpython/rev/7d202353a728
--
Nick Coghlan ncogh...@gmail.com added the comment:
Main change in that last commit is really the one to make pydoc ignore just
about *any* exception from get_source(). This should make it more robust
against buggy loaders, too.
--
___
Python
Nick Coghlan ncogh...@gmail.com added the comment:
And a manual check confirms the higher level issue is also fixed. (I believe
there's already a meta issue somewhere about the lack of automated tests for
pydoc's emitted HTML)
--
resolution: - fixed
status: open - closed
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +brett.cannon, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15343
___
___
Éric Araujo mer...@netwok.org added the comment:
Sounds like a pkgutil-related issue to me.
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15343
___
Nick Coghlan ncogh...@gmail.com added the comment:
Indeed, pydoc relies on pkgutil.walk_packages to work out what to document, and
that's broken currently due to the reliance on a non-standard importer API that
isn't in PEP 302 (not even as an optional extension, like the get_filename()
used
Brett Cannon br...@python.org added the comment:
Ugh, I don't exactly love the idea of adding a method to any of importlib's
finders simply because PJE didn't try to make this non-standard API part of PEP
302 or something. But basically pkgutil is worthless without doing something
about this
Georg Brandl ge...@python.org added the comment:
Not great, but that sounds reasonable.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15343
___
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
I agree pkgutil is pretty much useless right now and deprecation worth
considering. But isn't another option simply to change pkgutil's internals to
provide its own iter_modules whenever it finds that method missing? This seems
to
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
In Python 2.7, I just did this test:
import sys, pkgutil
for path in sys.path:
... print pkgutil.get_importer(path)
And got only pkgutil.ImpImporter instances and imp.NullImporter objects.
So even before, at least in the most
Brett Cannon br...@python.org added the comment:
Right, you aren't getting ImpImporters because they are only used when a module
doesn't define __loader__. But in Python 3.3, by default *all* modules get that
attribute defined.
And yes, we could either tweak pkgutil to recognize FileFinder
Nick Coghlan ncogh...@gmail.com added the comment:
*sigh* And, of course, there's no meaningful regression test defined for
pkgutil.walk_packages, which is why the test suite didn't pick this up :(
Oh well, at least I have a clear place to start.
--
assignee: - ncoghlan
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15343
___
Changes by Christopher the Magnificent ultimate.mac.fana...@gmail.com:
--
title: pydoc -w package writes out page with empty package contents
section - pydoc -w package writes out page with empty Package Contents
section
___
Python tracker
Changes by Christopher the Magnificent ultimate.mac.fana...@gmail.com:
--
title: pydoc -w package write out page with empty package contents
section - pydoc -w package writes out page with empty package contents
section
___
Python tracker
19 matches
Mail list logo