| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
iterable object. I'm not sure how that got overlooked before!
Got rid of the internal _PySequence_IterContains, introduced a new
internal _PySequence_IterSearch, and rewrote all the iteration-based
"count of", "index of", and "is the object in it or not?" routines to
just call the new function. I suppose it's slower this way, but the
code duplication was getting depressing.
|
| |
|
|
|
|
|
|
|
| |
saving instead a traceback string, but test_support's run_unittest was
still peeking into unittest internals and trying to pick apart unittest's
errors and failures vectors as if they contained exc_info() tuples instead
of strings.
Whatever, when a unittest-based test failed, test_support blew up. I'm
not sure this is the right way to fix it; it simply gets me unstuck.
|
| |
|
|
| |
branch (if it ever gets to the typo, the test is failing anyway).
|
| |
|
|
|
|
|
|
| |
capabilities of the Pentium FPU, so what should have been (and were on
Windows) exact results got fuzzy. Then it turns out test_support.fcmp()
isn't tolerant of tiny errors when *one* of the comparands is 0, but
test_complex's old check_close_real() is. Rather than fix gcc <wink>,
easier to revert this test and revisit after the release.
|
| |
|
|
| |
existed when I wrote this test.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
(1) Allow multiple -u options to extend each other (and the initial
value of use_resources passed into regrtest.main()).
(2) When a test is run stand-alone (not via regrtest.py), needed
resources are always granted.
|
| |
|
|
| |
This covers regression on SF bug #458860.
|
| |
|
|
| |
support.
|
| |
|
|
|
|
|
|
|
|
|
| |
1. That seeking beyond the end of a file increases the size of a file.
2. That files so extended are magically filled with null bytes.
I find no support for either in the C std, and #2 in particular turns out
not to be true on Win32 (you apparently see whatever trash happened to be
on disk). Left #1 intact, but changed the test to check only bytes it
explicitly wrote. Also fiddled the "expected" vs "got" failure reports
to consistently use repr (%r) -- they weren't readable otherwise.
|
| |
|
|
|
|
|
|
|
| |
Curious: the MS docs say stati64 etc are supported even on Win95, but
Win95 doesn't support a filesystem that allows partitions > 2 Gb.
test_largefile: This was opening its test file in text mode. I have no
idea how that worked under Win64, but it sure needs binary mode on Win98.
BTW, on Win98 test_largefile runs quickly (under a second).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
requires that errno ever get set, and it looks like glibc is already
playing that game. New rules:
+ Never use HUGE_VAL. Use the new Py_HUGE_VAL instead.
+ Never believe errno. If overflow is the only thing you're interested in,
use the new Py_OVERFLOWED(x) macro. If you're interested in any libm
errors, use the new Py_SET_ERANGE_IF_OVERFLOW(x) macro, which attempts
to set errno the way C89 said it worked.
Unfortunately, none of these are reliable, but they work on Windows and I
*expect* under glibc too.
|
| |
|
|
|
|
| |
32 characters per component. This makes mkdir() calls and such fail with EINVAL.
For now I am disabling the test on the Mac, and I'll open a bugreport.
|
| | |
|
| | |
|
| |
|
|
| |
UnixWare 7.x systems.
|
| |
|
|
| |
a default repr() that's longer than 20 characters.
|
| |
|
|
|
|
| |
getting Infs, NaNs, or nonsense in 2.1 and before; in yesterday's CVS we
were getting OverflowError; but these functions always make good sense
for positive arguments, no matter how large).
|
| |
|
|
|
|
| |
"/" and "//", and doesn't really care what they *mean*, just that both
are tried (and that, whatever they mean, they act similarly for int and
long arguments).
|
| |
|
|
|
| |
mostly changes of / operators into //. Once or twice I did more or
less than recommended.
|
| |
|
|
|
| |
change their basic behavior: When parsing something that cannot possibly
be valid in either HTML or XHTML, raise an exception.
|
| |
|
|
|
| |
the -Qwarnall option, so I've changed this to only filter out the one
warning that's a problem in practice.
|
| |
|
|
| |
broken declaration-like things.
|
| | |
|
| | |
|
| |
|
|
| |
e.g., (1L << 40000)/(1L << 40001) returns 0.5, not Inf or NaN or whatever.
|
| |
|
|
|
|
|
| |
the fiddling is simply due to that no caller of PyLong_AsDouble ever
checked for failure (so that's fixing old bugs). PyLong_AsDouble is much
faster for big inputs now too, but that's more of a happy consequence
than a design goal.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
of PyMapping_Keys because we know we have a real dict. Tolerate that
objects may have an attr named "__dict__" that's not a dict (Py_None
popped up during testing).
test_descr.py, test_dir(): Test the new classic-class behavior; beef up
the new-style class test similarly.
test_pyclbr.py, checkModule(): dir(C) is no longer a synonym for
C.__dict__.keys() when C is a classic class (looks like the same thing
that burned distutils! -- should it be *made* a synoym again? Then it
would be inconsistent with new-style class behavior.).
|
| | |
|
| |
|
|
|
| |
integer types, and y must be >= 0. See discussion at
http://sf.net/tracker/index.php?func=detail&aid=457066&group_id=5470&atid=105470
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bag. It's clearly wrong for classic classes, at heart because a classic
class doesn't have a __class__ attribute, and I'm unclear on whether
that's feature or bug. I'll repair this once I find out (in the
meantime, dir() applied to classic classes won't find the base classes,
while dir() applied to a classic-class instance *will* find the base
classes but not *their* base classes).
Please give the new dir() a try and see whether you love it or hate it.
The new dir([]) behavior is something I could come to love. Here's
something to hate:
>>> class C:
... pass
...
>>> c = C()
>>> dir(c)
['__doc__', '__module__']
>>>
The idea that an instance has a __doc__ attribute is jarring (of course
it's really c.__class__.__doc__ == C.__doc__; likewise for __module__).
OTOH, the code already has too many special cases, and dir(x) doesn't
have a compelling or clear purpose when x isn't a module.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
mapping object", in the same sense dict.update(x) requires of x (that x
has a keys() method and a getitem).
Questionable: The other type constructors accept a keyword argument, so I
did that here too (e.g., dictionary(mapping={1:2}) works). But type_call
doesn't pass the keyword args to the tp_new slot (it passes NULL), it only
passes them to the tp_init slot, so getting at them required adding a
tp_init slot to dicts. Looks like that makes the normal case (i.e., no
args at all) a little slower (the time it takes to call dict.tp_init and
have it figure out there's nothing to do).
|
| | |
|
| | |
|
| |
|
|
|
|
| |
I actually rewrote normpath quite a bit: it had no test cases, and as
soon as I starting writing some I found several cases that didn't make
sense.
|
| |
|
|
|
|
| |
using cooperative multiple inheritance.
inherits(): add a test for subclassing the unicode type.
|
| |
|
|
| |
Consequences for Jython still unknown (but raised on Jython-Dev).
|
| |
|
|
| |
tuples).
|
| |
|
|
|
| |
based on a suggestion from Tim Peters; also make sure that we're really
doing exponentiation and not multiplication.
|
| |
|
|
| |
bug from compile.c. (SF bug #456756.)
|
| |
|
|
| |
when that test is doomed to deadlock.
|
| |
|
|
|
| |
in which case it will hang because the import lock is already held
by the main thread.
|
| | |
|
| |
|
|
| |
non-subclassability. (More tests for number subclassing should follow.)
|
| |
|
|
| |
ints, convert to PyLong (rather than throwing away the high-order 32 bits).
|
| |
|
|
|
|
|
|
| |
64-bit INTs on 32-bit boxes (where they become longs). Also exploit that
int(str) and long(str) will ignore a trailing newline (saves creating a
new string at the Python level).
pickletester.py: Simulate reading a pickle produced by a 64-bit box.
|
| | |
|
| | |
|