Commit Graph

42357 Commits

Author SHA1 Message Date
Ezio Melotti d2191e04a4 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.
........
2010-07-02 23:18:51 +00:00
Brett Cannon 8315fd12a5 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.
2010-07-02 22:03:00 +00:00
Mark Dickinson be5846bfdc 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.
........
2010-07-02 20:26:07 +00:00
Benjamin Peterson 5d4708374c 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
........
2010-07-02 19:45:07 +00:00
Nick Coghlan 4bfb7da842 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
........
2010-07-02 16:14:05 +00:00
Mark Dickinson 6d02d9cc6b Style/consistency nit: make math_floor and math_ceil code look the same. 2010-07-02 16:05:15 +00:00
Nick Coghlan 9fc68c4e70 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
........
2010-07-02 15:57:50 +00:00
Benjamin Peterson f751bc9c01 fix lookup of __ceil__ 2010-07-02 13:46:42 +00:00
Benjamin Peterson b0125892e6 account for different ref counting semantics of _PyObject_LookupSpecial 2010-07-02 13:35:17 +00:00
Georg Brandl 8971f74c55 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.
........
2010-07-02 07:41:51 +00:00
Benjamin Peterson 963babcd05 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
........
2010-07-01 23:39:26 +00:00
Benjamin Peterson b51b5c4be7 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
........
2010-07-01 17:49:01 +00:00
Benjamin Peterson 8bb9cde6c0 correctly lookup __trunc__ and __floor__ 2010-07-01 15:16:55 +00:00
Benjamin Peterson 6e73b19747 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
........
2010-07-01 15:09:14 +00:00
Ezio Melotti 57221d02ba 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.
2010-07-01 07:32:02 +00:00
Benjamin Peterson ead3c83ea9 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
........
2010-06-30 18:44:04 +00:00
Giampaolo Rodolà 610aa4f07f 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
........
2010-06-30 17:47:39 +00:00
Benjamin Peterson 1cc6df97bc 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
........
2010-06-30 17:39:45 +00:00
Mark Dickinson d24305489b 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.
........
2010-06-30 16:36:12 +00:00
Michael Foord b3a8984488 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. 2010-06-30 12:17:50 +00:00
Mark Dickinson cba8c10b5c Unparse infinite imaginary literals correctly. Add some more numeric tests. 2010-06-30 11:45:53 +00:00
Mark Dickinson abe52d749c Revert accidental extra changes included in r82391. 2010-06-30 11:14:30 +00:00
Mark Dickinson 50b79a80bd Issue #9011: Tests for Python 3.2's treatment of negated imaginary literals. 2010-06-30 11:13:36 +00:00
Mark Dickinson af0e1544bf Remove backtick syntax for repr. 2010-06-30 09:14:43 +00:00
Mark Dickinson b67e15c53c Better solution for attribute access on integer literals. 2010-06-30 09:05:47 +00:00
Mark Dickinson 81ad8ccdfb Output try-except-finally statements where appropriate. 2010-06-30 08:46:53 +00:00
Mark Dickinson 8d6d760422 Collapse else: if: ... into elif: 2010-06-30 08:32:11 +00:00
Mark Dickinson 719e4e3ba5 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.
........
2010-06-29 20:10:42 +00:00
Mark Dickinson 578aa56f9a Fix typo in unparsing of a class definition. 2010-06-29 18:38:59 +00:00
Benjamin Peterson 927ccd257f update for nonlocal keyword 2010-06-29 18:36:39 +00:00
Brett Cannon 0e13c9451e Make a sentence a little less awkward. 2010-06-29 18:26:11 +00:00
Benjamin Peterson 162dd7484e note that byte strings can be raw, too #9114 2010-06-29 15:57:57 +00:00
Benjamin Peterson ac16bdec57 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
........
2010-06-29 15:32:34 +00:00
Vinay Sajip d31f363b48 Added information about pickle security and SocketHandler, and some cross-reference targets. 2010-06-29 15:31:15 +00:00
Mark Dickinson d751c2eafc test_unparse.py: Do roundtrip testing for all Python files in Lib and Lib/test. 2010-06-29 14:08:23 +00:00
Mark Dickinson 8042e28192 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.
2010-06-29 10:01:48 +00:00
Mark Dickinson 3eb0290346 Add parentheses around numeric literals, to avoid turning 3 .bit_length() into 3.bit_length(). 2010-06-29 08:52:36 +00:00
Mark Dickinson 82c8d93357 unparse.py: respect coding cookie in input files 2010-06-29 07:48:23 +00:00
Mark Dickinson 3c0b317e36 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.
........
2010-06-29 07:38:37 +00:00
Benjamin Peterson fb288dac9d rephrase and remove uneeded statement 2010-06-29 01:27:35 +00:00
Brian Curtin 3778db7b51 Update md5driver.py for 3.x.
Changed an import, replaced md5.new() with md5(), and added an encode where needed.
2010-06-29 00:14:28 +00:00
Mark Dickinson 3d1bfbf9a6 unparse.py: Typo fix. 2010-06-28 21:39:51 +00:00
Mark Dickinson fa2e4e9d04 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.
2010-06-28 21:14:17 +00:00
Mark Dickinson f5451e546a 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
........
2010-06-28 20:09:18 +00:00
Mark Dickinson ae1000533a 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.
........
2010-06-28 19:44:20 +00:00
Benjamin Peterson e893af5ab7 update error message 2010-06-28 19:43:42 +00:00
Senthil Kumaran 13a7eb4529 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.
........
2010-06-28 17:31:40 +00:00
Benjamin Peterson 902d2bd64d 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
........
2010-06-28 15:43:25 +00:00
Benjamin Peterson 17e0bbc30c 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
........
2010-06-28 15:39:55 +00:00
Alexander Belopolsky 311d2a93a1 Added missing white space 2010-06-28 14:36:55 +00:00