Commit Graph

25925 Commits

Author SHA1 Message Date
Guido van Rossum d3590f937f Only log a message and chmod() when the mode isn't already what we
want it to be.  Log both the old and new mode.
2003-01-29 16:58:31 +00:00
Jack Jansen 6afc5e02fa - The mac-specific tests should also be run on darwin.
- Added test_aepack to the mac/darwin specific tests.
2003-01-29 16:24:16 +00:00
Skip Montanaro 5445594e20 minor grammar tweaks 2003-01-29 15:41:33 +00:00
Michael W. Hudson 5e83b7a9cc Teach the parsermodule about floor division. Fixes
[ 676521 ] parser module validation failure

bugfix candidate.
2003-01-29 14:20:23 +00:00
Jack Jansen 090da4b626 Moved aepack test code to the test suite. 2003-01-29 10:41:18 +00:00
Jack Jansen 0502d89b49 Some objects could have uninitialized attributes. Fixed. 2003-01-29 10:39:19 +00:00
Jack Jansen cbdffcee62 test_macfs found an error on the first day of its existence: round trips for date values to FSSpec.{Get,Set}Dates didn't work in MacPython-OS9. Fixed. 2003-01-29 09:56:56 +00:00
Guido van Rossum ecb1104342 Document the demise of all pretenses of safety, and the difference
between cPickle and pickle.py regarding __safe_for_unpickling__ before
Python 2.3.
2003-01-29 06:24:30 +00:00
Guido van Rossum 586c9e813c Declare Protocol 2 as implemented. 2003-01-29 06:16:12 +00:00
Guido van Rossum 255f3ee0a5 Support for extension codes. (By accident I checked in the tests first.) 2003-01-29 06:14:11 +00:00
Guido van Rossum 0322d0ff13 Test all three EXT opcodes, and move these tests into
TempAbstractPickleTests, because they don't work with cPickle yet.
2003-01-29 06:12:46 +00:00
Fred Drake 49c595589e Make the footer at the end of a \verbatiminput stand out a little
more, to make it easier to tell apart from the verbatim content.
2003-01-29 05:14:44 +00:00
Fred Drake 7934bc23a8 Move a footnote to the end of the sentence, so the note mark won't
interfere with the flow of the sentence.
2003-01-29 05:10:27 +00:00
Tim Peters 2c60f7a136 Whitespace normalization. 2003-01-29 03:49:43 +00:00
Tim Peters c0c12b5707 pickle: Comment repair.
pickletools:  Import decode_long from pickle instead of duplicating it.
2003-01-29 00:56:17 +00:00
Tim Peters ad8605dfae Updated info about test_bsddb3 failures. 2003-01-29 00:38:42 +00:00
Tim Peters ecd79eb7db Expect test_macostools and test_macfs to get skipped whenever
sys.platform != mac.  Likewise expect test_win{reg,sound} to get skipped
on non-win32 platforms.
2003-01-29 00:35:32 +00:00
Jack Jansen addc5859db Test aliases too. 2003-01-28 23:54:05 +00:00
Jack Jansen 2b88dec606 Converted to not use macfs whenever possible. 2003-01-28 23:53:40 +00:00
Jack Jansen 60ffc2bafc Added a missing INCREF in pathname(). 2003-01-28 23:29:46 +00:00
Tim Peters 47a6b13988 Temporary hacks to arrange that the pickle tests relying on protocol 2
only get run by test_pickle.py now (& not by test_cpickle.py).  This
should be undone when protocol 2 is implemented in cPickle too.
test_cpickle should pass again.
2003-01-28 22:34:11 +00:00
Guido van Rossum 4e2491dbb1 Add a comment about how some built-in types should grow a
__getnewargs__ method.
2003-01-28 22:31:25 +00:00
Guido van Rossum b26a97aa50 Get rid of __safe_for_unpickling__ and safe_constructors.
Also tidied up a few lines, got rid of apply(), added a comment.
2003-01-28 22:29:13 +00:00
Tim Peters dcaa24e503 Renamed "bin" arguments to "proto". Note that this test currently
fails, for reasons unrelated to this patch.
2003-01-28 22:26:28 +00:00
Fred Drake c23e0192c9 More markup changes for consistency. 2003-01-28 22:09:16 +00:00
Fred Drake 68e6d57bb9 Various minor markup adjustments. 2003-01-28 22:02:35 +00:00
Guido van Rossum c8d6ef5cd6 Add a test for a list subclass with a __dict__ as well as slots. 2003-01-28 22:02:31 +00:00
Guido van Rossum ac5b5d2e8b Instead of bad hacks trying to worm around the inherited
object.__reduce__, do a getattr() on the class so we can explicitly
test for it.  The reduce()-calling code becomes a bit more regular as
a result.

Also add support slots: if an object has slots, the default state is
(dict, slots) where dict is the __dict__ or None, and slots is a dict
mapping slot names to slot values.  We do a best-effort approach to
find slot names, assuming the __slots__ fields of classes aren't
modified after class definition time to misrepresent the actual list
of slots defined by a class.
2003-01-28 22:01:16 +00:00
Fred Drake 7821d7230c Added missing dependency. 2003-01-28 21:53:05 +00:00
Jack Jansen 50abec8fc4 Install "python$(VERSION)" into /usr/local as the symlink to the framework,
and also create a symlink "python" pointing to "python$(VERSION)".
Fixes #675745.
2003-01-28 21:45:44 +00:00
Jack Jansen 28827e2406 Don't import Nav. It isn't needed, and importing it doesn't work in a
non-windowing Python.
2003-01-28 21:40:36 +00:00
Jack Jansen 10882f6fcb Finally created the first two tests for MacPython modules: macfs and
macostools.
2003-01-28 21:39:28 +00:00
Guido van Rossum fe8d84d5ae Comment out a test that was anticipating SF patch 661536 -- but that
isn't checked in yet. :-(
2003-01-28 20:39:49 +00:00
Tim Peters baefd9e552 Added new private API function _PyLong_NumBits. This will be used at the
start for the C implemention of new pickle LONG1 and LONG4 opcodes (the
linear-time way to pickle a long is to call _PyLong_AsByteArray, but
the caller has no idea how big an array to allocate, and correct
calculation is a bit subtle).
2003-01-28 20:37:45 +00:00
Guido van Rossum 3d8c01b31c The default __reduce__ on the base object type obscured any
possibility of calling save_reduce().  Add a special hack for this.
The tests for this are much simpler now (no __getstate__ or
__getnewargs__ needed).
2003-01-28 19:48:18 +00:00
Neal Norwitz abcb0c03ad Fix SF bug# 676155, RuntimeWarning with tp_compare
Check return value of PyLong_AsDouble(), it can return an error.
2003-01-28 19:21:24 +00:00
Guido van Rossum 54fb192508 Move the NEWOBJ-generating code to a separate function, and invoke it
after checking for __reduce__.
2003-01-28 18:22:35 +00:00
Guido van Rossum 533dbcf250 Some experimental support for generating NEWOBJ with proto=2, and
fixed a bug in load_newobj().
2003-01-28 17:55:05 +00:00
Guido van Rossum 53b39d2e70 Verify treatment of unary minus on negative numbers SF bug #660455. 2003-01-28 17:48:21 +00:00
Barry Warsaw 7871154c2e Bump the version number 2003-01-28 17:30:46 +00:00
Barry Warsaw f71de3e9a0 Everything worked in both the distutils distro and in Python 2.3cvs,
so merge from the bsddb-bsddb3-schizo-branch back to the trunk.
2003-01-28 17:20:44 +00:00
Tim Peters a6ae9a2128 save_empty_tuple(): Comment on why we can't get rid of this. 2003-01-28 16:58:41 +00:00
Tim Peters 82ca59e002 save_dict(): Added a comment about the control flow NealN missed. 2003-01-28 16:47:59 +00:00
Tim Peters 13a25fb8e6 _is_string_secure(): This method is no longer used; removed it. (It
was used before string-escape codecs were added to the core.)
2003-01-28 16:42:22 +00:00
Guido van Rossum bc64e22ed6 Made save() fit on a page, while adding comments. (I moved some type
checks to save_reduce(), which can also be called from a subclass.)

Also tweaked some more comments.
2003-01-28 16:34:19 +00:00
Tim Peters ad5a771fae Got rid of the _quotes global. Used only once, and is trivial. 2003-01-28 16:23:33 +00:00
Tim Peters 55762f5f80 Use raw-mode docstring whenever there's an escape code in an example --
they're easier to read this way.
2003-01-28 16:01:25 +00:00
Guido van Rossum 03e35327f2 _dis_test should be a raw string now that it contains \x escapes. 2003-01-28 15:37:13 +00:00
Tim Peters d0f7c86a20 dis(): Not all opcodes are printable anymore, so print the repr
of the opcode character instead (but stripping the quotes).

Added a proto 2 test section for the canonical recursive-tuple case.
Note that since pickle's save_tuple() takes different paths depending on
tuple length now, beefier tests are really needed (but not in pickletools);
the "short tuple" case tried here was actually broken yesterday, and it's
subtle stuff so needs to be tested.
2003-01-28 15:27:57 +00:00
Guido van Rossum 1be3175992 Add a few comments. Change the way the protocol is checked (it must
be one of 0, 1 or 2).

I should note that the previous checkin also added NEWOBJ support to
the unpickler -- but there's nothing yet that generates this.
2003-01-28 15:19:53 +00:00