Commit Graph

4520 Commits

Author SHA1 Message Date
Victor Stinner e6c910e953 Issue #12451: pydoc.synopsis() now reads the encoding cookie if available, to
read the Python script from the right encoding.
2011-06-30 15:55:43 +02:00
Victor Stinner dc9b1ea02e Issue #12451: distutils now opens the setup script in binary mode to read the
encoding cookie, instead of opening it in UTF-8.
2011-06-30 15:40:22 +02:00
Victor Stinner a7c33e5168 Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures
the output and displays it on failure instead. regrtest -v doesn't print the
error twice anymore if there is only one error.
2011-06-29 13:00:54 +02:00
Ned Deily 657b2de893 Issue #9516: Update Misc/NEWS. 2011-06-28 19:51:30 -07:00
Ned Deily 58f27b203c Issue #12141: Install a copy of template C module file so that
test_build_ext of test_distutils is no longer silently skipped when
run outside of a build directory.
2011-06-28 00:42:50 -07:00
Ned Deily 3eb67d58d6 Issue #8746: Correct faulty configure checks so that os.chflags() and
os.lchflags() are once again built on systems that support these
functions (*BSD and OS X).  Also add new stat file flags for OS X
(UF_HIDDEN and UF_COMPRESSED).  Also add additional tests for
os.chflags() and os.lchflags(). (Tests by Garrett Cooper)
2011-06-28 00:00:28 -07:00
Ned Deily 11f00f3b00 Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
on Mac OS X.  (Patch by Ronald Oussoren)
2011-06-27 23:12:20 -07:00
Ross Lagerwall dbfb9b89db Issue 12404: Remove C89 incompatible code from mmap module.
Patch by Akira Kitada.
2011-06-25 10:02:37 +02:00
Victor Stinner f1512a2967 Close #12383: Fix subprocess module with env={}: don't copy the environment
variables, start with an empty environment.
2011-06-21 17:18:38 +02:00
R David Murray e5e366c856 #11584: make Header and make_header handle binary unknown-8bit input
Analogous to the decode_header fix, this fix makes Header.append and
make_header correctly handle the unknown-8bit charset introduced by email5.1,
when the input to them is binary strings.  Previous to this fix the
make_header(decode_header(x)) == x invariant was broken in the face of the
unknown-8bit charset.
2011-06-18 12:57:28 -04:00
R David Murray 6bdb1769dc #11584: make decode_header handle Header objects correctly
This updates b21fdfa0019c, which fixed this bug incorrectly.
2011-06-18 12:30:55 -04:00
R David Murray c88bce1580 #11700: proxy object close methods can now be called multiple times
This makes them work like the close provided by regular file objects.
2011-06-17 22:24:05 -04:00
R David Murray 05ff990401 #11767: use context manager to close file in __getitem__ to prevent FD leak
All of the other methods in mailbox that create message objects take care to
close the file descriptors they use, so it seems to make sense to have
__getitem__ do so as well.

Patch by Filip Gruszczyński.
2011-06-17 12:54:56 -04:00
Victor Stinner a4c45d73cf Issue #12133: fix a ResourceWarning in urllib.request
AbstractHTTPHandler.do_open() of urllib.request closes the HTTP connection if
its getresponse() method fails with a socket error. Patch written by Ezio
Melotti.
2011-06-17 14:01:18 +02:00
Brian Curtin a87d586fd6 branch merge? 2011-06-13 16:10:32 -05:00
Brian Curtin d25aef55c8 Fix #12084. os.stat on Windows wasn't working properly with relative symlinks.
Use of DeviceIoControl to obtain the symlink path via the reparse tag was
removed. The code now uses GetFinalPathNameByHandle in the case of a
symbolic link and works properly given the added test which creates a symbolic
link and calls os.stat on it from multiple locations.

Victor Stinner also noticed an issue with os.lstat following the os.stat
code path when being passed bytes. The posix_lstat function was adjusted to
properly hook up win32_lstat instead of the previous STAT macro (win32_stat).
2011-06-13 15:16:04 -05:00
Benjamin Peterson 9620cc0463 allow "fake" filenames in findsource (closes #9284)
This allows findsource() to work in doctests.

A patch from Dirkjan Ochtman.
2011-06-11 15:53:11 -05:00
Benjamin Peterson 9aa68e4b32 merge 3.1 (#12009) 2011-06-10 12:29:40 -05:00
Benjamin Peterson 1df0f214a9 fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
R David Murray 4fbb9dbd34 #10694: zipfile now ignores garbage at the end of a zipfile.
Original fix by 'rep', final patch (with tests) by Xuanji Li.
2011-06-09 15:50:51 -04:00
R David Murray 0f663d07e6 #12283: Fixed regression in smtplib quoting of leading dots in DATA.
I unfortunately introduced the regression when I refactored the code,
and there were no tests of quoting so it wasn't caught.  Now there
is one.
2011-06-09 15:05:57 -04:00
Vinay Sajip 8168d10ea6 Issue #12168: SysLogHandler now allows NUL termination to be controlled using a new 'append_nul' attribute on the handler. 2011-06-09 16:50:49 +01:00
Brian Curtin 9c669ccc77 Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat.
By changing to the Windows GetFileAttributes API in nt._isdir we can figure
out if the path is a directory without opening the file via os.stat. This has
the minor benefit of speeding up os.path.isdir by at least 2x for regular
files and 10-15x improvements were seen on symbolic links (which opened the
file multiple times during os.stat). Since os.path.isdir is used in
several places on interpreter startup, we get a minor speedup in startup time.
2011-06-08 18:17:18 -05:00
Raymond Hettinger 3d89057ff8 Fix named tuples to work with vars(). 2011-06-02 23:40:24 -07:00
Benjamin Peterson 0aa71f7982 merge 3.1 (#12221) 2011-05-31 19:06:17 -05:00
Benjamin Peterson a22c98de85 simply use the Python version for pyexpat.__version__ #12221 2011-05-31 18:59:49 -05:00
Victor Stinner 87b9bc3893 Close #12085: Fix an attribute error in subprocess.Popen destructor if the
constructor has failed, e.g. because of an undeclared keyword argument. Patch
written by Oleg Oshmyan.
2011-06-01 00:57:47 +02:00
Victor Stinner ee49797c8d Issue #12057: Add tests for ISO 2022 codecs
iso2022_jp, iso2022_jp_2 and iso2022_kr
2011-05-31 00:01:24 +02:00
Victor Stinner 19c5233303 Issue #1195: fix the issue number of the NEWS entry 2011-05-30 23:50:04 +02:00
Victor Stinner 4f71101eed Issue #12016: my_fgets() now always clears errors before calling fgets(). Fix
the following case: sys.stdin.read() stopped with CTRL+d (end of file),
raw_input() interrupted by CTRL+c.
2011-05-30 23:46:00 +02:00
Benjamin Peterson 9a63745273 bump to 3.1.4rc1 2011-05-29 16:06:00 -05:00
Éric Araujo 4b8f6651f0 Branch merge 2011-05-29 18:05:53 +02:00
Ned Deily d5a91961dd Issue #12205: Fix test_subprocess failure due to uninstalled test data. 2011-05-29 02:39:02 -07:00
Éric Araujo f0ab5d6e7f Fix typos in Misc/NEWS 2011-05-29 03:43:59 +02:00
Ned Deily 6e5fd04ce2 Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
ensure "make install" creates symlinks in --prefix bin for the "-32"
files in the framework bin directory like the installer does.
2011-05-28 05:59:55 -07:00
Ned Deily 32b5cb0a66 Issue #985064: Make plistlib more resilient to faulty input plists.
Patch by Mher Movsisyan.
2011-05-28 03:02:30 -07:00
Ned Deily b8e59f77e6 Issue #985064: Make plistlib more resilient to faulty input plists.
Patch by Mher Movsisyan.
2011-05-28 02:19:19 -07:00
Ned Deily 056f5b9dad Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:36:12 -07:00
Ned Deily 9a7c524dc6 Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
2011-05-28 00:19:56 -07:00
Victor Stinner 988512cfd7 (Merge 3.1) Issue #12175: RawIOBase.readall() now returns None if read()
returns None.
2011-05-25 22:49:15 +02:00
Victor Stinner a80987f20d Issue #12175: RawIOBase.readall() now returns None if read() returns None. 2011-05-25 22:47:16 +02:00
Victor Stinner 4767114e77 (Merge 3.1) Issue #12175: FileIO.readall() now raises a ValueError instead of
an IOError if the file is closed.
2011-05-25 22:11:55 +02:00
Victor Stinner b79f28ccbd Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError if
the file is closed.
2011-05-25 22:09:03 +02:00
Victor Stinner 1273b7cd9c Issue #12070: Fix the Makefile parser of the sysconfig module to handle
correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
2011-05-24 23:37:07 +02:00
Victor Stinner d48ba0bde5 (Merge 3.1) Issue #12100: Don't reset incremental encoders of CJK codecs at
each call to their encode() method anymore, but continue to call the reset()
method if the final argument is True.
2011-05-24 22:22:17 +02:00
Victor Stinner 6bcbef7da0 Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
their encode() method anymore, but continue to call the reset() method if the
final argument is True.
2011-05-24 22:17:55 +02:00
Charles-François Natali cf057597e6 Issue #5715: In socketserver, close the server socket in the child process. 2011-05-24 18:27:25 +02:00
Charles-François Natali 7b54e7562d Issue #5715: In socketserver, close the server socket in the child process. 2011-05-24 18:23:15 +02:00
Benjamin Peterson f5fcd33be9 merge 3.1 2011-05-23 16:22:42 -05:00
Benjamin Peterson 7963a35b41 correctly lookup __dir__ 2011-05-23 16:11:05 -05:00