........
r82415 | benjamin.peterson | 2010-07-01 10:07:15 -0500 (Thu, 01 Jul 2010) | 1 line
remove docs about delegating to special methods; it does no such thing
........
1) #8271: when a byte sequence is invalid, only the start byte and all the
valid continuation bytes are now replaced by U+FFFD, instead of replacing
the number of bytes specified by the start byte.
See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
in behavior);
3) Change the error messages "unexpected code byte" to "invalid start byte"
and "invalid data" to "invalid continuation byte";
4) Add an extensive set of tests in test_unicode;
5) Fix test_codeccallbacks because it was failing after this change.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82409 | benjamin.peterson | 2010-06-30 13:41:08 -0500 (Wed, 30 Jun 2010) | 1 line
an AttributeError is perfectly acceptable here
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82403 | benjamin.peterson | 2010-06-30 12:11:08 -0500 (Wed, 30 Jun 2010) | 1 line
mark test depending on ref counting
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82379 | mark.dickinson | 2010-06-29 21:09:12 +0100 (Tue, 29 Jun 2010) | 1 line
Issue #1789: clarify that the 'size' column in struct docs refers to standard size.
........
- parenthesize lambdas, to avoid turning (lambda : int)() into lambda: int()
- unparse an infinite float literals in the AST as an overflowing finite value
unparse.py now successfully round-trips on all valid Lib/*.py and Lib/test/*.py files.
- relative imports
- keyword-only arguments
- function annotations
- class decorators
- raise ... from ...
- except ... as ...
- nonlocal
- bytes literals
- set literals
- set comprehensions
- dict comprehensions
Removals:
- print statement.
Some of this should be backported to 2.x.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82338 | mark.dickinson | 2010-06-28 20:31:41 +0100 (Mon, 28 Jun 2010) | 9 lines
Fix some shallow bugs in Demo/parser/unparse.py, and add tests:
- insert commas between entries in del statement
- left and right shifts were represented as >> and << (respectively); reverse
- unindent properly after for: else: or while: else:
- add parens around the result of an unary operation
- add parens around negative numbers, to avoid turning (-1)**2 into -1**2.
........
r82340 | mark.dickinson | 2010-06-28 20:34:15 +0100 (Mon, 28 Jun 2010) | 1 line
Fix typo in test_unparse.py.
........
r82341 | mark.dickinson | 2010-06-28 20:38:19 +0100 (Mon, 28 Jun 2010) | 1 line
Set svn:eol-style on test_unparse.py.
........
Required updating code relying on other modules to switch to _bootstrap's
unique module requirements. This led to the realization that
get_code was being too liberal in its exception catching when calling set_data
by blindly grabbing IOError. Shifted the responsibility of safely ignoring
writes to a read-only path to set_data.
Importlib is still not relying on SourceLoader yet; requires creating a
SourcelessLoader and updating the source finder.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77402 | brett.cannon | 2010-01-09 20:56:19 -0600 (Sat, 09 Jan 2010) | 12 lines
DeprecationWarning is now silent by default.
This was originally suggested by Guido, discussed on the stdlib-sig mailing
list, and given the OK by Guido directly to me. What this change essentially
means is that Python has taken a policy of silencing warnings that are only
of interest to developers by default. This should prevent users from seeing
warnings which are triggered by an application being run against a new
interpreter before the app developer has a chance to update their code.
Closes issue #7319. Thanks to Antoine Pitrou, Ezio Melotti, and Brian Curtin
for helping with the issue.
........
r77505 | brett.cannon | 2010-01-14 14:00:28 -0600 (Thu, 14 Jan 2010) | 7 lines
The silencing of DeprecationWarning was not taking -3 into consideration. Since
Py3K warnings are DeprecationWarning by default this was causing -3 to
essentially be a no-op. Now DeprecationWarning is only silenced if -3 is not
used.
Closes issue #7700. Thanks Ezio Melotti and Florent Xicluna for patch help.
........
r77510 | brett.cannon | 2010-01-14 19:31:45 -0600 (Thu, 14 Jan 2010) | 1 line
Remove C++/C99-style comments.
........
SourceLoader is a simplification of both PyLoader and PyPycLoader. If one only
wants to use source, then they need to only implement get_data and
get_filename. To also use bytecode -- sourceless loading is not supported --
then two abstract methods -- path_mtime and set_data -- need to be implemented.
Compared to PyLoader and PyPycLoader, there are less abstract methods
introduced and bytecode files become an optimization controlled by the ABC and
hidden from the user (this need came about as PEP 3147 showed that not treating
bytecode as an optimization can cause problems for compatibility).
PyLoader is deprecated in favor of SourceLoader. To be compatible from Python
3.1 onwards, a subclass need only use simple methods for source_path and
is_package. Otherwise conditional subclassing based on whether Python 3.1 or
Python 3.2 is being is the only change. The documentation and docstring for
PyLoader explain what is exactly needed.
PyPycLoader is deprecated also in favor of SourceLoader. Because PEP 3147
shifted bytecode path details so much, there is no foolproof way to provide
backwards-compatibility with SourceLoader. Because of this the class is simply
deprecated and users should move to SourceLoader (and optionally PyLoader for
Python 3.1). This does lead to a loss of support for sourceless loading
unfortunately.
At some point before Python 3.2 is released, SourceLoader will be moved over to
importlib._bootstrap so that the core code of importlib relies on the new code
instead of the old PyPycLoader code. This commit is being done now so that
there is no issue in having the API in Python 3.1a1.
........
r79596 | eric.smith | 2010-04-02 07:30:56 -0500 (Fri, 02 Apr 2010) | 1 line
Issue 7994: Make object.__format__ with a non-empty format string a PendingDecprecationWarning. Still need to remove uses of this from various tests.
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81004 | mark.dickinson | 2010-05-08 14:13:21 -0500 (Sat, 08 May 2010) | 1 line
Fix configure bug that was misreporting availability of MacOS X 10.5 SDK as available on Linux but not on OS X.
........