summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* For symmetry with the mixer interface, rename oss_t to oss_audio_t andGreg Ward2002-12-311-29/+29
| | | | OSSType to OSSAudioType.
* Add a bunch of comments to clearly delineate sections of the code.Greg Ward2002-12-311-1/+28
|
* Yet another renaming of some mixer methods:Greg Ward2002-12-311-9/+9
| | | | | | | | | | | | | | | devices(), stereodevices(), recdevices() -> controls(), stereocontrols(), reccontrols() Based on recommendation of Hannu Savolainen <hannu@opensound.com>: The right term to use for things like bass/treble/mic/vol/etc is "control". "Device" refers to different mixer devices (/dev/mixer0 to /dev/mixerN). "Channel" cannot be used because it refers to mono/stereo/multich channels. In fact most mixer controls have left/right channels so ...
* Rename more mixer methods: getrecsrc() -> get_recsrc(),Greg Ward2002-12-301-6/+6
| | | | setrecsrc() -> set_recsrc().
* Added casts to forestall warnings with MetroWerks.Jack Jansen2002-12-301-4/+4
|
* Squashed compiler wng from MSVC6.Tim Peters2002-12-301-1/+1
|
* Wouldn't compile on Windows; fixed.Tim Peters2002-12-301-1/+1
|
* PEP 302 + zipimport:Just van Rossum2002-12-303-0/+1209
| | | | | | | | | | | | | - new import hooks in import.c, exposed in the sys module - new module called 'zipimport' - various changes to allow bootstrapping from zip files I hope I didn't break the Windows build (or anything else for that matter), but then again, it's been sitting on sf long enough... Regarding the latest discussions on python-dev: zipimport sets pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as /path/to/Archive.zip/subdir/ are supported again.
* Bite the bullet on all the indirect timetz and datetimetz tzinfo methods:Tim Peters2002-12-301-14/+20
| | | | | | make the callers figure out the right tzinfo arguments to pass, instead of making the callees guess. The code is uglier this way, but it's less brittle (when the callee guesses, the caller can get surprised).
* Port BerkeleyDB 4.1 support from the pybsddb project. bsddb is now atBarry Warsaw2002-12-301-74/+333
| | | | version 4.1.1 and works with up to BerkeleyDB 4.1.25.
* A step on the way to making tzinfo classes writable by mortals: get ridTim Peters2002-12-301-32/+42
| | | | | | | of the timetz case. A tzinfo method will always see a datetimetz arg, or None, now. In the former case, it's still possible that it will get a datetimetz argument belonging to a different timezone. That will get fixed next.
* Silence cast warnings for Tcl 8.3.Martin v. Löwis2002-12-301-6/+12
|
* Patch 659834 by Magnus Lie Hetland:Guido van Rossum2002-12-301-0/+4
| | | | | | | | | Check for readline 2.2 features. This should make it possible to compile readline.c again with GNU readline versions 2.0 or 2.1; this ability was removed in readline.c rev. 2.49. Apparently the older versions are still in widespread deployment on older Solaris installations. With an older readline, completion behavior is subtly different (a space is always added).
* Untabify.Greg Ward2002-12-301-106/+106
|
* Whitespace fixes to conform to coding standards.Greg Ward2002-12-301-18/+18
|
* Comment fix.Greg Ward2002-12-301-9/+2
|
* Rename some mixer methods:Greg Ward2002-12-301-16/+16
| | | | | | | | | | | | | * channels() -> devices() * stereochannels() -> stereodevices() * recchannels() -> recdevices() * getvol() -> get() * setvol() -> set() This is for (slightly) more consistency with the OSS ioctl names (READ_DEVMASK, READ_RECMASK, READ_STEREODEVS). Also make sure the C function names correspond more closely to the Python method names for mixer methods.
* Remove 'x_' prefix from oss_t and oss_mixer_t struct members.Greg Ward2002-12-301-57/+58
| | | | | | (It added nothing, and served no obvious purpose.) Export SOUND_MIXER_NRDEVICES constant.
* SF patch 658251: Install a C implementation of the Mersenne Twister as theRaymond Hettinger2002-12-291-0/+528
| | | | core generator for random.py.
* Demonstrate use of PyType_Ready() in the example.Raymond Hettinger2002-12-291-3/+5
|
* SF patch #659536: Use PyArg_UnpackTuple where possible.Raymond Hettinger2002-12-292-11/+11
| | | | | | | Obtain cleaner coding and a system wide performance boost by using the fast, pre-parsed PyArg_Unpack function instead of PyArg_ParseTuple function which is driven by a format string.
* Apparently FreeBSD enables some HW floating-point exceptions by default.Tim Peters2002-12-281-0/+15
| | | | | | | This can cause core dumps when Python runs. Python relies on the 754- (and C99-) mandated default "non-stop" mode for FP exceptions. This patch from Ben Laurie disables at least one FP exception on FreeBSD at Python startup time.
* Gracefully delay runtime error up to 1s. Add .willdispatch().Martin v. Löwis2002-12-281-12/+31
|
* Patch #657889: Implement posix.getloadavg.Martin v. Löwis2002-12-271-0/+25
|
* And put back a little code duplication, in the form of asserts.Tim Peters2002-12-271-0/+3
|
* Squash recently-introduced code duplication.Tim Peters2002-12-271-66/+37
|
* Make comparison and subtraction of aware objects ignore tzinfo if theTim Peters2002-12-271-27/+64
| | | | | | operands have identical tzinfo members (meaning object identity -- "is"). I misunderstood the intent here, reading wrong conclusion into conflicting clues.
* Implemented datetime.astimezone() and datetimetz.astimezone().Tim Peters2002-12-251-18/+84
|
* Add an XXX comment about relative imports.Guido van Rossum2002-12-241-1/+2
|
* Implemented .replace() methods for date, datetime, datetimetz, time andTim Peters2002-12-241-26/+154
| | | | timetz.
* Squashed compiler warnings by adding casts, making sure prototypes are inJack Jansen2002-12-232-1/+5
| | | | scope and looking at types.
* call_utc_tzinfo_method(): Got rid of the label and the gotos.Tim Peters2002-12-231-7/+2
|
* I give up: unless I write my own strftime by hand, datetime just can'tTim Peters2002-12-221-0/+25
| | | | | | be trusted with years before 1900, so now we raise ValueError if a date or datetime or datetimetz .strftime() method is called with a year before 1900.
* Python's strftime implementation does strange things with the year,Tim Peters2002-12-221-1/+5
| | | | | | | | | | such that the datetime tests failed if the envar PYTHON2K was set. This is an utter mess, and the datetime module's strftime functions inherit it. I suspect that, regardless of the PYTHON2K setting, and regardless of platform limitations, the datetime strftime wrappers will end up delivering nonsense results (or bogus exceptions) for any year before 1900. I should probably just refuse to accept years earlier than that -- else we'll have to implement strftime() by hand.
* classify_object(): Renamed more meaningfully, to classify_utcoffset().Tim Peters2002-12-221-20/+17
| | | | | Also changed logic so that instances of user-defined subclasses of date, time, and datetime are called OFFSET_NAIVE instead of OFFSET_UNKNOWN.