Mark Dickinson [Sun, 4 Jul 2010 16:37:31 +0000 (16:37 +0000)]
Issue #9128: Fix validation of class decorators in parser module.
Benjamin Peterson [Sun, 4 Jul 2010 16:33:07 +0000 (16:33 +0000)]
Removed merge tracking for "svnmerge" for
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
Alexander Belopolsky [Sun, 4 Jul 2010 16:28:08 +0000 (16:28 +0000)]
Issue #9152: Removed dead code in datetime module
Mark Dickinson [Sun, 4 Jul 2010 10:15:11 +0000 (10:15 +0000)]
Fix refleak in Modules/audioop.c.
Georg Brandl [Sun, 4 Jul 2010 07:25:18 +0000 (07:25 +0000)]
Remove old and unsafe Dbm demo class.
Alexander Belopolsky [Sat, 3 Jul 2010 22:36:06 +0000 (22:36 +0000)]
Made minimal modifications to pass included tests
Brett Cannon [Sat, 3 Jul 2010 22:32:41 +0000 (22:32 +0000)]
Make importlib.abc.SourceLoader the primary mechanism for importlib.
This required moving the class from importlib/abc.py into
importlib/_bootstrap.py and jiggering some code to work better with the class.
This included changing how the file finder worked to better meet import
semantics. This also led to fixing importlib to handle the empty string from
sys.path as import currently does (and making me wish we didn't support that
instead just required people to insert '.' instead to represent cwd).
It also required making the new set_data abstractmethod create
any needed subdirectories implicitly thanks to __pycache__ (it was either this
or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
method or have set_data with no data arg mean to create a directory).
Lastly, as an optimization the file loaders cache the file path where the
finder found something to use for loading (this is thanks to having a
sourceless loader separate from the source loader to simplify the code and
cut out stat calls).
Unfortunately test_runpy assumed a loader would always work for a module, even
if you changed from underneath it what it was expected to work with. By simply
dropping the previous loader in test_runpy so the proper loader can be returned
by the finder fixed the failure.
At this point importlib deviates from import on two points:
1. The exception raised when trying to import a file is different (import does
an explicit file check to print a special message, importlib just says the path
cannot be imported as if it was just some module name).
2. the co_filename on a code object is not being set to where bytecode was
actually loaded from instead of where the marshalled code object originally
came from (a solution for this has already been agreed upon on python-dev but has
not been implemented yet; issue8611).
Brett Cannon [Sat, 3 Jul 2010 22:18:47 +0000 (22:18 +0000)]
Make importlib.abc.SourceLoader the primary mechanism for importlib.
This required moving the class from importlib/abc.py into
importlib/_bootstrap.py and jiggering some code to work better with the class.
This included changing how the file finder worked to better meet import
semantics. This also led to fixing importlib to handle the empty string from
sys.path as import currently does (and making me wish we didn't support that
instead just required people to insert '.' instead to represent cwd).
It also required making the new set_data abstractmethod create
any needed subdirectories implicitly thanks to __pycache__ (it was either this
or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
method or have set_data with no data arg mean to create a directory).
Lastly, as an optimization the file loaders cache the file path where the
finder found something to use for loading (this is thanks to having a
sourceless loader separate from the source loader to simplify the code and
cut out stat calls).
Unfortunately test_runpy assumed a loader would always work for a module, even
if you changed from underneath it what it was expected to work with. By simply
dropping the previous loader in test_runpy so the proper loader can be returned
by the finder fixed the failure.
At this point importlib deviates from import on two points:
1. The exception raised when trying to import a file is different (import does
an explicit file check to print a special message, importlib just says the path
cannot be imported as if it was just some module name).
2. the co_filename on a code object is not being set to where bytecode was
actually loaded from instead of where the marshalled code object originally
came from (a solution for this has already been agreed upon on python-dev but has
not been implemented yet; issue8611).
Alexander Belopolsky [Sat, 3 Jul 2010 22:05:41 +0000 (22:05 +0000)]
Issue #9151: Demo/classes/Dates.py does not work in 3.x Converted
descriptive comment into a docstring. Cast attributes to int in
__init__. Use __new__ instead of deleting attributes to
"uninitialize".
Brett Cannon [Sat, 3 Jul 2010 22:03:16 +0000 (22:03 +0000)]
Fix a spelling mistake in a comment.
Brett Cannon [Sat, 3 Jul 2010 21:50:52 +0000 (21:50 +0000)]
Trailing whitespace is bad for .rst files.
Brett Cannon [Sat, 3 Jul 2010 21:48:25 +0000 (21:48 +0000)]
Make importlib.abc.SourceLoader the primary mechanism for importlib.
This required moving the class from importlib/abc.py into
importlib/_bootstrap.py and jiggering some code to work better with the class.
This included changing how the file finder worked to better meet import
semantics. This also led to fixing importlib to handle the empty string from
sys.path as import currently does (and making me wish we didn't support that
instead just required people to insert '.' instead to represent cwd).
It also required making the new set_data abstractmethod create
any needed subdirectories implicitly thanks to __pycache__ (it was either this
or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
method or have set_data with no data arg mean to create a directory).
Lastly, as an optimization the file loaders cache the file path where the
finder found something to use for loading (this is thanks to having a
sourceless loader separate from the source loader to simplify the code and
cut out stat calls).
Unfortunately test_runpy assumed a loader would always work for a module, even
if you changed from underneath it what it was expected to work with. By simply
dropping the previous loader in test_runpy so the proper loader can be returned
by the finder fixed the failure.
At this point importlib deviates from import on two points:
1. The exception raised when trying to import a file is different (import does
an explicit file check to print a special message, importlib just says the path
cannot be imported as if it was just some module name).
2. the co_filename on a code object is not being set to where bytecode was
actually loaded from instead of where the marshalled code object originally
came from (a solution for this has already been agreed upon on python-dev but has
not been implemented yet; issue8611).
Alexander Belopolsky [Sat, 3 Jul 2010 21:42:47 +0000 (21:42 +0000)]
Issue #9151: Demo/classes/Dates.py does not work in 3.x
Made minimal changes to make included test pass.
Brett Cannon [Sat, 3 Jul 2010 21:37:28 +0000 (21:37 +0000)]
Ignore __pycache__.
Mark Dickinson [Sat, 3 Jul 2010 21:00:51 +0000 (21:00 +0000)]
Remove nonexistent tools from Tools README.
Alexander Belopolsky [Sat, 3 Jul 2010 20:35:53 +0000 (20:35 +0000)]
Issue #9094: Make python -m pickletools disassemble pickles given in
the command line.
Senthil Kumaran [Sat, 3 Jul 2010 17:48:22 +0000 (17:48 +0000)]
Fix Issue5468 - urlencode to handle bytes and other alternate encodings.
(Extensive tests provided). Patch by Dan Mahn.
Benjamin Peterson [Sat, 3 Jul 2010 15:09:20 +0000 (15:09 +0000)]
Removed merge tracking for "svnmerge" for
svn+ssh://pythondev@svn.python.org/python/branches/py3k/python/trunk
Victor Stinner [Sat, 3 Jul 2010 13:44:22 +0000 (13:44 +0000)]
Merged revisions 82492 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82492 | victor.stinner | 2010-07-03 15:36:19 +0200 (sam., 03 juil. 2010) | 3 lines
Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
ensure that the input string length is a multiple of the frame size
........
Georg Brandl [Sat, 3 Jul 2010 10:41:33 +0000 (10:41 +0000)]
Remove the need for a "()" empty argument list after opcodes.
Georg Brandl [Sat, 3 Jul 2010 10:33:26 +0000 (10:33 +0000)]
Fix markup.
Georg Brandl [Sat, 3 Jul 2010 10:26:54 +0000 (10:26 +0000)]
Merged revisions 82483 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82483 | georg.brandl | 2010-07-03 12:25:54 +0200 (Sa, 03 Jul 2010) | 1 line
Add link to bytecode docs.
........
Georg Brandl [Sat, 3 Jul 2010 10:26:17 +0000 (10:26 +0000)]
Recorded merge of revisions 82474 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82474 | georg.brandl | 2010-07-03 10:40:13 +0200 (Sa, 03 Jul 2010) | 1 line
Fix role name.
........
Georg Brandl [Sat, 3 Jul 2010 10:22:10 +0000 (10:22 +0000)]
Use the right role.
Georg Brandl [Sat, 3 Jul 2010 10:21:50 +0000 (10:21 +0000)]
Wrap and use the correct directive.
Mark Dickinson [Sat, 3 Jul 2010 09:17:16 +0000 (09:17 +0000)]
Merged revisions 82476 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82476 | mark.dickinson | 2010-07-03 10:15:09 +0100 (Sat, 03 Jul 2010) | 1 line
Fix typo in sys.float_info docs.
........
Nick Coghlan [Sat, 3 Jul 2010 07:38:28 +0000 (07:38 +0000)]
Issue 6507: missing patch submitter from NEWS entry in previous checkin
Nick Coghlan [Sat, 3 Jul 2010 07:36:51 +0000 (07:36 +0000)]
Issue 6507: accept source strings directly in dis.dis(). Original patch by Daniel Urban
Ezio Melotti [Sat, 3 Jul 2010 04:52:19 +0000 (04:52 +0000)]
Update comment about surrogates.
Alexander Belopolsky [Sat, 3 Jul 2010 03:35:27 +0000 (03:35 +0000)]
Merged revisions 82466 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82466 | alexander.belopolsky | 2010-07-02 23:27:12 -0400 (Fri, 02 Jul 2010) | 1 line
Revert r81681 (issue 8810).
........
Brett Cannon [Sat, 3 Jul 2010 01:32:48 +0000 (01:32 +0000)]
Make test_import a little bit more robust for cleaning up after itself in the
face of a failure.
Benjamin Peterson [Fri, 2 Jul 2010 23:25:44 +0000 (23:25 +0000)]
Merged revisions 82461 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82461 | benjamin.peterson | 2010-07-02 18:05:27 -0500 (Fri, 02 Jul 2010) | 1 line
don't require the presence of __getformat__ or __setformat__; use requires_IEEE_754 globally
........
Ezio Melotti [Fri, 2 Jul 2010 23:18:51 +0000 (23:18 +0000)]
Merged revisions 82455,82457,82459 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82455 | eric.smith | 2010-07-03 00:44:16 +0300 (Sat, 03 Jul 2010) | 1 line
Moved period outside paren, where it belongs.
........
r82457 | ezio.melotti | 2010-07-03 01:17:29 +0300 (Sat, 03 Jul 2010) | 1 line
#9139: Add examples for str.format().
........
r82459 | ezio.melotti | 2010-07-03 01:50:39 +0300 (Sat, 03 Jul 2010) | 1 line
#9139: the thousands separator is new in 2.7. Also add a missing variable in the example.
........
Brett Cannon [Fri, 2 Jul 2010 22:03:00 +0000 (22:03 +0000)]
Some people have mistaken Python bytecode as being stable and unchanging. In
reality it's simply an implementation detail for CPython. This point is now
clearly documented in both the docs for dis and the glossary.
Closes issue #7829. Thanks to Terry Reedy for some initial suggestions on
wording.
Mark Dickinson [Fri, 2 Jul 2010 20:26:07 +0000 (20:26 +0000)]
Merged revisions 82446 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82446 | mark.dickinson | 2010-07-02 19:06:52 +0100 (Fri, 02 Jul 2010) | 1 line
Clarify sys.float_info documentation.
........
Benjamin Peterson [Fri, 2 Jul 2010 19:45:07 +0000 (19:45 +0000)]
Merged revisions 82447 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82447 | benjamin.peterson | 2010-07-02 14:41:39 -0500 (Fri, 02 Jul 2010) | 1 line
add space
........
Nick Coghlan [Fri, 2 Jul 2010 16:14:05 +0000 (16:14 +0000)]
Merged revisions 82441 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82441 | nick.coghlan | 2010-07-03 02:01:53 +1000 (Sat, 03 Jul 2010) | 1 line
Issue 8202 actually caused an unintended behavioural change and was reverted in 2.7 - remove reference from What's New
........
Mark Dickinson [Fri, 2 Jul 2010 16:05:15 +0000 (16:05 +0000)]
Style/consistency nit: make math_floor and math_ceil code look the same.
Nick Coghlan [Fri, 2 Jul 2010 15:57:50 +0000 (15:57 +0000)]
Merged revisions 82439 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82439 | nick.coghlan | 2010-07-03 01:50:14 +1000 (Sat, 03 Jul 2010) | 1 line
Fix a couple of minor nits in What's New before the release goes out
........
Benjamin Peterson [Fri, 2 Jul 2010 13:46:42 +0000 (13:46 +0000)]
fix lookup of __ceil__
Benjamin Peterson [Fri, 2 Jul 2010 13:35:17 +0000 (13:35 +0000)]
account for different ref counting semantics of _PyObject_LookupSpecial
Georg Brandl [Fri, 2 Jul 2010 07:41:51 +0000 (07:41 +0000)]
Merged revisions 82433 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82433 | georg.brandl | 2010-07-02 09:33:50 +0200 (Fr, 02 Jul 2010) | 1 line
Grammar and markup fixes.
........
Benjamin Peterson [Thu, 1 Jul 2010 23:39:26 +0000 (23:39 +0000)]
Blocked revisions 82429 via svnmerge
........
r82429 | benjamin.peterson | 2010-07-01 18:35:37 -0500 (Thu, 01 Jul 2010) | 1 line
trunc does use the special method, though
........
Benjamin Peterson [Thu, 1 Jul 2010 17:49:01 +0000 (17:49 +0000)]
Merged revisions 82420 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82420 | benjamin.peterson | 2010-07-01 12:45:52 -0500 (Thu, 01 Jul 2010) | 1 line
fix fixer name
........
Benjamin Peterson [Thu, 1 Jul 2010 15:16:55 +0000 (15:16 +0000)]
correctly lookup __trunc__ and __floor__
Benjamin Peterson [Thu, 1 Jul 2010 15:09:14 +0000 (15:09 +0000)]
Blocked revisions 82415 via svnmerge
........
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
........
Ezio Melotti [Thu, 1 Jul 2010 07:32:02 +0000 (07:32 +0000)]
Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.
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.
Benjamin Peterson [Wed, 30 Jun 2010 18:44:04 +0000 (18:44 +0000)]
Merged revisions 82409 via svnmerge from
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
........
Giampaolo Rodolà [Wed, 30 Jun 2010 17:47:39 +0000 (17:47 +0000)]
Merged revisions 82404 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82404 | giampaolo.rodola | 2010-06-30 19:38:28 +0200 (mer, 30 giu 2010) | 1 line
fix issue #6589: cleanup asyncore.socket_map if smtpd.SMTPServer constructor raises an exception
........
Benjamin Peterson [Wed, 30 Jun 2010 17:39:45 +0000 (17:39 +0000)]
Merged revisions 82403 via svnmerge from
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
........
Mark Dickinson [Wed, 30 Jun 2010 16:36:12 +0000 (16:36 +0000)]
Blocked revisions 82399-82400 via svnmerge
........
r82399 | mark.dickinson | 2010-06-30 15:19:56 +0100 (Wed, 30 Jun 2010) | 1 line
Update Demo/parser directory; backport unparse fixes from py3k.
........
r82400 | mark.dickinson | 2010-06-30 17:27:57 +0100 (Wed, 30 Jun 2010) | 2 lines
Issue #9125: Update parser module for "except ... as ..." syntax.
........
Michael Foord [Wed, 30 Jun 2010 12:17:50 +0000 (12:17 +0000)]
Issue 9110. Adding ContextDecorator to contextlib. This enables the creation of APIs that act as decorators as well as context managers. contextlib.contextmanager changed to use ContextDecorator.
Mark Dickinson [Wed, 30 Jun 2010 11:45:53 +0000 (11:45 +0000)]
Unparse infinite imaginary literals correctly. Add some more numeric tests.
Mark Dickinson [Wed, 30 Jun 2010 11:14:30 +0000 (11:14 +0000)]
Revert accidental extra changes included in r82391.
Mark Dickinson [Wed, 30 Jun 2010 11:13:36 +0000 (11:13 +0000)]
Issue #9011: Tests for Python 3.2's treatment of negated imaginary literals.
Mark Dickinson [Wed, 30 Jun 2010 09:14:43 +0000 (09:14 +0000)]
Remove backtick syntax for repr.
Mark Dickinson [Wed, 30 Jun 2010 09:05:47 +0000 (09:05 +0000)]
Better solution for attribute access on integer literals.
Mark Dickinson [Wed, 30 Jun 2010 08:46:53 +0000 (08:46 +0000)]
Output try-except-finally statements where appropriate.
Mark Dickinson [Wed, 30 Jun 2010 08:32:11 +0000 (08:32 +0000)]
Collapse else: if: ... into elif:
Mark Dickinson [Tue, 29 Jun 2010 20:10:42 +0000 (20:10 +0000)]
Merged revisions 82379 via svnmerge from
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.
........
Mark Dickinson [Tue, 29 Jun 2010 18:38:59 +0000 (18:38 +0000)]
Fix typo in unparsing of a class definition.
Benjamin Peterson [Tue, 29 Jun 2010 18:36:39 +0000 (18:36 +0000)]
update for nonlocal keyword
Brett Cannon [Tue, 29 Jun 2010 18:26:11 +0000 (18:26 +0000)]
Make a sentence a little less awkward.
Benjamin Peterson [Tue, 29 Jun 2010 15:57:57 +0000 (15:57 +0000)]
note that byte strings can be raw, too #9114
Benjamin Peterson [Tue, 29 Jun 2010 15:32:34 +0000 (15:32 +0000)]
Blocked revisions 82368 via svnmerge
........
r82368 | benjamin.peterson | 2010-06-29 10:18:02 -0500 (Tue, 29 Jun 2010) | 1 line
group cStringIO docs under its factory function
........
Vinay Sajip [Tue, 29 Jun 2010 15:31:15 +0000 (15:31 +0000)]
Added information about pickle security and SocketHandler, and some cross-reference targets.
Mark Dickinson [Tue, 29 Jun 2010 14:08:23 +0000 (14:08 +0000)]
test_unparse.py: Do roundtrip testing for all Python files in Lib and Lib/test.
Mark Dickinson [Tue, 29 Jun 2010 10:01:48 +0000 (10:01 +0000)]
More unparse.py fixes:
- 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.
Mark Dickinson [Tue, 29 Jun 2010 08:52:36 +0000 (08:52 +0000)]
Add parentheses around numeric literals, to avoid turning 3 .bit_length() into 3.bit_length().
Mark Dickinson [Tue, 29 Jun 2010 07:48:23 +0000 (07:48 +0000)]
unparse.py: respect coding cookie in input files
Mark Dickinson [Tue, 29 Jun 2010 07:38:37 +0000 (07:38 +0000)]
Merged revisions 82356 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82356 | mark.dickinson | 2010-06-29 08:37:25 +0100 (Tue, 29 Jun 2010) | 1 line
Spelling.
........
Benjamin Peterson [Tue, 29 Jun 2010 01:27:35 +0000 (01:27 +0000)]
rephrase and remove uneeded statement
Brian Curtin [Tue, 29 Jun 2010 00:14:28 +0000 (00:14 +0000)]
Update md5driver.py for 3.x.
Changed an import, replaced md5.new() with md5(), and added an encode where needed.
Mark Dickinson [Mon, 28 Jun 2010 21:39:51 +0000 (21:39 +0000)]
unparse.py: Typo fix.
Mark Dickinson [Mon, 28 Jun 2010 21:14:17 +0000 (21:14 +0000)]
Update Demo/parser/unparse.py to current Python 3.x syntax. Additions:
- 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.
Mark Dickinson [Mon, 28 Jun 2010 20:09:18 +0000 (20:09 +0000)]
Merged revisions 82345 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82345 | mark.dickinson | 2010-06-28 20:54:19 +0100 (Mon, 28 Jun 2010) | 1 line
unparse.py: fix mispaced parentheses in chained comparisons
........
Mark Dickinson [Mon, 28 Jun 2010 19:44:20 +0000 (19:44 +0000)]
Merged revisions 82338,82340-82341 via svnmerge from
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.
........
Benjamin Peterson [Mon, 28 Jun 2010 19:43:42 +0000 (19:43 +0000)]
update error message
Senthil Kumaran [Mon, 28 Jun 2010 17:31:40 +0000 (17:31 +0000)]
Merged revisions 82334 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82334 | senthil.kumaran | 2010-06-28 22:37:40 +0530 (Mon, 28 Jun 2010) | 3 lines
Documentation correction. urllib2.urlopen.info returns a mimetools.Message instance not HTTPMessage object.
........
Benjamin Peterson [Mon, 28 Jun 2010 15:43:25 +0000 (15:43 +0000)]
Merged revisions 82332 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82332 | benjamin.peterson | 2010-06-28 10:41:06 -0500 (Mon, 28 Jun 2010) | 1 line
fix skipping condition
........
Benjamin Peterson [Mon, 28 Jun 2010 15:39:55 +0000 (15:39 +0000)]
Merged revisions 82330 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82330 | benjamin.peterson | 2010-06-28 10:36:40 -0500 (Mon, 28 Jun 2010) | 1 line
testcapi tests are definitely cpython only
........
Alexander Belopolsky [Mon, 28 Jun 2010 14:36:55 +0000 (14:36 +0000)]
Added missing white space
Senthil Kumaran [Mon, 28 Jun 2010 14:08:00 +0000 (14:08 +0000)]
Merged revisions 82324 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82324 | senthil.kumaran | 2010-06-28 19:26:46 +0530 (Mon, 28 Jun 2010) | 3 lines
Fix Issue8653 - Docstring for urlunsplit function.
........
Brett Cannon [Mon, 28 Jun 2010 05:46:25 +0000 (05:46 +0000)]
Add an inheritance test for importlib.abc.SourceLoader.
Brett Cannon [Mon, 28 Jun 2010 04:57:24 +0000 (04:57 +0000)]
Move importlib.abc.SourceLoader to _bootstrap.
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.
Benjamin Peterson [Mon, 28 Jun 2010 03:07:10 +0000 (03:07 +0000)]
Merged revisions 82317 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82317 | benjamin.peterson | 2010-06-27 21:58:25 -0500 (Sun, 27 Jun 2010) | 1 line
remove unused last argument to property_copy
........
Benjamin Peterson [Mon, 28 Jun 2010 00:24:13 +0000 (00:24 +0000)]
fix test with more obviously incorrect bytecode
Benjamin Peterson [Mon, 28 Jun 2010 00:16:12 +0000 (00:16 +0000)]
fix versionchanged
Benjamin Peterson [Mon, 28 Jun 2010 00:01:59 +0000 (00:01 +0000)]
Merged revisions 77402,77505,77510 via svnmerge from
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.
........
Brett Cannon [Sun, 27 Jun 2010 23:57:46 +0000 (23:57 +0000)]
Implement importlib.abc.SourceLoader and deprecate PyLoader and PyPycLoader.
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.
Benjamin Peterson [Sun, 27 Jun 2010 23:53:17 +0000 (23:53 +0000)]
Blocked revisions 79596 via svnmerge
........
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.
........
Benjamin Peterson [Sun, 27 Jun 2010 23:49:45 +0000 (23:49 +0000)]
Merged revisions 79894-79895,80098,80120 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79894 | jeroen.ruigrok | 2010-04-07 09:33:37 -0500 (Wed, 07 Apr 2010) | 5 lines
FreeBSD is not a sysv platform, so use freebsd.S instead of sysv.S (as is
also the case in FreeBSD's port of libffi).
Reviewed by: dickinsm
........
r79895 | jeroen.ruigrok | 2010-04-07 11:34:08 -0500 (Wed, 07 Apr 2010) | 2 lines
Document the libffi FreeBSD fix.
........
r80098 | benjamin.peterson | 2010-04-15 16:42:16 -0500 (Thu, 15 Apr 2010) | 1 line
add space
........
r80120 | antoine.pitrou | 2010-04-16 16:34:02 -0500 (Fri, 16 Apr 2010) | 3 lines
Ignore jinja2
........
Benjamin Peterson [Sun, 27 Jun 2010 23:34:03 +0000 (23:34 +0000)]
Merged revisions 81004 via svnmerge from
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.
........
Benjamin Peterson [Sun, 27 Jun 2010 23:31:03 +0000 (23:31 +0000)]
Blocked revisions 80396 via svnmerge
........
r80396 | sean.reifschneider | 2010-04-23 03:31:55 -0500 (Fri, 23 Apr 2010) | 2 lines
issue8451: Making syslog module use sys.argv[0] for "ident".
........
Benjamin Peterson [Sun, 27 Jun 2010 23:26:04 +0000 (23:26 +0000)]
Recorded merge of revisions 80866 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80866 | andrew.kuchling | 2010-05-06 08:03:39 -0500 (Thu, 06 May 2010) | 1 line
Use anonymous hyperlinks
........
Benjamin Peterson [Sun, 27 Jun 2010 23:21:13 +0000 (23:21 +0000)]
Merged revisions 81880 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81880 | andrew.kuchling | 2010-06-10 19:14:34 -0500 (Thu, 10 Jun 2010) | 1 line
Edit comments for current Python; bump version number of Python
........
Benjamin Peterson [Sun, 27 Jun 2010 23:16:51 +0000 (23:16 +0000)]
Blocked revisions 81700 via svnmerge
........
r81700 | martin.v.loewis | 2010-06-04 14:15:32 -0500 (Fri, 04 Jun 2010) | 2 lines
Display installer warning that Windows 2000 won't
be supported in future releases.
........
Benjamin Peterson [Sun, 27 Jun 2010 22:44:51 +0000 (22:44 +0000)]
Merged revisions 82303 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82303 | benjamin.peterson | 2010-06-27 17:40:26 -0500 (Sun, 27 Jun 2010) | 1 line
mark tracking tests as implementation details
........
Benjamin Peterson [Sun, 27 Jun 2010 22:41:29 +0000 (22:41 +0000)]
Merged revisions 81499,81506 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81499 | georg.brandl | 2010-05-24 16:29:07 -0500 (Mon, 24 May 2010) | 1 line
#8016: add the CP858 codec (approved by Benjamin). (Also add CP720 to the tests, it was missing there.)
........
r81506 | benjamin.peterson | 2010-05-24 17:04:53 -0500 (Mon, 24 May 2010) | 1 line
set svn:eol-style
........
Benjamin Peterson [Sun, 27 Jun 2010 22:37:28 +0000 (22:37 +0000)]
Merged revisions 81380 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81380 | brett.cannon | 2010-05-20 13:37:55 -0500 (Thu, 20 May 2010) | 8 lines
Turned out that if you used explicit relative import syntax
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.
Fixes issue #7902. Thanks to Meador Inge for the patch.
........