Commit Graph

14989 Commits

Author SHA1 Message Date
Serhiy Storchaka b2564ce085 Issue #19085: Added basic tests for all tkinter widget options. 2013-11-02 10:44:55 +02:00
Serhiy Storchaka 758c521ea8 Issue #19085: Added basic tests for all tkinter widget options. 2013-11-02 10:41:48 +02:00
Brett Cannon f6901c8baa Issue #19410: Put back in special-casing of '' for
importlib.machinery.FileFinder.

While originally moved to stop special-casing '' as PathFinder farther
up the typical call chain now uses the cwd in the instance of '', it
was deemed an unnecessary risk to breaking subclasses of FileFinder to
take the special-casing out.
2013-11-01 10:37:57 -04:00
Eric Snow cdf601281f Issue #19413: Restore pre-3.3 reload() semantics of re-finding modules. 2013-10-31 22:22:15 -06:00
Benjamin Peterson c99874da83 merge 3.3 (#19435) 2013-10-30 12:51:16 -04:00
Benjamin Peterson a50f89954d merge 3.2 (#19435) 2013-10-30 12:50:18 -04:00
Benjamin Peterson 35aca89617 merge 3.1 (#19435) 2013-10-30 12:48:59 -04:00
Benjamin Peterson 04e9de40f3 use the collapsed path in the run_cgi method (closes #19435) 2013-10-30 12:43:09 -04:00
Victor Stinner a4c704b260 Issue #19424: Fix the warnings module to accept filename containing surrogate
characters.
2013-10-29 23:43:41 +01:00
Ned Deily ab457a2193 Issue #19373: Add Misc/NEWS entry. 2013-10-29 15:00:48 -07:00
Antoine Pitrou 84745ab464 Issue #17936: Fix O(n**2) behaviour when adding or removing many subclasses of a given type. 2013-10-29 21:31:25 +01:00
Christian Heimes ee0bac66b2 Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding
It is causing trouble like e.g. hanging processes.
2013-10-29 21:11:55 +01:00
Georg Brandl b3acaccf27 Transplant of rev 544b654d000c: directory traversal attack in CGIHttpRequestHandler. 2013-11-11 06:10:23 +01:00
Ned Deily 85b8be1ac8 Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.3.3.
Some third-party projects, such as matplotlib and PIL/Pillow,
depended on being able to build with Tcl and Tk frameworks in
/Library/Frameworks.  They were unable to build with the built-in
Tcl/Tk and/or execute correctly.
2013-11-05 02:44:17 -08:00
Christian Heimes db816d6546 Issue #19420: Fix reference leak in module initalization code of _hashopenssl.c 2013-10-29 12:14:55 +01:00
Victor Stinner 73660af6af Issue #19428: zipimport now handles errors when reading truncated or invalid
ZIP archive.
2013-10-29 01:43:44 +01:00
Victor Stinner 41bb43a71e Issue #18408: Add a new PyFrame_FastToLocalsWithError() function to handle
exceptions when merging fast locals into f_locals of a frame.
PyEval_GetLocals() now raises an exception and return NULL on failure.
2013-10-29 01:19:37 +01:00
Nadeem Vawda 3797065ac5 #19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).
The underlying C libraries provide no mechanism for serializing compressor and
decompressor objects, so actually pickling these classes is impractical.
Previously, these objects would be pickled without error, but attempting to use
a deserialized instance would segfault the interpreter.
2013-10-28 21:35:23 +01:00
Georg Brandl 9b513bf6ca Add news entry for 3.3.3 final. 2013-10-28 08:06:50 +01:00
Georg Brandl ba4e58a021 Add NEWS header for 3.3.4. 2013-10-28 08:05:26 +01:00
Tim Golden bb4b0aa51b Issue 15792 Correct build options on Win64. Patch by Jeremy Kloth. 2013-10-27 20:04:12 +00:00
Georg Brandl 2d34f41bee Bump to 3.3.3rc1. 2013-10-27 09:22:59 +01:00
Georg Brandl 81be27d53e Issue #19227: Try to fix deadlocks caused by re-seeding then OpenSSL
pseudo-random number generator on fork().
2013-10-27 07:56:11 +01:00
Georg Brandl bf3f8eb960 Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more than
100 headers are read.  Adapted from patch by Jyrki Pulliainen.
2013-10-27 07:34:48 +01:00
Georg Brandl 28e78414f9 Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
prevent readline() calls from consuming too much memory.  Patch by Jyrki
Pulliainen.
2013-10-27 07:29:47 +01:00
Georg Brandl 7e27abbb39 Issue #16041: CVE-2013-1752: poplib: Limit maximum line lengths to 2048 to
prevent readline() calls from consuming too much memory.  Patch by Jyrki
Pulliainen.
2013-10-27 07:23:53 +01:00
Georg Brandl 72c98d3a76 Issue #17997: Change behavior of ``ssl.match_hostname()`` to follow RFC 6125,
for security reasons.  It now doesn't match multiple wildcards nor wildcards
inside IDN fragments.
2013-10-27 07:16:53 +01:00
Georg Brandl ca580f4ec1 Issue #16039: CVE-2013-1752: Change use of readline in imaplib module to limit
line length.  Patch by Emil Lind.
2013-10-27 06:52:14 +01:00
Benjamin Peterson 89d8cd943b just return toplevel symbol table rather than all blocks (closes #19393) 2013-10-26 13:13:51 -04:00
Victor Stinner 2ff68dd526 Close #19339: telnetlib module is now using time.monotonic() when available to
compute timeout.
2013-10-26 09:16:29 +02:00
Ned Deily 3d2f68d242 Issue #19400: Prevent extension module build failures with Xcode 5 on OS X
10.8+ when using a universal Python that included a PPC architecture,
such as with a python.org 32-bit-only binary installer.
2013-10-25 16:03:35 -07:00
Brett Cannon 6fd25c39c4 Issue #19392: Document that imp.reload() now relies on __loader__
being defined on top of __name__.
2013-10-25 13:46:15 -04:00
Larry Hastings dfcd46769b Issue #19390: Argument Clinic no longer accepts malformed Python and C ids. 2013-10-27 02:49:39 -07:00
Georg Brandl fb404f528a #19227: merge with 3.3 2013-10-27 07:57:42 +01:00
Georg Brandl b89b5df9c9 merge with 3.3 2013-10-27 07:46:09 +01:00
Serhiy Storchaka 68457be619 Issue #19329: Optimized compiling charsets in regular expressions. 2013-10-27 08:20:29 +02:00
Benjamin Peterson 77353664e2 merge 3.3 (#19393) 2013-10-26 13:22:08 -04:00
Nick Coghlan 059def58a5 Close #19330 by using public classes in contextlib
- added test cases to ensure docstrings are reasonable
- also updates various comments in contextlib for accuracy
- identifed #19404 as an issue making it difficult to provide
  good help output on generator based context manager instances
2013-10-26 18:08:15 +10:00
Serhiy Storchaka 9eabac68a3 Issue #18685: Restore re performance to pre-PEP 393 levels. 2013-10-26 10:45:48 +03:00
Serhiy Storchaka ffb58e96f1 Move Misc/NEWS entries in correct secton. 2013-10-26 10:42:09 +03:00
Victor Stinner ebca392a6c (Merge 3.3) Close #19339: telnetlib module is now using time.monotonic() when
available to compute timeout.
2013-10-26 09:20:38 +02:00
Tim Peters e5bb0bf04d Issue #19399: fix sporadic test_subprocess failure.
Change Thread.join() with a negative timeout to just return.  The
behavior isn't documented then, but this restores previous
behavior.
2013-10-25 20:46:51 -05:00
Tim Golden 0fb23a23f1 Issue13234 Credit Santoso for the patch and add NEWS item 2013-10-25 21:21:20 +01:00
Antoine Pitrou 3b2f0f0459 Issue #19375: The site module adding a "site-python" directory to sys.path, if it exists, is now deprecated. 2013-10-25 21:39:26 +02:00
Tim Golden 23005084ad Issue4905: use INVALID_FILE_ATTRIBUTES where appropriate. (Patch by Ulrich Eckhardt) 2013-10-25 11:22:37 +01:00
Ned Deily 4b7a023149 Issue #19019: Change the OS X installer build script to use CFLAGS instead
of OPT for special build options.  By setting OPT, some compiler-specific
options like -fwrapv were overridden and thus not used, which could result
in broken interpreters when building with clang.
2013-10-25 00:46:02 -07:00
Ned Deily 5b3582c919 Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+
64-bit/32-bit installer for 10.6+.  It is no longer necessary
to install a third-party version of Tcl/Tk 8.5 to work around the
problems in the Apple-supplied Tcl/Tk 8.5 shipped in OS X 10.6
and later releases.
2013-10-25 00:41:46 -07:00
Ned Deily 65657c27fa Issue #1584: Provide options to override default search paths for Tcl and Tk
when building _tkinter.  configure has two new options; if used, both must
be specified:

  ./configure \
      --with-tcltk-includes="-I/opt/local/include" \
      --with-tcltk-libs="-L/opt/local/lib -ltcl8.5 -ltk8.5"

In addition, the options can be overridden with make:

   make \
       TCLTK_INCLUDES="-I/opt/local/include" \
       TCLTK_LIBS="-L/opt/local/lib -ltcl8.6 -ltk8.6"
2013-10-25 00:34:44 -07:00
Christian Heimes 349b04e902 Issue 19384: Fix test_py_compile for root user, patch by Claudiu Popa. 2013-10-25 09:21:51 +02:00
Serhiy Storchaka 4f056d43d6 Issue #19288: Fixed the "in" operator of dbm.gnu databases for string
argument.  Original patch by Arfrever Frehtes Taifersar Arahesis.
2013-10-25 00:08:13 +03:00
Serhiy Storchaka 7d6392c517 Issue #19288: Fixed the "in" operator of dbm.gnu databases for string
argument.  Original patch by Arfrever Frehtes Taifersar Arahesis.
2013-10-25 00:06:52 +03:00
Serhiy Storchaka 124a0b314b Issue #19287: Fixed the "in" operator of dbm.ndbm databases for string
argument.  Original patch by Arfrever Frehtes Taifersar Arahesis.
2013-10-25 00:01:25 +03:00
Serhiy Storchaka 9da33ab193 Issue #19287: Fixed the "in" operator of dbm.ndbm databases for string
argument.  Original patch by Arfrever Frehtes Taifersar Arahesis.
2013-10-24 23:59:28 +03:00
Antoine Pitrou 7cb11fa890 Close #19379: Lazily import linecache in the warnings module, to make startup with warnings faster until a warning gets printed. 2013-10-24 22:23:42 +02:00
Serhiy Storchaka f740d467bf Issue #19369: Optimized the usage of __length_hint__(). 2013-10-24 23:19:51 +03:00
Serhiy Storchaka 8b150ecfc9 Issue #19327: Fixed the working of regular expressions with too big charset. 2013-10-24 22:04:37 +03:00
Serhiy Storchaka be80fc9a84 Issue #19327: Fixed the working of regular expressions with too big charset. 2013-10-24 22:02:58 +03:00
Peter Moody e5019d5183 #17400: correct handling of 100.64.0.0/10, fixing the docs and updating NEWS 2013-10-24 09:47:10 -07:00
Senthil Kumaran a46079e853 merge from 3.3: Increase the test coverage of macurl2path module. Patch by Colin Williams. 2013-10-23 21:55:35 -07:00
Senthil Kumaran b82a3dc240 Increase the coverage of macurl2path. Patch by Colin Williams. 2013-10-23 21:50:56 -07:00
Serhiy Storchaka 9c15ec1ce6 Issue #19365: Optimized the parsing of long replacement string in re.sub*()
functions.
2013-10-23 22:27:52 +03:00
Antoine Pitrou 4d397008cd Issue #19356: Avoid using a C variabled named "_self", it's a reserved word in some C compilers. 2013-10-23 19:21:55 +02:00
Antoine Pitrou 09fcb72048 Issue #19356: Avoid using a C variabled named "_self", it's a reserved word in some C compilers. 2013-10-23 19:20:21 +02:00
Antoine Pitrou 6c6b3f770d Issue #19352: Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv). 2013-10-23 19:15:05 +02:00
Antoine Pitrou d5d0bc35ad Issue #19352: Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv). 2013-10-23 19:11:29 +02:00
Antoine Pitrou 3d3e1ba8ac Issue #19340: Fix test_sysconfig when Python is built with an empty prefix.
Patch by Sunny K.
2013-10-23 19:08:07 +02:00
Antoine Pitrou dde25c4851 Issue #19340: Fix test_sysconfig when Python is built with an empty prefix.
Patch by Sunny K.
2013-10-23 19:07:40 +02:00
Tim Golden a4df90ceb9 Issue #15207: Fix mimetypes to read from correct area in Windows registry (Original patch by Dave Chambers) 2013-10-22 20:03:47 +01:00
Tim Golden 27a856495e Issue #15207: Fix mimetypes to read from correct area in Windows registry (Original patch by Dave Chambers) 2013-10-22 19:27:34 +01:00
Larry Hastings d0a7e67804 Merge 3.4.0a4 release head back into trunk. 2013-10-22 10:49:20 -07:00
Larry Hastings e0d9a1c8bc Post-release updates for 3.4.0a4. 2013-10-22 10:44:35 -07:00
Christian Heimes b7bd5df809 Issue #16595: Add prlimit() to resource module
prlimit() is a Linux specific command that combines setrlimit, getrlimit and can set the limit
of other processes.
2013-10-22 11:21:54 +02:00
Christian Heimes 6fc79bf813 Issue #19324: Expose Linux-specific constants in resource module 2013-10-22 11:09:27 +02:00
Christian Heimes d1d7576fb4 Fix Misc/NEWS merge conflict, hurray 2013-10-22 10:45:31 +02:00
Christian Heimes efa48676d5 Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
Python executable and not removed by the linker's optimizer.
2013-10-22 10:23:12 +02:00
Christian Heimes 49e61806f5 Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the
Python executable and not removed by the linker's optimizer.
2013-10-22 10:22:29 +02:00
Peter Moody 8ed30c15e8 #17400; NEWS and ipaddress.rst change 2013-10-21 16:16:51 -07:00
Christian Heimes b7ddbc855c Load SSL's error strings in hashlib.
Without ERR_load_crypto_strings() functions like ERR_lib_error_string() return NULL.
2013-10-21 19:48:22 +02:00
Christian Heimes c20bcde58d Issue #18527: Upgrade internal copy of zlib to 1.2.8 2013-10-21 12:03:09 +02:00
Georg Brandl a606542e95 #19274: use captured_stdout() in the test suite; add NEWS entry. 2013-10-21 08:29:29 +02:00
Guido van Rossum 7be5d7d0e0 Issue 19306: Add extra hints to faulthandler stack dumps that they are upside down. 2013-10-20 18:21:02 -07:00
Ezio Melotti 5c16c2eb45 #8964: merge with 3.3. 2013-10-21 03:05:46 +03:00
Ezio Melotti f076f53386 #8964: fix platform._sys_version to handle IronPython 2.6+. 2013-10-21 03:03:32 +03:00
Ezio Melotti 566a2be95c #18958: Improve error message for json.load(s) while passing a string that starts with a UTF-8 BOM. 2013-10-21 02:10:55 +03:00
Ezio Melotti a0e768ccc2 #19307: Improve error message for json.load(s) while passing objects of the wrong type. 2013-10-21 01:52:33 +03:00
Andrew Kuchling e5a3154c63 Grammar fix 2013-10-20 15:53:08 -04:00
Serhiy Storchaka 2acc456c33 Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
limiting the call to readline().  Original patch by Michał
Jastrzębski and Giampaolo Rodola.
2013-10-20 17:02:10 +03:00
Serhiy Storchaka c30b178cbc Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
limiting the call to readline().  Original patch by Michał
Jastrzębski and Giampaolo Rodola.
2013-10-20 16:58:27 +03:00
Serhiy Storchaka 36af10c1f7 Issue #17087: Improved the repr for regular expression match objects. 2013-10-20 13:13:31 +03:00
Larry Hastings bd61c3ae1f Version bump for 3.4.0a4. 2013-10-20 02:01:29 -07:00
Antoine Pitrou e55013febe Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX.
Patch by David Edelsohn.
2013-10-19 22:06:26 +02:00
Antoine Pitrou 0abb21884c Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX.
Patch by David Edelsohn.
2013-10-19 22:05:05 +02:00
Benjamin Peterson 3d9e481ece give explicitly global functions and classes a global __qualname__ (closes #19301) 2013-10-19 16:01:13 -04:00
Larry Hastings f5e987bbe6 Issue #18606: Add the new "statistics" module (PEP 450). Contributed
by Steven D'Aprano.
2013-10-19 11:50:09 -07:00
Serhiy Storchaka eaea5e9107 Issue #12866: The audioop module now supports 24-bit samples. 2013-10-19 21:10:46 +03:00
Serhiy Storchaka c679227e31 Issue #1772673: The type of `char*` arguments now changed to `const char*`. 2013-10-19 21:03:34 +03:00
Serhiy Storchaka 55e092f545 Issue #19279: UTF-7 decoder no more produces illegal strings. 2013-10-19 20:39:28 +03:00
Serhiy Storchaka 35804e4c63 Issue #19279: UTF-7 decoder no more produces illegal strings. 2013-10-19 20:38:19 +03:00
Nick Coghlan 8608d26e81 contextlib doc updates and refactoring
- explain single use, reusable and reentrant in docs
- converted suppress to a reentrant class based impl
- converted redirect_stdout to a reusable impl
- moved both suppress and redirect_stdout behind a functional
  facade
- added reentrancy tests for the updated suppress
- added reusability tests for the updated redirect_stdio
- slightly cleaned up an exception from contextmanager
2013-10-20 00:30:51 +10:00
Christian Heimes fcd8de2d86 lower case pbkdf2_hmac 2013-10-19 14:24:03 +02:00
Christian Heimes 3626a505db Issue #19254: Provide an optimized Python implementation of PBKDF2_HMAC 2013-10-19 14:12:02 +02:00
Larry Hastings 3182680210 Issue #16612: Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code.  (See PEP 436.)
2013-10-19 00:09:25 -07:00
Ned Deily 29eec66711 Issue #19019: Change the OS X installer build script to use CFLAGS instead
of OPT for special build options.  By setting OPT, some compiler-specific
options like -fwrapv were overridden and thus not used, which could result
in broken interpreters when building with clang.
2013-10-18 21:16:05 -07:00
Ned Deily 87adb6ef38 Issue #14499: Fix several problems with OS X universal build support:
1. ppc arch detection for extension module builds broke with Xcode 5
    2. ppc arch detection in configure did not work on OS X 10.4
    3. -sysroot and -arch flags were unnecessarily duplicated
    4. there was no obvious way to configure an intel-32 only build.
2013-10-18 21:09:56 -07:00
Ned Deily ea41d5f27c Issue #15663: Update OS X installer to use Tcl/Tk 8.5.15. 2013-10-18 20:49:27 -07:00
Nadeem Vawda ee1be99e05 Issue #19222: Add support for the 'x' mode to the gzip module.
Original patch by Tim Heaney.
2013-10-19 00:11:13 +02:00
Nadeem Vawda 8a9e99cffc Issue #19223: Add support for the 'x' mode to the bz2 module.
Patch by Tim Heaney and Vajrasky Kok.
2013-10-19 00:11:06 +02:00
Nadeem Vawda 42ca98217c Issue #19201: Add support for the 'x' mode to the lzma module.
Patch by Tim Heaney and Vajrasky Kok.
2013-10-19 00:06:19 +02:00
Brett Cannon baced5668a Fix a refleak in _sre 2013-10-18 14:03:16 -04:00
Brett Cannon 1830601cc1 Add NEWS entry for issue #18810 2013-10-18 13:29:04 -04:00
Brett Cannon 27e27f7ee1 Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
and stop importlib.machinery.FileFinder treating '' as '.'.

Previous PathFinder transformed '' into '.' which led to __file__ for
modules imported from the cwd to always be relative paths. This meant
the values of the attribute were wrong as soon as the cwd changed.
This change now means that as long as the site module is run (which
makes all entries in sys.path absolute) then all values for __file__
will also be absolute unless it's for __main__ when specified by file
path in a relative way (modules imported by runpy will have an
absolute path).

Now that PathFinder is no longer treating '' as '.' it only makes
sense for FileFinder to stop doing so as well. Now no transformation
is performed for the directory given to the __init__ method.

Thanks to Madison May for the initial patch.
2013-10-18 11:39:04 -04:00
Serhiy Storchaka 87efae2d16 Remove redundant empty lines. 2013-10-18 17:17:31 +03:00
Serhiy Storchaka 90b41f0281 Remove redundant empty lines. 2013-10-18 17:16:40 +03:00
Serhiy Storchaka b39d247ad7 Remove a duplicate. 2013-10-18 17:05:41 +03:00
Ethan Furman 63c141cacd Close #19030: inspect.getmembers and inspect.classify_class_attrs
Order of search is now:
  1. Try getattr
  2. If that throws an exception, check __dict__ directly
  3. If still not found, walk the mro looking for the eldest class that has
     the attribute (e.g. things returned by __getattr__)
  4. If none of that works (e.g. due to a buggy __dir__, __getattr__, etc.
     method or missing __slot__ attribute), ignore the attribute entirely.
2013-10-18 00:27:39 -07:00
Ethan Furman 0e0cd46227 Catching up on NEWS entries.
I'll make sure and include them in future patches.
2013-10-17 19:34:12 -07:00
Guido van Rossum 27b7c7ebf1 Initial checkin of asyncio package (== Tulip, == PEP 3156). 2013-10-17 13:40:50 -07:00
Serhiy Storchaka 5b37f97ea5 Issue #19276: Fixed the wave module on 64-bit big-endian platforms. 2013-10-17 23:05:19 +03:00
Serhiy Storchaka d3b750516f Issue #19276: Fixed the wave module on 64-bit big-endian platforms. 2013-10-17 23:04:04 +03:00
Nick Coghlan 240f86d7dd Close #19266: contextlib.ignore -> contextlib.suppress
Patch by Zero Piraeus.
2013-10-17 23:40:57 +10:00
Nick Coghlan 7d270ee05d Issue #16129: Add `Py_SetStandardStreamEncoding`
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.

Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.

(Initial patch by Bastien Montagne)
2013-10-17 22:35:35 +10:00
Christian Heimes 86823a52fc Issue #19275: Fix test_site on AMD64 Snow Leopard 2013-10-17 13:40:00 +02:00
R David Murray 3da240fd01 #18891: Complete new provisional email API.
This adds EmailMessage and, MIMEPart subclasses of Message
with new API methods, and a ContentManager class used by
the new methods.  Also a new policy setting, content_manager.

Patch was reviewed by Stephen J. Turnbull and Serhiy Storchaka,
and reflects their feedback.

I will ideally add some examples of using the new API to the
documentation before the final release.
2013-10-16 22:48:40 -04:00
Serhiy Storchaka 25324971fb Issue #18468: The re.split, re.findall, and re.sub functions and the group()
and groups() methods of match object now always return a string or a bytes
object.
2013-10-16 12:46:28 +03:00
Antoine Pitrou 355dda8d17 Issue #14407: Fix unittest test discovery in test_concurrent_futures. 2013-10-15 23:24:44 +02:00
Antoine Pitrou 9816a1e643 Issue #14407: Fix unittest test discovery in test_concurrent_futures. 2013-10-15 23:23:32 +02:00
Serhiy Storchaka acc9f3fb16 Issue #18725: The textwrap module now supports truncating multiline text. 2013-10-15 21:22:54 +03:00
Serhiy Storchaka b6ca62acab Issue #17221: Merge 3.4.0 Alpha 1 entries before and after 3.3.1 release candidate 1. 2013-10-15 12:05:57 +03:00
Serhiy Storchaka 6c64f23340 Merge heads 2013-10-13 23:22:09 +03:00
Antoine Pitrou 881bfba204 Remove unexpected headings from Misc/NEWS 2013-10-13 22:13:56 +02:00
Serhiy Storchaka 98b28fddd8 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:12:09 +03:00
Serhiy Storchaka bfdcd436f0 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:09:14 +03:00
Antoine Pitrou 6039db8de3 Issue #18776: atexit callbacks now display their full traceback when they raise an exception. 2013-10-13 21:54:15 +02:00
Antoine Pitrou 24201d497c Issue #18776: atexit callbacks now display their full traceback when they raise an exception. 2013-10-13 21:53:13 +02:00
Georg Brandl a8fc7f6fac #18714: add attribution. 2013-10-13 20:56:25 +02:00
Georg Brandl 6e22055ee1 pdb: modernize find_function() and add tests for it.
Closes #18714.
2013-10-13 20:51:47 +02:00
Serhiy Storchaka 5fa41f1d1e Merge heads 2013-10-13 18:11:11 +03:00
Serhiy Storchaka 8362006132 Merge heads 2013-10-13 18:11:05 +03:00
Serhiy Storchaka eb7414fc29 Issue #18919: Unified and extended tests for audio modules: aifc, sunau and
wave.
2013-10-13 18:06:45 +03:00
Nick Coghlan e206b6e10e Issue #17827: document codecs.encode and codecs.decode
- Merge from 3.3
- Added to What's New since these are more important in 3.x,
  as the bytes<->bytes and str<->str codecs don't fit the
  text model convenience methods in 3.x the way they did the
  basestring<->basestring methods in the 2.x text model
- Included under Library in Misc/NEWS for the same reason
2013-10-14 00:55:46 +10:00
Serhiy Storchaka 1b80e63d70 Issue #18919: Unified and extended tests for audio modules: aifc, sunau and
wave.
2013-10-13 17:55:07 +03:00
Nick Coghlan 6cb2b5b1e1 Issue #17827: Document codecs.encode and codecs.decode 2013-10-14 00:22:13 +10:00
Christian Heimes f1dc3ee16d Issue #19218: Rename collections.abc to _collections_abc in order to speed up interpreter start 2013-10-13 02:04:20 +02:00
Christian Heimes e92ef13b0a Issue #18582: Add 'pbkdf2_hmac' to the hashlib module. 2013-10-13 00:52:43 +02:00
Ned Deily 5d4121a631 Issue #18458: Prevent crashes with newer versions of libedit. Its readline
emulation has changed from 0-based indexing to 1-based like gnu readline.
Original patch by Ronald Oussoren.
2013-10-12 15:47:58 -07:00
Antoine Pitrou d01d396e7f Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py".
("make smelly" now clean)
2013-10-12 22:52:43 +02:00
Antoine Pitrou 3974d6abb2 Forgot NEWS entry for previous commit. 2013-10-12 22:26:28 +02:00
Serhiy Storchaka e23b2d06c7 Issue #18919: If the close() method of a writer in the sunau or wave module
failed, second invocation of close() and destructor no more raise an
exception.
2013-10-12 21:36:10 +03:00
Serhiy Storchaka 4ae423ded4 Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
2013-10-12 18:23:21 +03:00
Serhiy Storchaka 4b5325963b Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
2013-10-12 18:21:33 +03:00
Christian Heimes 2582762b1b Issue #19209: Remove import of copyreg from the os module to speed up
interpreter startup. stat_result and statvfs_result are now hard-coded to
reside in the os module.
The patch is based on Victor Stinner's patch.
2013-10-12 01:27:08 +02:00
Christian Heimes 8c9cd5a3d4 Issue #19205: Don't import the 're' module in site and sysconfig module to
to speed up interpreter start.
2013-10-12 00:24:55 +02:00
Antoine Pitrou fd4722cacf Issue #9548: Add a minimal "_bootlocale" module that is imported by the _io module instead of the full locale module. 2013-10-12 00:13:50 +02:00
Raymond Hettinger 1254b407ac Rename contextlib.ignored() to contextlib.ignore(). 2013-10-10 22:39:39 -07:00
Benjamin Peterson 94d08d908b upgrade unicode db to 6.3.0 (closes #19221) 2013-10-10 17:24:45 -04:00
R David Murray 78d692f98e 18764: remove the problematic 'print' alias for the PDB 'p' command.
So that it no longer shadows the print function.

Patch by Connor Osborn, doc and test changes by R. David Murray.
2013-10-10 17:23:26 -04:00
Victor Stinner 2fe9bac4dc Close #16742: Fix misuse of memory allocations in PyOS_Readline()
The GIL must be held to call PyMem_Malloc(), whereas PyOS_Readline() releases
the GIL to read input.

The result of the C callback PyOS_ReadlineFunctionPointer must now be a string
allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL if an error
occurred), instead of a string allocated by PyMem_Malloc() or PyMem_Realloc().

Fixing this issue was required to setup a hook on PyMem_Malloc(), for example
using the tracemalloc module.

PyOS_Readline() copies the result of PyOS_ReadlineFunctionPointer() into a new
buffer allocated by PyMem_Malloc(). So the public API of PyOS_Readline() does
not change.
2013-10-10 16:18:20 +02:00
Raymond Hettinger 088cbf2d39 Issue #15805: Add contextlib.redirect_stdout() 2013-10-10 00:46:57 -07:00
Tim Peters a61a1cb084 Repair format of NEWS entry. 2013-10-09 13:29:42 -05:00
Tim Peters 3415fa3c6e Repair format of NEWS entry. 2013-10-09 13:27:36 -05:00
Tim Peters 5aaddd9250 Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. 2013-10-09 13:21:46 -05:00
Tim Peters cbd4d08880 Issue 19158: a rare race in BoundedSemaphore could allow .release() too often. 2013-10-09 13:19:21 -05:00
Victor Stinner 8d19767403 Close #19199: Remove ``PyThreadState.tick_counter`` field 2013-10-09 14:53:01 +02:00
Antoine Pitrou 1cfa0ba883 Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least one place so as to avoid regressions. 2013-10-07 20:40:59 +02:00
Antoine Pitrou 59c900d3bf Fix macro expansion of _PyErr_OCCURRED(), and make sure to use it in at least one place so as to avoid regressions. 2013-10-07 20:38:51 +02:00
Georg Brandl 7c679514a5 merge with 3.3 2013-10-06 21:23:26 +02:00
Georg Brandl c377fe2b96 Closes #1215: document better why it is not a good idea to catch e.g. SIGSEGV and refer to faulthandler.
Patch by Martin Pool.
2013-10-06 21:22:42 +02:00
Serhiy Storchaka 992cf1dd59 Issue #18972: Modernize email examples and use the argparse module in them. 2013-10-06 11:45:25 +03:00
Antoine Pitrou 5df8a8a1fd Issue #19087: Improve bytearray allocation in order to allow cheap popping of data at the front (slice deletion). 2013-10-05 21:12:18 +02:00
Ezio Melotti 93d7dda914 #19148: fix markup errors and wording in enum docs. Patch by Esa Peuha. 2013-10-05 04:13:18 +03:00
Brett Cannon 1448ecf470 Issue #18716: Deprecate the formatter module 2013-10-04 11:38:59 -04:00
Eric Snow 5c4b4c530f [issue19152] Revert 832579dbafd6. 2013-10-03 15:03:29 -06:00
Eric Snow b6b3492317 Fix typo. 2013-10-03 14:39:39 -06:00
Eric Snow 48b42ecd0f Fix typo. 2013-10-03 14:37:55 -06:00
Eric Snow bf14dccc4d [issue19151] Fix issue number in Misc/NEWS entry. 2013-10-03 12:45:04 -06:00
Eric Snow af8566c847 [issue19152] Add ExtensionFileLoader.get_filename(). 2013-10-03 12:08:55 -06:00
Eric Snow 5179445520 [issue19152] Add ExtensionFileLoader.get_filename(). 2013-10-03 12:08:55 -06:00
Eric Snow efbc475278 [issue19151] Fix docstring and use of _get_suppported_file_loaders() to reflect 2-tuples. 2013-10-03 12:08:55 -06:00
Eric Snow e8bbfebee0 [issue19951] Fix docstring and use of _get_suppported_file_loaders() to reflect 2-tuples. 2013-10-03 12:08:55 -06:00
Antoine Pitrou 0e61ed8400 Issue #19014: memoryview.cast() is now allowed on zero-length views. 2013-10-03 19:56:54 +02:00
Antoine Pitrou 60b183407c Issue #19014: memoryview.cast() is now allowed on zero-length views. 2013-10-03 19:55:41 +02:00
Serhiy Storchaka 026af2a597 Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. 2013-10-03 12:10:49 +03:00
Serhiy Storchaka def0a4c298 Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. 2013-10-03 12:08:38 +03:00
Nick Coghlan fdf239a855 Close #17839: support bytes-like objects in base64 module
This mostly affected the encodebytes and decodebytes function
(which are used by base64_codec)

Also added a test to ensure all bytes-bytes codecs can handle
memoryview input and tests for handling of multidimensional
and non-bytes format input in the modern base64 API.
2013-10-03 00:43:22 +10:00
Nick Coghlan 45163ccce4 Close #18690: register memoryview with Sequence ABC 2013-10-02 22:31:47 +10:00
Nick Coghlan a0f169cde8 Close #19078: memoryview now supports reversed
Patch by Claudiu Popa
2013-10-02 22:06:54 +10:00
Serhiy Storchaka 7c411a4041 Issue #19132: The pprint module now supports compact mode. 2013-10-02 11:56:18 +03:00
Serhiy Storchaka 092bd388ce Issue #19137: The pprint module now correctly formats instances of set and
frozenset subclasses.
2013-10-02 11:43:30 +03:00
Serhiy Storchaka 51844384f4 Issue #19137: The pprint module now correctly formats instances of set and
frozenset subclasses.
2013-10-02 11:40:49 +03:00
Raymond Hettinger 224c87d60c Issue #18594: Fix the fallback path in collections.Counter(). 2013-10-01 21:36:09 -07:00
Nick Coghlan f05d981f58 Close #10042: functools.total_ordering now handles NotImplemented
(Patch by Katie Miller)
2013-10-02 00:02:03 +10:00
Nick Coghlan e6f4631f08 Merge #19092 from 3.3 2013-10-01 23:28:00 +10:00
Nick Coghlan 1a33b2f35b Close #19092: ExitStack now reraises exceptions from __exit__
Report and patch by Hrvoje Nikšić
2013-10-01 23:24:56 +10:00
Raymond Hettinger c13516b0a0 merge 2013-10-01 01:00:59 -07:00
Raymond Hettinger 2ff2190b62 Issue #18594: Fix the fast path for collections.Counter().
The path wasn't being taken due to an over-restrictive type check.
2013-10-01 00:55:43 -07:00
Antoine Pitrou 6a9c0e50a9 Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except when necessary.
Patch by Oscar Benjamin.
2013-09-30 22:29:48 +02:00
Antoine Pitrou 3c678c33a7 Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except when necessary.
Patch by Oscar Benjamin.
2013-09-30 22:28:10 +02:00
Larry Hastings d92af0f1d9 Merge 3.4.0a3 release changes. 2013-09-30 01:13:32 +01:00
Larry Hastings e9cbd181a2 Post-version release cleanup. 2013-09-30 01:09:55 +01:00
Antoine Pitrou 5d23e6d543 Issue #5845: In site.py, only load readline history from ~/.python_history if no history has been read already. This avoids double writes to the history file at shutdown. 2013-09-29 22:18:38 +02:00
Antoine Pitrou b2201e1aa6 Properly initialize all fields of a SSL object after allocation. 2013-09-29 19:53:45 +02:00
Antoine Pitrou 860aee75b8 Properly initialize all fields of a SSL object after allocation. 2013-09-29 19:52:45 +02:00
Antoine Pitrou 20b85557f2 Issue #19095: SSLSocket.getpeercert() now raises ValueError when the SSL handshake hasn't been done. 2013-09-29 19:50:53 +02:00
Christian Heimes cb1915a17c Issue #19130: Correct PCbuild/readme.txt, Python 3.3 and 3.4 require VS 2010 2013-09-29 19:05:23 +02:00
Christian Heimes 9c99cc092e Issue #19130: Correct PCbuild/readme.txt, Python 3.3 and 3.4 require VS 2010 2013-09-29 19:02:35 +02:00
Antoine Pitrou 61e10a5efe Issue #4366: Fix building extensions on all platforms when --enable-shared is used. 2013-09-29 01:49:07 +02:00
Antoine Pitrou 643238eb53 Issue #4366: Fix building extensions on all platforms when --enable-shared is used. 2013-09-29 01:48:40 +02:00
Larry Hastings 44719a7717 Version bump to 3.4.0a3. 2013-09-28 23:51:00 +01:00
Serhiy Storchaka f7622bfcfb Issue #18950: Fix miscellaneous bugs in the sunau module.
Au_read.readframes() now updates current file position and reads correct
number of frames from multichannel stream.  Au_write.writeframesraw() now
correctly updates current file position.  Au_read.getnframes() now returns an
integer (as in Python 2).  Au_read and Au_write now correctly works with file
object if start file position is not a zero.
2013-09-28 21:24:43 +03:00
Serhiy Storchaka 0300a8db49 Issue #18950: Fix miscellaneous bugs in the sunau module.
Au_read.readframes() now updates current file position and reads correct
number of frames from multichannel stream.  Au_write.writeframesraw() now
correctly updates current file position.  Au_read.getnframes() now returns an
integer (as in Python 2).  Au_read and Au_write now correctly works with file
object if start file position is not a zero.
2013-09-28 21:21:39 +03:00
Nick Coghlan 6ba64f454d Close #18596: Support address sanity checking in clang/GCC
This patch appropriately marks known false alarms in the
small object allocator when address sanity checking is
enabled (patch contributed by Dhiru Kholia).
2013-09-29 00:28:55 +10:00
Serhiy Storchaka ab25c7c011 Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty
bytes until end of data.
2013-09-27 22:14:31 +03:00
Serhiy Storchaka d2c07a58af Issue #19053: ZipExtFile.read1() with non-zero argument no more returns empty
bytes until end of data.
2013-09-27 22:11:57 +03:00
Vinay Sajip 5421f35d5e logging: added support for Unix domain sockets to SocketHandler and DatagramHandler. 2013-09-27 18:18:28 +01:00
Benjamin Peterson c51c3ed3f2 merge 3.3 2013-09-26 23:43:11 -04:00
Benjamin Peterson eecdd77c6b fix my absurd spelling 2013-09-26 23:42:53 -04:00
Benjamin Peterson c30d05855a merge 3.3 (#19098) 2013-09-26 22:21:41 -04:00
Benjamin Peterson 305e5aac85 don't scale compiler stack frames if the recursion limit is huge (closes #19098) 2013-09-26 22:17:45 -04:00
Serhiy Storchaka 369606df2f Issue #19028: Fixed tkinter.Tkapp.merge() for non-string arguments. 2013-09-23 23:20:07 +03:00
Serhiy Storchaka 77622f55c2 Issue #18996: TestCase.assertEqual() now more cleverly shorten differing
strings in error report.
2013-09-23 23:07:00 +03:00
Serhiy Storchaka 463bd4b5c6 Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation. 2013-09-23 22:49:02 +03:00
Jason R. Coombs 838521eed0 Close #18978: Merge changes. 2013-09-22 10:06:24 -04:00
Jason R. Coombs ea9e097464 Update NEWS 2013-09-22 09:40:06 -04:00
Nick Coghlan f94a16b494 Close #18626: add a basic CLI for the inspect module 2013-09-22 22:46:49 +10:00
Serhiy Storchaka dac8b8b7a6 Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
returned empty string.
2013-09-20 23:24:20 +03:00
Serhiy Storchaka 31f477c7eb Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
returned empty string.
2013-09-20 23:21:44 +03:00
Serhiy Storchaka c8bf95cfc5 Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0
binaries.
2013-09-20 21:24:39 +03:00
Tim Peters df099f5df6 Update internal comments to say _something_ about the "API ID".
Best I can tell, the possible values for this aren't documented anywhere.
2013-09-19 21:06:37 -05:00
R David Murray cf6d0e77ea Merge #19037: adjust file times *before* moving maildir files into place. 2013-09-18 08:36:36 -04:00
R David Murray 41a22f1a77 #19037: adjust file times *before* moving maildir files into place.
This avoids race conditions when other programs are monitoring
the maildir directory.  Patch by janzert.
2013-09-18 08:34:40 -04:00
R David Murray 4750fa8369 Merge #14984: On POSIX, enforce permissions when reading default .netrc. 2013-09-17 21:28:17 -04:00
R David Murray fb9dc0b3ae Merge #14984: On POSIX, enforce permissions when reading default .netrc. 2013-09-17 21:04:50 -04:00
R David Murray 8270a2c209 Merge #14984: On POSIX, enforce permissions when reading default .netrc. 2013-09-17 20:32:54 -04:00
R David Murray 104aab956f #14984: On POSIX, enforce permissions when reading default .netrc.
Initial patch by Bruno Piguet.

This is implemented as if a useful .netrc file could exist without passwords,
which is possible in the general case; but in fact our netrc implementation
does not support it.  Fixing that issue will be an enhancement.
2013-09-17 20:30:02 -04:00
Serhiy Storchaka 935349406a Issue #18873: The tokenize module, IDLE, 2to3, and the findnocoding.py script
now detect Python source code encoding only in comment lines.
2013-09-16 23:57:00 +03:00
Serhiy Storchaka dafea85190 Issue #18873: The tokenize module, IDLE, 2to3, and the findnocoding.py script
now detect Python source code encoding only in comment lines.
2013-09-16 23:51:56 +03:00
Serhiy Storchaka 3c41154331 Issue #17003: Unified the size argument names in the io module with common
practice.
2013-09-16 23:18:10 +03:00
Andrew Kuchling 173a157e72 #1565525: Add traceback.clear_frames() helper function to clear locals ref'd by a traceback 2013-09-15 18:15:56 -04:00
Senthil Kumaran defe7f4c62 Expose --bind argument for http.server, enable http.server to bind to a user
specified network interface.

Patch contributed by Malte Swart. Addresses issue #17764.

HG :Enter commit message.  Lines beginning with 'HG:' are removed.
2013-09-15 09:37:27 -07:00
Raymond Hettinger c76aa4832b merge 2013-09-14 20:52:54 -07:00
Raymond Hettinger 46f5ca31d0 Issue #19018: The heapq.merge() function no longer suppresses IndexError 2013-09-14 20:51:57 -07:00
Antoine Pitrou 0715b9fad3 Issue #18937: Add an assertLogs() context manager to unittest.TestCase to ensure that a block of code emits a message using the logging module. 2013-09-14 19:45:47 +02:00
Georg Brandl bc75046bb3 Add a NEWS entry for b9b521efeba3. 2013-09-14 09:10:21 +02:00
Georg Brandl c5884d8930 Add NEWS entry for c18c18774e24. 2013-09-14 09:09:18 +02:00
Eli Bendersky 12f18289c0 Merge for Issue #18997: Issue #18997: fix ElementTree crash with using pickle and __getstate__. 2013-09-13 06:27:52 -07:00
Eli Bendersky 61f4cd1dd5 Add Germán M. Bravo to Misc/ACKS 2013-09-13 06:24:59 -07:00
Serhiy Storchaka bf28d2dcad Issue #18818: The "encodingname" part of PYTHONIOENCODING is now optional. 2013-09-13 11:46:24 +03:00
Senthil Kumaran 187b063005 Fix http.server's request handling case on trailing '/'.
Patch contributed by Vajrasky Kok. Addresses Issue #17324
2013-09-13 00:22:45 -07:00
Senthil Kumaran 72c238e21a Fix http.server's request handling case on trailing '/'.
Patch contributed by Vajrasky Kok. Addresses Issue #17324
2013-09-13 00:21:18 -07:00
Serhiy Storchaka 5abf3d9926 Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.
2013-09-13 07:49:36 +03:00