summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Heh. I need a break. After this: stropmodule & stringobject were moreTim Peters2001-05-102-16/+12
| | | | | | out of synch than I realized, and I managed to break replace's "count" argument when it was 0. All is well again. Maybe. Bugfix candidate.
* Fudge. stropmodule and stringobject both had copies of the buggyTim Peters2001-05-102-40/+54
| | | | | | mymemXXX stuff, and they were already out of synch. Fix the remaining bugs in both and get them back in synch. Bugfix release candidate.
* SF bug #422088: [OSF1 alpha] string.replace().Tim Peters2001-05-092-26/+39
| | | | | | Platform blew up on "123".replace("123", ""). Michael Hudson pinned the blame on platform malloc(0) returning NULL. This is a candidate for all bugfix releases.
* Mechanical changes for easier edits.Tim Peters2001-05-091-152/+136
|
* Remove the old platform-specific FCNTL.py modules; these are no longerFred Drake2001-05-0915-1993/+0
| | | | needed now that fcntl exports the constants.
* Add a new FCNTL.py backward compatibility module that issues a deprecationFred Drake2001-05-091-0/+14
| | | | warning. This is similar to the TERMIOS backward compatbility module.
* Update the tests for the fcntl module to check passing in file objects,Fred Drake2001-05-091-11/+21
| | | | and using the constants defined there instead of FCNTL.
* Update the fcntl module documentation.Fred Drake2001-05-091-30/+26
|
* Modify to allow file objects wherever file descriptors are needed.Fred Drake2001-05-091-8/+71
| | | | | | | | This closes SF bug #231328. Added all constants needed to use the functions defined in this module that are not defined elsewhere (the O_* symbols are available in the os module). No additonal modules are needed to use this now.
* fdconv(): Do not second guess the error condition returned byFred Drake2001-05-091-37/+4
| | | | | | | | PyObject_AsFileDescriptor() -- it does the same thing everywhere, so use it the same way everyone else does so that exceptions are consistent. This means we have less code here, and we do not need to resort to hackish ways of getting the Python-visible function name to fdconv().
* SF patch #416247 2.1c1 stringobject: unused vrbl cleanup.Tim Peters2001-05-091-2/+0
| | | | Thanks to Mark Favas.
* Itamar Shtull-Trauring <python@itamarst.org>:Fred Drake2001-05-091-4/+5
| | | | | | | Updates zipfile.ZipFile docs to mention the fact that you can create a ZipFile instance from an arbitrary file-like object. This closes patch #418011.
* Three uses of makesockaddr() used sockaddr buffers that had not be cleared;Fred Drake2001-05-091-1/+4
| | | | | | | | | | | | | this could cause invalid paths to be returned for AF_UNIX sockets on some platforms (including FreeBSD 4.2-RELEASE), appearantly because there is no assurance that the address will be nul-terminated when filled in by the kernel. PySocketSock_recvfrom(): Use PyString_AS_STRING() to get the data pointer of a string we create ourselves; there is no need for the extra type check from PyString_AsString(). This closes SF bug #416573.
* SF patch #416249, from Mark Favas: 2.1c1 compile: unused vrbl cleanupTim Peters2001-05-091-2/+0
|
* Minor fiddling related toTim Peters2001-05-091-5/+2
| | | | SF patch 416251 2.1c1 mmapmodule: unused vrbl cleanup
* Update build notes for Mac OS X 10.0.Fred Drake2001-05-091-10/+10
| | | | This closes SF bug #416530.
* Only import termio.h on OSF, and add a comment about why it is needed there.Fred Drake2001-05-091-0/+4
| | | | | | | This header does not exist on all Unix flavors; FreeBSD in particular does not include it. This closes SF bug #422320.
* Fix the operator precedence table: exponentiation binds tighter thanFred Drake2001-05-091-2/+2
| | | | | | negation. This closes SF bug #421999.
* Remove items that have been done or are being tracked in the SourceForgeFred Drake2001-05-091-10/+0
| | | | bug tracker.
* Update the directory names to match changes at SourceForge.Fred Drake2001-05-092-2/+2
|
* Trivial tests of urllib2 for recent SF bugJeremy Hylton2001-05-092-0/+18
|
* Work around limitations of the module synopsis table generation to avoidFred Drake2001-05-099-9/+9
| | | | | | leaking LaTeX2HTML's internal string munging. This fixes SF bug #420399.
* Raise useful exception when called with URL for which request typeJeremy Hylton2001-05-091-1/+2
| | | | | | cannot be determined. Pseudo-fix for SF bug #420724
* Minor adjustments to HTML for the module synopsis tables.Fred Drake2001-05-091-2/+6
|
* Sheesh -- repair the dodge around "cast isn't an lvalue" complaints toTim Peters2001-05-091-0/+4
| | | | restore correct semantics.
* Mark Favas reported that gcc caught me using casts as lvalues. Dodge it.Tim Peters2001-05-091-6/+10
|
* Job.build_html(): Be more robust in ensuring about.html exists; copyingFred Drake2001-05-091-17/+16
| | | | | | | | | the right HTML file to the name about.html is needed even if the --numeric option was not given -- some other name may have been assigned due to some non-determinism in the algorithm use to perform name allocation. ;-( This closes the "About..." portion of SF bug #420216.
* There is no IMAP class in the imaplib module; the class is IMAP4.Fred Drake2001-05-091-9/+10
| | | | | | | | There is no imap module; refer to imaplib instead, since it exists. Move the "See Also:" section in front of the sub-sections, for consistency with other portions of the library reference. This closes the library reference portion of SF bug #420216.
* Note that when inplace=1 existing backup files will be removed silently.Fred Drake2001-05-091-2/+5
| | | | Closes SF bug #420230.
* Always pass a full path name to LoadLibraryEx(). Fixes some Windows 9x ↵Mark Hammond2001-05-091-17/+14
| | | | problems. As discussed on python-dev
* Ack! Restore the COUNT_ALLOCS one_strings code.Tim Peters2001-05-091-1/+5
|
* My change to string_item() left an extra reference to each 1-characterTim Peters2001-05-091-4/+3
| | | | | interned string created by "string"[i]. Since they're immortal anyway, this was hard to notice, but it was still wrong <wink>.
* Intern 1-character strings as soon as they're created. As-is, they aren'tTim Peters2001-05-081-15/+12
| | | | | | | | | | | | | | | | | | | interned when created, so the cached versions generally aren't ever interned. With the patch, the Py_INCREF(t); *p = t; Py_DECREF(s); return; indirection block in PyString_InternInPlace() is never executed during a full run of the test suite, but was executed very many times before. So I'm trading more work when creating one-character strings for doing less work later. Note that the "more work" here can happen at most 256 times per program run, so it's trivial. The same reasoning accounts for the patch's simplification of string_item (the new version can call PyString_FromStringAndSize() no more than 256 times per run, so there's no point to inlining that stuff -- if we were serious about saving time here, we'd pre-initialize the characters vector so that no runtime testing at all was needed!).
* Blurb about the increased precision of float literals in .pyc/.pyo files.Tim Peters2001-05-081-0/+20
|
* SF bug #422177: Results from .pyc differs from .pyTim Peters2001-05-084-8/+34
| | | | | | | | Store floats and doubles to full precision in marshal. Test that floats read from .pyc/.pyo closely match those read from .py. Declare PyFloat_AsString() in floatobject header file. Add new PyFloat_AsReprString() API function. Document the functions declared in floatobject.h.
* Removed some confusing sentences that are no longer relevant now thatJack Jansen2001-05-081-9/+0
| | | | calldll is part of the standard macPython distribution.
* Michael Hudson <mwh21@cam.ac.uk>:Fred Drake2001-05-081-2/+3
| | | | | | | | Documentation update to reflect changes to the termios module (noting that the termios functions can take a file object as well as a file descriptor). This closes the documentation portion of SF patch #417081.
* SF patch #421922: Implement rich comparison for dicts.Tim Peters2001-05-083-4/+104
| | | | | | d1 == d2 and d1 != d2 now work even if the keys and values in d1 and d2 don't support comparisons other than ==, and testing dicts for equality is faster now (especially when inequality obtains).
* Fix several bugs and add two features.Jeremy Hylton2001-05-081-34/+88
| | | | | | | | | | | | | | | | | | | | | | | | | Assertion error message had typos in arguments to string format. .cover files for modules in packages are now put in the right place. The code that generate .cover files seemed to prepend a "./" to many absolute paths, causing them to fail. The code now checks explicitly for absolute paths and leaves them alone. In trace/coverage code, recover from case where module has no __name__ attribute, when e.g. it is executed by PyRun_String(). In this case, assign modulename to None and hope for the best. There isn't anywhere to write out coverage data for this code anyway. Also, replace several sys.stderr.writes with print >> sys.stderr. New features: -C/--coverdir dir: Generate .cover files in specified directory instead of in the directory where the .py file is. -s: Print a short summary of files coverred (# lines, % coverage, name)
* Several small changes. Mostly reformatting, adding parens.Jeremy Hylton2001-05-081-10/+11
| | | | | | | | | Check for free in class and method only if nested scopes are enabled. Add assertion to verify that no free variables occur when nested scopes are disabled. XXX When should nested scopes by made non-optional on the trunk?
* SF patch 419176 from MvL; fixed bug 418977Jeremy Hylton2001-05-083-6/+24
| | | | Two errors in dict_to_map() helper used by PyFrame_LocalsToFast().
* Remove unused variableJeremy Hylton2001-05-081-1/+0
|
* This is a test showing SF bug 422177. It won't trigger until I check inTim Peters2001-05-081-0/+30
| | | | | | another change (to test_import.py, which simply imports the new file). I'm checking this piece in now, though, to make it easier to distribute a patch for x-platform checking.
* SF bug #422108 - Error in rich comparisons.Tim Peters2001-05-071-1/+7
| | | | | | 2.1.1 bugfix candidate too. Fix a bad (albeit unlikely) return value in try_rich_to_3way_compare(). Also document do_cmp()'s return values.
* Michael Hudson <mwh21@cam.ac.uk>:Fred Drake2001-05-071-53/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does several things to termios: (1) changes all functions to be METH_VARARGS (2) changes all functions to be able to take a file object as the first parameter, as per http://mail.python.org/pipermail/python-dev/2001-February/012701.html (3) give better error messages (4) removes a bunch of comments that just repeat the docstrings (5) #includes <termio.h> before #including <sys/ioctl.h> so more #constants are actually #defined. (6) a couple of docstring tweaks I have tested this minimally (i.e. it builds, and doesn't blow up too embarassingly) on OSF1/alpha and on one of the sf compile farm's solaris boxes, and rather more comprehansively on my linux/x86 box. It still needs to be tested on all the other platforms we build termios on. This closes the code portion of SF patch #417081.
* Hmm... better add a version annotation for the Iterator Protocol section.Fred Drake2001-05-071-0/+2
|
* Added documentation for PyIter_Check() and PyIter_Next().Fred Drake2001-05-071-1/+39
| | | | Wrapped a long line.
* Generalize zip() to work with iterators.Tim Peters2001-05-064-28/+96
| | | | | | | | NEEDS DOC CHANGES. More AttributeErrors transmuted into TypeErrors, in test_b2.py, and, again, this strikes me as a good thing. This checkin completes the iterator generalization work that obviously needed to be done. Can anyone think of others that should be changed?
* Get rid of silly 5am "del" stmts.Tim Peters2001-05-051-2/+0
|
* Reimplement PySequence_Contains() and instance_contains(), so they workTim Peters2001-05-054-77/+67
| | | | | | | | | safely together and don't duplicate logic (the common logic was factored out into new private API function _PySequence_IterContains()). Visible change: some_complex_number in some_instance no longer blows up if some_instance has __getitem__ but neither __contains__ nor __iter__. test_iter changed to ensure that remains true.