summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* AddrlistClass.getaddress(): when parsing `:'s, in the loop, watch outBarry Warsaw1999-07-121-1/+2
| | | | | | for gotonext() pushing self.pos past the end of the string. This can happen if the message has a To field like "To: :" and you call msg.getaddrlist('to').
* The first concrete subclass of CCompiler: defines a barebones Unix C compiler.Greg Ward1999-07-101-0/+192
|
* The abstract base class that defines the C/C++ compiler abstraction model.Greg Ward1999-07-101-0/+313
|
* Added a self-berating command relating to installation directories forGreg Ward1999-07-101-0/+8
| | | | module distributions that contain platform-specific files.
* Don't pollute importer's namespace with type objects from types modules.Greg Ward1999-07-101-2/+11
| | | | Added DistutilsPlatformError.
* Patch by Jeffrey Chang to add docstrings everywhere.Guido van Rossum1999-07-091-31/+314
| | | | The text is condensed from the library manual.
* FTP.dir(): Fix typo in docstring.Fred Drake1999-07-071-1/+1
|
* Sjoerd Mullender:Guido van Rossum1999-07-011-1/+1
| | | | | | In splithost, accept empty host part in URLs. This is required for file URLs that can have an empty host part. For such URLs, we should not return the initial 2 slashes as part of the file name.
* Relocating file to Lib/lib-old.Fred Drake1999-07-013-218/+0
|
* Define NotANumber as a subclass of ValueError when using class-basedFred Drake1999-06-291-2/+6
| | | | | | | exceptions. When raising NotANumber, pass the string that failed as the exception value.
* While we're at it, convert to docstrings and set the indentation levelFred Drake1999-06-251-91/+96
| | | | to 4.
* Break some cycles when the widget is destroyed.Guido van Rossum1999-06-251-0/+8
|
* Patch from Sjoerd Mullender:Fred Drake1999-06-251-12/+12
| | | | | Make argument names equal to what is used in the documentation of the file object, since chunks are supposedly file-like.
* Mikael Lyngvig writes:Guido van Rossum1999-06-251-4/+4
| | | | | I just noticed that the changes below also apply to cmpcache.py, which is virtually identical to cmp.py.
* Patch by Mikael Lyngvig:Guido van Rossum1999-06-251-4/+4
| | | | | | | | | | 1. Fix incorrect file open mode on Win32 platforms (use "rb" instead of "r"). 2. Add shallow parameter to cmp.cmp(). If false, deep file comparisons are made. The module should be 100 percent backwards compatible.
* Sjoerd Mullender writes:Guido van Rossum1999-06-241-2/+8
| | | | | | | | | | | Urllib makes the URL of the opened file available through the geturl method of the returned object. For local files, this consists of file: plus the name of the file. This results in an invalid URL if the file name was relative. This patch fixes this so that the returned URL is just a relative URL in that case. When the file name is absolute, the URL returned is of the form file:///absolute/path. [I guess that a URL of the form "file:foo.html" is illegal... GvR]
* Small patch by Tim Peters - it was using self.maxlist when it shouldGuido van Rossum1999-06-231-1/+1
| | | | be using self.maxdict.
* Make the mode parameter to open() default in the same way as for wave.open().Fred Drake1999-06-222-8/+18
|
* Patch by Tim Peters:Guido van Rossum1999-06-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new builtin exception, UnboundLocalError, raised when ceval.c tries to retrieve or delete a local name that isn't bound to a value. Currently raises NameError, which makes this behavior a FAQ since the same error is raised for "missing" global names too: when the user has a global of the same name as the unbound local, NameError makes no sense to them. Even in the absence of shadowing, knowing whether a bogus name is local or global is a real aid to quick understanding. Example: D:\src\PCbuild>type local.py x = 42 def f(): print x x = 13 return x f() D:\src\PCbuild>python local.py Traceback (innermost last): File "local.py", line 8, in ? f() File "local.py", line 4, in f print x UnboundLocalError: x D:\src\PCbuild> Note that UnboundLocalError is a subclass of NameError, for compatibility with existing class-exception code that may be trying to catch this as a NameError. Unfortunately, I see no way to make this wholly compatible with -X (see comments in bltinmodule.c): under -X, [UnboundLocalError is an alias for NameError --GvR]. [The ceval.c patch differs slightly from the second version that Tim submitted; I decided not to raise UnboundLocalError for DELETE_NAME, only for DELETE_LOCAL. DELETE_NAME is only generated at the module level, and since at that level a NameError is raised for referencing an undefined name, it should also be raised for deleting one.]
* Greg McFarlane submitted two missing Text methods: mark_next() andGuido van Rossum1999-06-211-0/+4
| | | | mark_previous().
* Relocating file to Lib/lib-old.Fred Drake1999-06-181-63/+0
|
* Patch suggested (and partially provided) by Lars Damerow: instead ofGuido van Rossum1999-06-171-5/+8
| | | | | | always lowercasing the option name, call a method optionxform() which can be overridden. Also make the regexps SECTRE and OPTRE non-private variables so they can also be overridden.
* In collect_children(), put a try-except around os.waitpid() because itGuido van Rossum1999-06-171-1/+4
| | | | | may raise an exception (when there are no children). Reported by Andy Dustman.
* open(): Make the mode parameter optional; if omitted or None, use theFred Drake1999-06-171-1/+6
| | | | | | | | mode attribute of the file object (if it has one), otherwise use 'rb'. The documentation should still show this as required until there's a new release.
* Suppress warning print statements about modules not found, they areGuido van Rossum1999-06-161-2/+3
| | | | confusing to end users of IDEs.
* Sjoerd Mullender:Guido van Rossum1999-06-161-8/+24
| | | | | | | Added support for unseekable files. (I use unqualified excepts since we don't know why the seek/tell might fail. In my case it was because of an AttributeError.)
* Laurence Tratt notes that the accept() call in get_request() can fail,Guido van Rossum1999-06-151-1/+4
| | | | | and suggests putting a try/except around the get_request() call in handle_request(). (All in class TCPServer.)
* Add the test case provided by Barry Scott for his patch.Guido van Rossum1999-06-151-0/+5
|
* Barry Scott writes:Guido van Rossum1999-06-151-1/+1
| | | | | | | | | | | | | | | | | | | Problem: rfc822.py in 1.5.2 final loses the quotes around quoted local-part names. The fix is to preserve the quotes around a local-part name in an address. Test: import rfc822 a = rfc822.AddrlistClass('(Comment stuff) "Quoted name"@somewhere.com') a.getaddrlist() The correct result is: [('Comment stuff', '"Quoted name"@somewhere.com')]
* Added a couple of endswith test cases for bugs reported by Timbot.Barry Warsaw1999-06-151-0/+8
| | | | | Also added a short circuit for the regression test suite since CVS insisted on putting this file in the main branch. :(
* Added more tests of joinBarry Warsaw1999-06-141-0/+9
|
* Message.getheaders(): If there are no matching headers, return anFred Drake1999-06-141-2/+3
| | | | empty list instead of None. (Guido's request.)
* After more discussion with Jim, change the behavior so that only aGuido van Rossum1999-06-111-9/+1
| | | | | *missing* content-type at the outer level of a POST defaults to urlencoded. In all other circumstances, the default is read_singe().
* Two extra startswith testsBarry Warsaw1999-06-111-0/+3
|
* Harness can now test object methods directly, if they aren't availableBarry Warsaw1999-06-111-2/+14
| | | | | | in the string module. Add a bunch of new tests for extended startswith/endswith arguments.
* Mark Hammond: patch for Windows/CE.Guido van Rossum1999-06-111-0/+15
|
* Output for the regression test of the new string methods.Barry Warsaw1999-06-101-0/+3
|
* Regression test for the new string methods.Barry Warsaw1999-06-101-0/+110
|
* Relocating file to Lib/lib-old.Fred Drake1999-06-101-25/+0
|
* Added a few more bugs to the doc string; reformatted existing bugs.Guido van Rossum1999-06-101-8/+23
|
* Co-production with Tim Peters, implementing a suggestion by MarkGuido van Rossum1999-06-101-6/+31
| | | | | | Hammond: record top-level functions (as Function instances, a simple subclass of Class). You must use the new interface readmodule_ex() to get these, though.
* Fix by Sjoerd for a package related bug: If you have a non-empyGuido van Rossum1999-06-091-6/+6
| | | | | | | | | | | | | | __init__.py it isn't read. (Sjoerd just came up with this, so it's not heavily tested.) Other (yet unsolved) package problems noted by Sjoerd: - If you have a package and a module inside that or another package with the same name, module caching doesn't work properly since the key is the base name of the module/package. - The only entry that is returned when you readmodule a package is a __path__ whose value is a list which confuses certain class browsers that I wrote. (Hm, this could be construed as a feature.)
* Updated lagging version#. Also added some comments about how quote()Guido van Rossum1999-06-091-1/+3
| | | | and quote_plus() can be optimized tenfold.
* Patch by Per Cederqvist:Guido van Rossum1999-06-091-3/+6
| | | | | | | I've found two places where smtplib.py sends an extra trailing space on command lines to the SMTP server. I don't know if this ever causes any problems, but I'd prefer to be on the safe side. The enclosed patch removes the extra space.
* Add unrelated but handy function: timegm(), to calculate UnixGuido van Rossum1999-06-091-0/+17
| | | | timestamp from GMT tuple.
* Don't just die if gethostbyaddr() fails -- as it can when DNS isGuido van Rossum1999-06-091-6/+10
| | | | unreachable -- but fall back to using whatever hostname we have.
* Oops, Sjoerd was in a hurry. This patch from him fixes some lengthGuido van Rossum1999-06-091-0/+1
| | | | math in the Chunk class.
* Patch/new code by Sjoerd Mullender:Guido van Rossum1999-06-092-74/+155
| | | | Separate the Chunk class out of the aifc module into a new "chunk" module.
* Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:Guido van Rossum1999-06-081-1/+1
| | | | | | all processing instruction target names containing 'xml' were rejected, instead (as the standard rejects) only the name 'xml' itself (or case variants thereof).
* On David Ascher's recommendation: reversed order of 'utime()' andGreg Ward1999-06-081-2/+5
| | | | 'chmod()' in 'copy_file()'.