summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bugfix: disallow use of DB_TXN after commit() or abort(), prevents aGregory P. Smith2003-01-171-5/+37
| | | | | | | | | coredump or segmentation violation. Sourceforge patch ID 664896: http://sourceforge.net/tracker/index.php?func=detail&aid=664896&group_id=13900&atid=313900 The bug was reported on the pybsddb-users mailing list.
* Got rid of the internal datetimetz type.Tim Peters2003-01-111-1004/+635
|
* Minor fiddling to make the next part easier. Introduced an internalTim Peters2003-01-111-17/+20
| | | | HASTZINFO() macro.
* Get build working on Redhat 7.2 linux 2.4.7Neal Norwitz2003-01-101-0/+4
|
* SF #665913, Fix mmap module core dump with unixNeal Norwitz2003-01-101-2/+4
| | | | | | Closing an mmap'ed file (calling munmap) twice on Solaris caused a core dump. Will backport.
* Get rid of compiler warningsNeal Norwitz2003-01-102-19/+19
|
* Got rid of the timetz type entirely. This was a bit trickier than ITim Peters2003-01-101-476/+336
| | | | | | | hoped it would be, but not too bad. A test had to change: time.__setstate__() can no longer add a non-None tzinfo member to a time object that didn't already have one, since storage for a tzinfo member doesn't exist in that case.
* Removed more now-pointless pickle code.Tim Peters2003-01-101-93/+34
|
* Deleted pickle/unpickle code for the old datetime and time classes -- it'sTim Peters2003-01-081-160/+0
| | | | unreachable now.
* Utterly minimal changes to collapse datetimetz into datetime, and timetzTim Peters2003-01-081-17/+10
| | | | | | | | | into time. This is little more than *exporting* the datetimetz object under the name "datetime", and similarly for timetz. A good implementation of this change requires more work, but this is fully functional if you don't stare too hard at the internals (e.g., right now a type named "datetime" shows up as a base class of the type named "datetime"). The docs also need extensive revision, not part of this checkin.
* Added a couple of casts to make this compile with CodeWarrior.Jack Jansen2003-01-081-3/+3
|
* all_ins(): EX_OK and friends, constants from sysexits.hBarry Warsaw2003-01-071-0/+57
|
* Fix from Michael Stone for SF bug #660476 and #513033 (bogus threadGuido van Rossum2003-01-071-13/+7
| | | | state swaps in readline).
* A few more whitespace normalizations.Guido van Rossum2003-01-071-1/+4
|
* Various cleanups:Guido van Rossum2003-01-071-45/+80
| | | | | | | | - Whitespace normalization. - Cleaned up some comments. - Broke long lines.
* SF patch #662433: Fill arraymodule's tp_iter and sq_contains slotsRaymond Hettinger2003-01-071-2/+121
|
* Patch #661760: Cygwin auto-import module patchJason Tishler2003-01-067-59/+28
| | | | | | | | | | | | The attached patch enables shared extension modules to build cleanly under Cygwin without moving the static initialization of certain function pointers (i.e., ones exported from the Python DLL core) to a module initialization function. Additionally, this patch fixes the modules that have been changed in the past to accommodate Cygwin.
* datetime_from_timet_and_us(): ignore leap seconds if the platformTim Peters2003-01-041-1/+10
| | | | | | | localtime()/gmtime() insists on delivering them, + associated doc changes. Redid the docs for datetimtez.astimezone().
* Fix typo.Martin v. Löwis2003-01-041-1/+1
|
* Remove appartment check from dooneevent. Fixes #660961.Martin v. Löwis2003-01-041-6/+17
| | | | Check whether self is NULL in mainloop.
* A new implementation of astimezone() that does what we agreed on in allTim Peters2003-01-041-41/+35
| | | | | | cases, plus even tougher tests of that. This implementation follows the correctness proof very closely, and should also be quicker (yes, I wrote the proof before the code, and the code proves the proof <wink>).
* Fix compiler warningNeal Norwitz2003-01-041-1/+1
|
* Wrap doc strings in PyDoc_STRVAR. Fix .string docstring. Provide defaultMartin v. Löwis2003-01-041-3/+21
| | | | macro definitions for older Python releases.
* Completed astimezone()'s correctness proof. This also proves we can getTim Peters2003-01-041-4/+53
| | | | | the desired compromise behavior during the "problem hour" when DST ends cheaply (but I haven't yet implemented that).
* Convert Tcl path objects to strings. Fixes #661357.Martin v. Löwis2003-01-041-1/+64
| | | | Provide .string attribute and __unicode for Tcl_Objs.
* Fix for bug #661136Just van Rossum2003-01-031-12/+14
| | | | | | | | | | | | | Lesson learned: kids should not be allowed to use API's starting with an underscore :-/ zipimport in 2.3a1 is even more broken than I thought: I attemped to _PyString_Resize a string created by PyString_FromStringAndSize, which fails for strings with length 0 or 1 since the latter returns an interned string in those cases. This would cause a SystemError with empty source files (and no matching pyc) in the zip archive. I rewrote the offending code to simply allocate a new buffer and avoid _PyString_Resize altogether. Added a test that would've caught the problem.
* SF patch 660559: Use METH_O and METH_NOARGS where possibleRaymond Hettinger2003-01-033-117/+70
| | | | | Simplify code and speed access by using PyArg_UnpackTuple, METH_O and METH_NOARGS in three modules that can benefit from it.
* The tzinfo methods utcoffset() and dst() must return a timedelta objectTim Peters2003-01-021-22/+14
| | | | | | (or None) now. In 2.3a1 they could also return an int or long, but that was an unhelpfully redundant leftover from an earlier version wherein they couldn't return a timedelta. TOOWTDI.
* astimezone() internals: if utcoffset() returns a duration, complain ifTim Peters2003-01-021-1/+5
| | | | dst() returns None (instead of treating that as 0).
* The astimezone() correctness proof endured much pain to prove whatTim Peters2003-01-021-70/+43
| | | | | turned out to be 3 special cases of a single more-general result. Proving the latter instead is a real simplification.
* SF bug 661086: datetime.today() truncates microseconds.Tim Peters2003-01-021-7/+16
| | | | | | | | | | | | | | | | On Windows, it was very common to get microsecond values (out of .today() and .now()) of the form 480999, i.e. with three trailing nines. The platform precision is .001 seconds, and fp rounding errors account for the rest. Under the covers, that 480999 started life as the fractional part of a timestamp, like .4809999978. Rounding that times 1e6 cures the irritation. Confession: the platform precision isn't really .001 seconds. It's usually worse. What actually happens is that MS rounds a cruder value to a multiple of .001, and that suffers its own rounding errors. A tiny bit of refactoring added a new internal utility to round doubles.
* Ugh, zipimport is virtually broken in 2.3a1 :-( It worked by accident inJust van Rossum2003-01-021-1/+1
| | | | | | | | | | | | | the test set as it only tested with a zip archive in the current directory, but it doesn't work at all for packages when the zip archive was specified as an absolute path. It's a real embarrassing bug: a strchr call should have been strrchr; fever apparently implies dyslexia. Second stupid bug: the zipimport test failed with a name error __importer__ (which I had renamed to __loader__ everywhere but here). I would've sworn I ran the test after that change but that can't be true. What I don't understand that noone reported a failing test_zipimport.py before the release of 2.3a1.
* OS/2 sockets do not support AF_UNIX, even though EMX headers define itAndrew MacIntyre2003-01-021-4/+4
|
* Completed astimezone's correctness proof. That doesn't mean it'sTim Peters2003-01-021-4/+51
| | | | | correct by your lights, it means that-- barring coding errors --it implements what it intended to implement.
* A quicker astimezone() implementation, rehabilitating an earlierTim Peters2003-01-011-65/+151
| | | | | | | | | | | | | | | | | | | suggestion from Guido, along with a formal correctness proof of the trickiest bit. The intricacy of the proof reveals how delicate this is, but also how robust the conclusion: correctness doesn't rely on dst() returning +- one hour (not all real time zones do!), it only relies on: 1. That dst() returns a (any) non-zero value if and only if daylight time is in effect. and 2. That the tzinfo subclass implements a consistent notion of time zone. The meaning of "consistent" was a hidden assumption, which is now an explicit requirement in the docs. Alas, it's an unverifiable (by the datetime implementation) requirement, but so it goes.
* Expose I_ constants. Auto-detect stropts.h. Properly configure the slave ↵Martin v. Löwis2003-01-012-3/+40
| | | | terminal.
* datetimetz_astimezone(): Speed optimizations -- although I'd ratherTim Peters2003-01-011-32/+38
| | | | | | | | | find a more elegant algorithm (OTOH, the hairy new implementation allows user-written tzinfo classes to be elegant, so it's a big win even if astimezone() remains hairy). Darn! I've only got 10 minutes left to get falling-down drunk! I suppose I'll have to smoke crack instead now.
* Try to get compilation working for cygwinNeal Norwitz2002-12-311-3/+6
|
* Patch #660485: Cygwin _tkinter Tcl/Tk 8.3 patchJason Tishler2002-12-311-2/+4
| | | | | | | The attached patch enables Cygwin Python to build cleanly against the latest Cygwin Tcl/Tk which is based on Tcl/Tk 8.3. It also prevents building against the real X headers, if installed.
* SF patch [ 597919 ] compiler package and SET_LINENOJeremy Hylton2002-12-311-6/+7
| | | | | | | | | | | | | | | | | A variety of changes from Michael Hudson to get the compiler working with 2.3. The primary change is the handling of SET_LINENO: # The set_lineno() function and the explicit emit() calls for # SET_LINENO below are only used to generate the line number table. # As of Python 2.3, the interpreter does not have a SET_LINENO # instruction. pyassem treats SET_LINENO opcodes as a special case. A few other small changes: - Remove unused code from pycodegen and pyassem. - Fix error handling in parsermodule. When PyParser_SimplerParseString() fails, it sets an exception with detailed info. The parsermodule was clobbering that exception and replacing it was a generic "could not parse string" exception. Keep the original exception.
* A new, and much hairier, implementation of astimezone(), building onTim Peters2002-12-311-24/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | an idea from Guido. This restores that the datetime implementation never passes a datetime d to a tzinfo method unless d.tzinfo is the tzinfo instance whose method is being called. That in turn allows enormous simplifications in user-written tzinfo classes (see the Python sandbox US.py and EU.py for fully fleshed-out examples). d.astimezone(tz) also raises ValueError now if d lands in the one hour of the year that can't be expressed in tz (this can happen iff tz models both standard and daylight time). That it used to return a nonsense result always ate at me, and it turned out that it seemed impossible to force a consistent nonsense result under the new implementation (which doesn't know anything about how tzinfo classes implement their methods -- it can only infer properties indirectly). Guido doesn't like this -- expect it to change. New tests of conversion between adjacent DST-aware timezones don't pass yet, and are commented out. Running the datetime tests in a loop under a debug build leaks 9 references per test run, but I don't believe the datetime code is the cause (it didn't leak the last time I changed the C code, and the leak is the same if I disable all the tests that invoke the only function that changed here). I'll pursue that next.
* Eliminate C++ comment.Martin v. Löwis2002-12-311-1/+1
|
* Fix compilation errors on HPUX11Neal Norwitz2002-12-311-3/+3
|
* removed unused get_short() functionJust van Rossum2002-12-311-14/+0
|
* Restore signalhandler in case of error. Fix type of signal handler.Martin v. Löwis2002-12-311-3/+9
|
* Patch #656590: /dev/ptmx support for ptys.Martin v. Löwis2002-12-311-7/+39
|
* Make sure zip_path is null-terminated, since it's on the stackNeal Norwitz2002-12-311-0/+1
|
* - added missing decrefJust van Rossum2002-12-311-4/+5
| | | | - whitespace normalization
* Add build_namelists() to expose the OSS macros SOUND_DEVICE_LABELS andGreg Ward2002-12-311-0/+45
| | | | SOUND_DEVICE_NAMES as 'control_labels' and 'control_names'.
* Rename the parameter 'xp' in several methods to 'self', since that'sGreg Ward2002-12-311-23/+23
| | | | what it is.