summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Use PyObject_CheckReadBuffer().Jeremy Hylton2001-11-091-6/+1
|
* Fix memory leak. This is part of SF patch #478006.Fred Drake2001-11-091-0/+1
|
* Fix memory leak. This is (very!) similar to part of SF patch #478006.Fred Drake2001-11-091-0/+1
|
* Fixes to compile cPickle.c & socketmodule.c on cygwin and possiblyMichael W. Hudson2001-11-092-5/+10
| | | | | other platforms that have funny ideas about whether addresses of functions in dlls are compile-time constants.
* Fix memory leaks detecting in bug report #478003.Martin v. Löwis2001-11-072-5/+11
|
* Remove obsolete e-mail addressAndrew M. Kuchling2001-11-051-1/+1
|
* SF patch 473749 compile under OS/2 VA C++, from Michael Muller.Tim Peters2001-11-051-1/+4
| | | | Changes enabling Python to compile under OS/2 Visual Age C++.
* Correct argument parsing for alp_getstatus, which is METH_VARARGS.Martin v. Löwis2001-11-031-1/+1
|
* Patch #474169: Move fdopen calls out of critical section.Martin v. Löwis2001-11-021-4/+8
|
* Correct getnameinfo refcounting and tuple parsing. Fixes #476648.Martin v. Löwis2001-11-021-6/+4
|
* Simplify initmd5() to use PyModule_AddIntConstant().Fred Drake2001-11-021-3/+2
|
* Clean up a Tab inconsistency.Fred Drake2001-11-021-4/+2
| | | | Simplfy the insint() macro to use PyModule_AddIntConstant().
* [Patch #476612] Add attributes from PEP247 to the md5 and sha modulesAndrew M. Kuchling2001-11-022-4/+11
|
* has_finalizer(): simplified "if (complicated_bool) 1 else 0" toTim Peters2001-11-011-8/+3
| | | | "complicated_bool".
* Add has_finalizer predictate function. Use it when deciding whichNeil Schemenauer2001-11-011-14/+26
| | | | | | | | | | | objects to save in gc.garbage. This should be the last change needed to fix SF bug 477059: "__del__ on new classes vs. GC". Note that this change slightly changes the behavior of the collector. Before, if a cycle was found that contained instances with __del__ methods then all instance objects in that cycle were saved in gc.garbage. Now, only objects with __del__ methods are saved in gc.garbage.
* SF bug #477059 (my own): __del__ on new classes vs. GC.Guido van Rossum2001-11-011-1/+3
| | | | | | When moving objects with a __del__ attribute to a special list, look for __del__ on new-style classes with the HEAPTYPE flag set as well. (HEAPTYPE means the class was created by a class statement.)
* Make the gc.collect() function respect the collection lock. This fixesNeil Schemenauer2001-10-311-4/+11
| | | | SF bug 476129: "gc.collect sometimes hangs".
* Change the limit on the input size for b2a_base64 to what will fit inGuido van Rossum2001-10-301-1/+3
| | | | | | memory, rather than the standard's 57. This fixes SF bug #473009.
* PySocketSock_connect_ex(): On Windows, return the correct Windows exitTim Peters2001-10-301-1/+6
| | | | | code. The patch is from Jeremy, and allows test_asynchat to run again. Bugfix candidate.
* Make the low-level log-reader object export a dictionary mapping keysFred Drake2001-10-291-45/+163
| | | | | | | | | | | | | | to lists of values, giving the contents of all the ADD_INFO records seen so far. This is initialized agressively when the log file is opened, so that whoever is looking at the log reader can always see the initial data loaded into the data stream. ADD_INFO events later in the log file continue to be reported to the application layer as before. Add a new method, addinfo(), to the profiler. This can be used to insert additional ADD_INFO records into the profiler log. Fix the tp_flags and tp_name slots on the type objects.
* Oops. In the tp_name field, the name should be "_socket.socket", notGuido van Rossum2001-10-281-2/+2
| | | | | | "socket.socket" -- on Windows, "socket.socket" is the wrapper class. Also added the module name to the SSL type (which is not a new-style class -- I don't want to mess with it yet).
* Made SocketType and socket the same thing: a subclassable type whoseGuido van Rossum2001-10-271-119/+167
| | | | | | | | | | | | | | | | | | | | | constructor acts just like socket() before. All three arguments have a sensible default now; socket() is equivalent to socket(AF_INET, SOCK_STREAM). One minor issue: the socket() function and the SocketType had different doc strings; socket.__doc__ gave the signature, SocketType.__doc__ gave the methods. I've merged these for now, but maybe the list of methods is no longer necessary since it can easily be recovered through socket.__dict__.keys(). The problem with keeping it is that the total doc string is a bit long (34 lines -- it scrolls of a standard tty screen). Another general issue with the socket module is that it's a big mess. There's pages and pages of random platform #ifdefs, and the naming conventions are totally wrong: it uses Py prefixes and CapWords for static functions. That's a cleanup for another day... (Also I think the big starting comment that summarizes the API can go -- it's a repeat of the docstring.)
* Add sendall() method, which loops until all data is written or anGuido van Rossum2001-10-261-2/+44
| | | | | | | error occurs, and doesn't return a count. (This is my second patch from SF patch #474307, with small change to the docstring for send().) 2.1.2 "bugfix" candidate.
* Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck)Guido van Rossum2001-10-251-3/+13
| | | | | | | | Replace some tortuous code that was trying to be clever but forgot to DECREF the key and value, by more longwinded but obviously correct code. (Inspired by but not copying the fix from SF patch #475033.)
* After discussion with itojun, it was clarified that Tru64 is in error,Martin v. Löwis2001-10-251-1/+3
| | | | and that the work-around should be restricted to that system.
* (experimental) "finditer" method/function. this works pretty muchFredrik Lundh2001-10-241-0/+28
| | | | | like findall, but returns an iterator (which returns match objects) instead of a list of strings/tuples.
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-244-38/+23
|
* Fix typo. Thanks to Jack Jansen for spotting it.Martin v. Löwis2001-10-241-1/+1
|
* Check for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED andMartin v. Löwis2001-10-241-7/+40
| | | | | | STRICT_SYSV_CURSES when compiling curses module on HP/UX. Generalize access to _flags on systems where WINDOW is opaque. Fixes bugs #432497, #422265, and the curses parts of #467145 and #473150.
* Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfoMartin v. Löwis2001-10-241-0/+6
| | | | not properly processing numeric IPv4 addresses. Fixes V5.1 part of #472675.
* Added missing cast.Jack Jansen2001-10-231-1/+1
|
* Got this to work in MacPython. The code is #ifdef macintosh style (to match ↵Jack Jansen2001-10-231-2/+10
| | | | the existing #ifdef MS_WINDOWS), but eventually ifdeffing on configure features is probably better.
* Convert the ref() and proxy() implementations to use the newFred Drake2001-10-231-2/+2
| | | | PyArg_UnpackTuple() function (serves as an example and test case).
* another major speedup: let sre.sub/subn check for escapes in theFredrik Lundh2001-10-221-30/+89
| | | | | template string, and don't call the template compiler if we can avoid it.
* sre.split should return the last segment, even if emptyFredrik Lundh2001-10-221-11/+10
| | | | (sorry, barry)
* Adding missing "static" declarations (found by "make smelly").Neil Schemenauer2001-10-212-2/+2
|
* fixed character set description in docstring (SRE uses PythonFredrik Lundh2001-10-211-96/+41
| | | | | | | | | | | | | | | | | strings, not C strings) removed USE_PYTHON defines, and related sre.py helpers skip calling the subx helper if the template is callable. interestingly enough, this means that def callback(m): return literal result = pattern.sub(callback, string) is much faster than result = pattern.sub(literal, string)
* sre.Scanner fixes (from Greg Chapman). also added a Scanner sanityFredrik Lundh2001-10-211-0/+17
| | | | | | check to the test suite. added a few missing exception checks in the _sre module
* rewrote the pattern.sub and pattern.subn methods in CFredrik Lundh2001-10-211-113/+306
| | | | | | | | | removed (conceptually flawed) getliteral helper; the new sub/subn code uses a faster code path for literal replacement strings, but doesn't (yet) look for literal patterns. added STATE_OFFSET macro, and use it to convert state.start/ptr to char indexes
* Change clear_handlers argument to indicate whether this is an initialization.Martin v. Löwis2001-10-211-9/+10
| | | | Do not set the Expat handlers if it is. Fixes PyXML bug #473195.
* rewrote the pattern.split method in CFredrik Lundh2001-10-201-12/+136
| | | | also restored SRE Unicode support for 1.6/2.0/2.1
* Add two forgotten 'break' statementsAndrew M. Kuchling2001-10-201-15/+40
| | | | | | | | Allow passing strings to the .border() method Correct some error messages ("1 or 4" -> "1 to 4") Bump version number Tweak code formatting Update my e-mail address
* (Hopefully) fix SF bug #472675: CVS socketmodule now doesn't compileGuido van Rossum2001-10-191-1/+1
| | | | | This appears to be a case of a missing \n\ in a multiline string literal.
* SF patch #460805 by Chris Gonnerman: Support for unsetenv()Guido van Rossum2001-10-191-0/+34
| | | | | | | | This adds unsetenv to posix, and uses it in the __delitem__ method of os.environ. (XXX Should we change the preferred name for putenv to setenv, for consistency?)
* SF patch #443759: Add Interface to readline's add_historyGuido van Rossum2001-10-191-0/+18
| | | | | | | | | | | | | | This was submitted by Moshe, but apparently he's too busy to check it in himself. He wrote: Here is a function in GNU readline called add_history, which is used to manage the history list. Though Python uses this function internally, it does not expose it to the Python programmer. This patch adds direct interface to this function with documentation. This could be used by friendly modules to "seed" the history with commands.
* Expose O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW.Martin v. Löwis2001-10-181-0/+17
|
* Don't leave bare newlines in long strings -- VC doesn't like that.Guido van Rossum2001-10-181-3/+3
|
* SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.Guido van Rossum2001-10-182-78/+227
| | | | | | | | | | | | | | | | | This is a big one, touching lots of files. Some of the platforms aren't tested yet. Briefly, this changes the return value of the os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the time functions localtime(), gmtime(), and strptime() from tuples into pseudo-sequences. When accessed as a sequence, they behave exactly as before. But they also have attributes like st_mtime or tm_year. The stat return value, moreover, has a few platform-specific attributes that are not available through the sequence interface (because everybody expects the sequence to have a fixed length, these couldn't be added there). If your platform's struct stat doesn't define st_blksize, st_blocks or st_rdev, they won't be accessible from Python either. (Still missing is a documentation update.)
* Shut up warnings for setgroups() on Linux -- you have to #includeGuido van Rossum2001-10-181-0/+5
| | | | <grp.h> it seems. This requires yet another configure test.
* SRE bug #441409:Fredrik Lundh2001-10-181-1/+3
| | | | | | | | compile should raise error for non-strings SRE bug #432570, 448951: reset group after failed match also bumped version number to 2.2.0