Anthony Baxter [Mon, 3 Apr 2006 08:05:07 +0000 (08:05 +0000)]
The email module's parsedate_tz function now sets the daylight savings
flag to -1 (unknown) since it can't tell from the date whether it should
be set.
patch from Aldo Cortesi
Fix test_pty on OSF/1 (Tru64). The problem is that the newline gets
converted to CR CR NL. There may be a way to fix this with tcsetattr,
but I couldn't find it. There was a similar problem on IRIX.
Skip the test for sys.stdin.seek(-1) on OSF/1 (Tru64) since it does Bad Things
like cause the interpreter to exit abruptly. If there's a way to fix this,
it would be good to really fix it. It could just be the operation of the
std C library and we just aren't supposed to do that.
When the test case is skipped, we print a message so the user can check
for themselves.
* Fix a refleak of *_attributes.
* Cleanup formatting a bit (add spaces).
* Move static var initialized inside init_types() since that's the only place
it's used.
Anthony Baxter [Sat, 1 Apr 2006 08:36:27 +0000 (08:36 +0000)]
backport r243 from the pysqlite2 svn repository - lowers the required version
of SQLite3 from 3.2.2 to 3.0.8, by providing an alternative to
sqlite3_transfer_bindings. setup.py also handles the common (in debian
and ubuntu, at least) case of a buggy sqlite3.h SQLITE_VERSION_NUMBER.
Anthony Baxter [Sat, 1 Apr 2006 01:08:29 +0000 (01:08 +0000)]
Add a clause to the PY_FORMAT_SIZE_T to stop warnings on 32 bit intel
linux with gcc 4.0.2, after talking to Tim.
<ymmit> But it won't break anything anywhere, so don't worry :-)
Anthony Baxter [Sat, 1 Apr 2006 00:57:31 +0000 (00:57 +0000)]
merged the sqlite-integration branch.
This is based on pysqlite2.1.3, and provides a DB-API interface in
the standard library. You'll need sqlite 3.2.2 or later to build
this - if you have an earlier version, the C extension module will
not be built.
Georg Brandl [Fri, 31 Mar 2006 20:00:11 +0000 (20:00 +0000)]
bug #1461855: make os.fdopen() add the O_APPEND flag if using "a" mode.
glibc, for example, does this already on its own, but it seems that
the solaris libc doesn't. This leads to Python code being able to over-
write file contents even though having specified "a" mode.
Jeremy Hylton [Fri, 31 Mar 2006 16:41:22 +0000 (16:41 +0000)]
Expand comments.
Explicitly clear all elements from arena->a_objects and remove
assert() that refcount is 1. It's possible for a program to get a
reference to the list via sys.getobjects() or via gc functions.
Thomas Wouters [Fri, 31 Mar 2006 15:31:43 +0000 (15:31 +0000)]
Fix the reference leak in test_generators, by explicitly breaking the cycle
we are about to leave behind. An example of the cause of this leak can be
found in the leakers directory, in case we ever want to tackle the
underlying problem.
Walter Dörwald [Fri, 31 Mar 2006 15:26:22 +0000 (15:26 +0000)]
Bug #947906: An object oriented interface has been added to the calendar
module. It's possible to generate HTML calendar now and the module can be
called as a script (e.g. via ``python -mcalendar``).
Neal Norwitz [Fri, 31 Mar 2006 06:54:45 +0000 (06:54 +0000)]
Get gcc to do strict IEEE math. This flag was already used for cc, just not
gcc. Without this flag, doing pretty much anything with NaNs causes
a Floating Point Exception signal. This causes the interpreter to quit.
The failing tests this fixes are: test_float, test_long, and test_struct.
This is somewhat equivalent to doing signal(SIGFPE, SIG_IGN).
Will verify if this is a problem in 2.4 and backport if necessary (probably).
Tim Peters [Fri, 31 Mar 2006 04:11:16 +0000 (04:11 +0000)]
test_main(): Restore the decimal context that was in
effect at the time test_decimal was imported. Else
running test_decimal had the bad side effect of
permanently changing the decimal context in effect.
That caused text_tokenize to fail if it ran after
test_decimal.
Barry Warsaw [Thu, 30 Mar 2006 22:45:35 +0000 (22:45 +0000)]
SF patch #1458476 with modifications based on discussions in python-dev. This
adds the following API calls: PySet_Clear(), _PySet_Next(), and
_PySet_Update(). The latter two are considered non-public. Tests and
documentation (for the public API) are included.