Commit Graph

6231 Commits

Author SHA1 Message Date
Antoine Pitrou 71cbafbda1 Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows. 2011-06-30 20:02:54 +02:00
Victor Stinner 3909da7fca (merge 3.2) Issue #12451: The XInclude default loader of xml.etree now decodes
files from UTF-8 instead of the locale encoding if the encoding is not
specified. It now also opens XML files for the parser in binary mode instead of
the text mode to avoid encoding issues.
2011-06-30 18:11:18 +02:00
Victor Stinner eaf399e335 Issue #12451: The XInclude default loader of xml.etree now decodes files from
UTF-8 instead of the locale encoding if the encoding is not specified. It now
also opens XML files for the parser in binary mode instead of the text mode to
avoid encoding issues.
2011-06-30 18:10:14 +02:00
Victor Stinner a0b12a1ca7 (merge 3.2) Issue #12451: doctest.debug_script() doesn't create a temporary
file anymore to avoid encoding issues (it used the locale encoding, whereas
UTF-8 should be).

Remove also an unused import (warnings).
2011-06-30 17:39:17 +02:00
Victor Stinner 12b8d14991 Issue #12451: doctest.debug_script() doesn't create a temporary file anymore to
avoid encoding issues (it used the locale encoding, whereas UTF-8 should be).

Remove also an unused import (warnings).
2011-06-30 17:35:55 +02:00
Victor Stinner 319672e8a6 (merge 3.2) Issue #12451: pydoc.synopsis() now reads the encoding cookie if
available, to read the Python script from the right encoding.
2011-06-30 15:58:29 +02:00
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 0b5e049ea0 (merge 3.2) 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:41:56 +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 e2185d714b (merge 3.2) 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:04:35 +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 044369fd52 Issue #9516: Update Misc/NEWS to include packaging. 2011-06-28 20:08:34 -07:00
Ned Deily 8c86d308a1 Issue #9516: Merge Distutils changes from 3.2 2011-06-28 20:01:52 -07:00
Ned Deily 657b2de893 Issue #9516: Update Misc/NEWS. 2011-06-28 19:51:30 -07:00
Ned Deily 4a1ec12999 Issue #12141: Install copies of template C module file so that
test_build_ext of test_distutils and test_command_build_ext of
test_packaging are no longer silently skipped when
run outside of a build directory.
2011-06-28 00:53:54 -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 8b56c4b1b8 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:13:01 -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 f6837aa171 Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
2.8 +  on Mac OS X.  (Patch by Ronald Oussoren)
2011-06-27 23:18:45 -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
Benjamin Peterson e90ec366fb don't memoize objects that are their own copies (closes #12422)
Patch mostly by Alex Gaynor.
2011-06-27 16:22:46 -05:00
Raymond Hettinger 29e2c64edd Issue #4608: urllib.request.urlopen does not return an iterable object 2011-06-26 14:30:25 +02:00
Raymond Hettinger 038018aaa4 Issue #4608: urllib.request.urlopen does not return an iterable object 2011-06-26 14:29:35 +02:00
Ross Lagerwall bc808224b6 Issue #12303: Add sigwaitinfo() and sigtimedwait() to the signal module. 2011-06-25 12:13:40 +02:00
Ross Lagerwall 1db37f3248 Merge with 3.2 (Issue #12404). 2011-06-25 10:11:44 +02: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
R David Murray fcb17e13da Merge #10206: add test for previously fixed bug. 2011-06-24 13:28:08 -04:00
R David Murray e697e3750f #10206: add test for previously fixed bug.
Patch by Francisco Martín Brugué.
2011-06-24 13:26:31 -04:00
Benjamin Peterson e109c70860 give the names of missing positional or keyword-only arguments (closes #12356) 2011-06-24 09:37:26 -05:00
R David Murray 749073af13 #1874: detect invalid multipart CTE and report it as a defect. 2011-06-22 13:47:53 -04:00
Victor Stinner 372b838db5 (merge 3.2) Close #12383: Fix subprocess module with env={}: don't copy the
environment variables, start with an empty environment.
2011-06-21 17:24:21 +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
Benjamin Peterson f5ff22329b use a invalid name for the __class__ closure for super() (closes #12370)
This prevents the assignment of __class__ in the class body from breaking
super. (Although a determined person could do locals()["@__class__"] = 4)
2011-06-19 19:42:22 -05:00
Éric Araujo 3e425ac64b packaging: Add the project directory to sys.path to support local setup hooks.
Original patch by Vinay Sajip on #11637.
2011-06-19 21:23:43 +02:00
Nick Coghlan 3b83ff6138 ACKS update for devguide patch (closes #12278) 2011-06-19 23:07:49 +10:00
R David Murray afc9a5eaa1 #6771: Move wrapper function into __init__ and eliminate wrapper module
Andrew agreed in the issue that eliminating the module file made sense.
Wrapper has only been exposed as a function, and so there is no (easy)
way to access the wrapper module, which in any case only had the one
function in it.  Since __init__ already contains a couple wrapper
functions, it seems to make sense to just move wrapper there instead of
importing it from a single function module.
2011-06-18 20:21:09 -04:00
R David Murray e76ff4081a merge #11584: make Header and make_header handle binary unknown-8bit input 2011-06-18 13:02:42 -04: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 7df08379c6 merge #11584: make decode_header handle Header objects correctly
This updates 12e39cd7a0e4 (merge of b21fdfa0019c), which fixed this bug
incorrectly.
2011-06-18 12:32:27 -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 953510560f merge #11700: proxy object close methods can now be called multiple times 2011-06-17 22:25:14 -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 4c7d21e2b3 merge #11767: use context manager to close file in __getitem__ to prevent FD leak 2011-06-17 12:56:41 -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 f073dc286c (Merge 3.2) 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:02:18 +02: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 c9d6a501db branch merge 2011-06-13 16:03:01 -05:00
Brian Curtin 3e86c99f90 Merge from 3.2 for Issue #12084. 2011-06-13 16:00:35 -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 3bbb722654 allow __dir__ to return any sequence 2011-06-11 16:12:08 -05:00
Benjamin Peterson 703f7c4bf5 merge 3.2 (#9284) 2011-06-11 15:56:46 -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
Éric Araujo bc18532eee Branch merge 2011-06-11 19:56:09 +02:00
Charles-François Natali a529308348 Issue #12287: In ossaudiodev, check that the device isn't closed in several
methods.
2011-06-11 18:58:24 +02:00
Benjamin Peterson acde6a0a40 onto 3.1.5 2011-06-11 11:33:01 -05:00
Benjamin Peterson d858df20d0 bump to 3.1.4 2011-06-11 09:58:58 -05:00
Éric Araujo 643cb7345f Allow multiple setup hooks in packaging’s setup.cfg files (#12240).
Original patch by Erik Bray.
2011-06-11 00:33:38 +02:00
Éric Araujo 3605030c9b Fix assorted bugs in packaging.util.cfg_to_args (#11595).
Original patch by Erik Bray.
2011-06-10 23:52:26 +02:00
Benjamin Peterson 49aaad3c47 merge heads 2011-06-10 12:32:07 -05:00
Benjamin Peterson ae10b3201c merge 3.2 (#12009) 2011-06-10 12:30:16 -05:00
Benjamin Peterson 9aa68e4b32 merge 3.1 (#12009) 2011-06-10 12:29:40 -05:00
Éric Araujo df55334d52 Branch merge 2011-06-10 18:34:45 +02:00
Benjamin Peterson 1df0f214a9 fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
Éric Araujo fa6cfbc4f7 Don’t try to install something when running from uninstalled source (#12246).
Original patch by Tshepang Lekhonkhobe.
2011-06-10 18:31:40 +02:00
R David Murray 51fcb811e3 Merge #10694: zipfile now ignores garbage at the end of a zipfile. 2011-06-09 15:52:31 -04: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 0a9f16b627 merge #12283: Fixed regression in smtplib quoting of leading dots in DATA. 2011-06-09 15:21:02 -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
R David Murray f97c59aaba #10424: argument names are now included in the missing argument message
Fix and initial test patch by Michele Orrù.
2011-06-09 12:34:07 -04:00
Vinay Sajip 8dd8d582e3 Merged fix for issue #12168 from 3.2. 2011-06-09 16:55:23 +01: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
Éric Araujo f5949b5e47 The change done for #10645 deserves a NEWS entry 2011-06-09 14:10:07 +02:00
Brian Curtin 9a82eaade3 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:43:57 -05: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
Charles-François Natali 4dd453c6aa Issue #12021: Make mmap's read() method argument optional. Patch by Petri
Lehtinen.
2011-06-08 19:18:14 +02:00
Antoine Pitrou dd69649660 Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
children and raises BrokenProcessPool in such a situation.  Previously it
would reliably freeze/deadlock.
2011-06-08 17:21:55 +02:00
Brett Cannon c5011fe227 When building sqlite3, the directory where sqlite.h was found was
always appended to the include directories regardless of whether it
was already in the list of directories. This could cause issue if
sqlite was installed in the same location as another install of
Python. Now a check is done to make sure the directory is not included
twice.
2011-06-06 20:09:10 -07:00
Antoine Pitrou 176f07dadf Issue #12040: Expose a new attribute `sentinel` on instances of
:class:`multiprocessing.Process`.  Also, fix Process.join() to not use
polling anymore, when given a timeout.
2011-06-06 19:35:31 +02:00
Antoine Pitrou f068ab8304 Issue #11893: Remove obsolete internal wrapper class `SSLFakeFile` in the smtplib module.
Patch by Catalin Iacob.
2011-06-06 19:17:09 +02:00
Benjamin Peterson b204a42383 greatly improve argument parsing error messages (closes #12265) 2011-06-05 22:04:07 -05:00
Gregory P. Smith d64b2bae9b merge heads. 2011-06-04 23:05:19 -07:00
Mark Dickinson 7ce0fa8775 Issue #12080: Fix a performance issue in Decimal._power_exact that causes some corner-case Decimal.__pow__ calls to take an unreasonably long time. 2011-06-04 18:14:23 +01:00
Éric Araujo 765e94f80c Add NEWS and whatsnew entries for the packaging module 2011-06-03 17:26:59 +02:00
Raymond Hettinger 22cc1183a3 merge 2011-06-02 23:49:44 -07:00
Raymond Hettinger 3d89057ff8 Fix named tuples to work with vars(). 2011-06-02 23:40:24 -07:00
Éric Araujo c0725162d5 Remove duplicate entry for Josip 2011-06-01 19:41:21 +02:00
Benjamin Peterson 8c6f88efa2 remove __version__s dependent on subversion keyword expansion (closes #12221) 2011-05-31 20:52:17 -05:00
Benjamin Peterson 9e3e1c6e4e merge 3.2 (#12221) 2011-05-31 19:07:45 -05: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 1b5b9d7434 (Merge 3.2) 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:58:57 +02: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
Benjamin Peterson 0bb2991653 add news note 2011-05-31 17:11:26 -05:00
Nick Coghlan 62ecb6aa0a Tidy up the additional string module tests added at the Pycon sprints (closes #11505) 2011-05-31 19:40:11 +10:00
Victor Stinner 1eb6d278a8 (Merge 3.2) Issue #12057: Add tests for ISO 2022 codecs
iso2022_jp, iso2022_jp_2 and iso2022_kr
2011-05-31 00:03:07 +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 4f1252dfbe (Merge 3.2) Issue #1195: fix the issue number of the NEWS entry 2011-05-30 23:50:34 +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 0c9f31b4c0 (Merge 3.2) 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:47:01 +02:00