Florent Xicluna
af1adbeedd
Issue #13248 : argparse: Remove obsolete argument "version" of ArgumentParser.
2012-07-07 17:02:22 +02:00
Nick Coghlan
3008ec070f
Issue 14814: Ensure ordering semantics across all 3 entity types in ipaddress are consistent and well-defined
2012-07-08 00:45:33 +10:00
Nick Coghlan
9a9c28ce7a
Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__
2012-07-07 23:05:59 +10:00
Florent Xicluna
fed2c51eea
Merge branch
2012-07-07 12:26:56 +02:00
Florent Xicluna
11f0b41e9d
Issue #14990 : tokenize: correctly fail with SyntaxError on invalid encoding declaration.
2012-07-07 12:13:35 +02:00
Nick Coghlan
36f8dcde06
Issue 14814: Provide more informative error messages in ipaddress, and ensure that errors are caught as expected
2012-07-07 19:23:53 +10:00
doko@ubuntu.com
9dc823d2e0
- Issue #15268 : Search curses.h in /usr/include/ncursesw.
2012-07-07 03:06:42 +02:00
Antoine Pitrou
7d7f40c613
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:52:58 +02:00
Antoine Pitrou
9235b254dc
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:48:24 +02:00
Richard Oudkerk
2240ac1eae
Issue #15261 : Stop os.stat(fd) crashing on Windows when fd not open.
2012-07-06 12:05:32 +01:00
Antoine Pitrou
74de153681
Issue #15020 : The program name used to search for Python's path is now python3 under Unix, not python.
2012-07-05 20:57:33 +02:00
Antoine Pitrou
01cca5e451
Issue #15020 : The program name used to search for Python's path is now "python3" under Unix, not "python".
2012-07-05 20:56:30 +02:00
Senthil Kumaran
f28fbabc7f
Fix issue # 15033 - Return the proper exitcode for failure when modules are invoked using -m switch. Patch contributed by Jeff Knupp
2012-07-04 19:33:45 -07:00
Senthil Kumaran
f01a337950
Fix issue # 15033 - Return the proper exitcode for failure when modules are invoked using -m switch. Patch contributed by Jeff Knupp
2012-07-04 19:28:16 -07:00
Brett Cannon
98979b85e7
Issue #15166 : Re-implement imp.get_tag() using sys.implementation.
...
Also eliminates some C code in Python/import.c as well.
Patch by Eric Snow with verification by comparing against another
patch from Jeff Knupp.
2012-07-02 15:13:11 -04:00
Brett Cannon
8e2f5564b3
Issue #15210 : If _frozen_importlib is not found in sys.modules by
...
importlib.__init__, then catch the KeyError raised, not ImportError.
2012-07-02 14:53:10 -04:00
Brett Cannon
1e331560ee
Closes #15030 : Make importlib.abc.PyPycLoader respect the new .pyc
...
file size header field.
Thanks to Marc Abramowitz and Ronan Lamy for helping out with various
parts of the patch.
2012-07-02 14:35:34 -04:00
doko@ubuntu.com
15bac0f4da
- Issue #15235 : Allow Berkley DB versions up to 5.3 to build the dbm module.
2012-07-01 10:35:54 +02:00
Antoine Pitrou
f87289bb58
Issue #15229 : An OSError subclass whose __init__ doesn't call back
...
OSError.__init__ could produce incomplete instances, leading to crashes
when calling str() on them.
2012-06-30 23:37:47 +02:00
doko@ubuntu.com
7e6c2e2cc4
- Issue #14330 : For cross builds, don't use host python, use host search paths
...
for host compiler.
Add NEWS entry, rename _PROJECT_BASE to _PYTHON_PROJECT_BASE.
2012-06-30 22:35:00 +02:00
Petri Lehtinen
25652884b4
#5346 : Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()
2012-06-29 15:12:54 +03:00
Petri Lehtinen
5b5619f717
#5346 : Preserve permissions of mbox, MMDF and Babyl mailbox files on flush()
2012-06-29 15:10:41 +03:00
Antoine Pitrou
c92448beba
Issue #10571 : Fix the "--sign" option of distutils' upload command.
...
Patch by Jakub Wilk.
2012-06-29 01:06:51 +02:00
Antoine Pitrou
24319ac407
Issue #10571 : Fix the "--sign" option of distutils' upload command.
...
Patch by Jakub Wilk.
2012-06-29 01:05:26 +02:00
Petri Lehtinen
dde8cb0899
#9559 : Append data to single-file mailbox files if messages are only added
...
If messages were only added, a new file is no longer created and
renamed over the old file when flush() is called on an mbox, MMDF or
Babyl mailbox.
2012-06-28 13:56:14 +03:00
Petri Lehtinen
f29435f9f0
#9559 : Append data to single-file mailbox files if messages are only added
...
If messages were only added, a new file is no longer created and
renamed over the old file when flush() is called on an mbox, MMDF or
Babyl mailbox.
2012-06-28 13:53:23 +03:00
David Malcolm
8d37ffa563
Issue #12605 : Show information on more C frames within gdb backtraces
...
The gdb hooks for debugging CPython (within Tools/gdb) have
been enhanced to show information on more C frames relevant to CPython within
the "py-bt" and "py-bt-full" commands:
* C frames that are waiting on the GIL
* C frames that are garbage-collecting
* C frames that are due to the invocation of a PyCFunction
2012-06-27 14:15:34 -04:00
Christian Heimes
afa2973d7a
Issue 10924: Fixed mksalt() to use a RNG that is suitable for cryptographic purpose
2012-06-27 15:36:46 +02:00
David Malcolm
b83719287d
Issue #14443 : ensure that brp-python-bytecompile is invoked with the correct
...
python executable
The __os_install_macro defines some post-processing activities during an rpm
build; one of the scripts it calls is brp-python-bytecompile, which can take
an argument: the python executable with which to byte-compile .py files in the
package payload.
In some older versions of rpm (e.g. in RHEL 6), this invocation doesn't pass
in an argument, and brp-python-bytecompile defaults to using /usr/bin/python,
which can lead to the .py files being byte-compiled for the wrong version of
python. This has been fixed in later versions of rpm by passing in
%{__python} as an argument to brp-python-bytecompile.
Workaround this by detecting if __os_install_post has a 0-argument invocation
of brp-python-bytecompile, and if so generating an equivalent macro that has
the argument, and explicitly provide the new definition within the specfile.
2012-06-26 14:06:23 -04:00
doko@ubuntu.com
2a918768f1
- Issue #15194 : Update libffi to the 3.0.11 release.
2012-06-26 17:56:44 +02:00
Georg Brandl
d08cec6d62
Bump version to 3.3.0b1.
2012-06-26 09:43:40 +02:00
Larry Hastings
805dff5309
Fix issue # in Misc/NEWS (should be #15187 , not 15817.)
2012-06-26 00:15:17 -07:00
Larry Hastings
5b2f9c0aff
Issue #15817 : Bugfix: remove temporary directories test_shutil was leaving
...
behind.
2012-06-25 23:50:01 -07:00
Brett Cannon
0b1b9ce494
If main() is called and an argument cannot be decoded, make sure to
...
free the copy of the command-line.
Found using Clang's static analyzer.
2012-06-25 16:25:28 -04:00
David Malcolm
555bfc7ed0
Issue #14443 : ensure that brp-python-bytecompile is invoked with the correct
...
python executable
The __os_install_macro defines some post-processing activities during an rpm
build; one of the scripts it calls is brp-python-bytecompile, which can take
an argument: the python executable with which to byte-compile .py files in the
package payload.
In some older versions of rpm (e.g. in RHEL 6), this invocation doesn't pass
in an argument, and brp-python-bytecompile defaults to using /usr/bin/python,
which can lead to the .py files being byte-compiled for the wrong version of
python. This has been fixed in later versions of rpm by passing in
%{__python} as an argument to brp-python-bytecompile.
Workaround this by detecting if __os_install_post has a 0-argument invocation
of brp-python-bytecompile, and if so generating an equivalent macro that has
the argument, and explicitly provide the new definition within the specfile.
2012-06-25 15:52:24 -04:00
Larry Hastings
52c60979ba
Moved hmac.compare_digest Misc/NEWS entry from Core and Builtins to Library.
2012-06-25 04:51:59 -07:00
Larry Hastings
c48fe98a7c
Issue #15177 : Added dir_fd parameter to os.fwalk().
2012-06-25 04:49:05 -07:00
Larry Hastings
fdaea06d3c
Issue #15176 : Clarified behavior, documentation, and implementation
...
of os.listdir().
2012-06-25 04:42:23 -07:00
Larry Hastings
e6bdc8f2dd
Restore Misc/NEWS entries lost in the merge for the previous commit.
2012-06-24 14:34:49 -07:00
Larry Hastings
68386bc0b8
Issue #15164 : Change return value of platform.uname() from a
...
plain tuple to a collections.namedtuple.
2012-06-24 14:30:41 -07:00
Antoine Pitrou
ab88803a8a
Support Mageia Linux in the platform module.
2012-06-24 22:20:18 +02:00
Georg Brandl
488fccfaaf
Closes #11678 : support Arch linux in the platform module.
2012-06-24 22:17:23 +02:00
Ezio Melotti
46495182d0
#15156 : HTMLParser now uses the new "html.entities.html5" dictionary.
2012-06-24 22:02:56 +02:00
Christian Heimes
6cea65555c
Issue #15061 : Re-implemented hmac.compare_digest() in C
2012-06-24 13:48:32 +02:00
Larry Hastings
605a62ddb1
Issue #15118 : Change return value of os.uname() and os.times() from
...
plain tuples to immutable iterable objects with named attributes
(structseq objects).
2012-06-24 04:33:36 -07:00
Stefan Krah
78f075636c
Speed up _decimal by another 10-15% by caching the thread local context
...
that was last accessed. In the pi benchmark (64-bit platform, prec=9),
_decimal is now only 1.5x slower than float.
2012-06-24 12:20:03 +02:00
Larry Hastings
49c15d4a5f
Issue #14815 : Use Py_ssize_t instead of long for the object hash, to
...
preserve all 64 bits of hash on Win64.
2012-06-24 01:54:21 -07:00
Gregory P. Smith
990a5feba7
Fixes issue #12268 : File readline, readlines and read() or readall() methods
...
no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR
from within these methods.
2012-06-24 00:23:47 -07:00
Gregory P. Smith
5135992164
Fixes issue #12268 : File readline, readlines and read() or readall() methods
...
no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR
from within these methods.
2012-06-23 23:55:39 -07:00
Éric Araujo
859aad6a36
Remove packaging from the standard library.
...
Distutils2 will live on on PyPI and be included in the stdlib when it
is ready. See discussion starting at
http://mail.python.org/pipermail/python-dev/2012-June/120430.html
2012-06-24 00:07:41 -04:00
Ezio Melotti
dc44f55cc9
#11113 : add a new "html5" dictionary containing the named character references defined by the HTML5 standard and the equivalent Unicode character(s) to the html.entities module.
2012-06-24 04:37:41 +02:00
Larry Hastings
b698d8e7e9
Issue #15154 : Add "dir_fd" parameter to os.rmdir, remove "rmdir"
...
parameter from os.remove / os.unlink.
Patch written by Georg Brandl. (I'm really looking forward to George
getting commit privileges so I don't have to keep doing checkins on his
behalf.)
2012-06-23 16:55:07 -07:00
Ned Deily
cbfb9a56e6
Issue #13590 : Improve support for OS X Xcode 4:
...
- Try to avoid building Python or extension modules with problematic
llvm-gcc compiler.
- Since Xcode 4 removes ppc support, extension module builds now
check for ppc compiler support and automatically remove ppc and
ppc64 archs when not available.
- Since Xcode 4 no longer install SDKs in default locations,
extension module builds now revert to using installed headers
and libs if the SDK used to build the interpreter is not
available.
- Update ./configure to use better defaults for universal builds;
in particular, --enable-universalsdk=yes uses the Xcode default
SDK and --with-universal-archs now defaults to "intel" if ppc
not available.
2012-06-23 16:02:19 -07:00
Martin v. Löwis
75aeaa9b18
Issue #11626 : Add _SizeT functions to stable ABI.
2012-06-24 00:00:30 +02:00
Martin v. Löwis
9c56409d33
Issue #15146 : Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
2012-06-23 23:20:45 +02:00
Antoine Pitrou
99cc629969
Issue #15142 : Fix reference leak when deallocating instances of types created using PyType_FromSpec().
2012-06-23 14:42:38 +02:00
Hynek Schlawack
fb8dac7632
Fix typo in Misc/NEWS
2012-06-23 18:21:11 +02:00
Hynek Schlawack
67be92bed4
#4489 : Add a shutil.rmtree that isn't suspectible to symlink attacks
...
It is used automatically on platforms supporting the necessary os.openat() and
os.unlinkat() functions. Main code by Martin von Löwis.
2012-06-23 17:58:42 +02:00
Ezio Melotti
3861d8b271
#15114 : the strict mode of HTMLParser and the HTMLParseError exception are deprecated now that the parser is able to parse invalid markup.
2012-06-23 15:27:51 +02:00
Antoine Pitrou
a4db02c7a3
Issue #15142 : Fix reference leak when deallocating instances of types created using PyType_FromSpec().
2012-06-23 14:45:21 +02:00
Antoine Pitrou
463badf06c
Issue #3665 : \u and \U escapes are now supported in unicode regular expressions.
...
Patch by Serhiy Storchaka.
2012-06-23 13:29:19 +02:00
Nick Coghlan
04e2e3f231
Close #15153 : Added inspect.getgeneratorlocals to simplify whitebox testing of generator state updates
2012-06-23 19:52:05 +10:00
Nick Coghlan
2f92e54507
Close #13062 : Add inspect.getclosurevars to simplify testing stateful closures
2012-06-23 19:39:55 +10:00
Alexander Belopolsky
8141cc7f88
Issues #11024 : Fixes and additional tests for Time2Internaldate.
2012-06-22 21:03:39 -04:00
Larry Hastings
9cf065cfdc
Issue #14626 : Large refactoring of functions / parameters in the os module.
...
Many functions now support "dir_fd" and "follow_symlinks" parameters;
some also support accepting an open file descriptor in place of of a path
string. Added os.support_* collections as LBYL helpers. Removed many
functions only previously seen in 3.3 alpha releases (often starting with
"f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
implemented by Larry Hastings.
2012-06-22 16:30:09 -07:00
Larry Hastings
7c7cbfc00f
Issue #15008 : Implement PEP 362 "Signature Objects".
...
Patch by Yury Selivanov.
2012-06-22 15:19:35 -07:00
Guido van Rossum
8e0d25504c
Merge
2012-06-22 15:18:38 -07:00
Guido van Rossum
95c1c48fd6
Speed up base64.urlsafe_{en,de}code().
2012-06-22 15:16:09 -07:00
Brian Curtin
c57a34577c
Fix #444582 . Add shutil.which function for finding programs on the system path.
2012-06-22 16:00:30 -05:00
Antoine Pitrou
5f6213be2d
Merge
2012-06-22 21:13:34 +02:00
Antoine Pitrou
3b36fb1f53
Issue #14837 : SSL errors now have `library` and `reason` attributes describing precisely what happened and in which OpenSSL submodule.
...
The str() of a SSLError is also enhanced accordingly.
NOTE: this commit creates a reference leak. The leak seems tied to the
use of PyType_FromSpec() to create the SSLError type. The leak is on the
type object when it is instantiated:
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
35
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
36
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
37
2012-06-22 21:11:52 +02:00
David Malcolm
49526f48fc
Issue #14785 : Add sys._debugmallocstats() to help debug low-level memory allocation issues
2012-06-22 14:55:41 -04:00
Jesus Cea
9436361e4c
Closes #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-06-22 18:32:07 +02:00
Alexander Belopolsky
fdc860f310
Issue #9527 : datetime.astimezone() method will now supply a class
...
timezone instance corresponding to the system local timezone when
called with no arguments.
2012-06-22 12:23:23 -04:00
Larry Hastings
8f904daee9
Issue #14769 : test_capi now has SkipitemTest, which cleverly checks
...
for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
function skipitem() for all possible "format units".
2012-06-22 03:56:29 -07:00
Martin v. Löwis
7800f75827
Issue #15042 : Add PyState_AddModule and PyState_RemoveModule.
...
Add version guard for Py_LIMITED_API additions.
Issue #15081 : Document PyState_FindModule.
Patch by Robin Schreiber.
2012-06-22 12:20:55 +02:00
Alexander Belopolsky
76935b9c8c
Issue #14653 : email.utils.mktime_tz() no longer relies on system
...
mktime() when timezone offest is supplied.
2012-06-21 20:48:23 -04:00
Alexander Belopolsky
a07548e97b
Issue #14653 : email.utils.mktime_tz() no longer relies on system
...
mktime() when timezone offest is supplied.
2012-06-21 20:34:09 -04:00
Hynek Schlawack
69168354c2
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:58:31 +02:00
Hynek Schlawack
9ed8b4e4ca
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:20:25 +02:00
Ned Deily
69192238ba
Issue #14225 : Fix Unicode support for curses ( #12567 ) on OS X:
...
1. on OS X, there is no separate /usr/lib/libcursesw nor libpanelw
2. _XOPEN_SOURCE_EXTENDED must be enabled for _curses build
2012-06-20 23:47:14 -07:00
Nadeem Vawda
fd8a838d58
Issue #14684 : Add support for predefined compression dictionaries to the zlib module.
...
Original patch by Sam Rushing.
2012-06-21 02:13:12 +02:00
Christian Heimes
0b3847de6d
Issue #15096 : Drop support for the ur string prefix
2012-06-20 11:17:58 +02:00
Nadeem Vawda
10c8791978
Fix GzipFile's handling of filenames given as bytes objects.
...
Add relevant tests for GzipFile, and also for BZ2File and LZMAFile.
2012-06-20 01:48:50 +02:00
Nadeem Vawda
103e8113e4
Fix GzipFile's handling of filenames given as bytes objects.
2012-06-20 01:35:22 +02:00
Antoine Pitrou
e67f48ce5e
Issue #14928 : Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h.
2012-06-19 22:29:35 +02:00
Brian Curtin
0d0a1dedbc
Fix #14772 : Return the destination from some shutil functions.
2012-06-18 18:41:07 -05:00
Kristján Valur Jónsson
e75ff35af2
Issue #15038 : Optimize python Locks on Windows
...
Extract cross-platform condition variable support into a separate file and
provide user-mode non-recursive locks for Windows.
2012-06-18 20:30:44 +00:00
Richard Oudkerk
d69cfe88ea
Issue #15064 : Implement context manager protocol for multiprocessing types
2012-06-18 17:47:52 +01:00
Richard Oudkerk
0f884273b0
Issue #15101 : Make pool finalizer avoid joining current thread.
2012-06-18 16:02:49 +01:00
Richard Oudkerk
f29ec4b0c8
Issue #15101 : Make pool finalizer avoid joining current thread.
2012-06-18 15:54:57 +01:00
Petri Lehtinen
10e65881d5
Fix NEWS entry for #15036
2012-06-18 10:45:56 +03:00
Petri Lehtinen
da7a6e7da0
Fix NEWS entry for #15036
2012-06-18 10:43:53 +03:00
Antoine Pitrou
48114b952b
Issue #14657 : The frozen instance of importlib used for bootstrap is now also the module imported as importlib._bootstrap.
2012-06-17 22:33:38 +02:00
Nick Coghlan
307ef8aee5
Merge from 3.2 (Ignore X-Antivirus headers in test_nntplib)
2012-06-17 21:30:35 +10:00
Nick Coghlan
14d99a1491
Ignore X-Antivirus headers in test_nntplib
2012-06-17 21:27:18 +10:00
Nick Coghlan
9aff2a7c41
Merge from 3.2 (Issue #15043 : skip test_gdb if the custom hooks can't be loaded)
2012-06-17 19:16:02 +10:00
Nick Coghlan
be4e4b5691
Issue #15043 : skip test_gdb if the custom hooks can't be loaded
2012-06-17 18:57:20 +10:00
Martin v. Löwis
bce166681c
Issue #14055 : Add __sizeof__ support to _elementtree.
2012-06-17 10:41:22 +02:00
Nick Coghlan
9680bdb567
Issue #14814 : Add first draft of PEP 3144 ipaddress module documentation (initial patch by Sandro Tosi)
2012-06-17 17:24:10 +10:00