| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
521908 (again) to MAIN
The patch applied by Steven was inadvertently reverted during the
transition to GRPC.
Python 2.3a0 (#3, May 8 2002, 23:37:01)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
GRPC IDLE Fork 0.8.2
>>> print u'\xbfQu\xe9 pas\xf3?'
¿Qué pasó?
Modified Files:
OutputWindow.py
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use a slightly different strategy to determine when not to call the line
trace function. This removes the need for the RETURN_NONE opcode, so
that's gone again. Update docs and comments to match.
Thanks to Neal and Armin!
Also add a test suite. This should have come with the original patch...
|
|
|
|
| |
course.
|
|
|
|
|
|
|
|
|
| |
because it added it to 12 PM too. 12 PM should be hour 12 not hour
24.
Also cleaned up a minor style nit. There are more style problems in
this file that I'll clean up next (but I didn't want them to overwhelm
the substance of this fix).
|
|
|
|
|
|
|
|
| |
localtime, which in -0400 is 12 noon GMT. The bug boiled down to
broken conversion of 12 PM to hour 12 for the '%I %p' format string.
Added a test for this specific condition: Strptime12AMPMTests. Fix to
_strptime.py coming momentarily.
|