1) tempfile.TemporaryFile, NamedTemporaryFile, and SpooledTemporaryFile
now pass newline and encoding to the underlying io.open call.
2) test_tempfile is updated
3) test_csv is updated to use the new arguments.
to be a text file. (XXX It should use UTF-8 as the encoding.)
I also removed the unised 'binary' argument from the make_file() signature.
XXX I am under no illusion that this is now working; I're pretty sure
it would be more principled if it always read binary data. But that's
for someone who actually cares about this module.
- Replace all asserts by ValuleErrors or TypeErrors as appropriate.
- Add _checkReadable, _checkWritable methods; these check self.closed too.
- Add a test that everything exported by io.py exists, and is either
an exception or an IOBase instance (except for the open function).
- Default buffering to 1 if isatty() (I had to tweak this to enforce
the *default* bit -- GvR).
Known issues:
The string.Formatter class, as discussed in the PEP, is incomplete.
Error handling needs to conform to the PEP.
Need to fix this warning that I introduced in Python/formatter_unicode.c:
Objects/stringlib/unicodedefs.h:26: warning: `STRINGLIB_CMP' defined but not used
Need to make sure sign formatting is correct, more tests needed.
Need to remove '()' sign formatting, left over from an earlier version of the PEP.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r57227 | facundo.batista | 2007-08-20 17:16:21 -0700 (Mon, 20 Aug 2007) | 5 lines
Catch ProtocolError exceptions and include the header information in
test output (to make it easier to debug test failures caused by
problems in the server). [GSoC - Alan McIntyre]
........
r57229 | mark.hammond | 2007-08-20 18:04:47 -0700 (Mon, 20 Aug 2007) | 5 lines
[ 1761786 ] distutils.util.get_platform() return value on 64bit Windows
As discussed on distutils-sig: Allows the generated installer name on
64bit Windows platforms to be different than the name generated for
32bit Windows platforms.
........
r57230 | mark.hammond | 2007-08-20 18:05:16 -0700 (Mon, 20 Aug 2007) | 5 lines
[ 1761786 ] distutils.util.get_platform() return value on 64bit Windows
As discussed on distutils-sig: Allows the generated installer name on
64bit Windows platforms to be different than the name generated for
32bit Windows platforms.
........
r57253 | georg.brandl | 2007-08-20 23:01:18 -0700 (Mon, 20 Aug 2007) | 2 lines
Demand version 2.5.1 since 2.5 has a bug with codecs.open context managers.
........
r57254 | georg.brandl | 2007-08-20 23:03:43 -0700 (Mon, 20 Aug 2007) | 2 lines
Revert accidental checkins from last commit.
........
r57255 | georg.brandl | 2007-08-20 23:07:08 -0700 (Mon, 20 Aug 2007) | 2 lines
Bug #1777160: mention explicitly that e.g. -1**2 is -1.
........
r57256 | georg.brandl | 2007-08-20 23:12:19 -0700 (Mon, 20 Aug 2007) | 3 lines
Bug #1777168: replace operator names "opa"... with "op1"... and mark everything up as literal,
to enhance readability.
........
r57259 | facundo.batista | 2007-08-21 09:57:18 -0700 (Tue, 21 Aug 2007) | 8 lines
Added test for behavior of operations on an unconnected SMTP object,
and tests for NOOP, RSET, and VRFY. Corrected typo in a comment for
testNonnumericPort. Added a check for constructing SMTP objects when
non-numeric ports are included in the host name. Derived a server from
SMTPServer to test various ESMTP/SMTP capabilities. Check that a
second HELO to DebuggingServer returns an error. [GSoC - Alan McIntyre]
........
r57279 | skip.montanaro | 2007-08-22 12:02:16 -0700 (Wed, 22 Aug 2007) | 2 lines
Note that BeOS is unsupported as of Python 2.6.
........
r57280 | skip.montanaro | 2007-08-22 12:05:21 -0700 (Wed, 22 Aug 2007) | 1 line
whoops - need to check in configure as well
........
r57284 | alex.martelli | 2007-08-22 14:14:17 -0700 (Wed, 22 Aug 2007) | 5 lines
Fix compile.c so that it records 0.0 and -0.0 as separate constants in a code
object's co_consts tuple; add a test to show that the previous behavior (where
these two constants were "collapsed" into one) causes serious malfunctioning.
........
r57286 | gregory.p.smith | 2007-08-22 14:32:34 -0700 (Wed, 22 Aug 2007) | 3 lines
stop leaving log.0000001 __db.00* and xxx.db turds in developer
sandboxes when bsddb3 tests are run.
........
r57301 | jeffrey.yasskin | 2007-08-22 16:14:27 -0700 (Wed, 22 Aug 2007) | 3 lines
When setup.py fails to find the necessary bits to build some modules, have it
print a slightly more informative message.
........
r57320 | brett.cannon | 2007-08-23 07:53:17 -0700 (Thu, 23 Aug 2007) | 2 lines
Make test_runpy re-entrant.
........
r57324 | georg.brandl | 2007-08-23 10:54:11 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1768121: fix wrong/missing opcode docs.
........
r57326 | georg.brandl | 2007-08-23 10:57:05 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1766421: "return code" vs. "status code".
........
r57328 | georg.brandl | 2007-08-23 11:08:06 -0700 (Thu, 23 Aug 2007) | 2 lines
Second half of #1752175: #ifdef out references to PyImport_DynLoadFiletab if HAVE_DYNAMIC_LOADING is not defined.
........
r57331 | georg.brandl | 2007-08-23 11:11:33 -0700 (Thu, 23 Aug 2007) | 2 lines
Use try-except-finally in contextlib.
........
r57343 | georg.brandl | 2007-08-23 13:35:00 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1697820: document that the old slice protocol is still used by builtin types.
........
r57345 | georg.brandl | 2007-08-23 13:40:01 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1573854: fix docs for sqlite3 cursor rowcount attr.
........
r57347 | georg.brandl | 2007-08-23 13:50:23 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1694833: fix imp.find_module() docs wrt. packages.
........
r57348 | georg.brandl | 2007-08-23 13:53:28 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1594966: fix misleading usage example
........
r57349 | georg.brandl | 2007-08-23 13:55:44 -0700 (Thu, 23 Aug 2007) | 2 lines
Clarify wording a bit.
........
r57351 | georg.brandl | 2007-08-23 14:18:44 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1752332: httplib no longer uses socket.getaddrinfo().
........
r57352 | georg.brandl | 2007-08-23 14:21:36 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1734111: document struct.Struct.size.
........
r57353 | georg.brandl | 2007-08-23 14:27:57 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1688564: document os.path.join's absolute path behavior in the docstring.
........
r57354 | georg.brandl | 2007-08-23 14:36:05 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1625381: clarify match vs search introduction.
........
r57355 | georg.brandl | 2007-08-23 14:42:54 -0700 (Thu, 23 Aug 2007) | 2 lines
Bug #1758696: more info about descriptors.
........
r57357 | georg.brandl | 2007-08-23 14:55:57 -0700 (Thu, 23 Aug 2007) | 2 lines
Patch #1779550: remove redundant code in logging.
........
r57378 | gregory.p.smith | 2007-08-23 22:11:38 -0700 (Thu, 23 Aug 2007) | 2 lines
Fix bug 1725856.
........
r57382 | georg.brandl | 2007-08-23 23:10:01 -0700 (Thu, 23 Aug 2007) | 2 lines
uuid creation is now threadsafe, backport from py3k rev. 57375.
........
r57389 | georg.brandl | 2007-08-24 04:47:37 -0700 (Fri, 24 Aug 2007) | 2 lines
Bug #1765375: fix stripping of unwanted LDFLAGS.
........
r57391 | guido.van.rossum | 2007-08-24 07:53:14 -0700 (Fri, 24 Aug 2007) | 2 lines
Fix silly typo in test name.
........
M idlelib/configHandler.py
M idlelib/ColorDelegator.py
M idlelib/Delegator.py
M idlelib/ObjectBrowser.py
M idlelib/PyShell.py
M idlelib/Debugger.py
M idlelib/configDialog.py
M idlelib/StackViewer.py
M idlelib/keybindingDialog.py
M idlelib/tabpage.py
M idlelib/EditorWindow.py
M idlelib/WindowList.py
M idlelib/RemoteDebugger.py
M idlelib/dynOptionMenuWidget.py
M idlelib/configHandler.py
M idlelib/tabpage.py
M idlelib/EditorWindow.py
M idlelib/rpc.py
M idlelib/IOBinding.py
M idlelib/RemoteDebugger.py
M idlelib/TreeWidget.py
(Note that test_xmlrpc isn't touched by the fixes!) There were two
separate issues; (a) BaseHTTPServer was using a TextIOWrapper which
was swallowing some of the POST body; (b) the getheaders() API was
changed but (due to integration of 2.6 code) the code wasn't modified.
IDLE modules have main() or test() functions which are essential for testing.
M idlelib/AutoCompleteWindow.py
M idlelib/UndoDelegator.py
M idlelib/Bindings.py
M idlelib/AutoComplete.py
M idlelib/configHandler.py
M idlelib/HyperParser.py
M idlelib/ColorDelegator.py
M idlelib/ObjectBrowser.py
M idlelib/ZoomHeight.py
M idlelib/PyShell.py
M idlelib/ParenMatch.py
M idlelib/Debugger.py
M idlelib/configDialog.py
M idlelib/StackViewer.py
M idlelib/ReplaceDialog.py
M idlelib/ScriptBinding.py
M idlelib/GrepDialog.py
M idlelib/EditorWindow.py
M idlelib/FormatParagraph.py
M idlelib/OutputWindow.py
M idlelib/aboutDialog.py
M idlelib/IdleHistory.py
M idlelib/PathBrowser.py
M idlelib/ClassBrowser.py
M idlelib/CallTips.py
M idlelib/FileList.py
M idlelib/idle.py
M idlelib/CodeContext.py
M idlelib/SearchDialog.py
M idlelib/RemoteObjectBrowser.py
M idlelib/RemoteDebugger.py
M idlelib/TreeWidget.py
M idlelib/run.py
M idlelib/Percolator.py
M idlelib/macosxSupport.py
None. Remove encoding and errors argument from pax create methods in
TarInfo, pax always uses UTF-8.
Adapt the documentation and tests to the new string/unicode concept.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r57155 | brett.cannon | 2007-08-17 11:51:57 -0700 (Fri, 17 Aug 2007) | 2 lines
Clarify the comment about setting the PYTHON variable for the Doc Makefile.
........
r57156 | brett.cannon | 2007-08-17 11:59:58 -0700 (Fri, 17 Aug 2007) | 3 lines
Remove news entry for test.test_support.guard_warnings_filter as it has been
removed.
........
r57158 | facundo.batista | 2007-08-17 12:16:44 -0700 (Fri, 17 Aug 2007) | 9 lines
Added a flag (_send_traceback_header) to the SimpleXMLRPCServer class
that allows sending back exception/stack trace information about
internal server errors (this flag defaults to False to avoid sending
such information unless explicitly enabled). Added tests to verify
behavior of this new feature (these tests are skipped on win32 because
of problems with WSAEWOULDBLOCK). Renamed HTTPTestCase to
SimpleServerTestCase. [GSoC - Alan McIntyre]
........
r57160 | brett.cannon | 2007-08-17 13:16:15 -0700 (Fri, 17 Aug 2007) | 2 lines
Make test_warnings re-entrant.
........
r57175 | georg.brandl | 2007-08-17 23:05:56 -0700 (Fri, 17 Aug 2007) | 2 lines
Fix PDB command descriptions.
........
r57182 | brett.cannon | 2007-08-18 11:30:36 -0700 (Sat, 18 Aug 2007) | 3 lines
Remove Mikael as the maintainer of BeOS at his request. With no maintainer
should the port be deprecated in 2.6?
........
r57199 | georg.brandl | 2007-08-19 11:43:50 -0700 (Sun, 19 Aug 2007) | 2 lines
Fix stray backticks.
........
r57211 | hyeshik.chang | 2007-08-19 23:49:18 -0700 (Sun, 19 Aug 2007) | 2 lines
Add cheot-ga-keut composed make-up sequence support in EUC-KR codec.
........
r57216 | guido.van.rossum | 2007-08-20 08:18:04 -0700 (Mon, 20 Aug 2007) | 4 lines
Add a hack (originally devised in a slightly different form by Thomas Wouters)
to prevent spurious tracebacks when a daemon thread's cleanup happens to wake
up when the world around it has already been destroyed.
........
be answered with the comments removed.
There are many places that require checks when doing arithmetic for memory
sizes when allocating memory. Otherwise, overflow is possible with
a subsequent crash.
Fix SF #1777057 which was a result of not initializing the new BufferError
properly. Had to update the test for exceptions for BufferError too.
*restoring* selected registries instead of *resetting* them all. Also
change the default for the huntrleaks parameter to None everywhere, as
its other value is a list of three elements, so it is not a bool.
methods. Reset the negative cache *before* resetting the invalidation
counter, hoping this may plug a race condition (but then again, this
whole module isn't coded to be thread-safe).
using the message generated by svnmerge, because it contains a lot of
stuff about the Doc tree, which I'm not merging this time due to the
way the Doc tree was initially added. I am however adding roman.py
which was added later to Doc/tools. I'll try to diff the two Doc
trees separately to see if there's stuff I missed.
ut-32-be). On narrow builds the codecs combine surrogate pairs in the unicode
object into one codepoint on encoding and create surrogate pairs for
codepoints outside the BMP on decoding. Lone surrogates are passed through
unchanged in all cases.
Backport to the trunk will follow.
Refactor the urllib open_http() and open_https() to use the same
internal logic. The only difference between the two is the call to
constructor an HTTPConnection object.
The two clients in the std library have been updated to use the newer
interface. A couple of minor changes to the httplib tests were
needed.
Also, reformat some long lines in the httplib tests.
Note that it's hard to test xmlrpclib, because the server it attempts
to connect to doesn't seem to support the expected interfaces. Many
of the links via xmlrpc.com are dead, so I couldn't find another
server to use for tests.
- fix "h[sbseek] == b'\1'" and "ratecode = ord(h[sbseek+4])" in test_voc()
- avoid division by zero
- use startswith method: replace h[:2] == b'BM' by h.startswith(b'BM')
- use aifc.open() instead of old aifc.openfp()
- use ord(b'P') instead of ord('P')
modules have unittests AFAICT, and I'm not improving things here, but these
changes make a bunch of email package tests succeed, and command line testing
against real files seems to make things better.
Added an __main__ section to imghdr.py so that it can be run from the command
line similarly to sndhdr.py. Someone else can figure out a better -m way of
doing this.
In sndhdr.py do a couple of very minor cleanups, and use a with statement to
not wait for gc to close the file.
2. PyShell: shell isn't working due to encoding issues. Temporarily direct
exceptions to the terminal. Also, trap exceptions occurring during write()
instead of passing.
Checking (2) in temporarily to aid finding the encoding problem in
IOBinding.py
Completely get rid of StringIO.py and cStringIO.c.
I had to fix a few tests and modules beyond what Christian did, and
invent a few conventions. E.g. in elementtree, I chose to
write/return Unicode strings whe no encoding is given, but bytes when
an explicit encoding is given. Also mimetools was made to always
assume binary files.
The problem is that ctypes c_char (and c_char_p) creates unicode string
instead of byte string. I attached a proposition (patch) to change this
behaviour (use bytes for c_char).
So in next example, it will display 'bytes' and not 'str':
from ctypes import c_buffer, c_char
buf = c_buffer("abcdef")
print (type(buf[0]))
Other behaviour changes:
- repr(c_char) adds a "b"
eg. repr(c_char('x')) is "c_char(b'x')" instead of "c_char('x')"
- bytes is mutable whereas str is not:
this may break some modules based on ctypes
The HTTPResponse object is being passed to BufferedReader, but it
wasn't designed to be used that way. These changes extend the hacks
that have already been made in urllib2 to get the tests to pass.
The hacks need to be removed and proper support for use with the io
library. That's a project for another day.
All code in the stdlib should be ASCII only, unless (a) it's test
input for testing the *parsing* of unicode, or (b) it's an author's
name in a comment.
We just need to force the encoding when no encoding is passed to toxml()
or toprettyxml(), rather than relying on the default encoding (which is
unreliable).
All tests pass, but maybe some tests have become unnecessary now.
Removed PaxUnicodeTest, added MiscTest.
TarFile.extractfile() returns a binary file object which can be used
with a TextIOWrapper for text I/O.
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
................
r56760 | neal.norwitz | 2007-08-05 18:55:39 -0700 (Sun, 05 Aug 2007) | 178 lines
Merged revisions 56477-56759 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r56485 | facundo.batista | 2007-07-21 17:13:00 -0700 (Sat, 21 Jul 2007) | 5 lines
Selectively enable tests for asyncore.readwrite based on the presence
of poll support in the select module (since this is the only case in
which readwrite can be called). [GSoC - Alan McIntyre]
........
r56488 | nick.coghlan | 2007-07-22 03:18:07 -0700 (Sun, 22 Jul 2007) | 1 line
Add explicit relative import tests for runpy.run_module
........
r56509 | nick.coghlan | 2007-07-23 06:41:45 -0700 (Mon, 23 Jul 2007) | 5 lines
Correctly cleanup sys.modules after executing runpy relative import
tests
Restore Python 2.4 ImportError when attempting to execute a package
(as imports cannot be guaranteed to work properly if you try it)
........
r56519 | nick.coghlan | 2007-07-24 06:07:38 -0700 (Tue, 24 Jul 2007) | 1 line
Tweak runpy test to do a better job of confirming that sys has been manipulated correctly
........
r56520 | nick.coghlan | 2007-07-24 06:58:28 -0700 (Tue, 24 Jul 2007) | 1 line
Fix an incompatibility between the -i and -m command line switches as reported on python-dev by PJE - runpy.run_module now leaves any changes it makes to the sys module intact after the function terminates
........
r56523 | nick.coghlan | 2007-07-24 07:39:23 -0700 (Tue, 24 Jul 2007) | 1 line
Try to get rid of spurious failure in test_resource on the Debian buildbots by changing the file size limit before attempting to close the file
........
r56533 | facundo.batista | 2007-07-24 14:20:42 -0700 (Tue, 24 Jul 2007) | 7 lines
New tests for basic behavior of smtplib.SMTP and
smtpd.DebuggingServer. Change to use global host & port number
variables. Modified the 'server' to take a string to send back in
order to vary test server responses. Added a test for the reaction of
smtplib.SMTP to a non-200 HELO response. [GSoC - Alan McIntyre]
........
r56538 | nick.coghlan | 2007-07-25 05:57:48 -0700 (Wed, 25 Jul 2007) | 1 line
More buildbot cleanup - let the OS assign the port for test_urllib2_localnet
........
r56539 | nick.coghlan | 2007-07-25 06:18:58 -0700 (Wed, 25 Jul 2007) | 1 line
Add a temporary diagnostic message before a strange failure on the alpha Debian buildbot
........
r56543 | martin.v.loewis | 2007-07-25 09:24:23 -0700 (Wed, 25 Jul 2007) | 2 lines
Change location of the package index to pypi.python.org/pypi
........
r56551 | georg.brandl | 2007-07-26 02:36:25 -0700 (Thu, 26 Jul 2007) | 2 lines
tabs, newlines and crs are valid XML characters.
........
r56553 | nick.coghlan | 2007-07-26 07:03:00 -0700 (Thu, 26 Jul 2007) | 1 line
Add explicit test for a misbehaving math.floor
........
r56561 | mark.hammond | 2007-07-26 21:52:32 -0700 (Thu, 26 Jul 2007) | 3 lines
In consultation with Kristjan Jonsson, only define WINVER and _WINNT_WIN32
if (a) we are building Python itself and (b) no one previously defined them
........
r56562 | mark.hammond | 2007-07-26 22:08:54 -0700 (Thu, 26 Jul 2007) | 2 lines
Correctly detect AMD64 architecture on VC2003
........
r56566 | nick.coghlan | 2007-07-27 03:36:30 -0700 (Fri, 27 Jul 2007) | 1 line
Make test_math error messages more meaningful for small discrepancies in results
........
r56588 | martin.v.loewis | 2007-07-27 11:28:22 -0700 (Fri, 27 Jul 2007) | 2 lines
Bug #978833: Close https sockets by releasing the _ssl object.
........
r56601 | martin.v.loewis | 2007-07-28 00:03:05 -0700 (Sat, 28 Jul 2007) | 3 lines
Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannot
represent the result in a single character.
........
r56604 | facundo.batista | 2007-07-28 07:21:22 -0700 (Sat, 28 Jul 2007) | 9 lines
Moved all of the capture_server socket setup code into the try block
so that the event gets set if a failure occurs during server setup
(otherwise the test will block forever). Changed to let the OS assign
the server port number, and client side of test waits for port number
assignment before proceeding. The test data in DispatcherWithSendTests
is also sent in multiple send() calls instead of one to make sure this
works properly. [GSoC - Alan McIntyre]
........
r56611 | georg.brandl | 2007-07-29 01:26:10 -0700 (Sun, 29 Jul 2007) | 2 lines
Clarify PEP 343 description.
........
r56614 | georg.brandl | 2007-07-29 02:11:15 -0700 (Sun, 29 Jul 2007) | 2 lines
try-except-finally is new in 2.5.
........
r56617 | facundo.batista | 2007-07-29 07:23:08 -0700 (Sun, 29 Jul 2007) | 9 lines
Added tests for asynchat classes simple_producer & fifo, and the
find_prefix_at_end function. Check behavior of a string given as a
producer. Added tests for behavior of asynchat.async_chat when given
int, long, and None terminator arguments. Added usepoll attribute to
TestAsynchat to allow running the asynchat tests with poll support
chosen whether it's available or not (improves coverage of asyncore
code). [GSoC - Alan McIntyre]
........
r56620 | georg.brandl | 2007-07-29 10:38:35 -0700 (Sun, 29 Jul 2007) | 2 lines
Bug #1763149: use proper slice syntax in docstring.
(backport)
........
r56624 | mark.hammond | 2007-07-29 17:45:29 -0700 (Sun, 29 Jul 2007) | 4 lines
Correct use of Py_BUILD_CORE - now make sure it is defined before it is
referenced, and also fix definition of _WIN32_WINNT.
Resolves patch 1761803.
........
r56632 | facundo.batista | 2007-07-30 20:03:34 -0700 (Mon, 30 Jul 2007) | 8 lines
When running asynchat tests on OS X (darwin), the test client now
overrides asyncore.dispatcher.handle_expt to do nothing, since
select.poll gives a POLLHUP error at the completion of these tests.
Added timeout & count arguments to several asyncore.loop calls to
avoid the possibility of a test hanging up a build. [GSoC - Alan
McIntyre]
........
r56633 | nick.coghlan | 2007-07-31 06:38:01 -0700 (Tue, 31 Jul 2007) | 1 line
Eliminate RLock race condition reported in SF bug #1764059
........
r56636 | martin.v.loewis | 2007-07-31 12:57:56 -0700 (Tue, 31 Jul 2007) | 2 lines
Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+.
........
r56653 | facundo.batista | 2007-08-01 16:18:36 -0700 (Wed, 01 Aug 2007) | 9 lines
Allow the OS to select a free port for each test server. For
DebuggingServerTests, construct SMTP objects with a localhost argument
to avoid abysmally long FQDN lookups (not relevant to items under
test) on some machines that would cause the test to fail. Moved server
setup code in the server function inside the try block to avoid the
possibility of setup failure hanging the test. Minor edits to conform
to PEP 8. [GSoC - Alan McIntyre]
........
r56681 | matthias.klose | 2007-08-02 14:33:13 -0700 (Thu, 02 Aug 2007) | 2 lines
- Allow Emacs 22 for building the documentation in info format.
........
r56689 | neal.norwitz | 2007-08-02 23:46:29 -0700 (Thu, 02 Aug 2007) | 1 line
Py_ssize_t is defined regardless of HAVE_LONG_LONG. Will backport
........
r56727 | hyeshik.chang | 2007-08-03 21:10:18 -0700 (Fri, 03 Aug 2007) | 3 lines
Fix gb18030 codec's bug that doesn't map two-byte characters on
GB18030 extension in encoding. (bug reported by Bjorn Stabell)
........
r56751 | neal.norwitz | 2007-08-04 20:23:31 -0700 (Sat, 04 Aug 2007) | 7 lines
Handle errors when generating a warning.
The value is always written to the returned pointer if getting it was
successful, even if a warning causes an error. (This probably doesn't matter
as the caller will probably discard the value.)
Will backport.
........
................
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
........
r56497 | kurt.kaiser | 2007-07-22 14:55:16 -0700 (Sun, 22 Jul 2007) | 4 lines
In the case of syntax errors, in py3k format_exception_only()
was including line number and position in the final line of the
exception notification, duplicating info in previous lines.
........
r56501 | kurt.kaiser | 2007-07-22 19:35:50 -0700 (Sun, 22 Jul 2007) | 2 lines
Hum, needed a newline in the last change.
........
r56536 | kurt.kaiser | 2007-07-24 19:06:48 -0700 (Tue, 24 Jul 2007) | 5 lines
Not all instantiations of SyntaxError set the args attribute.
e.g. symtable.c
Modify format_exception_only() to get SyntaxError attributes directly
instead of unpacking 'args'.
........
r56537 | kurt.kaiser | 2007-07-24 19:13:03 -0700 (Tue, 24 Jul 2007) | 3 lines
Update doctest strings: traceback.py no longer prints redundant location
information in the last line of the exception display.
........
r56627 | kurt.kaiser | 2007-07-29 21:06:57 -0700 (Sun, 29 Jul 2007) | 2 lines
Interactive interpreter emulator (code.py) failing to print exceptions.
........
r56628 | kurt.kaiser | 2007-07-29 21:41:02 -0700 (Sun, 29 Jul 2007) | 2 lines
Eliminate extra lines before and after tracebacks.
........
r56638 | kurt.kaiser | 2007-07-31 19:36:45 -0700 (Tue, 31 Jul 2007) | 3 lines
Refactor syntax error display in shell and edit windows; move
colorize_syntax_error() to EditorWindow; update to py3k.
........
r56685 | neal.norwitz | 2007-08-02 22:20:23 -0700 (Thu, 02 Aug 2007) | 10 lines
Remove several h/w and o/s specific modules that are undocumented, obsolete,
and/or not widely used:
linuxaudiodev.c, sunaudiodev.c Lib/plat-sunos5/SUNAUDIODEV.py
Lib/audiodev.py Tools/audiopy/audiopy
Move Lib/toaiff.py to Demo.
See PEP 3108 for most of the details.
........
r56686 | neal.norwitz | 2007-08-02 22:21:48 -0700 (Thu, 02 Aug 2007) | 4 lines
Missed one module that should have been removed since it relied
on audiodev which was removed.
........
r56748 | neal.norwitz | 2007-08-04 19:19:04 -0700 (Sat, 04 Aug 2007) | 1 line
Make from X import * outside module scope an error.
........
r56750 | neal.norwitz | 2007-08-04 19:35:01 -0700 (Sat, 04 Aug 2007) | 1 line
Use READONLY consistently instead of RO
........
The HTTP class is a backwards compatibility layer for the Python 1.5
API. (The only remaining use in the std library is xmlrpclib.)
The current change makes urllib issue HTTP/1.0 requests with
HTTPConnection, because is accesses HTTPResponse.fp directly instead
of using the read() method. Using fp directly interacts poorly with
persistent connections. There are probably better solutions than the
current one, but this is a start.
Add code to test_roundtrip() that figures out the encoding
from the first two lines of the file.
(We need to refactor this again to make it available to
all places that need this, e.g. linecache.py.)
In particular, watch out for comparing b"" to "". They're not equal,
but you can start at the code asking whether buf == "" for a long time
before realizing that it will never be True.
I'm not sure why I thought it should originally, but it introduces an
__del__() method on the response which cause the close() to be called
too soon using the HTTP compat class.
Also, remove some stale comments. The HTTPResponse calls makefile()
immediately, so there is no risk of it closing the socket.
If a makefile()-generated object is open and its parent socket is
closed, the parent socket should remain open until the child is
closed, too. The code to support this is moderately complex and
requires one extra slots in the socket object.
This change fixes httplib so that several urllib2net test cases pass
again.
Add SocketCloser class to socket.py, which encapsulates the
refcounting logic for sockets after makefile() has been called.
Move SocketIO class from io module to socket module. It's only use is
to implement the raw I/O methods on top of a socket to support
makefile().
Add unittests to test_socket to cover various patterns of close and
makefile.
error callback changes the bytes object in the exception the decoder might
use memory that's no longer in use. Change unicode_decode_call_errorhandler()
so that it fetches the adresses of the bytes array (start and end) from the
exception object and passes them back to the caller.
1. Removed "returns_unicode" attribute, associated code
in the module to support that attribute, and all tests
associated with it.
2. Parsed data is now returned as unicode strings.
3. Changed input tests to use io.BytesIO instead
of StringIO, to reflect the byte processing
nature of expat.
This makes test_resource.py pass, and I think it's the right thing
to do: if you're closing a file after encountering an I/O error
there's nothing you can do about it. If you want the error, you
can call flush() yourself.