Raymond Hettinger
2835e37be5
SF bug #663701 : sets module review
...
Renamed hook methods to use the double underscore convention.
2003-02-14 03:42:11 +00:00
Andrew M. Kuchling
a2ecabe420
Fix docstring typo
2003-02-14 01:14:15 +00:00
Andrew M. Kuchling
c07fb2fc5b
Fix comment typo
2003-02-14 01:13:01 +00:00
Raymond Hettinger
61436489f9
SF 685011: calendar module overflow handling
...
Restored a Py2.2 behavior to not range check the day of the month.
A user application was this exploiting undocumented, accidental "feature".
2003-02-13 22:58:02 +00:00
Guido van Rossum
4b499dd3fb
- Finally fixed the bug in compile() and exec where a string ending
...
with an indented code block but no newline would raise SyntaxError.
This would have been a four-line change in parsetok.c... Except
codeop.py depends on this behavior, so a compilation flag had to be
invented that causes the tokenizer to revert to the old behavior;
this required extra changes to 2 .h files, 2 .c files, and 2 .py
files. (Fixes SF bug #501622.)
2003-02-13 22:07:59 +00:00
Tim Peters
18e36f4576
Removed unused cut'n'paste import.
2003-02-13 19:37:19 +00:00
Tim Peters
c0c9370985
We didn't have any tests making pickles with one of {pickle, cPickle},
...
and loading them via the other, except for the special cases of this
Guido added to test_datetime.py for datetime module objects. The new
test_xpickle.py tries all of pickletester's AbstractPickleTests in
both x-module ways.
2003-02-13 19:30:57 +00:00
Tim Peters
e9ef203ea6
Added a simple NEWOBJ test. This is in the pickle-only part of the
...
test for now (cPickle can't yet produce NEWOBJ).
2003-02-13 18:42:00 +00:00
Andrew M. Kuchling
c1eea67d93
Remove filecmp
2003-02-13 18:36:22 +00:00
Walter Dörwald
7585229bbf
Port test_userlist to PyUnit and add a few tests to increase code
...
coverage. From SF patch #662807
2003-02-13 18:07:43 +00:00
Guido van Rossum
298e421453
SF patch #685738 by Michael Stone.
...
This changes the default __new__ to refuse arguments iff tp_init is the
default __init__ implementation -- thus making it a TypeError when you
try to pass arguments to a constructor if the class doesn't override at
least __init__ or __new__.
2003-02-13 16:30:16 +00:00
Guido van Rossum
0c016a9590
Re-enable compiling ossaudiodev now that it seems to work again.
2003-02-13 16:12:21 +00:00
Tim Peters
8587b3c073
Added a HIGHEST_PROTOCOL module attribute to pickle and cPickle.
2003-02-13 15:44:41 +00:00
Neal Norwitz
bb1844148a
SF patch #682432 , add lookbehind tests
2003-02-13 03:01:18 +00:00
Walter Dörwald
3ea7cc3cbe
Fix typo.
2003-02-12 23:49:57 +00:00
Neal Norwitz
7cbd247af6
Add test to ensure files (fds) don't leak
2003-02-12 23:09:53 +00:00
Neal Norwitz
2294c0d4ec
Cleanup from patch #683257 :
...
Add missing INCREFs and re-indent returns to be consistent.
Add \n\ for lines in docstring
Add a pathetic test
Add docs
2003-02-12 23:02:21 +00:00
Guido van Rossum
3288f592cb
Expect test_ossaudiodev to skip on Linux, too. (It's broken.
...
Volunteers wanted to fix it!)
2003-02-12 20:40:08 +00:00
Guido van Rossum
9c00f42870
Systematic testing of hex/oct constants.
2003-02-12 17:09:17 +00:00
Guido van Rossum
66b1259dbc
SF #660455 : patch by NNorwitz.
...
"Unsigned" (i.e., positive-looking, but really negative) hex/oct
constants with a leading minus sign are once again properly negated.
The micro-optimization for negated numeric constants did the wrong
thing for such hex/oct constants. The patch avoids the optimization
for all hex/oct constants.
This needs to be backported to Python 2.2!
2003-02-12 16:57:47 +00:00
Jack Jansen
e71b9f830b
- Use distutils to find site-python (suggested by Thomas Heller, thanks!)
...
- Fixed a bug for packages without MD5 checksum.
2003-02-12 16:37:00 +00:00
Just van Rossum
c96d6ce3c2
Thank you sir, can I have another.
2003-02-12 16:19:39 +00:00
Jack Jansen
f59c6fa125
When in MacPython-OSX use bundlebuilder to create .app bundles.
2003-02-12 15:37:26 +00:00
Jack Jansen
53b341ff67
- Better way to find site-packages
...
- Catch stderr as well as stdout
- Fixed a bug with non-installable packages
- Parse .pth files after installing, so you don't have to restart Python (or
the IDE) after installing.
2003-02-12 15:36:25 +00:00
Guido van Rossum
a89d10edc9
Implement another useful feature for proxies: in super(X, x), x may
...
now be a proxy for an X instance, as long as issubclass(x.__class__, X).
2003-02-12 03:58:38 +00:00
Guido van Rossum
03bc7d3c4d
SF #532767 : isinstance(x, X) should work when x is a proxy for an X
...
instance, as long as x.__class__ is X or a subclass thereof.
Did a little cleanup of PyObject_IsInstance() too.
2003-02-12 03:32:58 +00:00
Tim Peters
42f08ac1e3
Implemented batching for dicts in cPickle. This is after two failed
...
attempts to merge the C list-batch and dict-batch code -- they worked, but
it was a godawful mess to read.
2003-02-11 22:43:24 +00:00
Jack Jansen
e7b33db22d
Changed database format to make fields adhere to PEP 241 where
...
applicable, and use a similar naming scheme for other fields. This
has drastically changed the structure, as the PEP241 names aren't
identifiers.
2003-02-11 22:40:59 +00:00
Tim Peters
1092d64002
Implemented list batching in cPickle.
2003-02-11 21:06:20 +00:00
Guido van Rossum
b6e5a0c658
Put proper tests in classmethod_get(). Remove the type argument to
...
descr_check(); it wasn't useful. Change the type argument of the
various _get() methods to PyObject * because the call signature of
tp_descr_get doesn't guarantee its type.
2003-02-11 18:44:42 +00:00
Tim Peters
8d2613adbe
Added tests to ensure that list and dict "chunking" are actually
...
getting done. Since this isn't yet implemented in cPickle, the
new tests are in TempAbstractPickleTests (which cPickle doesn't
run).
2003-02-11 16:40:16 +00:00
Guido van Rossum
3f50cdc05e
Get rid of the "bozo" __getstate__ that was inserted when __slots__
...
was used. This simplifies some logic in copy_reg.py (used by
pickling). It also broke a test, but this was rewritten to test the
new feature. :-)
2003-02-10 21:31:27 +00:00
Just van Rossum
ba20533d82
[ 683376 ] Adding NotImplementedType to types.py
2003-02-10 19:38:33 +00:00
Walter Dörwald
4f046e2e21
Add a few tests to test_count() to increase coverage in
...
Object/unicodeobject.c::unicode_count().
2003-02-10 17:51:03 +00:00
Walter Dörwald
74640247d4
Fix copy&paste error: call title instead of count
2003-02-10 17:44:16 +00:00
Walter Dörwald
8dd19321bb
Change filtertuple() to use tp_as_sequence->sq_item
...
instead of PyTuple_GetItem, so an overwritten __getitem__
in a tuple subclass works. SF bug #665835 .
2003-02-10 17:36:40 +00:00
Jack Jansen
8d326b8581
Punctuation fixes in docstrings.
2003-02-10 16:08:17 +00:00
Jack Jansen
6a600aba2d
Added docstrings.
2003-02-10 15:55:51 +00:00
Jack Jansen
26bf3acf42
- Better exception when the database isn't found.
...
- Allow for "manual:" pseudo-scheme in downloadURL to signal that
the download should be done manually.
2003-02-10 14:19:14 +00:00
Jack Jansen
4f82a513ca
Pick up Makefile variable BASECFLAGS too. This is needed since OPT was
...
split into OPT and BASECFLAGS (Makefile.pre.in rev. 1.108), because
now there are essential CFLAGS in BASECFLAGS.
2003-02-10 14:02:33 +00:00
Jack Jansen
c4b217dd18
Use MD5 checksums to check archive integrity and forestall downloads.
2003-02-10 13:38:44 +00:00
Walter Dörwald
1918f7755e
Change filterstring() and filterunicode(): If the
...
object is not a real str or unicode but an instance
of a subclass, construct the output via looping
over __getitem__. This guarantees that the result
is the same for function==None and function==lambda x:x
This doesn't happen for tuples, because filtertuple()
uses PyTuple_GetItem().
(This was discussed on SF bug #665835 ).
2003-02-10 13:19:13 +00:00
Jack Jansen
b4bb64e288
Added preInstall and postInstall commands to packages. PIL needs this
...
(preInstall, at least).
2003-02-10 13:08:04 +00:00
Just van Rossum
3aaf42c613
patch #683515 : "Add unicode support to compile(), eval() and exec"
...
Incorporated nnorwitz's comment re. Py__USING_UNICODE.
2003-02-10 08:21:10 +00:00
Neal Norwitz
de8b94c3e1
Fix SF bug #683467 , 'int' ability to generate longs not inherited
...
When subclassing from an int but not overriding __new__,
long values were not converted properly. Try to convert
longs into an int.
2003-02-10 02:12:43 +00:00
Neal Norwitz
9caf9c040e
Add tests and news entry about parser errors from bug #678518 .
2003-02-10 01:54:06 +00:00
Jack Jansen
95839b8af9
Strawman for a Package Install Manager for Python. It isn't CPAN yet, but at
...
less than 500 lines it already manages to test whether Numeric is installed,
and can install it if it isn't, including any prerequisites.
2003-02-09 23:10:20 +00:00
Just van Rossum
f032f86e9e
patch 680474 that fixes bug 679880: compile/eval/exec refused utf-8 bom
...
mark. Added unit test.
2003-02-09 20:38:48 +00:00
Guido van Rossum
cf117b0b40
Rename 'proto' keyword arg to 'protocol' . Greg Ward's suggestion.
2003-02-09 17:19:41 +00:00
Raymond Hettinger
60eca9331a
C Code:
...
* Removed the ifilter flag wart by splitting it into two simpler functions.
* Fixed comment tabbing in C code.
* Factored module start-up code into a loop.
Documentation:
* Re-wrote introduction.
* Addede examples for quantifiers.
* Simplified python equivalent for islice().
* Documented split of ifilter().
Sets.py:
* Replace old ifilter() usage with new.
2003-02-09 06:40:58 +00:00