Larry Hastings [Sun, 24 Jun 2012 11:33:36 +0000 (04:33 -0700)]
Issue #15118: Change return value of os.uname() and os.times() from
plain tuples to immutable iterable objects with named attributes
(structseq objects).
Stefan Krah [Sun, 24 Jun 2012 10:20:03 +0000 (12:20 +0200)]
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.
R David Murray [Sun, 24 Jun 2012 09:03:27 +0000 (05:03 -0400)]
#15160: Extend the new email parser to handle MIME headers.
This code passes all the same tests that the existing RFC mime header
parser passes, plus a bunch of additional ones.
There are a couple of commented out tests where there are issues with the
folding. The folding doesn't normally get invoked for headers parsed from
source, and the cases are marginal anyway (headers with invalid binary data)
so I'm not worried about them, but will fix them after the beta.
There are things that can be done to make this API even more convenient, but I
think this is a solid foundation worth having. And the parser is a full RFC
parser, so it handles cases that the current parser doesn't. (There are also
probably cases where it fails when the current parser doesn't, but I haven't
found them yet ;)
Oh, yeah, and there are some really ugly bits in the parser for handling some
'postel' cases that are unfortunately common.
I hope/plan to to eventually refactor a lot of the code in the parser which
should reduce the line count...but there is no escaping the fact that the
error recovery is welter of special cases.
Ned Deily [Sun, 24 Jun 2012 07:44:30 +0000 (00:44 -0700)]
Update compileall calls in OS X installer postflight script to
properly skip uncompilable files and to compile existing
files in site-packages if reinstalling. Also, no longer
attempt to install a documentation link in /Developer
as that no longer necessarily exists with Xcode 4.3+.
Éric Araujo [Sun, 24 Jun 2012 07:27:43 +0000 (03:27 -0400)]
Packaging removal: also revert introduction of sysconfig.cfg.
We need a discussion to define what should be customized how; this new
config file is premature. It was added to serve the needs of the
resources system in install_data / packaging.database, so it can be
removed alongside packaging for 3.3.
Gregory P. Smith [Sun, 24 Jun 2012 07:23:47 +0000 (00:23 -0700)]
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.
Ned Deily [Sun, 24 Jun 2012 07:19:31 +0000 (00:19 -0700)]
Remove obsolete fixapplepython23 script and PythonSystemFixes
installer package from the OS X Makefile for Python 3. It has
never worked on Python 3 and is not needed there as pre-10.3.9
installs are no longer supported.
Gregory P. Smith [Sun, 24 Jun 2012 06:55:39 +0000 (23:55 -0700)]
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.
Éric Araujo [Sun, 24 Jun 2012 04:07:41 +0000 (00:07 -0400)]
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
Ezio Melotti [Sun, 24 Jun 2012 02:37:41 +0000 (04:37 +0200)]
#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.
Larry Hastings [Sat, 23 Jun 2012 23:55:07 +0000 (16:55 -0700)]
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.)
Ned Deily [Sat, 23 Jun 2012 23:02:19 +0000 (16:02 -0700)]
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.
Hynek Schlawack [Sat, 23 Jun 2012 18:28:32 +0000 (20:28 +0200)]
#4489: Fix usage of fd-based functions to new api introduced earlier today
Also add an explicit test for safe implementation usage on supported platforms.
As a side effect, this commit adds a module-level attribute 'rmtree_is_safe'
which offers introspection whether the current rmtree implementation is safe
against symlink attacks.