summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Remove an obsolete comment and a "return" before fallig off the end of aFred Drake2001-05-031-2/+0
| | | | void function.
* ParserCreate(): Allow an empty string for the namespace_separator argument;Fred Drake2001-04-251-68/+82
| | | | | | | | | | | | while not generally a good idea, this is used by RDF users, and works to implement RDF-style namespace+localname concatenation as defined in the RDF specifications. (This also corrects a backwards-compatibility bug.) Be more conservative while clearing out handlers; set the slot in the self->handlers array to NULL before DECREFing the callback. Still more adjustments to make the code style internally consistent.
* SF but #417587: compiler warnings compiling 2.1.Tim Peters2001-04-211-1/+1
| | | | Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
* Export three optimization (fast locals) flagsJeremy Hylton2001-04-161-0/+4
|
* Reverting Moshe's EGD patch *and* Martin's patch to make it work withGuido van Rossum2001-04-161-34/+0
| | | | | | | | | | OpenSSL versions beore 0.9.5. This just is too experimental to be worth it, especially since the user would have to do some severe hacking of the Modules/Setup file to even enable the EGD code, and without the EGD code it would always spit out a warning on some systems -- even when socket.ssl() is not used. Fixing that properly is not my job; the EGD patch is clearly not so important that it should hold up the 2.1 release.
* SRE: made "copyright" string static, to avoid potential linkingFredrik Lundh2001-04-151-1/+8
| | | | conflicts.
* Make some private symbols static.Guido van Rossum2001-04-141-1/+1
|
* Clean up the unsightly mess around the readline header files. We nowGuido van Rossum2001-04-131-24/+1
| | | | | | | | | | | | | | | | | | | | | | | always: - #undef HAVE_CONFIG_H (because otherwise chardefs.h tries to include strings.h) - #include readline.h and history.h and we never declare any readline function prototypes ourselves. This makes it compile with readline 4.2, albeit with a few warnings. Some of the remaining warnings are about completion_matches(), which is renamed to rl_completion_matches(). I've tested it with various other versions, from 2.0 up, and they all seem to work (some with warnings) -- but only on Red Hat Linux 6.2. Fixing the warnings for readline 4.2 would break compatibility with 3.0 (and maybe even earlier versions), and readline doesn't seem to have a way to test for its version at compile time, so I'd rather leave the warnings in than break compilation with older versions.
* I am TENTATIVELY checking in Martin von Loewis's patch for the SSLGuido van Rossum2001-04-131-0/+7
| | | | | | | | | | | | problem reported by Neil Schemenauer on python-dev on 4/12/01, wth subject "Problem with SSL and socketmodule on Debian Potato?". It's tentative because Moshe objected, but Martin rebutted, and Moshe seems unavailable for comments. (Note that with OpenSSL 0.9.6a, I get a lot of compilation warnings for socketmodule.c -- I'm assuming I can safely ignore these until 2.1 is released.)
* cleanup_helper(): Make sure we invalidate all reference objectsFred Drake2001-04-131-6/+41
| | | | | | | | | | | before calling any callbacks. This is important since the callback objects only look at themselves to determine that they are invalide. This change avoids a segfault when callbacks use a different reference to an object in the process of being deallocated. This fixes SF bug #415660.
* Slight adaptation of Michael Hudson's patch to test PyDict_Next()Guido van Rossum2001-04-131-0/+62
| | | | | | | | | | | | (with modification of existing dict elements!). This is part of SF patch #409864: lazy fix for Pings bizarre scoping crash. The adaptation I made to Michael's patch was to change the error handling to avoid masking other errors (moving the specific error message to inside test_dict_inner()), and to insert a test for dict==NULL at the start.
* Unixware 7 support by Billy G. Allie (SF patch 413011)Guido van Rossum2001-04-112-0/+34
|
* Updated version of RISCOS support. SF patch 411213 by Dietmar SchwertbergerGuido van Rossum2001-04-102-10/+22
|
* Include py_curses.h *after* defining _XOPEN_SOURCE_EXTENDED.Guido van Rossum2001-04-101-2/+3
| | | | | | Michael Hudson suggested this fox for the Tru64 problem (SF bug 232597). It looks reasonable, it works on Tru64, and it doesn't beak anything on Linux, so I say go for it.
* Ack -- this module mixes tabs and spaces, and what appears to be a mixTim Peters2001-04-101-5/+5
| | | | | | | of 2-space and 4-space indents. Whatever, when I saw the checkin diff it was clear that what my editor thinks a tab means didn't match this module's belief. Removed all the tabs from the lines I added and changed, left everything else alone.
* On a sizeof(long)==8 machine, ints in range(2**31, 2**32) were gettingTim Peters2001-04-101-5/+21
| | | | | | | | | | | | | | | | pickled into the signed(!) 4-byte BININT format, so were getting unpickled again as negative ints. Repaired that. Added some minimal docs at the top about what I've learned about the pickle format codes (little of which was obvious from staring at the code, although that's partly because all the size-related bugs greatly obscured the true intent of the code). Happy side effect: because save_int() needed to grow a *proper* range check in order to fix this bug, it can now use the more-efficient BININT1, BININT2 and BININT formats when the long's value is small enough to fit in a signed 4-byte int (before this, on a sizeof(long)==8 box it always used the general INT format for negative ints). test_cpickle works again on sizeof(long)==8 machines. test_pickle is still busted big-time.
* Critical fix: if cPickle on a sizeof(long)==8 box is used to read aTim Peters2001-04-101-1/+8
| | | | | | | | | | | binary pickle, and the latter contains a pickle of a negative Python int i written on a sizeof(long)==4 box (and whether by cPickle or pickle.py), it's read incorrectly as i + 2**32. The patch repairs that, and allows test_cpickle.py (to which I added a relevant test case earlier today) to work again on sizeof(long)==8 boxes. There's another (at least one) sizeof(long)==8 binary pickle bug, but in pickle.py instead. That bug is still there, and test_pickle.py doesn't catch it yet (try pickling and unpickling, e.g., 1 << 46).
* Michael Hudson <mwh21@cam.ac.uk>:Fred Drake2001-04-091-13/+10
| | | | | | | Update the docstrings to no longer refer to the obsolete TERMIOS module. This is a partial acceptance of SF patch #413419.
* Repair portability of sign extension when reading signed ints on boxesTim Peters2001-04-081-10/+6
| | | | | | | | | | where sizeof(long)==8. This *was* broken on boxes where signed right shifts didn't sign-extend, but not elsewhere. Unfortunately, apart from the Cray T3E I don't know of such a box, and Guido has so far refused to buy me any Cray machines for home Python testing <wink>. More immediately interesting would be if someone could please test this on *any* sizeof(long)==8 box, to make sure I didn't break it.
* Effectively revert the previous change: leave the new #include in, butFred Drake2001-04-051-0/+3
| | | | | comment it out with an explanation. This makes it easier for someone who wants the additional symbols to try re-enabling it for their platform.
* Add an #include of sys/ioctl.h to pick up a lot of the constants supportedFred Drake2001-04-041-0/+1
| | | | | | in the previous patch. This closes (again!) SF patch #410267.
* Applying SF patch #412553 by Christopher Lee: fix linuxaudiodevGuido van Rossum2001-04-021-9/+29
| | | | | | | | | | handling of EAGAIN. This may or may not fix the problem for me (Mandrake 7.2 on a Dell Optiplex GX110 desktop): I can't hear the output, but it does pass the test now. It doesn't fix the problem for Fred (Mandrake 7.2 on a Dell Inspiron 7500 which has the Maestro sound drivers). Fred suspects that it's the kernel version in combination with the driver.
* Michael Hudson <mwh21@cam.ac.uk>:Fred Drake2001-03-261-0/+329
| | | | | | Add many more constants for some systems. This closes SF patch #410267.
* get_version_string(): New function -- returns a Python string object thatFred Drake2001-03-241-3/+24
| | | | | | | | gives the CVS revision of this file even if it does not include the extra RCS "$Revision: " cruft. initpyexpat(): Use get_version_string() instead of hard-coding magic indexes into the RCS string (which may be affected by export options).
* Fix a memory leak -- there's no need to INCREF() the result ofGuido van Rossum2001-03-231-1/+0
| | | | newreadlinesobject() in xreadlines().
* Revert the 1.8 patch, since it's implicated in nasty blowups (see Pyhon-Dev).Tim Peters2001-03-231-1/+1
|
* add DEF_BOUND constantJeremy Hylton2001-03-221-0/+1
|
* Update the Tix version (long overdue :-).Guido van Rossum2001-03-221-4/+4
| | | | | This is SF patch # #409044, by Internet Discovery: "Update tcl/tk/tix versions".
* Inform the cycle-detector that the a weakref object no longer needs to beFred Drake2001-03-221-1/+1
| | | | | | tracked as soon as it is clear; this can decrease the number of roots for the cycle detector sooner rather than later in applications which hold on to weak references beyond the time of the invalidation.
* Make cPickle use the recently-added PyInstance_NewRaw() API to createFred Drake2001-03-221-11/+3
| | | | | instance objects without calling the constructor. This is the same as the new.instance() function.
* sre 2.1b2 update:Fredrik Lundh2001-03-222-17/+63
| | | | | | - take locale into account for word boundary anchors (#410271) - restored 2.0's *? behaviour (#233283, #408936 and others) - speed up re.sub/re.subn
* Extend support for from __future__ import nested_scopesJeremy Hylton2001-03-221-3/+8
| | | | | | | | | | | | | | | | | | | If a module has a future statement enabling nested scopes, they are also enable for the exec statement and the functions compile() and execfile() if they occur in the module. If Python is run with the -i option, which enters interactive mode after executing a script, and the script it runs enables nested scopes, they are also enabled in interactive mode. XXX The use of -i with -c "from __future__ import nested_scopes" is not supported. What's the point? To support these changes, many function variants have been added to pythonrun.c. All the variants names end with Flags and they take an extra PyCompilerFlags * argument. It is possible that this complexity will be eliminated in a future version of the interpreter in which nested scopes are not optional.
* Don't raise MemoryError in keys() when the database is empty.Guido van Rossum2001-03-221-1/+1
| | | | This fixes SF bug #410146 (python 2.1b shelve is broken).
* SF patch 407758, "timemodule patches for Cygwin", from Norman Vine.Tim Peters2001-03-201-0/+7
| | | | http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470
* Committing patch 405101Moshe Zadka2001-03-181-0/+27
|
* SF bug [ #233200 ] cPickle does not use Py_BEGIN_ALLOW_THREADS.Tim Peters2001-03-171-173/+182
| | | | | | | http://sourceforge.net/tracker/?func=detail&aid=233200&group_id=5470&atid=105470 Wrapped the fread/fwrite calls in thread BEGIN_ALLOW/END_ALLOW brackets Afraid I hit the "delete trailing whitespace key" too! Only two "real" sections of code changed here.
* Variety of small INC/DECREF patches that fix reported memory leaksJeremy Hylton2001-03-131-3/+0
| | | | | | | | | | | | | | | | | | | | | with free variables. Thanks to Martin v. Loewis for finding two of the problems. This fixes SF buf 405583. There is also a C API change: PyFrame_New() is reverting to its pre-2.1 signature. The change introduced by nested scopes was a mistake. XXX Is this okay between beta releases? cell_clear(), the GC helper, must decref its reference to break cycles. frame_dealloc() must dealloc all cell vars and free vars in addition to locals. eval_code2() setup code must INCREF cells it copies out of the closure. The STORE_DEREF opcode implementation must DECREF the object it passes to PyCell_Set().
* Make sure we close the group and password databases when we are done withFred Drake2001-03-112-0/+2
| | | | them; this closes SF bug #407504.
* Define sunmath prototypes if sunmath.h was not included.Martin v. Löwis2001-03-071-0/+6
|
* Document SIG_* warning causes on Solaris.Martin v. Löwis2001-03-061-0/+5
|
* Use Py_CHARMASK for ctype macros. Fixes bug #232787.Martin v. Löwis2001-03-061-1/+1
|
* Be a bit more strict in setting up the export of the C API for thisFred Drake2001-03-031-6/+6
| | | | | module; do not attempt to insert the API object into the module dict if there was an error creating it.
* Wrap several more of the constants in #ifdef/#endif for FreeBSD; at leastFred Drake2001-03-031-0/+58
| | | | | | | some fairly recent versions have an anaemic selection of terminal-control symbols. This closes SF bug #405567.
* Extra fix from bbum (SF #402357) for his previous patch:Guido van Rossum2001-03-021-1/+1
| | | | | It should use the normal CC referenced compiler as ObjC is integrated directly into gcc and enabled through the use of the -ObjC flag.
* Fix typo in RISCOS patch inside MS #ifdef. (Probably my own fingers.)Guido van Rossum2001-03-021-1/+1
|
* Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;Fred Drake2001-03-021-1/+9
| | | | | | | | | these can be missing on some (all?) Irix and Tru64 versions. Protect the CRTSCTS value with a cast; this can be a larger value on Solaris/SPARC. This should fix SF tracker items #405092, #405350, and #405355.
* RISCOS changes by dschwertberger.Guido van Rossum2001-03-022-107/+182
|
* RISCOS changes by dschwertbergerGuido van Rossum2001-03-022-0/+13
|
* RISCOS changes by dschwertberger.Guido van Rossum2001-03-021-0/+23
|