Raymond Hettinger
301eb71fb9
Author markup: Andrew got to it first
2003-01-30 01:03:38 +00:00
Raymond Hettinger
0e449234bf
SF patch 672098: Three __contains__ implementations
...
Contributed by Jp Calderone.
2003-01-30 00:56:33 +00:00
Mark Hammond
61bb35f440
Fix [ 583477 ] wrong dest size.
...
Note this code is not used by the core on Win32, but in a block used only
by Windows CE.
2003-01-29 22:38:29 +00:00
Guido van Rossum
ba884f3d22
Use %c rather than chr() to turn some ints into chars.
2003-01-29 20:14:23 +00:00
Tim Peters
c1c2b3e0e2
dis(): This had a problem with proto 0 pickles, in that POP sometimes
...
popped a MARK, but without stack emulation the disassembler couldn't
know that, and subsequent indentation got hosed.
Now the disassembler does do enough stack emulation to catch this. While
I was at it, also added lots of sanity checks for other stack operations,
and correct use of the memo. This goes (I think) a long way toward being
a "pickle verifier" now too.
2003-01-29 20:12:21 +00:00
Guido van Rossum
5d9113d8be
Implement appropriate __getnewargs__ for all immutable subclassable builtin
...
types. The special handling for these can now be removed from save_newobj().
Add some testing for this.
Also add support for setting the 'fast' flag on the Python Pickler class,
which suppresses use of the memo.
2003-01-29 17:58:45 +00:00
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