Commit Graph

22 Commits

Author SHA1 Message Date
Benjamin Peterson 26da187193 simplify and modernize updatecache() 2010-05-21 21:35:44 +00:00
Benjamin Peterson b9e7c01294 remove debugging rubish 2010-05-21 21:32:49 +00:00
Benjamin Peterson 266e454866 ensure the last line has a trailing newline #8782 2010-05-21 21:31:24 +00:00
Georg Brandl 7c26d76d9c #1309567: fix linecache behavior of stripping subdirectories from paths when looking for relative filename matches. Also add a linecache test suite. 2009-05-05 08:28:49 +00:00
Nick Coghlan a2053475bb Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details. 2008-12-14 10:54:50 +00:00
Ronald Oussoren 9015b938cb Linecache contains support for PEP302 loaders, but fails to deal with loaders
that return None to indicate that the module is valid but no source is
available. This patch fixes that.
2006-06-13 11:19:56 +00:00
Neal Norwitz 0c469854bc Adjust whitespace. 2006-04-11 07:21:20 +00:00
Tim Peters 413c9226d2 Whitespace normalization. 2006-04-11 01:44:26 +00:00
Phillip J. Eby 4703211080 Updated the warnings, linecache, inspect, traceback, site, and doctest modules
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects.  Tests and doc updates are included.
2006-04-11 01:07:43 +00:00
Hye-Shik Chang 182ac85147 SF #737473: Show up-to-date source code in tracebacks always.
And add an optional argument 'filename' to linecache.checkcache()
to enable checking caches per-file.
2004-10-26 09:16:42 +00:00
Jeremy Hylton 97b2e84d43 Whitespace normalization. 2003-06-29 16:59:43 +00:00
Raymond Hettinger 32200aeac6 Replaced obsolete stat module constants with equivalent attributes 2002-06-01 19:51:15 +00:00
Raymond Hettinger 54f0222547 SF 563203. Replaced 'has_key()' with 'in'. 2002-06-01 14:18:47 +00:00
Jack Jansen 7b8c7546eb Mass checkin of universal newline support.
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.

See PEP278 for details.
2002-04-14 20:12:41 +00:00
Tim Peters 12f21ae07f Patch from Gordon McMillan.
updatecache():  When using imputil, sys.path may contain things other than
strings.  Ignore such things instead of blowing up.
Hard to say whether this is a bugfix or a feature ...
2001-05-29 04:27:01 +00:00
Skip Montanaro 17ab123cf1 a few more modules get __all__ 2001-01-24 06:27:27 +00:00
Fred Drake 8152d32375 Update the code to better reflect recommended style:
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
2000-12-12 23:20:45 +00:00
Guido van Rossum 54f22ed30b More trivial comment -> docstring transformations by Ka-Ping Yee,
who writes:

Here is batch 2, as a big collection of CVS context diffs.
Along with moving comments into docstrings, i've added a
couple of missing docstrings and attempted to make sure more
module docstrings begin with a one-line summary.

I did not add docstrings to the methods in profile.py for
fear of upsetting any careful optimizations there, though
i did move class documentation into class docstrings.

The convention i'm using is to leave credits/version/copyright
type of stuff in # comments, and move the rest of the descriptive
stuff about module usage into module docstrings.  Hope this is
okay.
2000-02-04 15:10:34 +00:00
Guido van Rossum 92794e30cb don't print Cannot open/stat messages 1995-08-10 19:32:22 +00:00
Guido van Rossum 7aeb4b9ce8 * Lib/linecache.py: don't crash on empty filename
* Lib/macpath.py: don't return trailing colon for dirname()
	(XXX won't do for volume names -- but otherwise glob(':*:*.py')
	loops forever)
	* Lib/traceback.py: print SyntaxError correctly
	* Lib/stat.py: moved to posixstat.py; added macstat.py which has
	the constants for the Mac; and created new stat.py which includes
	the right one
	* Lib/urllib.py: fix caching bug (by disabling the cache)
1994-08-23 13:32:20 +00:00
Guido van Rossum c341c62e81 Search through the module search path.
Add a warning to the top that this is the case.
1992-03-27 15:12:43 +00:00
Guido van Rossum 921c82401b Initial revision 1992-01-10 14:54:42 +00:00