| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a
64-bit value, there's no way to make this test succeed on a 64-bit
platform. So just skip it when sys.maxint isn't 0x7fffffff.
Backport candidate.
|
|
|
|
| |
iter(self.keys()).
|
|
|
|
|
| |
Note that distutils.core.DEBUG still works if client code uses it, but
the core code avoids circular references by using distutils.debug.
|
| |
|
|
|
|
|
| |
This makes things a touch more like 2.2. Read the comments in
Python/ceval.c for more details.
|
| |
|
|
|
|
| |
reference to the payload.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
exception occurred so it should only be closed in the else clause.
Without this change we can an UnboundLocalError on Linux:
Traceback (most recent call last):
File "Lib/test/test_mmap.py", line 304, in ?
test_both()
File "Lib/test/test_mmap.py", line 208, in test_both
m.close()
UnboundLocalError: local variable 'm' referenced before assignment
|
|
|
|
| |
(adapted from Quinn Dunkan's mimelib SF patch #573204).
|
|
|
|
| |
Quinn Dunkan's mimelib SF patch #573204) fixes the problem.
|
|
|
|
| |
de-backslash-ifying.
|
|
|
|
|
| |
2.3. This patch (adapted from Quinn Dunkan's SF patch #573204) fixes
the problem and should get ported to rfc822.py.
|
|
|
|
|
|
| |
a more reasonable value.
Backport candidate.
|
|
|
|
|
| |
more instances of the bizarre "del f; del m" ways to spell .close() (del
won't do any good here under Jython, etc).
|
|
|
|
|
|
|
|
|
|
| |
with a size larger than the underlying file worked on Windows. It
does <wink>. However, merely creating an mmap that way has the side
effect of growing the file on disk to match the specified size. A
*later* test assumed that the file on disk was still exactly as it was
before the new "size too big" test was added, but that's no longer true.
So added a hack at the end of the "size too big" test to truncate the
disk file back to its original size on Windows.
|
|
|
|
|
| |
boundary could be found -- in a lax parser -- the entire body is
assigned to the message payload.
|
|
|
|
|
|
|
|
|
|
|
| |
_handle_text(): Use _isstring() for stringiness test.
_handle_multipart(): Add a test before the ListType test, checking for
stringiness of the payload. String payloads for multitypes means a
message with broken MIME chrome was parsed by a lax parser. Instead
of raising a BoundaryError in those cases, the entire body is assigned
to the message payload (but since the content type is still
multipart/*, the Generator needs to be updated too).
|
|
|
|
| |
UnicodeType, which is different between Python 2.1 and 2.2.
|
| |
|
|
|
|
| |
broken wrapping of long ASCII headers.
|
| |
|
|
|
|
| |
to the command-line arguments. Fix this by adding the source filename.
|
|
|
|
| |
(Bugfix candidate for 2.2, and likely 2.1 as well)
|
| |
|
|
|
|
|
|
|
| |
the same. Added check to verify the two names are not the same. Does not
check the actual files to see if there is a symbolic link.
Closes SF bug 490165 and Tzot's patch 604600.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add read(), write(), and readwrite() helper functions to shorten poll
functions. Use get() instead of try/except KeyError for lookup.
XXX How could the lookup ever fail?
Remove module-level DEBUG flag.
Use iteritems() instead of items() when walking the socket map.
Reformat the functions I touched so that are consistently Pythonic.
|
| |
|
| |
|
|
|
|
| |
GUSI/Threading interaction, I'm not sure, but I don't have the time to fix this right now.
|
|
|
|
| |
Closes SF bug 605731.
|
|
|
|
|
| |
when the replacement from an encoding error callback is itself
unencodable.
|
|
|
|
|
|
|
|
|
| |
from SF patch http://www.python.org/sf/554192
This adds two new functions to mimetypes:
guess_all_extensions() which returns a list of all known
extensions for a mime type, and add_type() which adds one
mapping between a mime type and an extension.
|
|
|
|
| |
Oleg Broytmann in SF patch #600096. Whitespace normalized by Barry.
|
|
|
|
|
|
| |
Broytmann in SF patch #600096. Specifically, the former function now
encodes the triplets, while the latter adds optional charset and
language arguments.
|
|
|
|
|
| |
the previous RFC 2045, $5.2 repair to get_content_type() this
subpart's type will now be text/plain.
|
| |
|
|
|
|
|
| |
#601959. Modified slightly by Barry (who added the KeyError in case
the header is missing.
|
|
|
|
|
| |
Raise ValueError if user passes a size to mmap which is larger
than the file.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
M RemoteDebugger.py
M ScriptBinding.py
Restart the execution server with a clean environment and execute the
active module from scratch upon activation of Run/F5.
Add functionality to PyShell.py to restart the execution server in a new
subprocess. The server makes a connection to the Idle client which sends a
block of code to be executed.
Modify ScriptBinding.py to restart the subprocess upon Run/F5, assuming that
an execution is not currently in progress. Remove Import Module functionality,
not required now that the code is executed in a clean environment.
If the Debugger is active, also restart the subprocess side of the split
debugger. Add functionality to RemoteDebugger.py to support this.
At this time breakpoints will be lost in the subprocess if Run/F5 is activated.
A subsequent checkin of PyShell.py will implement reloading of the breakpoints
into the subprocess debugger. I'm keeping this separate as the design may
change.
|
|
|
|
|
|
|
|
| |
The problem was that it expected rfc822.parseaddr() to return None
upon a parse failure. The actual, documented return value for a
parse failure is (None, None).
Closes SF bug 602029.
|
|
|
|
|
|
|
|
|
|
| |
Unicode strings (with arbitrary length) are allowed
as entries in the unicode.translate mapping.
Add a test case for multicharacter replacements.
(Multicharacter replacements were enabled by the
PEP 293 patch)
|
|
|
|
|
|
| |
to fix it. (It fails when the day of the month is a 1-digit number,
because %c produces space+digit there, while strptime seems to expect
zero+digit somehow.)
|
|
|
|
| |
along with some small changes (e.g. use of +=).
|
|
|
|
|
| |
missing key. (Also added a guard to SyntaxError__str__ to prevent
calling PyString_Check(NULL).)
|
|
|
|
|
| |
If the transfer-encoding is unknown, ignore it. Suggested by Tom
Emerson.
|
|
|
|
| |
sometimes wasn't short enough.
|
|
|
|
|
|
|
|
| |
The new execvpe code would sometimes do the wrong thing when a
non-executable file existed earlier in the path and an executable file
of the same name existed later in the path. This patch restores the
proper behavior (which is to execute the second file). When only a
non-executable file exists, the correct error is still reported.
|
|
|
|
|
|
|
|
|
| |
of PyString_DecodeEscape(). This prevents a call to
_PyString_Resize() for the empty string, which would
result in a PyErr_BadInternalCall(), because the
empty string has more than one reference.
This closes SF bug http://www.python.org/sf/603937
|