| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
and that conversion to "timezone" None is the same as stripping the
tzinfo member.
|
|
|
|
|
| |
west of the US zones getting converted, and also by using Eastern "as if"
it were UTC (wrt Pacific), and vice versa.
|
| |
|
|
|
|
| |
The new "substr in str" feature masked the error.
|
|
|
|
|
|
|
|
| |
ignore tuple.
The line, "from _random import Random as CoreGenerator", fools the test
code which expects CoreGenerator.__name__ to be "CoreGenerator" instead
of "Random".
|
|
|
|
| |
the _random subclass for Random.
|
|
|
|
|
| |
random number generator. Altered it a bit to use the old generator
and restore the test.
|
|
|
|
|
|
|
| |
Guido has in mind an easier way for users to code this stuff, but the
only tests we have now are for fixed-offset tzinfo classes, and this
stuff is extremely delicate in the endcases (read the new test code
for why: there are holes in time <wink>).
|
|
|
|
| |
core generator for random.py.
|
|
|
|
|
| |
Python 2.2.x backport candidate. (This bug has been around since
Python 1.6.)
|
| |
|
|
|
|
|
|
| |
operands have identical tzinfo members (meaning object identity -- "is").
I misunderstood the intent here, reading wrong conclusion into
conflicting clues.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
subtraction, work as documented. In the Python implementation,
they weren't calling utcoffset() if both operands had the same
tzinfo object. That's fine if it so happens that the shared
tzinfo object returns a fixed offset (independent of operand),
but can give wrong results if that's not so, and the latter
obtains in a tzinfo subclass instance trying to model both
standard and daylight times. The C implementation was already
doing this "correctly", so we're just adding tests to verify it.
|
| |
|
| |
|
| |
|
|
|
|
| |
timetz.
|
| |
|
|
|
|
|
|
| |
be trusted with years before 1900, so now we raise ValueError if a date or
datetime or datetimetz .strftime() method is called with a year before
1900.
|
|
|
|
|
|
|
|
|
|
|
|
| |
{timetz,datetimetz}.{utcoffset,dst}() now return a timedelta (or None)
instead of an int (or None).
tzinfo.{utcoffset,dst)() can now return a timedelta (or an int, or None).
Curiously, this was much easier to do in the C implementation than in the
Python implementation (which lives in the Zope3 code tree) -- the C code
already had lots of hair to extract C ints from offset objects, and used
C ints internally.
|
| |
|
|
|
|
| |
can be read by the C implementation. I don't really understand this.
|
|
|
|
|
|
|
|
|
|
| |
used that.
wrap_strftime(): Removed the most irritating uses of buf.
TestDate.test_ordinal_conversions(): The C implementation is fast enough
that we can afford to check the endpoints of every year. Also added
tm_yday tests at the endpoints.
|
| |
|
|
|
|
|
|
|
|
| |
[ 643835 ] Set Next Statement for Python debuggers
with a few tweaks by me: adding an unsigned or two, mentioning that
not all jumps are allowed in the doc for pdb, adding a NEWS item and
a note to whatsnew, and AuCTeX doing something cosmetic to libpdb.tex.
|
|
|
|
| |
still needed to test the Python implementatino.
|
|
|
|
|
| |
to others to argue about how to build it on other platforms (on Windows
it's in its own DLL).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
containing class objects) are allowed as the second argument.
This makes issubclass() more similar to isinstance() where recursive
tuples are allowed too.
|
|
|
|
|
|
|
|
|
|
| |
test_resource calls resource.setrlimit() to change the file size limits.
This fails on Cygwin, which supports setrlimit() and getrlimit(), just not
changing that particular setting. (The same would apply to any other
platform that has those functions but not that particular feature.)
Since getrlimit() works and setrlimit() can be used for other reasons, a
check for ValueError was added to that part of the test.
|
|
|
|
|
|
|
|
|
|
|
| |
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.
This closes SF patch #649608.
|
| |
|
| |
|
| |
|
|
|
|
| |
the obvious s/linuxaudiodev/ossaudiodev/ change made.
|
|
|
|
|
|
|
| |
Most of these patches are from Thomas Heller, with long lines folded
by Tim. The change to test_descr.py is from Guido. See the bug report.
Not a bugfix candidate -- METH_CLASS is new in 2.3.
|
|
|
|
|
| |
input, and 2) unicode input means unicode output. This closes
SF bug #622831.
|
|
|
|
|
|
| |
Change LongWordTestCase.setUp() -- remove leading whitespace from
text string.
Comment fix.
|
|
|
|
|
|
|
|
| |
this can result in significantly smaller files. All classes as well as the
open function now accept an optional binary parameter, which defaults to
False for backward compatibility. Added a small test suite, updated the
libref documentation (including documenting the exported classes and fixing
a few other nits) and added a note about the change to Misc/NEWS.
|
|
|
|
| |
heapsort and verifies the result against list.sort().
|
|
|
|
|
| |
Added related testcase.
Closes SF bug #643260.
|
| |
|
|
|
|
| |
Simplifies the code and gets Just van Rossum's example to work.
|
|
|
|
|
|
| |
[ 633152 ] list slice ass ignores subtypes of list
Allow arbitrary sequences on the RHS of extended slices.
|