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

Ka-Ping Yee ping@users.sourceforge.net
Thu, 12 Apr 2001 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)