Commit Graph

26352 Commits

Author SHA1 Message Date
Jack Jansen f3f4af5521 Got rid of macfs and made a bit more OSX-friendly. 2003-02-05 23:10:46 +00:00
Just van Rossum 19e02fc67f removing old junk 2003-02-05 22:59:07 +00:00
Jack Jansen ab564eea05 Removed unused import of macfs. 2003-02-05 22:53:29 +00:00
Jack Jansen 6d8bca8cb6 I don't think this script serves a useful purpose anymore, and I can't
be bothered to fix it.
2003-02-05 22:52:16 +00:00
Guido van Rossum ce8bcd8405 Fix for SF #668433. I'm not explaining it here; ample comments are in
the code.
2003-02-05 22:39:45 +00:00
Jeremy Hylton bd5cbf866f Refactor the logic for setting f_builtins.
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.
2003-02-05 22:39:29 +00:00
Andrew M. Kuchling 64edd6ac1d [Patch #654421 from Matthew Mueller]
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.
2003-02-05 21:35:07 +00:00
Andrew M. Kuchling 570e35870a Markup fixes; in particular, the tables are now reasonable width 2003-02-05 21:15:38 +00:00
Tim Peters 62235e701e dis(): Added an optional memo argument, so that multiple pickles in a
file can be dumped without (bogus) complaint if the the pickles were
created using a single pickle memo.
2003-02-05 19:55:53 +00:00
Tim Peters 18e7083cda SF bug 681122: Built-in function dir() causes refcount leak in baseclasses.
merge_class_dict():  This was missing a decref.

Bugfix candidate.
2003-02-05 19:35:19 +00:00
Tim Peters 6ee0480521 [680789] Debug with long array takes forever
Added array.array to the types repr.py knows about, after a suggestion
from Jurjen N.E. Bos.
2003-02-05 18:29:34 +00:00
Jason Tishler 5c4ded2c3b Patch #551977: Regression exceptions for cygwin
Applied the skip test_ossaudiodev patch.
2003-02-05 16:46:01 +00:00
Jack Jansen cf0b2e8e28 Getting rid of macfs and FSSpecs. 2003-02-05 15:49:19 +00:00
Jack Jansen d66071b48d Got rid of macfs 2003-02-05 15:44:03 +00:00
Jack Jansen 611b9f6697 Added "Open File by Name" command which presens a filename dialog. If
the clipboard contains a filename that filename is used as the default.
2003-02-05 15:41:09 +00:00
Jack Jansen d424836f3a Cast various floats to ints so we don't get warnings. 2003-02-05 15:40:05 +00:00
Jason Tishler 9181c94e05 This patch reverts the following:
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.
2003-02-05 15:16:17 +00:00
Jason Tishler cccac1a163 This patch enables Cygwin Python to build _tkinter against Tcl/Tk 8.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.
2003-02-05 15:06:46 +00:00
Jack Jansen 769e1ff4a1 Fixed a few typos, and changed FSCreateResourceFile filename argument to unicode. 2003-02-05 13:39:04 +00:00
Jack Jansen 8d4f06a73a Added itertools module. 2003-02-05 13:36:50 +00:00
Jack Jansen b86a2e8036 Use os.path.realpath() in stead of abspath(), so the tests don't fail if
we have a symlink somewhere in the TESTFN path.
2003-02-05 11:14:16 +00:00
Raymond Hettinger 30a634e0a9 SF patch #674396: Apply UserDict.DictMixin to expand dbshelve and dbojb
to have a full dictionary interface.
2003-02-05 04:12:41 +00:00
Tim Peters 35ad641b99 Build pickler_choices list in a lazier way. 2003-02-05 04:08:07 +00:00
Tim Peters 6288e230d8 More typo repair. 2003-02-05 03:53:10 +00:00
Tim Peters 679201467b Typo repair. 2003-02-05 03:46:17 +00:00
Tim Peters 3e667d5452 cPickle: exempt two_tuple from GC -- it's a speed hack, and doesn't
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.
2003-02-04 21:47:44 +00:00
Neil Schemenauer 5042da6b1e If a float is passed where a int is expected, issue a DeprecationWarning
instead of raising a TypeError.  Closes #660144 (again).
2003-02-04 20:59:40 +00:00
Tim Peters 731098b3ff cPickle now generates proto 2 EXT[124] when appropriate.
Moved such EXT tests as currently exist from TempAbstractPickleTests to
AbstractPickleTests, so that test_cpickle runs them too.
2003-02-04 20:56:09 +00:00
Neal Norwitz 7fe16e79f5 Remove forward static reference since it is not required 2003-02-04 20:46:50 +00:00
Neal Norwitz ce3d34dde7 Whitespace normalization 2003-02-04 20:45:17 +00:00
Walter Dörwald c3da83fcd7 Make sure filter() never returns tuple, str or unicode
subclasses. (Discussed in SF patch #665835)
2003-02-04 20:24:45 +00:00
Marc-André Lemburg 29273c87da Fix for [ 543344 ] Interpreter crashes when recoding; suggested
by Michael Stone (mbrierst).

Python 2.1.4, 2.2.2 candidate.
2003-02-04 19:35:03 +00:00
Fred Drake 604ade4ebd supports_unicode_filenames was not in the right location. 2003-02-04 19:13:07 +00:00
Walter Dörwald bda1c86daf Use size_t instead of int for various variables to prevent
signed/unsigned comparison warnings on the call to iconv().

Fix comment typos.

From SF patch #680146.
2003-02-04 18:02:28 +00:00
Tim Peters dbaba0d05a Added basic tests of copy_reg's extension registry. 2003-02-04 17:49:36 +00:00
Walter Dörwald 5e61e24d55 Add a test that checks that filter() honors the sq_item slot for
str and unicode subclasses not just for generating the output
but for testing too.
2003-02-04 17:04:01 +00:00
Walter Dörwald 531e000d2e PyUnicode_Resize() doesn't free its argument in case of a failure,
so we can jump to the error handling code that does.
(Spotted by Neal Norwitz)
2003-02-04 16:57:49 +00:00
Walter Dörwald 903f1e0c40 filterstring() and filterunicode() in Python/bltinmodule.c
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.
2003-02-04 16:28:00 +00:00
Jack Jansen 57ba55b77d - Handle the img and MediaFormat modules not being available (by not
providing the format info, only the raw data).
- Get rid of fsspecs.
- Make the demo program at least do something if img not available.
2003-02-04 15:36:42 +00:00
Jack Jansen b9fa1a9ec5 Changed an edit instruction because of a changed parameter name (sigh). 2003-02-04 15:35:07 +00:00
Fred Drake 57d575240c Update to better reflect the usage of struct_time instances throughout;
continuing to call these "time tuples" is misleading at best.
Closes SF bug #671731; will backport to 2.2.x.
2003-02-04 15:12:06 +00:00
Fred Drake 5bbeb8d1ad Twiddle. 2003-02-04 15:01:37 +00:00
Raymond Hettinger 105b084b59 Add refcount test. 2003-02-04 05:47:30 +00:00
Tim Peters fa05ce3c1d Typo in comment. 2003-02-04 05:20:32 +00:00
Tim Peters 2d62965734 cPickle can load pickles using proto 2 EXT[124] now, but can't yet
generate these opcodes.
2003-02-04 05:06:17 +00:00
Guido van Rossum d4b920c8bd Rename the extension registry variables to have leading underscores --
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.
2003-02-04 01:54:49 +00:00
Tim Peters 322d553143 Whitespace normalization. 2003-02-04 00:38:20 +00:00
Tim Peters 0dd23aa539 Typo repair. 2003-02-04 00:30:46 +00:00
Tim Peters 5b7da39f23 Brought some module variables into synch with pickle.py's current values.
Imported the extension-registry dicts from copy_reg.py, in preparation for
tackling EXT[124].
2003-02-04 00:21:07 +00:00
Walter Dörwald e7028ac56c Fix typo. 2003-02-03 23:05:27 +00:00