Commit Graph

38493 Commits

Author SHA1 Message Date
Benjamin Peterson 8cad9c777b fix docs about open's return value #5539
(how annoying to have the same docs in two places)

(three if you count the docstring...)
2009-03-23 02:38:01 +00:00
Matthias Klose 21e5fcd245 - Modules/Setup.dist: Readd the _functools extension, lost in the io-c merge. 2009-03-22 23:58:48 +00:00
Lars Gustäbel 42e0091208 Merged revisions 70523 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70523 | lars.gustaebel | 2009-03-22 21:09:33 +0100 (Sun, 22 Mar 2009) | 5 lines

  Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop
  forever on incomplete input. That caused tarfile.open() to hang when used
  with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
  partial bzip2 compressed data.
........
2009-03-22 20:34:29 +00:00
Benjamin Peterson db08306bc2 fix incorrect merge 2009-03-22 17:22:36 +00:00
Benjamin Peterson 9d57ccb6c6 Blocked revisions 70463 via svnmerge
........
  r70463 | benjamin.peterson | 2009-03-18 15:52:15 -0500 (Wed, 18 Mar 2009) | 1 line

  fix strange errors when setting attributes on tracebacks #4034
........
2009-03-21 17:49:59 +00:00
Benjamin Peterson 0ed52455b7 port the queue change r70405 2009-03-21 17:36:10 +00:00
Benjamin Peterson f07d0026da Merged revisions 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406,70418,70438,70464,70468 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70342 | georg.brandl | 2009-03-13 14:03:58 -0500 (Fri, 13 Mar 2009) | 1 line

  #5486: typos.
........
  r70385 | benjamin.peterson | 2009-03-15 09:38:55 -0500 (Sun, 15 Mar 2009) | 1 line

  fix tuple.index() error message #5495
........
  r70386 | georg.brandl | 2009-03-15 16:32:06 -0500 (Sun, 15 Mar 2009) | 1 line

  #5496: fix docstring of lookup().
........
  r70387 | georg.brandl | 2009-03-15 16:37:16 -0500 (Sun, 15 Mar 2009) | 1 line

  #5493: clarify __nonzero__ docs.
........
  r70389 | georg.brandl | 2009-03-15 16:43:38 -0500 (Sun, 15 Mar 2009) | 1 line

  Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int.
........
  r70390 | georg.brandl | 2009-03-15 16:44:43 -0500 (Sun, 15 Mar 2009) | 1 line

  #5491: clarify nested() semantics.
........
  r70392 | georg.brandl | 2009-03-15 16:46:00 -0500 (Sun, 15 Mar 2009) | 1 line

  #5488: add missing struct member.
........
  r70393 | georg.brandl | 2009-03-15 16:47:42 -0500 (Sun, 15 Mar 2009) | 1 line

  #5478: fix copy-paste oversight in function signature.
........
  r70395 | georg.brandl | 2009-03-15 16:51:48 -0500 (Sun, 15 Mar 2009) | 1 line

  #5276: document IDLESTARTUP and .Idle.py.
........
  r70400 | georg.brandl | 2009-03-15 16:59:37 -0500 (Sun, 15 Mar 2009) | 3 lines

  Fix markup in re docs and give a mail address in regex howto, so that
  the recommendation to send suggestions to the author can be followed.
........
  r70405 | georg.brandl | 2009-03-15 17:11:07 -0500 (Sun, 15 Mar 2009) | 7 lines

  Move the previously local import of threading to module level.

  This is cleaner and avoids lockups in obscure cases where a Queue
  is instantiated while the import lock is already held by another thread.

  OKed by Tim Peters.
........
  r70406 | hirokazu.yamamoto | 2009-03-15 17:43:14 -0500 (Sun, 15 Mar 2009) | 1 line

  Added skip for old MSVC.
........
  r70418 | georg.brandl | 2009-03-16 14:42:03 -0500 (Mon, 16 Mar 2009) | 1 line

  Add token markup.
........
  r70438 | benjamin.peterson | 2009-03-17 15:29:51 -0500 (Tue, 17 Mar 2009) | 1 line

  I thought this was begging for an example
........
  r70464 | benjamin.peterson | 2009-03-18 15:58:09 -0500 (Wed, 18 Mar 2009) | 1 line

  a much better example
........
  r70468 | benjamin.peterson | 2009-03-18 22:04:31 -0500 (Wed, 18 Mar 2009) | 1 line

  close files after comparing them
........
2009-03-21 17:31:58 +00:00
Benjamin Peterson 839d6cac82 Blocked revisions 70286,70290,70292-70293,70295-70296,70298,70300,70305,70315,70319,70466,70470,70472-70473,70475,70477,70479,70485 via svnmerge
........
  r70286 | raymond.hettinger | 2009-03-09 19:06:05 -0500 (Mon, 09 Mar 2009) | 1 line

  Fix markup.
........
  r70290 | raymond.hettinger | 2009-03-09 20:07:30 -0500 (Mon, 09 Mar 2009) | 1 line

  Update url for the spec.
........
  r70292 | raymond.hettinger | 2009-03-09 23:40:24 -0500 (Mon, 09 Mar 2009) | 1 line

  Clarify the meaning of normal and subnormal.
........
  r70293 | raymond.hettinger | 2009-03-09 23:49:21 -0500 (Mon, 09 Mar 2009) | 1 line

  Add a version tag to the decimal module.
........
  r70295 | raymond.hettinger | 2009-03-10 03:16:05 -0500 (Tue, 10 Mar 2009) | 1 line

  Update the decimal FAQ for the from_float() classmethod and improve the recipe for remove_exponent() to make it cut and pasteable.
........
  r70296 | raymond.hettinger | 2009-03-10 04:31:48 -0500 (Tue, 10 Mar 2009) | 1 line

  Small optimization for corner case where maxlen==0.
........
  r70298 | raymond.hettinger | 2009-03-10 07:50:59 -0500 (Tue, 10 Mar 2009) | 1 line

  For collections.deque() objects, expose the maxlen parameter as a read-only attribute.
........
  r70300 | raymond.hettinger | 2009-03-10 08:04:30 -0500 (Tue, 10 Mar 2009) | 1 line

  Fix typo.
........
  r70305 | brett.cannon | 2009-03-10 23:51:06 -0500 (Tue, 10 Mar 2009) | 5 lines

  Require implementations for warnings.showwarning() support the 'line' argument.
  Was a DeprecationWarning for not supporting it since Python 2.6.

  Closes issue #3652.
........
  r70315 | raymond.hettinger | 2009-03-11 19:25:03 -0500 (Wed, 11 Mar 2009) | 1 line

  Add reference to solution for a commonly asked question.
........
  r70319 | raymond.hettinger | 2009-03-11 19:31:58 -0500 (Wed, 11 Mar 2009) | 1 line

  Issue 5477: Fix buglet in the itertools documentation.
........
  r70466 | raymond.hettinger | 2009-03-18 17:13:20 -0500 (Wed, 18 Mar 2009) | 1 line

  Use mixin methods where possible. (2.7 only -- these don't all exist in 3.0)
........
  r70470 | raymond.hettinger | 2009-03-19 10:21:10 -0500 (Thu, 19 Mar 2009) | 6 lines

  Improve implementation with better underlying data structure
  for O(1) deletions.  Big-Oh performance now the same as regular
  dictionaries.  Uses a doubly-linked list instead of a list/seq
  to track insertion order.
........
  r70472 | raymond.hettinger | 2009-03-19 14:24:43 -0500 (Thu, 19 Mar 2009) | 1 line

  Silence a compiler warning.
........
  r70473 | raymond.hettinger | 2009-03-19 14:59:58 -0500 (Thu, 19 Mar 2009) | 6 lines

  * Add clearer comment to initialization code.
  * Add optional argument to popitem() -- modeled
    after Anthon van der Neut's C version.
  * Fix method markup in docs.
........
  r70475 | raymond.hettinger | 2009-03-19 18:12:41 -0500 (Thu, 19 Mar 2009) | 6 lines

  * Add implementation notes.
  * Re-order methods so that those touching the underlying data
    structure come first and the derived methods come last.
........
  r70477 | raymond.hettinger | 2009-03-19 18:22:25 -0500 (Thu, 19 Mar 2009) | 1 line

  Fix typo
........
  r70479 | mark.dickinson | 2009-03-20 10:51:55 -0500 (Fri, 20 Mar 2009) | 3 lines

  Issue #4258:  Use 30-bit digits for Python longs, on 64-bit platforms.
  Backport of r70459.
........
  r70485 | raymond.hettinger | 2009-03-20 13:25:49 -0500 (Fri, 20 Mar 2009) | 1 line

  Add MutableSet example.
........
2009-03-21 17:17:56 +00:00
Hirokazu Yamamoto 3530246621 Merged revisions 70499 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70499 | hirokazu.yamamoto | 2009-03-21 19:32:52 +0900 | 1 line

  There is no macro named SIZEOF_SSIZE_T. Should use SIZEOF_SIZE_T instead.
........
2009-03-21 13:23:27 +00:00
Mark Dickinson af23217798 Remove remnants of svn conflict marker from Misc/NEWS 2009-03-21 10:51:42 +00:00
Mark Dickinson ae681df4d8 - Issue #5463: In struct module, remove deprecated overflow wrapping
when packing an integer: for example, struct.pack('=L', -1) now
  raises struct.error instead of returning b'\xff\xff\xff\xff'.

  Thanks Andreas Schawo for the patch.
2009-03-21 10:26:31 +00:00
Brett Cannon e43b060b05 Document import's semantics for the language reference. This includes filling
in missing details for the sys module.
2009-03-21 03:11:16 +00:00
Benjamin Peterson b487e63282 stringio doesn't have an encoding 2009-03-21 03:08:31 +00:00
Mark Dickinson 16f966ee26 Merged revisions 70489 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70489 | mark.dickinson | 2009-03-20 23:16:14 +0000 (Fri, 20 Mar 2009) | 4 lines

  Rewrite Py_ARITHMETIC_RIGHT_SHIFT so that it's valid for all signed
  integer types T, not just those for which "unsigned T" is legal.
........
2009-03-20 23:23:15 +00:00
Raymond Hettinger be075b1c4e Add MutableSet example. 2009-03-20 18:33:06 +00:00
Mark Dickinson d72c7b671e Add ..versionadded for sys.int_info, update py3k version of
whatsnew/2.7.rst to keep it in sync with the trunk version, and
replace SHIFT with PyLong_SHIFT in #error message
2009-03-20 16:00:49 +00:00
Mark Dickinson 0ef2cf6126 Blocked revisions 70479 via svnmerge
........
  r70479 | mark.dickinson | 2009-03-20 15:51:55 +0000 (Fri, 20 Mar 2009) | 3 lines

  Issue #4258:  Use 30-bit digits for Python longs, on 64-bit platforms.
  Backport of r70459.
........
2009-03-20 15:53:29 +00:00
Raymond Hettinger bfb5456142 Fix typo 2009-03-19 23:23:15 +00:00
Raymond Hettinger 18ed2cbc75 Forward port 70475: Add implementation notes. Put methods in more readable order. 2009-03-19 23:14:39 +00:00
Raymond Hettinger dc879f033c Forward port r70470 and r70473 for OrderedDict to use a doubly linked list. 2009-03-19 20:30:56 +00:00
Antoine Pitrou 6cf17aacbf svnmerge from trunk for r70457 (sorry, I accidentally deleted the commit message) 2009-03-18 20:26:42 +00:00
Mark Dickinson bd7926478d Issue #4258: Make it possible to use 30-bit digits for PyLongs:
- new configure option --enable-big-digits
 - new structseq sys.int_info giving information about the internal format
By default, 30-bit digits are enabled on 64-bit machines but
disabled on 32-bit machines.
2009-03-18 20:06:12 +00:00
Mark Dickinson e7f45b8e59 Blocked revisions 70454 via svnmerge
........
  r70454 | mark.dickinson | 2009-03-18 16:07:26 +0000 (Wed, 18 Mar 2009) | 9 lines

  Issue 4474: On platforms with sizeof(wchar_t) == 4 and
  sizeof(Py_UNICODE) == 2, PyUnicode_FromWideChar now converts
  each character outside the BMP to the appropriate surrogate pair.

  Thanks Victor Stinner for the patch.

  (backport of r70452 from py3k to trunk)
........
2009-03-18 16:09:22 +00:00
Mark Dickinson 081dfee4f1 Issue 4474: On platforms with sizeof(wchar_t) == 4 and
sizeof(Py_UNICODE) == 2, PyUnicode_FromWideChar now converts
each character outside the BMP to the appropriate surrogate pair.

Thanks Victor Stinner for the patch.
2009-03-18 14:47:41 +00:00
Hirokazu Yamamoto ecdfd513a2 Merged revisions 70448 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70448 | hirokazu.yamamoto | 2009-03-18 19:17:26 +0900 | 3 lines

  Updated openssl support on VC6. (openssl-0.9.6g is old, cannot compile with _ssl.c)
  If you use http://svn.python.org/projects/external/openssl-0.9.8g, Perl is not needed.
  This scheme was ported from PCBuild.
........
2009-03-18 11:39:46 +00:00
Mark Dickinson 7303b594e6 Merged revisions 70444 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70444 | mark.dickinson | 2009-03-18 08:22:51 +0000 (Wed, 18 Mar 2009) | 3 lines

  Fix bug in _insert_thousands_sep: too much zero padding could be
  added for 'n' formats with non-repeating thousands-separator.
........
2009-03-18 08:25:36 +00:00
Mark Dickinson 79f52039fe Merged revisions 70439 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70439 | mark.dickinson | 2009-03-17 23:03:46 +0000 (Tue, 17 Mar 2009) | 3 lines

  Issue #2110:  Add support for thousands separator and 'n' format specifier
  to Decimal __format__ method.
........
2009-03-17 23:12:51 +00:00
Mark Dickinson 9c59fe0714 Move Misc/NEWS item to the right place. 2009-03-17 18:15:08 +00:00
Mark Dickinson ad41634313 Merged revisions 70430 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70430 | mark.dickinson | 2009-03-17 18:01:03 +0000 (Tue, 17 Mar 2009) | 3 lines

  Fix bug in Decimal __format__ method that swapped left and right
  alignment.
........
2009-03-17 18:10:15 +00:00
Brett Cannon 44c5481941 Fix a doc typo. 2009-03-16 22:30:11 +00:00
Georg Brandl 7f157864a0 Merged revisions 70397 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70397 | georg.brandl | 2009-03-15 22:53:56 +0100 (So, 15 Mär 2009) | 1 line

  #5469: add with statement to list of name-binding constructs.
........
2009-03-15 21:57:20 +00:00
Nick Coghlan 9309583176 Merged revisions 70378 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70378 | nick.coghlan | 2009-03-15 13:24:46 +1000 (Sun, 15 Mar 2009) | 1 line

  Make marshalling errors a little more informative as to what went wrong
........
2009-03-15 05:07:56 +00:00
Brett Cannon 8d11013169 Implement InspectLoader for FrozenImporter. 2009-03-15 02:20:16 +00:00
Brett Cannon 2b9fd47da7 Fix docs for __import__ that say the default for 'level' is -1; it's actually
0.
2009-03-15 02:18:41 +00:00
Brett Cannon a113ac58be Implement InspectLoader for BuiltinImporter. 2009-03-15 01:41:33 +00:00
Brett Cannon 7aa21f75c1 A few more docstring/API cleanups for importlib. 2009-03-15 00:53:05 +00:00
Brett Cannon 0e0d8a63b1 Clean up docstring from importlib.util.module_for_loader. 2009-03-15 00:00:19 +00:00
Eric Smith 22b1331930 Blocked revisions 70368 via svnmerge
........
  r70368 | eric.smith | 2009-03-14 10:37:38 -0400 (Sat, 14 Mar 2009) | 1 line

  Unicode format tests weren't actually testing unicode. This was probably due to the original backport from py3k.
........
2009-03-14 14:44:03 +00:00
Eric Smith 8ec90443f5 Merged revisions 70364 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70364 | eric.smith | 2009-03-14 07:57:26 -0400 (Sat, 14 Mar 2009) | 17 lines

  Issue 5237, Allow auto-numbered replacement fields in str.format() strings.

  For simple uses for str.format(), this makes the typing easier. Hopfully this
  will help in the adoption of str.format().

  For example:
  'The {} is {}'.format('sky', 'blue')

  You can mix and matcth auto-numbering and named replacement fields:
  'The {} is {color}'.format('sky', color='blue')

  But you can't mix and match auto-numbering and specified numbering:
  'The {0} is {}'.format('sky', 'blue')
  ValueError: cannot switch from manual field specification to automatic field numbering

  Will port to 3.1.
........
2009-03-14 12:29:34 +00:00
Antoine Pitrou 350370c25f Merged revisions 70356 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70356 | antoine.pitrou | 2009-03-14 01:07:21 +0100 (sam., 14 mars 2009) | 3 lines

  Issue #1222: locale.format() bug when the thousands separator is a space character.
........
2009-03-14 00:13:13 +00:00
Antoine Pitrou a28fcfdbda Issue #5016: FileIO.seekable() could return False if the file position
was negative when truncated to a C int. Patch by Victor Stinner.
2009-03-13 23:42:55 +00:00
Antoine Pitrou 0ae29cf617 The error detection code in FileIO.close() could fail to reflect the `errno` value, and report it as -1 instead. 2009-03-13 22:33:17 +00:00
Antoine Pitrou 652e7076fe Issue #5392: when a very low recursion limit was set, the interpreter would
abort with a fatal error after the recursion limit was hit twice.
2009-03-13 19:25:20 +00:00
Georg Brandl ae2dbe2543 #5486: typos. 2009-03-13 19:04:40 +00:00
Brett Cannon f87e04d339 Finish properly hiding importlib implementation code. 2009-03-12 22:47:53 +00:00
Brett Cannon e9103d2619 Last big re-organization of importlib._bootstrap. Should actually be able to find something in the file now. 2009-03-12 22:37:06 +00:00
Brett Cannon ce43ddfee5 Do a little bit of reorganization on importlib._bootstrap. 2009-03-12 22:28:55 +00:00
Brett Cannon 3eeaa0a821 Make utility code in importlib._bootstrap private. 2009-03-12 22:07:17 +00:00
Brett Cannon 9495f182a0 Define importlib.__init__.__all__. 2009-03-12 22:01:40 +00:00
Raymond Hettinger 2c109ab514 Issue 5477: Fix buglet in the itertools documentation. 2009-03-12 00:29:44 +00:00