summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Updated version of [ 558544 ] cmd.py: add instance-specific stdin/outAnthony Baxter2003-02-062-25/+42
| | | | | | | | | | This patch adds stdin, stdout as optional arguments to the cmd.Cmd constructor (defaulting to sys.stdin, sys.stdout), and changes the Cmd methods throughout to use self.stdout.write() and self.stdin.foo for output and input. This allows much greater flexibility for using cmd - for instance, hooking it into a telnet server. Patch for library module and for documentation.
* Small function call optimization and special build option for call stats.Jeremy Hylton2003-02-056-14/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | -DCALL_PROFILE: Count the number of function calls executed. When this symbol is defined, the ceval mainloop and helper functions count the number of function calls made. It keeps detailed statistics about what kind of object was called and whether the call hit any of the special fast paths in the code. Optimization: When we take the fast_function() path, which seems to be taken for most function calls, and there is minimal frame setup to do, avoid call PyEval_EvalCodeEx(). The eval code ex function does a lot of work to handle keywords args and star args, free variables, generators, etc. The inlined version simply allocates the frame and copies the arguments values into the frame. The optimization gets a little help from compile.c which adds a CO_NOFREE flag to code objects that don't have free variables or cell variables. This change allows fast_function() to get into the fast path with fewer tests. I measure a couple of percent speedup in pystone with this change, but there's surely more that can be done.
* Got rid of macfs and made a bit more OSX-friendly.Jack Jansen2003-02-051-7/+10
|
* removing old junkJust van Rossum2003-02-051-60/+0
|
* Removed unused import of macfs.Jack Jansen2003-02-051-1/+0
|
* I don't think this script serves a useful purpose anymore, and I can'tJack Jansen2003-02-051-0/+0
| | | | be bothered to fix it.
* Fix for SF #668433. I'm not explaining it here; ample comments are inGuido van Rossum2003-02-051-0/+93
| | | | the code.
* Refactor the logic for setting f_builtins.Jeremy Hylton2003-02-051-24/+31
| | | | | | | For the case where the current globals match the previous frame's globals, eliminates three tests in two if statements. For the case where we just get __builtins__ from a module, eliminate a couple of tests.
* [Patch #654421 from Matthew Mueller]Andrew M. Kuchling2003-02-051-2/+2
| | | | | | | | | gzip shouldn't raise ValueError on corrupt files Currently the gzip module will raise a ValueError if the file was corrupt (bad crc or bad size). I can't see how that applies to reading a corrupt file. IOError seems better, and it's what code will likely be looking for.
* Markup fixes; in particular, the tables are now reasonable widthAndrew M. Kuchling2003-02-051-104/+117
|
* dis(): Added an optional memo argument, so that multiple pickles in aTim Peters2003-02-051-2/+38
| | | | | file can be dumped without (bogus) complaint if the the pickles were created using a single pickle memo.
* SF bug 681122: Built-in function dir() causes refcount leak in baseclasses.Tim Peters2003-02-051-1/+4
| | | | | | merge_class_dict(): This was missing a decref. Bugfix candidate.
* [680789] Debug with long array takes foreverTim Peters2003-02-053-0/+33
| | | | | Added array.array to the types repr.py knows about, after a suggestion from Jurjen N.E. Bos.
* Patch #551977: Regression exceptions for cygwinJason Tishler2003-02-051-0/+1
| | | | Applied the skip test_ossaudiodev patch.
* Getting rid of macfs and FSSpecs.Jack Jansen2003-02-051-7/+5
|
* Got rid of macfsJack Jansen2003-02-051-5/+3
|
* Added "Open File by Name" command which presens a filename dialog. IfJack Jansen2003-02-051-0/+17
| | | | the clipboard contains a filename that filename is used as the default.
* Cast various floats to ints so we don't get warnings.Jack Jansen2003-02-052-1/+3
|
* This patch reverts the following:Jason Tishler2003-02-051-5/+6
| | | | | | | | It also prevents building against the real X headers, if installed. After discussions with the Cygwin project lead, I believe that building against the real X headers is OK. Especially, since the psuedo-X headers are *not* installed by the Cygwin Tcl/Tk binary package.
* This patch enables Cygwin Python to build _tkinter against Tcl/Tk 8.4.Jason Tishler2003-02-051-12/+4
| | | | | | Note that this patch just reverts the lib_prefix (i.e., "cyg") portion of my Tcl/Tk 8.3 patch. It seems that Cygwin Tcl/Tk is using a more normal file naming convention again.
* Fixed a few typos, and changed FSCreateResourceFile filename argument to ↵Jack Jansen2003-02-051-3/+3
| | | | unicode.
* Added itertools module.Jack Jansen2003-02-053-0/+2
|
* Use os.path.realpath() in stead of abspath(), so the tests don't fail ifJack Jansen2003-02-052-4/+4
| | | | we have a symlink somewhere in the TESTFN path.
* SF patch #674396: Apply UserDict.DictMixin to expand dbshelve and dbojbRaymond Hettinger2003-02-052-2/+4
| | | | to have a full dictionary interface.
* Build pickler_choices list in a lazier way.Tim Peters2003-02-051-16/+5
|
* More typo repair.Tim Peters2003-02-051-1/+1
|
* Typo repair.Tim Peters2003-02-051-4/+4
|
* cPickle: exempt two_tuple from GC -- it's a speed hack, and doesn'tTim Peters2003-02-043-34/+61
| | | | | | | | | | | | guarantee to keep valid pointers in its slots. tests: Moved ExtensionSaver from test_copy_reg into pickletester, and use it both places. Once extension codes get assigned, it won't be safe to overwrite them willy nilly in test suites, and ExtensionSaver does a thorough job of undoing any possible damage. Beefed up the EXT[124] tests a bit, to check the smallest and largest codes in each opcode's range too.
* If a float is passed where a int is expected, issue a DeprecationWarningNeil Schemenauer2003-02-042-15/+29
| | | | instead of raising a TypeError. Closes #660144 (again).
* cPickle now generates proto 2 EXT[124] when appropriate.Tim Peters2003-02-042-20/+85
| | | | | Moved such EXT tests as currently exist from TempAbstractPickleTests to AbstractPickleTests, so that test_cpickle runs them too.
* Remove forward static reference since it is not requiredNeal Norwitz2003-02-041-3/+1
|
* Whitespace normalizationNeal Norwitz2003-02-041-1/+1
|
* Make sure filter() never returns tuple, str or unicodeWalter Dörwald2003-02-042-5/+45
| | | | subclasses. (Discussed in SF patch #665835)
* Fix for [ 543344 ] Interpreter crashes when recoding; suggestedMarc-André Lemburg2003-02-042-1/+12
| | | | | | by Michael Stone (mbrierst). Python 2.1.4, 2.2.2 candidate.
* supports_unicode_filenames was not in the right location.Fred Drake2003-02-041-7/+8
|
* Use size_t instead of int for various variables to preventWalter Dörwald2003-02-041-9/+9
| | | | | | | | signed/unsigned comparison warnings on the call to iconv(). Fix comment typos. From SF patch #680146.
* Added basic tests of copy_reg's extension registry.Tim Peters2003-02-041-0/+78
|
* Add a test that checks that filter() honors the sq_item slot forWalter Dörwald2003-02-041-0/+13
| | | | | str and unicode subclasses not just for generating the output but for testing too.
* PyUnicode_Resize() doesn't free its argument in case of a failure,Walter Dörwald2003-02-041-1/+1
| | | | | so we can jump to the error handling code that does. (Spotted by Neal Norwitz)
* filterstring() and filterunicode() in Python/bltinmodule.cWalter Dörwald2003-02-042-8/+91
| | | | | | | | | | | | | blindly assumed that tp_as_sequence->sq_item always returns a str or unicode object. This might fail with str or unicode subclasses. This patch checks whether the object returned from __getitem__ is a str/unicode object and raises a TypeError if not (and the filter function returned true). Furthermore the result for __getitem__ can be more than one character long, so checks for enough memory have to be done.
* - Handle the img and MediaFormat modules not being available (by notJack Jansen2003-02-041-24/+40
| | | | | | providing the format info, only the raw data). - Get rid of fsspecs. - Make the demo program at least do something if img not available.
* Changed an edit instruction because of a changed parameter name (sigh).Jack Jansen2003-02-042-7/+10
|
* Update to better reflect the usage of struct_time instances throughout;Fred Drake2003-02-041-24/+28
| | | | | continuing to call these "time tuples" is misleading at best. Closes SF bug #671731; will backport to 2.2.x.
* Twiddle.Fred Drake2003-02-041-1/+2
|
* Add refcount test.Raymond Hettinger2003-02-041-3/+12
|
* Typo in comment.Tim Peters2003-02-041-1/+1
|
* cPickle can load pickles using proto 2 EXT[124] now, but can't yetTim Peters2003-02-042-1/+109
| | | | generate these opcodes.
* Rename the extension registry variables to have leading underscores --Guido van Rossum2003-02-043-29/+29
| | | | | | | | | this clarifies that they are part of an internal API (albeit shared between pickle.py, copy_reg.py and cPickle.c). I'd like to do the same for copy_reg.dispatch_table, but worry that it might be used by existing code. This risk doesn't exist for the extension registry.
* Whitespace normalization.Tim Peters2003-02-041-1/+1
|
* Typo repair.Tim Peters2003-02-041-1/+1
|