[Python-checkins] CVS: python/dist/src/Lib pydoc.py,1.26,1.27

Ka-Ping Yee ping@users.sourceforge.net
2001年4月12日 06:37:41 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv29541
Modified Files:
	pydoc.py 
Log Message:
Give up trying to keep dynamically loaded extensions up to date:
 the import.c machinery has soundly defeated my every attempt.
Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** pydoc.py	2001年04月12日 12:54:36	1.26
--- pydoc.py	2001年04月12日 13:37:39	1.27
***************
*** 1018,1022 ****
 # inherits from another module that has changed?).
 if path not in sys.builtin_module_names:
! del sys.modules[path]
 try:
 module = __import__(path)
--- 1018,1028 ----
 # inherits from another module that has changed?).
 if path not in sys.builtin_module_names:
! # Python never loads a dynamic extension a second time from the
! # same path, even if the file is changed or missing. Deleting
! # the entry in sys.modules doesn't help for dynamic extensions,
! # so we're not even going to try to keep them up to date.
! info = inspect.getmoduleinfo(sys.modules[path].__file__)
! if info[3] != imp.C_EXTENSION:
! del sys.modules[path]
 try:
 module = __import__(path)

AltStyle によって変換されたページ (->オリジナル) /