Neal Norwitz [Sat, 27 Oct 2007 17:25:12 +0000 (17:25 +0000)]
URLError now takes only a single parameter. This was causing
errors in test_urllib2net on the MIPS buildbot.
Neal Norwitz [Sat, 27 Oct 2007 06:04:52 +0000 (06:04 +0000)]
Get a bunch of tests working on Mac OS. I suspect that a bunch of the
ord()s in Lib/plat-mac/ic.py need to be removed.
Neal Norwitz [Sat, 27 Oct 2007 05:40:06 +0000 (05:40 +0000)]
Get the locale and pwd tests working on the Solaris box where there
are some unicode values used. I'm not sure if this is the correct
on all operating systems, but this works on Linux w/o unicode.
Neal Norwitz [Sat, 27 Oct 2007 04:01:17 +0000 (04:01 +0000)]
Try to get this test to pass on Win64 by making clean for ssize_t
Neal Norwitz [Sat, 27 Oct 2007 04:00:45 +0000 (04:00 +0000)]
Get rid of more uses of string and use unicode
Neal Norwitz [Sat, 27 Oct 2007 02:55:08 +0000 (02:55 +0000)]
Get test_email to pass. There is a problem reading the data file and
making it unicode with the default encoding. I'm not sure if this is
a problem in and of itself. However, the test seems to be testing
something different, so at least get that working. Need to revisit
the unicode problem.
Neal Norwitz [Sat, 27 Oct 2007 02:50:52 +0000 (02:50 +0000)]
Use unicode in more places. Fixes a problem with str8 + str in test.
Guido van Rossum [Fri, 26 Oct 2007 21:46:44 +0000 (21:46 +0000)]
Sort the method lists for str8 and bytes so differences are more apparent.
Changed bytes.fromhex to take a str argument, as the docstring promises.
Added str8.fromhex (untested so far).
Guido van Rossum [Fri, 26 Oct 2007 19:34:40 +0000 (19:34 +0000)]
Kill PyString_Encode(), which isn't used anywhere.
(We should also kill the other PyString_ encode/decode APIs, but they
still have some users.)
Guido van Rossum [Fri, 26 Oct 2007 18:43:10 +0000 (18:43 +0000)]
Delete test_str.py. There's not much there I care about, and it is confused
about whether it's testing str8 or str... The stuff that matters is already
tested in test_unicode.py anyway.
Guido van Rossum [Fri, 26 Oct 2007 17:39:48 +0000 (17:39 +0000)]
Patch 1335 by Christian Heimes.
Add a bytes iterator (copied from stringobject.c and reindented :-).
I (Guido) added a small change to _abcoll.py to remove the registration
of bytes as a virtual subtype of Iterator -- the presence of __iter__
will handle that now.
Guido van Rossum [Fri, 26 Oct 2007 17:19:33 +0000 (17:19 +0000)]
Patch 1330 by Christian Heimes (with some TLC applied by myself).
Move most of the messiness with truncate() on Windows into _fileio.c.
Still keep the flush() call in io.py though.
Neal Norwitz [Fri, 26 Oct 2007 06:44:10 +0000 (06:44 +0000)]
Fix some Py_ssize_t warnings on Win64 that were probably bugs
Neal Norwitz [Fri, 26 Oct 2007 06:05:28 +0000 (06:05 +0000)]
Try to fix some of the failing tests on Win64. PY_SSIZE_T_MAX (8 bytes)
is larger than what can fit into a long (4 bytes). Hopefully this will
fix more problems than it creates. There are many, many compile warnings
on Win64. Each of these should be investigated to determine if they
are real problems or not. Many of these presumably affect the trunk too.
Brett Cannon [Fri, 26 Oct 2007 05:42:09 +0000 (05:42 +0000)]
Add a missing news entry about how str8's constructor signature now matches the
bytes type.
Guido van Rossum [Fri, 26 Oct 2007 04:29:23 +0000 (04:29 +0000)]
Patch # 1331 by Christian Heimes.
The patch fixes some of the problems on Windows. It doesn't introduce
addition problems on Linux.
Guido van Rossum [Thu, 25 Oct 2007 23:47:33 +0000 (23:47 +0000)]
Patch # 1302 by Christian Heimes (with some love from me :-).
The patch fixes the output for profile and cProfile. Another patch from
Alexandre and me added additional calls to the UTF-8 codec.
Guido van Rossum [Thu, 25 Oct 2007 23:21:03 +0000 (23:21 +0000)]
Patch # 1323 by Amaury Forgeot d'Arc.
This patch corrects a problem in test_file.py on Windows:
f.truncate() seeks to the truncation point, but does not empty the
buffers. In the test, f.tell() returns -1...
Guido van Rossum [Thu, 25 Oct 2007 23:18:51 +0000 (23:18 +0000)]
Patch 1318 by Christian Heimes: remove os.tmpnam(), os.tempnam(),
and os.tmpfile().
Georg Brandl [Wed, 24 Oct 2007 21:25:34 +0000 (21:25 +0000)]
Remove a test case which is no longer valid.
Georg Brandl [Wed, 24 Oct 2007 21:14:07 +0000 (21:14 +0000)]
Fix a refleak for `filename', introduced in rev. 58466.
Also remove an unnecessary incref/decref for `name'.
Guido van Rossum [Wed, 24 Oct 2007 21:13:09 +0000 (21:13 +0000)]
Fix a broken format in a PyErr_Format() call: %lx is not supported.
(It's still technically broken since the va_args code assumes %x is
an int while we're passing a long, but that's mostly theoretical,
and it's done all over the place.)
Guido van Rossum [Wed, 24 Oct 2007 20:18:37 +0000 (20:18 +0000)]
Make test_locale pass by removing tests that were designed to handle
issues with <ctype.h> on various platforms. We no longer use <ctype.h>.
Thomas Heller [Wed, 24 Oct 2007 19:37:27 +0000 (19:37 +0000)]
A 'PyObject *' parameter in PyErr_Format must use %S parameter, not %s.
Added unittest for calling a function with paramflags.
Georg Brandl [Wed, 24 Oct 2007 18:55:37 +0000 (18:55 +0000)]
Patch #1303: Adapt str8 constructor to bytes (now buffer) one.
Guido van Rossum [Wed, 24 Oct 2007 18:41:19 +0000 (18:41 +0000)]
Patch #1318 by Amaury Forgeot d'Arc.
Updates to ctypes for python 3.0 to make the tests pass.
Notable changes are:
- return bytes instead of str8
- integers in range(256) are accepted as "one char string":
libc.strchr("abcdef", 98) is now valid.
- directly use the wide-char version of the win32 function LoadLibrary.
Guido van Rossum [Tue, 23 Oct 2007 19:43:28 +0000 (19:43 +0000)]
Patch #1314 by Christian Heimes.
Fix failing unittests for time and strptime on German and probably other
localized Windows installations.
Georg Brandl [Tue, 23 Oct 2007 19:24:22 +0000 (19:24 +0000)]
#1316: remove redundant PyLong_Check calls when PyInt_Check was already called.
Georg Brandl [Tue, 23 Oct 2007 18:26:17 +0000 (18:26 +0000)]
Remove duplicate entry for PyObject_AsFileDescriptor.
Georg Brandl [Tue, 23 Oct 2007 18:25:20 +0000 (18:25 +0000)]
Remove redundant PyInt/PyLong checks.
Georg Brandl [Tue, 23 Oct 2007 18:21:41 +0000 (18:21 +0000)]
Update Pygments version from externals.
Georg Brandl [Tue, 23 Oct 2007 18:17:00 +0000 (18:17 +0000)]
Update w.r.t. PEP 3137.
Georg Brandl [Tue, 23 Oct 2007 06:52:59 +0000 (06:52 +0000)]
Patch #1071: Improve unicode.translate() so that you can pass unicode
characters as mapping keys and invalid mapping keys are recognized
and raise an error.
Georg Brandl [Tue, 23 Oct 2007 06:26:46 +0000 (06:26 +0000)]
#1061 (mainly by Thomas Wouters): use weak sets for abc caches.
Guido van Rossum [Mon, 22 Oct 2007 22:18:51 +0000 (22:18 +0000)]
Patch 1304, by Amaury Forgeot d'Arc.
Add md5module.c and sha1module.c to the project files,
and in some cases bytes_methods.c and related .h files.
Brett Cannon [Mon, 22 Oct 2007 20:24:51 +0000 (20:24 +0000)]
Make str/str8 comparisons return True/False for !=/==.
Code that has been returning str8 becomes much more apparent thanks to this
(e.g., struct module returning str8 for all string-related formats or sqlite3
passing in str8 instances when converting objects that had a __conform__
method). One also has to watch out in C code when making a key from char *
using PyString in the C code but a str instance in Python code as that will not
longer compare equal.
Once str8 gains a constructor like the current bytes type then
test_modulefinder needs a cleanup as the fix is a little messy in that file.
Thanks goes to Thomas Lee for writing the patch for the change giving an
initial run-down of why most of the tests were failing.
Georg Brandl [Mon, 22 Oct 2007 16:16:13 +0000 (16:16 +0000)]
In followup to #1310: Remove more exception indexing.
Guido van Rossum [Mon, 22 Oct 2007 16:00:45 +0000 (16:00 +0000)]
ssue 1309: fix by Christian Heimes to be able to build on Windows.
Georg Brandl [Mon, 22 Oct 2007 12:42:46 +0000 (12:42 +0000)]
Fix exception indexing.
Guido van Rossum [Mon, 22 Oct 2007 00:09:51 +0000 (00:09 +0000)]
Issue 1267, continued.
Additional patch by Christian Heimes to deal more cleanly with the
FILE* vs file-descriptor issues.
I cleaned up his code a bit, and moved the lseek() call into import.c.
Brett Cannon [Sun, 21 Oct 2007 02:45:33 +0000 (02:45 +0000)]
Make sure the malloc'ed string has space for the null byte.
Brett Cannon [Sat, 20 Oct 2007 03:46:49 +0000 (03:46 +0000)]
Fix PyTokenizer_FindEncoding() for OS X 10.4. Turns out that seeking to the
beginning of a file through a file pointer is not reflected when reading from a
file descriptor. Using both fflush() and fpurge() does not solve it. One must
use lseek() directly on the file descriptor to get the desired effect.
This might suggest that we standardize on either file pointers (FILE) or file
descriptors (int) for all C code used.
Brett Cannon [Sat, 20 Oct 2007 03:43:15 +0000 (03:43 +0000)]
Fix a memory leak caused by PyTokenizer_FindEncoding() returning a char * that
was PyMem_MALLOC'ed.
Brett Cannon [Sat, 20 Oct 2007 02:54:14 +0000 (02:54 +0000)]
Plug a memory leak where a struct tok_state was not being freed.
Also tweak a comparison that was going farther than needed.
Guido van Rossum [Sat, 20 Oct 2007 00:05:19 +0000 (00:05 +0000)]
Tweak the version *string* to clarify that this isn't your father's 3.0a1. :-)
Guido van Rossum [Fri, 19 Oct 2007 23:16:50 +0000 (23:16 +0000)]
Patch 1267 by Christian Heimes.
Move the initialization of sys.std{in,out,err} and __builtin__.open
to C code.
This solves the problem that "python -S" wouldn't work.
Guido van Rossum [Fri, 19 Oct 2007 22:06:24 +0000 (22:06 +0000)]
Patch 1280, by Alexandre Vassalotti.
Make PyString's indexing and iteration return integers.
(I changed a few of Alexandre's decisions -- GvR.)
Guido van Rossum [Fri, 19 Oct 2007 21:48:41 +0000 (21:48 +0000)]
This is the uncontroversial half of patch 1263 by Thomas Lee:
changes to codecs.c and structmember.c to use PyUnicode instead of
PyString.
Gregory P. Smith [Fri, 19 Oct 2007 07:34:48 +0000 (07:34 +0000)]
Merge 58539: squelch the warning that this test is intended to raise.
Gregory P. Smith [Thu, 18 Oct 2007 16:55:12 +0000 (16:55 +0000)]
Merge 58532, 58533, 58534: bsddb.dbtables bug fixes - don't allow null bytes
in random rowid strings, pass txn using a keyword where possible.
Guido van Rossum [Tue, 16 Oct 2007 18:12:55 +0000 (18:12 +0000)]
Patch# 1258 by Christian Heimes: kill basestring.
I like this because it makes the code shorter! :-)
Gregory P. Smith [Tue, 16 Oct 2007 06:31:30 +0000 (06:31 +0000)]
For PEP3137: Adds missing methods to the mutable PyBytes object (soon
to be called a buffer). Shares code with stringobject when possible.
Adds unit tests with common code that should be usable to test the PEPs
mutable buffer() and immutable bytes() types.
http://bugs.python.org/issue1261
Alexandre Vassalotti [Tue, 16 Oct 2007 00:26:33 +0000 (00:26 +0000)]
Fix a small typo in the comment of unicode_default_encoding[].
Brett Cannon [Mon, 15 Oct 2007 20:52:41 +0000 (20:52 +0000)]
Make the docstring for io.open() a raw string so that the explanation for the
'newline' argument is not a jumbled mess of newlines.
Neal Norwitz [Mon, 15 Oct 2007 16:08:26 +0000 (16:08 +0000)]
Move decl so it compiles with C89.
Guido van Rossum [Mon, 15 Oct 2007 15:42:31 +0000 (15:42 +0000)]
Update what the locale module documents about string operations.
Guido van Rossum [Mon, 15 Oct 2007 02:52:41 +0000 (02:52 +0000)]
Patch #1272, by Christian Heimes and Alexandre Vassalotti.
Changes to make __file__ a proper Unicode object, using the default
filesystem encoding.
This is a bit tricky because the default filesystem encoding isn't
set by the time we import the first modules; at that point we fudge
things a bit. This is okay since __file__ isn't really used much
except for error reporting.
Tested on OSX and Linux only so far.
Kurt B. Kaiser [Mon, 15 Oct 2007 02:40:08 +0000 (02:40 +0000)]
Finish bug fix applied at 58398. I missed a piece, Tal Einat found the error.
Guido van Rossum [Mon, 15 Oct 2007 01:27:53 +0000 (01:27 +0000)]
Fix yet another stray 2.x-ism (maybe merged?).
Guido van Rossum [Mon, 15 Oct 2007 00:25:56 +0000 (00:25 +0000)]
Make it possible to run this test stand-alone.
Guido van Rossum [Sun, 14 Oct 2007 20:46:15 +0000 (20:46 +0000)]
Fix typo: formats -> format. (Only mattered in wide unicode builds.)
Neal Norwitz [Sun, 14 Oct 2007 03:23:09 +0000 (03:23 +0000)]
Fix some more memory leaks (in error conditions) introduced in r58455.
Also fix some indentation.
Alexandre Vassalotti [Sun, 14 Oct 2007 02:54:41 +0000 (02:54 +0000)]
Fix the memory leak introduced in r58455. The buffer reference
returned by 'et' need to be freed after usage.
Alexandre Vassalotti [Sun, 14 Oct 2007 02:05:51 +0000 (02:05 +0000)]
Remove the buffer API from PyUnicode as specified by PEP 3137. Also,
fix the error message of the 't' format unit, in getargs.c, so that it
asks for bytes, instead of string.
Gregory P. Smith [Sat, 13 Oct 2007 23:23:58 +0000 (23:23 +0000)]
Merge 58450: fix uncollectable reference caused by bsddb.db.DBShelf.append
Adds a DBShelf __repr__ method to not raise an exception when the DB is closed.
Travis E. Oliphant [Sat, 13 Oct 2007 21:03:27 +0000 (21:03 +0000)]
Eliminate use of PyBUF_CHARACTER flag which is no longer part of the buffer interface. Fix up array module to export the correct format for wide-builds.
Guido van Rossum [Sat, 13 Oct 2007 21:01:08 +0000 (21:01 +0000)]
Fix typo in arraymodule.c (?) -- it's PyBUF_LOCK, not PyBUF_LOCKDATA.
Neal Norwitz [Sat, 13 Oct 2007 18:56:00 +0000 (18:56 +0000)]
Remove more hotshot cruft.
Travis E. Oliphant [Fri, 12 Oct 2007 23:27:53 +0000 (23:27 +0000)]
Fix problems with memoryview object. There is still more to do to finish PEP 3118. The memory-view object needs to be fleshed out and the struct module needs to be modified.
Travis E. Oliphant [Fri, 12 Oct 2007 22:06:37 +0000 (22:06 +0000)]
Add macros for checking for long double and defining the size of long double on the platform. Ctypes and Struct module will both need them.
Travis E. Oliphant [Fri, 12 Oct 2007 22:05:15 +0000 (22:05 +0000)]
Fix Issue 1268 with the array module by backing-out the 'w' addition. All builds will continue to use 'u' for unicode.
Brett Cannon [Fri, 12 Oct 2007 19:18:19 +0000 (19:18 +0000)]
Make _load_testfile() use its encoding argument when __loader__ is defined.
Gregory P. Smith [Fri, 12 Oct 2007 19:13:19 +0000 (19:13 +0000)]
Merge r58434:
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.
Brett Cannon [Thu, 11 Oct 2007 23:08:53 +0000 (23:08 +0000)]
Remove self-referential import.
Fred Drake [Thu, 11 Oct 2007 18:05:38 +0000 (18:05 +0000)]
clean out some hotshot-related build turds
Fred Drake [Thu, 11 Oct 2007 18:01:43 +0000 (18:01 +0000)]
remove hotshot profiler from Py3k
Guido van Rossum [Wed, 10 Oct 2007 22:48:24 +0000 (22:48 +0000)]
Two changes that are definitely problem-free and avoid calling print()
with a bytes instance (as this will soon print something differently).
Guido van Rossum [Wed, 10 Oct 2007 21:38:59 +0000 (21:38 +0000)]
get rid of some more PyString uses.
Only the filename is still a PyString now.
(We'll need to deal with the default filesystem encoding to do it right.)
Guido van Rossum [Wed, 10 Oct 2007 18:53:36 +0000 (18:53 +0000)]
Minor cleanup of the comment for PyErr_ProgramText() and a tweak to the code
to guarantee the claim that it doesn't set an exception.
Guido van Rossum [Wed, 10 Oct 2007 18:49:50 +0000 (18:49 +0000)]
Fix another stray PyString reference that should be PyBytes; and its comment.
Guido van Rossum [Wed, 10 Oct 2007 18:44:39 +0000 (18:44 +0000)]
Fix an issue in PyTokenizer_RestoreEncoding() which was treating a PyBytes
object with PyString calls and not checking errors. This caused the display
of syntax errors to be deformed.
Guido van Rossum [Wed, 10 Oct 2007 18:00:50 +0000 (18:00 +0000)]
Random changes having to do with readline() and bytes.
Kurt B. Kaiser [Wed, 10 Oct 2007 00:36:38 +0000 (00:36 +0000)]
the default class attr is needed!
Guido van Rossum [Wed, 10 Oct 2007 00:12:46 +0000 (00:12 +0000)]
Don't depend on str8.splitlines() in test_chunkcoding().
Kurt B. Kaiser [Tue, 9 Oct 2007 23:12:31 +0000 (23:12 +0000)]
Windows EOL sequence not converted correctly, encoding error.
Caused file save to fail. Bug 1130.
M idlelib/IOBinding.py
M idlelib/NEWS.txt
Guido van Rossum [Tue, 9 Oct 2007 21:55:58 +0000 (21:55 +0000)]
PyFile_WriteObject() should use PyObject_Repr(), not _ReprStr8().
Gregory P. Smith [Tue, 9 Oct 2007 18:35:13 +0000 (18:35 +0000)]
use a reliable host
Guido van Rossum [Tue, 9 Oct 2007 17:30:03 +0000 (17:30 +0000)]
Silly script I'd rather not throw away.
Guido van Rossum [Tue, 9 Oct 2007 17:21:10 +0000 (17:21 +0000)]
Patch #1049 by Thomas Lee.
Changes comparisons between PyBytes and PyUnicode to return unequal
instead of raising TypeError.
Guido van Rossum [Tue, 9 Oct 2007 03:46:30 +0000 (03:46 +0000)]
Replace all (locale-dependent) uses of isupper(), tolower(), etc., by
locally-defined macros that assume ASCII and only consider ASCII letters.
Brett Cannon [Mon, 8 Oct 2007 19:48:15 +0000 (19:48 +0000)]
Change the default encoding for ftplib.FTP to latin1 so that bytes can be in
the range of 255 instead of only 128.
Georg Brandl [Mon, 8 Oct 2007 14:08:36 +0000 (14:08 +0000)]
#1228: new comparison behavior.
Georg Brandl [Mon, 8 Oct 2007 07:00:29 +0000 (07:00 +0000)]
Remove buffer() from the docs.
Neal Norwitz [Mon, 8 Oct 2007 05:28:00 +0000 (05:28 +0000)]
Remove unused variables
Guido van Rossum [Mon, 8 Oct 2007 03:39:26 +0000 (03:39 +0000)]
Remove more traces of bufferobject.[ch] from build files etc.
Guido van Rossum [Mon, 8 Oct 2007 03:32:34 +0000 (03:32 +0000)]
Delete bufferobject.[ch].
This will undoubtedly require Windows build file changes too.
Guido van Rossum [Mon, 8 Oct 2007 02:46:15 +0000 (02:46 +0000)]
Breaking ground for PEP 3137 implementation:
Get rid of buffer(). Use memoryview() in its place where possible.
In a few places, do things a bit different, because memoryview()
can't slice (yet).
Brett Cannon [Sun, 7 Oct 2007 23:12:41 +0000 (23:12 +0000)]
Fix a minor typo.
Neal Norwitz [Sun, 7 Oct 2007 19:26:50 +0000 (19:26 +0000)]
At least one of the buildbots was complaining about newview being used
without being initialized. Also make the code conform to the comment and
return the new object. This code needs a test!
Gregory P. Smith [Sat, 6 Oct 2007 08:23:10 +0000 (08:23 +0000)]
Merge 58344: allow BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module