From 96cf82c82fcb8375837500baa209bc2a20d3cc10 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: May 27 2010 15:37:54 +0000 Subject: - make "pydoc -k" more robust in the face of broken modules (rhbz:461419, patch115) --- diff --git a/make-pydoc-more-robust-001.patch b/make-pydoc-more-robust-001.patch new file mode 100644 index 0000000..ed2de4e --- /dev/null +++ b/make-pydoc-more-robust-001.patch @@ -0,0 +1,20 @@ +Index: Lib/pydoc.py +=================================================================== +--- Lib/pydoc.py (revision 76636) ++++ Lib/pydoc.py (working copy) +@@ -1961,10 +1961,14 @@ + if modname[-9:] == '.__init__': + modname = modname[:-9] + ' (package)' + print modname, desc and '- ' + desc ++ def onerror(modname): ++ # Ignore non-ImportError exceptions raised whilst trying to ++ # import modules ++ pass + try: import warnings + except ImportError: pass + else: warnings.filterwarnings('ignore') # ignore problems during import +- ModuleScanner().run(callback, key) ++ ModuleScanner().run(callback, key, onerror=onerror) + + # --------------------------------------------------- web browser interface + diff --git a/python.spec b/python.spec index f0baffe..cbd42a9 100644 --- a/python.spec +++ b/python.spec @@ -61,7 +61,7 @@ Summary: An interpreted, interactive, object-oriented programming language Name: %{python} # Remember to also rebase python-docs when changing this: Version: 2.6.5 -Release: 11%{?dist} +Release: 12%{?dist} License: Python Group: Development/Languages Provides: python-abi = %{pybasever} @@ -377,6 +377,10 @@ Patch113: python-2.6.5-more-configuration-flags.patch # (rhbz:553020); partially upstream as http://bugs.python.org/issue7647 Patch114: python-2.6.5-statvfs-f_flag-constants.patch +# Make "pydoc -k" more robust in the face of broken modules +# (rhbz:461419; patch sent upstream as http://bugs.python.org/issue7425 ) +Patch115: make-pydoc-more-robust-001.patch + %if %{main_python} Obsoletes: Distutils Provides: Distutils @@ -608,6 +612,8 @@ rm -r Modules/zlib || exit 1 %patch114 -p1 -b .statvfs-f-flag-constants +%patch115 -p0 + # This shouldn't be necesarry, but is right now (2.2a3) find -name "*~" |xargs rm -f @@ -1306,6 +1312,9 @@ rm -fr %{buildroot} # payload file would be unpackaged) %changelog +* Thu May 27 2010 David Malcolm - 2.6.5-12 +- make "pydoc -k" more robust in the face of broken modules (rhbz:461419, patch115) + * Wed May 26 2010 David Malcolm - 2.6.5-11 - add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os") (patch 114)