summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* (HTML|Text)Repr.repr1: Guard against objects whos types have no __name__Skip Montanaro2003-06-271-10/+10
| | | | attribute. Patch and bug report from Geoff Talvola. Closes patch #672855.
* Jacob Hallen cornered me here at EuroPython and got me to look atMichael W. Hudson2003-06-271-1/+5
| | | | | | | | | | patch: [ 750008 ] 'compiler' module bug with 'import foo.bar as baz' which I'm now checking in. after import foo.bar as baz, baz would refer to foo.
* SF bug #761337: datetime.strftime fails on trivial format stringRaymond Hettinger2003-06-271-0/+1
| | | | | | | | | | | | | | The interning of short strings violates the refcnt==1 assumption for _PyString_Resize(). A simple fix is to boost the initial value of "totalnew" by 1. Combined with an NULL argument to PyString_FromStringAndSize(), this assures that resulting format string is not interned. This will remain true even if the implementation of PyString_FromStringAndSize() changes because only the uninitialized strings that can be interned are those of zero length. Added a test case.
* Don't call constructor() from pickle().Jeremy Hylton2003-06-261-3/+3
| | | | | | | The constructor() call only made sense when it registered the constructor as safe for unpickling. We should probably remove the module-global function, but need to worry about backwards compatibility.
* Portion of SF patch #761104. Fixes a minor docstring error.Raymond Hettinger2003-06-261-4/+3
| | | | _TemporarilyImmutableSet is in fact a subclass of BaseSet
* Enable tracing of multi-threaded applications.Jeremy Hylton2003-06-261-1/+6
| | | | | Fix bug in computation of coverage percentage: Only count a line if it was executed or if we print the >>>>>> marker.
* SF bug #759889: Pickling of Random is brokenRaymond Hettinger2003-06-242-0/+10
| | | | | * Implement __reduce__() to support pickling. * Add a test case to prove a successful roundtrip through pickle.
* _make_boundary(): A minor optimization suggested by the Timbot.Barry Warsaw2003-06-241-1/+1
|
* Deal with a couple XXX comments which asked questions.Greg Stein2003-06-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In response to "shouldn't the client close the file?", the answer is "no". The original design behind HTTPConnection is that the client did not have to worry about it. The response would close itself when you read the last of the data from it. This closing also dealt with allowing the connection to perform another request/response (if it was a persistent connection). However... the auto-close behavior broke compatibility with the classic httplib.HTTP class' behavior when a zero-length response body was present. In that situation, the HTTPResponse object was auto-closing it since there was no data present, and for an HTTP/1.0 connection-close socket (or an HTTP/0.9 request) connection, that also ended up closing the socket. When an httplib.HTTP user went to read the socket... boom. A patch to correct the auto-close (for compat with old httplib users) was added in rev 1.22. But for non-zero-length *chunked* bodies, we should keep the auto-close behavior. The library user is not reading the socket (they can't cuz of the chunked response we just got done handling), so they should be immune to the response closing the socket. In fact, I would like to see (one day) the auto-close restored, and the HTTP subclass would simply have a flag to disable that behavior (for back-compat purposes).
* SF patch #736962. Converted test_compile to unittest format.Raymond Hettinger2003-06-232-167/+140
|
* Idlefork patch #682347: convert Unicode strings from readline toMartin v. Löwis2003-06-222-4/+15
| | | | | IOBinding.encoding. Also set sys.std{in,out,err}.encoding, for both the local and the subprocess case.
* some old changes to this unused moduleJust van Rossum2003-06-211-13/+6
|
* changed 8-space indentation to 4Just van Rossum2003-06-214-1935/+1935
|
* Patch #755087: Deal with emptied dumbdbm files correctly.Martin v. Löwis2003-06-211-3/+3
|
* - do the right thing with symlinks inside directories we're copyingJust van Rossum2003-06-201-6/+13
| | | | | - move the normpath stuff around a bit - added dubious special case to addPythonFramework()
* make sure paths to dirs don't end in a /Just van Rossum2003-06-201-2/+2
|
* Reworked --strip option: it will now look at _any_ file that's markedJust van Rossum2003-06-201-13/+24
| | | | executable in the bundle. Therefore got rid of the "binaries" attribute.
* register the library inside Python.framework as eligable for strippingJust van Rossum2003-06-201-2/+4
|
* Add initial standalone support for Python.frameworkJust van Rossum2003-06-201-2/+32
|
* Added regression test for SF #757818Raymond Hettinger2003-06-201-0/+5
|
* Many new tests, based on gcov's coverage information.Gustavo Niemeyer2003-06-201-0/+172
| | | | | | From gcov's output (based on a locally changed _sre.c): 82.07% of 1372 source lines executed in file ./Modules/_sre.c
* Use find() instead of looping over the string in expanduser().Walter Dörwald2003-06-192-5/+9
| | | | From SF patch #757058.
* randrange(): Repaired my overly optimistic rewrite, and added commentsTim Peters2003-06-191-1/+13
| | | | explaining what's wrong with the two simpler variants.
* randrange(): 2.3 can no longer raises OverflowError on an int() call, soTim Peters2003-06-191-10/+1
| | | | | | some of this code because useless, and (worse) could return a long instead of int (in Zope that's important, because a long can't be used as a key in an IOBTree or IIBTree).
* Minor updates:Raymond Hettinger2003-06-181-5/+14
| | | | | | * Updated comment on design of imap() * Added untraversed object in izip() structure * Replaced the pairwise() example with a more general window() example
* Port test_complex.py to unittest.Walter Dörwald2003-06-182-145/+249
| | | | | | | | Move the constructor tests from test_builtin to test_complex. Add a bunch of tests (code coverage is a 94%). From SF patch #736962.
* Give default _elemdict and _propdict attributes to OSA classes, soJack Jansen2003-06-181-4/+6
| | | | | | | we don't get infinite recursion for suites that don't have an application class. Also got rid of some tabs.
* An indenting error in the code made it miss some suites that have an applicationJack Jansen2003-06-181-2/+2
| | | | class.
* SF bug #753451: classmethod abuse --> SystemErrorRaymond Hettinger2003-06-181-0/+8
| | | | | | Check the argument to classmethod for callability. Backport candidate.
* Remove debug print on filename with NUL byte.Greg Ward2003-06-181-1/+0
|
* SF patch #755987 (Jim Ahlstrom):Greg Ward2003-06-181-16/+15
| | | | | | | | | | | | | | | | | This is a patch for Bug 755031: If a null byte appears in a file name, Python zipfile.py retains it, but InfoZip terminates the name. Null bytes in file names are used as a trick by viruses. I tested WinZip, and it also truncates the file name at the null byte. The patch also fixes a buglet: If a zipfile incorrectly uses a directory separator other than '/', there was an invalid complaint that the central directory name does not match the file header name. I also removed my name from the top of the file. It was there for legal reasons which I believe no longer apply. Many people have worked on this file besides me.
* Change all header strings to be as if they were capitalize()'ed. Also callBrett Cannon2003-06-171-9/+9
| | | | | | capitalize in AbstractHTTPHandler before inserting headers into HTTP instance. Closes bug #649742, again.
* Use _PyEval_SliceIndex to handle list.index() calls withWalter Dörwald2003-06-171-0/+9
| | | | huge start and stop arguments. Add tests.
* Fix docstringRaymond Hettinger2003-06-171-1/+1
|
* Fix sloppy index() implementation:Guido van Rossum2003-06-171-2/+6
| | | | | - don't use min() and max() - interpret negative start/stop argument like negative slice indices
* Modernize Lib/posixpath.py: Use startswith(), endswith(), rstrip(),Walter Dörwald2003-06-171-15/+16
| | | | | | struct_passwd attributes and +=. From SF patch #755245.
* SF Patch 569574 - enhancements to cgitb for plain text displaySkip Montanaro2003-06-171-14/+95
|
* SF #754014: list.index() should accept optional start, end argumentsRaymond Hettinger2003-06-173-1/+26
| | | | Also, modified UserList.index() to match and expanded the related tests.
* test_posixpath.py now uses unittest. The output file is no longer needed.Raymond Hettinger2003-06-171-2/+0
|
* Add test for bug #751998.Neal Norwitz2003-06-161-0/+16
|
* Complete rewrite of tests by Walter Dorwald as unittest tests.Brett Cannon2003-06-161-45/+394
|
* Add ':' after IDLE version, fix spacing on a couple of lines I missedKurt B. Kaiser2003-06-161-4/+5
|
* Made DateTime's constructor accept a time.struct_time class,Gustavo Niemeyer2003-06-161-1/+1
| | | | besides plain tuples.
* Whitespace normalization.Tim Peters2003-06-157-12/+11
|
* Return None to signal that the module the object was defined in was not ↵Brett Cannon2003-06-151-0/+2
| | | | found when object has no __name__ attr but is needed to figure out location of object.
* Make CREDITS.txt a Latin-1 file. Extend ViewFile to support file encodings.Martin v. Löwis2003-06-152-4/+17
|
* choose_boundary(): This no longer uses random, so stop importing it.Tim Peters2003-06-151-1/+0
|
* choose_boundary(): Incorporated a threadsafe incrementing counter, so thatTim Peters2003-06-151-8/+22
| | | | | | | | unique boundary strings within a program run are guaranteed. On Windows, duplicates were pretty likely, due to the coarse granularity of time.time. Toned down the absurdly optimistic claims in the docstring. Bugfix candidate.
* Add a missing 'self,' to a super call in recently checked-in code.Guido van Rossum2003-06-151-1/+1
| | | | This was reported in the IDLEFORK bug tracker as #754971.
* Forwardport Patch from IDLEfork SF 615312Kurt B. Kaiser2003-06-151-0/+9
| | | | Convert characters from the locale's encoding on output