]> granicus.if.org Git - python/log
python
15 years agoSeparate initialization from clearing.
Raymond Hettinger [Wed, 25 Mar 2009 22:45:22 +0000 (22:45 +0000)]
Separate initialization from clearing.

15 years agowild card import is only allowed at the module level
Benjamin Peterson [Wed, 25 Mar 2009 21:50:43 +0000 (21:50 +0000)]
wild card import is only allowed at the module level

15 years agoclarify the type of data returned
Skip Montanaro [Wed, 25 Mar 2009 00:52:18 +0000 (00:52 +0000)]
clarify the type of data returned

15 years agoreuse tokenize.detect_encoding in linecache instead of a custom solution
Benjamin Peterson [Tue, 24 Mar 2009 22:30:15 +0000 (22:30 +0000)]
reuse tokenize.detect_encoding in linecache instead of a custom solution

patch by Victor Stinner #4016

15 years agohttp://bugs.python.org/issue5544
Kristján Valur Jónsson [Tue, 24 Mar 2009 15:27:42 +0000 (15:27 +0000)]
http://bugs.python.org/issue5544
Guard _fileio.c against other malicious os.close(f.fileno()) attempts.
Add tests to test_fileio.py to verify behaviour.

15 years agohttp://bugs.python.org/issue5552
Kristján Valur Jónsson [Tue, 24 Mar 2009 14:15:49 +0000 (14:15 +0000)]
http://bugs.python.org/issue5552
Return None rather than raise an exception if os.device_error is given an invalid file descriptor.

15 years agohttp://bugs.python.org/issue5544
Kristján Valur Jónsson [Tue, 24 Mar 2009 13:51:36 +0000 (13:51 +0000)]
http://bugs.python.org/issue5544
Fix to the last checkin, correctly raise an exception on failure.

15 years agohttp://bugs.python.org/issue5544
Kristján Valur Jónsson [Tue, 24 Mar 2009 13:21:53 +0000 (13:21 +0000)]
http://bugs.python.org/issue5544
Someone may have closed the file descriptor, with something like
f = open('test.test', 'w')
os.close(f.fileno())
f.close()
Protect against this by checking fd on windows before closing.

15 years agofix function name
Benjamin Peterson [Tue, 24 Mar 2009 01:40:39 +0000 (01:40 +0000)]
fix function name

15 years agoMerged revisions 70574 via svnmerge from
Benjamin Peterson [Tue, 24 Mar 2009 01:33:55 +0000 (01:33 +0000)]
Merged revisions 70574 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70574 | benjamin.peterson | 2009-03-23 20:11:37 -0500 (Mon, 23 Mar 2009) | 1 line

  fix typo
........

15 years agofix some versionchanged and versionadded directives
Benjamin Peterson [Tue, 24 Mar 2009 01:00:11 +0000 (01:00 +0000)]
fix some versionchanged and versionadded directives

15 years agoMerged revisions 70558,70561-70563,70568-70571 via svnmerge from
Benjamin Peterson [Tue, 24 Mar 2009 00:56:30 +0000 (00:56 +0000)]
Merged revisions 70558,70561-70563,70568-70571 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70558 | benjamin.peterson | 2009-03-23 17:29:45 -0500 (Mon, 23 Mar 2009) | 4 lines

  comply with the evilJavaNamingScheme for attribute names

  It seems my love of PEP 8 overrode the need for consistentcy
........
  r70561 | benjamin.peterson | 2009-03-23 18:10:14 -0500 (Mon, 23 Mar 2009) | 1 line

  refactor unittest docs
........
  r70562 | benjamin.peterson | 2009-03-23 18:13:36 -0500 (Mon, 23 Mar 2009) | 1 line

  forgot to document that setUp can be skipped (silly me...)
........
  r70563 | benjamin.peterson | 2009-03-23 18:19:03 -0500 (Mon, 23 Mar 2009) | 1 line

  update from CVS
........
  r70568 | benjamin.peterson | 2009-03-23 19:35:20 -0500 (Mon, 23 Mar 2009) | 1 line

  some cleanup and modernization
........
  r70569 | benjamin.peterson | 2009-03-23 19:36:16 -0500 (Mon, 23 Mar 2009) | 1 line

  remove special metadata
........
  r70570 | benjamin.peterson | 2009-03-23 19:37:12 -0500 (Mon, 23 Mar 2009) | 1 line

  update docstring
........
  r70571 | benjamin.peterson | 2009-03-23 19:39:24 -0500 (Mon, 23 Mar 2009) | 1 line

  add new skipping things to __all__
........

15 years agoAdd links to related resources.
Raymond Hettinger [Tue, 24 Mar 2009 00:22:53 +0000 (00:22 +0000)]
Add links to related resources.

15 years agoFor some reason rst docs like an initial 3 space indent.
Raymond Hettinger [Mon, 23 Mar 2009 22:42:28 +0000 (22:42 +0000)]
For some reason rst docs like an initial 3 space indent.

15 years agoMerged revisions 70555 via svnmerge from
Benjamin Peterson [Mon, 23 Mar 2009 22:25:03 +0000 (22:25 +0000)]
Merged revisions 70555 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70555 | benjamin.peterson | 2009-03-23 16:50:21 -0500 (Mon, 23 Mar 2009) | 4 lines

  implement test skipping and expected failures

  patch by myself #1034053
........

15 years agoPyString_FromString -> PyUnicode_FromString
Benjamin Peterson [Mon, 23 Mar 2009 21:52:09 +0000 (21:52 +0000)]
PyString_FromString -> PyUnicode_FromString

15 years agoMerged revisions 70550 via svnmerge from
Antoine Pitrou [Mon, 23 Mar 2009 19:19:54 +0000 (19:19 +0000)]
Merged revisions 70550 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70550 | antoine.pitrou | 2009-03-23 20:17:00 +0100 (lun., 23 mars 2009) | 3 lines

  The tracking statistics were actually too pessimistic
........

15 years agoMerged revisions 70546 via svnmerge from
Antoine Pitrou [Mon, 23 Mar 2009 18:52:06 +0000 (18:52 +0000)]
Merged revisions 70546 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70546 | antoine.pitrou | 2009-03-23 19:41:45 +0100 (lun., 23 mars 2009) | 9 lines

  Issue #4688: Add a heuristic so that tuples and dicts containing only
  untrackable objects are not tracked by the garbage collector. This can
  reduce the size of collections and therefore the garbage collection overhead
  on long-running programs, depending on their particular use of datatypes.

  (trivia: this makes the "binary_trees" benchmark from the Computer Language
  Shootout 40% faster)
........

15 years agoMerged revisions 70542 via svnmerge from
Mark Dickinson [Mon, 23 Mar 2009 18:44:57 +0000 (18:44 +0000)]
Merged revisions 70542 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70542 | mark.dickinson | 2009-03-23 18:25:13 +0000 (Mon, 23 Mar 2009) | 14 lines

  Issue #5512: speed up the long division algorithm for Python longs.
  The basic algorithm remains the same; the most significant speedups
  come from the following three changes:

    (1) normalize by shifting instead of multiplying and dividing
    (2) the old algorithm usually did an unnecessary extra iteration of
        the outer loop; remove this.  As a special case, this means that
        long divisions with a single-digit result run twice as fast as
        before.
    (3) make inner loop much tighter.

  Various benchmarks show speedups of between 50% and 150% for long
  integer divisions and modulo operations.
........

15 years agoMake imported name private and wrap long-line.
Raymond Hettinger [Mon, 23 Mar 2009 18:29:11 +0000 (18:29 +0000)]
Make imported name private and wrap long-line.

15 years agoForward port r70533 and r70538.
Raymond Hettinger [Mon, 23 Mar 2009 05:19:21 +0000 (05:19 +0000)]
Forward port r70533 and r70538.

15 years agomore about the file type's death #5513
Benjamin Peterson [Mon, 23 Mar 2009 02:49:51 +0000 (02:49 +0000)]
more about the file type's death #5513

15 years agosync open() docs more
Benjamin Peterson [Mon, 23 Mar 2009 02:44:58 +0000 (02:44 +0000)]
sync open() docs more

15 years agofix docs about open's return value #5539
Benjamin Peterson [Mon, 23 Mar 2009 02:38:01 +0000 (02:38 +0000)]
fix docs about open's return value #5539

(how annoying to have the same docs in two places)

(three if you count the docstring...)

15 years ago- Modules/Setup.dist: Readd the _functools extension, lost in the io-c merge.
Matthias Klose [Sun, 22 Mar 2009 23:58:48 +0000 (23:58 +0000)]
- Modules/Setup.dist: Readd the _functools extension, lost in the io-c merge.

15 years agoMerged revisions 70523 via svnmerge from
Lars Gustäbel [Sun, 22 Mar 2009 20:34:29 +0000 (20:34 +0000)]
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.
........

15 years agofix incorrect merge
Benjamin Peterson [Sun, 22 Mar 2009 17:22:36 +0000 (17:22 +0000)]
fix incorrect merge

15 years agoBlocked revisions 70463 via svnmerge
Benjamin Peterson [Sat, 21 Mar 2009 17:49:59 +0000 (17:49 +0000)]
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
........

15 years agoport the queue change r70405
Benjamin Peterson [Sat, 21 Mar 2009 17:36:10 +0000 (17:36 +0000)]
port the queue change r70405

15 years agoMerged revisions 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406...
Benjamin Peterson [Sat, 21 Mar 2009 17:31:58 +0000 (17:31 +0000)]
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
........

15 years agoBlocked revisions 70286,70290,70292-70293,70295-70296,70298,70300,70305,70315,70319...
Benjamin Peterson [Sat, 21 Mar 2009 17:17:56 +0000 (17:17 +0000)]
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.
........

15 years agoMerged revisions 70499 via svnmerge from
Hirokazu Yamamoto [Sat, 21 Mar 2009 13:23:27 +0000 (13:23 +0000)]
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.
........

15 years agoRemove remnants of svn conflict marker from Misc/NEWS
Mark Dickinson [Sat, 21 Mar 2009 10:51:42 +0000 (10:51 +0000)]
Remove remnants of svn conflict marker from Misc/NEWS

15 years ago- Issue #5463: In struct module, remove deprecated overflow wrapping
Mark Dickinson [Sat, 21 Mar 2009 10:26:31 +0000 (10:26 +0000)]
- 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.

15 years agoDocument import's semantics for the language reference. This includes filling
Brett Cannon [Sat, 21 Mar 2009 03:11:16 +0000 (03:11 +0000)]
Document import's semantics for the language reference. This includes filling
in missing details for the sys module.

15 years agostringio doesn't have an encoding
Benjamin Peterson [Sat, 21 Mar 2009 03:08:31 +0000 (03:08 +0000)]
stringio doesn't have an encoding

15 years agoMerged revisions 70489 via svnmerge from
Mark Dickinson [Fri, 20 Mar 2009 23:23:15 +0000 (23:23 +0000)]
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.
........

15 years agoAdd MutableSet example.
Raymond Hettinger [Fri, 20 Mar 2009 18:33:06 +0000 (18:33 +0000)]
Add MutableSet example.

15 years agoAdd ..versionadded for sys.int_info, update py3k version of
Mark Dickinson [Fri, 20 Mar 2009 16:00:49 +0000 (16:00 +0000)]
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

15 years agoBlocked revisions 70479 via svnmerge
Mark Dickinson [Fri, 20 Mar 2009 15:53:29 +0000 (15:53 +0000)]
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.
........

15 years agoFix typo
Raymond Hettinger [Thu, 19 Mar 2009 23:23:15 +0000 (23:23 +0000)]
Fix typo

15 years agoForward port 70475: Add implementation notes. Put methods in more readable order.
Raymond Hettinger [Thu, 19 Mar 2009 23:14:39 +0000 (23:14 +0000)]
Forward port 70475:  Add implementation notes.  Put methods in more readable order.

15 years agoForward port r70470 and r70473 for OrderedDict to use a doubly linked list.
Raymond Hettinger [Thu, 19 Mar 2009 20:30:56 +0000 (20:30 +0000)]
Forward port r70470 and r70473 for OrderedDict to use a doubly linked list.

15 years agosvnmerge from trunk for r70457 (sorry, I accidentally deleted the commit message)
Antoine Pitrou [Wed, 18 Mar 2009 20:26:42 +0000 (20:26 +0000)]
svnmerge from trunk for r70457 (sorry, I accidentally deleted the commit message)

15 years agoIssue #4258: Make it possible to use 30-bit digits for PyLongs:
Mark Dickinson [Wed, 18 Mar 2009 20:06:12 +0000 (20:06 +0000)]
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.

15 years agoBlocked revisions 70454 via svnmerge
Mark Dickinson [Wed, 18 Mar 2009 16:09:22 +0000 (16:09 +0000)]
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)
........

15 years agoIssue 4474: On platforms with sizeof(wchar_t) == 4 and
Mark Dickinson [Wed, 18 Mar 2009 14:47:41 +0000 (14:47 +0000)]
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.

15 years agoMerged revisions 70448 via svnmerge from
Hirokazu Yamamoto [Wed, 18 Mar 2009 11:39:46 +0000 (11:39 +0000)]
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.
........

15 years agoMerged revisions 70444 via svnmerge from
Mark Dickinson [Wed, 18 Mar 2009 08:25:36 +0000 (08:25 +0000)]
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.
........

15 years agoMerged revisions 70439 via svnmerge from
Mark Dickinson [Tue, 17 Mar 2009 23:12:51 +0000 (23:12 +0000)]
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.
........

15 years agoMove Misc/NEWS item to the right place.
Mark Dickinson [Tue, 17 Mar 2009 18:15:08 +0000 (18:15 +0000)]
Move Misc/NEWS item to the right place.

15 years agoMerged revisions 70430 via svnmerge from
Mark Dickinson [Tue, 17 Mar 2009 18:10:15 +0000 (18:10 +0000)]
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.
........

15 years agoFix a doc typo.
Brett Cannon [Mon, 16 Mar 2009 22:30:11 +0000 (22:30 +0000)]
Fix a doc typo.

15 years agoMerged revisions 70397 via svnmerge from
Georg Brandl [Sun, 15 Mar 2009 21:57:20 +0000 (21:57 +0000)]
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.
........

15 years agoMerged revisions 70378 via svnmerge from
Nick Coghlan [Sun, 15 Mar 2009 05:07:56 +0000 (05:07 +0000)]
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
........

15 years agoImplement InspectLoader for FrozenImporter.
Brett Cannon [Sun, 15 Mar 2009 02:20:16 +0000 (02:20 +0000)]
Implement InspectLoader for FrozenImporter.

15 years agoFix docs for __import__ that say the default for 'level' is -1; it's actually
Brett Cannon [Sun, 15 Mar 2009 02:18:41 +0000 (02:18 +0000)]
Fix docs for __import__ that say the default for 'level' is -1; it's actually
0.

15 years agoImplement InspectLoader for BuiltinImporter.
Brett Cannon [Sun, 15 Mar 2009 01:41:33 +0000 (01:41 +0000)]
Implement InspectLoader for BuiltinImporter.

15 years agoA few more docstring/API cleanups for importlib.
Brett Cannon [Sun, 15 Mar 2009 00:53:05 +0000 (00:53 +0000)]
A few more docstring/API cleanups for importlib.

15 years agoClean up docstring from importlib.util.module_for_loader.
Brett Cannon [Sun, 15 Mar 2009 00:00:19 +0000 (00:00 +0000)]
Clean up docstring from importlib.util.module_for_loader.

15 years agoBlocked revisions 70368 via svnmerge
Eric Smith [Sat, 14 Mar 2009 14:44:03 +0000 (14:44 +0000)]
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.
........

15 years agoMerged revisions 70364 via svnmerge from
Eric Smith [Sat, 14 Mar 2009 12:29:34 +0000 (12:29 +0000)]
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.
........

15 years agoMerged revisions 70356 via svnmerge from
Antoine Pitrou [Sat, 14 Mar 2009 00:13:13 +0000 (00:13 +0000)]
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.
........

15 years agoIssue #5016: FileIO.seekable() could return False if the file position
Antoine Pitrou [Fri, 13 Mar 2009 23:42:55 +0000 (23:42 +0000)]
Issue #5016: FileIO.seekable() could return False if the file position
was negative when truncated to a C int. Patch by Victor Stinner.

15 years agoThe error detection code in FileIO.close() could fail to reflect the `errno` value...
Antoine Pitrou [Fri, 13 Mar 2009 22:33:17 +0000 (22:33 +0000)]
The error detection code in FileIO.close() could fail to reflect the `errno` value, and report it as -1 instead.

15 years agoIssue #5392: when a very low recursion limit was set, the interpreter would
Antoine Pitrou [Fri, 13 Mar 2009 19:25:20 +0000 (19:25 +0000)]
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.

15 years ago#5486: typos.
Georg Brandl [Fri, 13 Mar 2009 19:04:40 +0000 (19:04 +0000)]
#5486: typos.

15 years agoFinish properly hiding importlib implementation code.
Brett Cannon [Thu, 12 Mar 2009 22:47:53 +0000 (22:47 +0000)]
Finish properly hiding importlib implementation code.

15 years agoLast big re-organization of importlib._bootstrap. Should actually be able to find...
Brett Cannon [Thu, 12 Mar 2009 22:37:06 +0000 (22:37 +0000)]
Last big re-organization of importlib._bootstrap. Should actually be able to find something in the file now.

15 years agoDo a little bit of reorganization on importlib._bootstrap.
Brett Cannon [Thu, 12 Mar 2009 22:28:55 +0000 (22:28 +0000)]
Do a little bit of reorganization on importlib._bootstrap.

15 years agoMake utility code in importlib._bootstrap private.
Brett Cannon [Thu, 12 Mar 2009 22:07:17 +0000 (22:07 +0000)]
Make utility code in importlib._bootstrap private.

15 years agoDefine importlib.__init__.__all__.
Brett Cannon [Thu, 12 Mar 2009 22:01:40 +0000 (22:01 +0000)]
Define importlib.__init__.__all__.

15 years agoIssue 5477: Fix buglet in the itertools documentation.
Raymond Hettinger [Thu, 12 Mar 2009 00:29:44 +0000 (00:29 +0000)]
Issue 5477: Fix buglet in the itertools documentation.

15 years agoAdd reference to solution for a commonly asked question.
Raymond Hettinger [Thu, 12 Mar 2009 00:25:29 +0000 (00:25 +0000)]
Add reference to solution for a commonly asked question.

15 years agoMerged revisions 70308 via svnmerge from
Tarek Ziadé [Wed, 11 Mar 2009 12:52:00 +0000 (12:52 +0000)]
Merged revisions 70308 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70308 | tarek.ziade | 2009-03-11 13:48:04 +0100 (Wed, 11 Mar 2009) | 1 line

  Issue #5472: Fixed distutils.test_util tear down
........

15 years agoAdd a NOTE for importlib to fill in the docstrings for the ABCs.
Brett Cannon [Wed, 11 Mar 2009 05:14:27 +0000 (05:14 +0000)]
Add a NOTE for importlib to fill in the docstrings for the ABCs.

15 years agoBlocked revisions 70305 via svnmerge
Brett Cannon [Wed, 11 Mar 2009 05:11:02 +0000 (05:11 +0000)]
Blocked revisions 70305 via svnmerge

........
  r70305 | brett.cannon | 2009-03-10 21:51:06 -0700 (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.
........

15 years agoRecord version added as 3.1.
Raymond Hettinger [Tue, 10 Mar 2009 22:48:06 +0000 (22:48 +0000)]
Record version added as 3.1.

15 years agoFor collections.deque() objects, expose the maxlen parameter as a read-only attribute.
Raymond Hettinger [Tue, 10 Mar 2009 12:56:32 +0000 (12:56 +0000)]
For collections.deque() objects, expose the maxlen parameter as a read-only attribute.

15 years agoSmall optimization for corner case where maxlen==0.
Raymond Hettinger [Tue, 10 Mar 2009 09:36:07 +0000 (09:36 +0000)]
Small optimization for corner case where maxlen==0.

15 years agoImplement importlib.util.set_loader: a decorator to automatically set
Brett Cannon [Tue, 10 Mar 2009 05:17:37 +0000 (05:17 +0000)]
Implement importlib.util.set_loader: a decorator to automatically set
__loader__ on modules.

15 years agoImplement get_source for importlib.abc.PyLoader using source_path and get_data.
Brett Cannon [Tue, 10 Mar 2009 03:29:23 +0000 (03:29 +0000)]
Implement get_source for importlib.abc.PyLoader using source_path and get_data.

15 years agoFix markup.
Raymond Hettinger [Tue, 10 Mar 2009 00:07:25 +0000 (00:07 +0000)]
Fix markup.

15 years agofix versionchanged
Benjamin Peterson [Mon, 9 Mar 2009 21:08:47 +0000 (21:08 +0000)]
fix versionchanged

15 years agoMerged revisions 69998-69999,70002,70022-70023,70025-70026,70061,70086,70145,70171...
Benjamin Peterson [Mon, 9 Mar 2009 21:04:33 +0000 (21:04 +0000)]
Merged revisions 69998-69999,70002,70022-70023,70025-70026,70061,70086,70145,70171,70183,70188,70235,70244,70275,70281 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69998 | benjamin.peterson | 2009-02-26 13:04:40 -0600 (Thu, 26 Feb 2009) | 1 line

  the startship is rather outdated now
........
  r69999 | benjamin.peterson | 2009-02-26 13:05:59 -0600 (Thu, 26 Feb 2009) | 1 line

  comma
........
  r70002 | andrew.kuchling | 2009-02-26 16:34:30 -0600 (Thu, 26 Feb 2009) | 1 line

  The curses panel library is now supported
........
  r70022 | georg.brandl | 2009-02-27 10:23:18 -0600 (Fri, 27 Feb 2009) | 1 line

  #5361: fix typo.
........
  r70023 | georg.brandl | 2009-02-27 10:39:26 -0600 (Fri, 27 Feb 2009) | 1 line

  #5363: fix cmpfiles() docs. Another instance where a prose description is twice as long as the code.
........
  r70025 | georg.brandl | 2009-02-27 10:52:55 -0600 (Fri, 27 Feb 2009) | 1 line

  #5344: fix punctuation.
........
  r70026 | georg.brandl | 2009-02-27 10:59:03 -0600 (Fri, 27 Feb 2009) | 1 line

  #5365: add quick look conversion table for different time representations.
........
  r70061 | hirokazu.yamamoto | 2009-02-28 09:24:00 -0600 (Sat, 28 Feb 2009) | 1 line

  Binary flag is needed on windows.
........
  r70086 | benjamin.peterson | 2009-03-01 21:35:12 -0600 (Sun, 01 Mar 2009) | 1 line

  fix a silly problem of caching gone wrong #5401
........
  r70145 | benjamin.peterson | 2009-03-03 16:51:57 -0600 (Tue, 03 Mar 2009) | 1 line

  making the writing more formal
........
  r70171 | facundo.batista | 2009-03-04 15:18:17 -0600 (Wed, 04 Mar 2009) | 3 lines

  Fixed a typo.
........
  r70183 | benjamin.peterson | 2009-03-04 18:17:57 -0600 (Wed, 04 Mar 2009) | 1 line

  add example
........
  r70188 | hirokazu.yamamoto | 2009-03-05 03:34:14 -0600 (Thu, 05 Mar 2009) | 1 line

  Fixed memory leak on failure.
........
  r70235 | benjamin.peterson | 2009-03-07 18:21:17 -0600 (Sat, 07 Mar 2009) | 1 line

  fix funky indentation
........
  r70244 | martin.v.loewis | 2009-03-08 09:06:19 -0500 (Sun, 08 Mar 2009) | 2 lines

  Add Chris Withers.
........
  r70275 | georg.brandl | 2009-03-09 11:35:48 -0500 (Mon, 09 Mar 2009) | 2 lines

  Add missing space.
........
  r70281 | benjamin.peterson | 2009-03-09 15:38:56 -0500 (Mon, 09 Mar 2009) | 1 line

  gzip and bz2 are context managers
........

15 years agoBlocked revisions 70261,70267,70271,70273 via svnmerge
Benjamin Peterson [Mon, 9 Mar 2009 20:37:13 +0000 (20:37 +0000)]
Blocked revisions 70261,70267,70271,70273 via svnmerge

........
  r70261 | raymond.hettinger | 2009-03-09 06:31:39 -0500 (Mon, 09 Mar 2009) | 1 line

  Issue 5443: Fix typo.
........
  r70267 | raymond.hettinger | 2009-03-09 06:57:29 -0500 (Mon, 09 Mar 2009) | 1 line

  Add consume() recipe to itertools docs.
........
  r70271 | raymond.hettinger | 2009-03-09 07:56:23 -0500 (Mon, 09 Mar 2009) | 1 line

  Add cross-reference to the collections docs.
........
  r70273 | georg.brandl | 2009-03-09 09:25:07 -0500 (Mon, 09 Mar 2009) | 2 lines

  #5458: add a note when we started to raise RuntimeErrors.
........

15 years agoFix some reST mishaps.
Brett Cannon [Mon, 9 Mar 2009 16:28:16 +0000 (16:28 +0000)]
Fix some reST mishaps.

15 years agoAdd cross-reference to the collections docs.
Raymond Hettinger [Mon, 9 Mar 2009 12:54:35 +0000 (12:54 +0000)]
Add cross-reference to the collections docs.

15 years agoAdd consume() recipe to itertools docs.
Raymond Hettinger [Mon, 9 Mar 2009 11:55:25 +0000 (11:55 +0000)]
Add consume() recipe to itertools docs.

15 years agoIssue 5443: Fix typo.
Raymond Hettinger [Mon, 9 Mar 2009 11:37:57 +0000 (11:37 +0000)]
Issue 5443: Fix typo.

15 years agoClean up importlib NOTES so it only contains short term goals.
Brett Cannon [Mon, 9 Mar 2009 07:54:33 +0000 (07:54 +0000)]
Clean up importlib NOTES so it only contains short term goals.

15 years agoClarify an assumption that importlib.abc.PyLoader makes when importing a
Brett Cannon [Mon, 9 Mar 2009 07:53:09 +0000 (07:53 +0000)]
Clarify an assumption that importlib.abc.PyLoader makes when importing a
package and setting __path__.

15 years agoIntroduce importlib.abc. The module contains various ABCs related to imports
Brett Cannon [Mon, 9 Mar 2009 03:35:50 +0000 (03:35 +0000)]
Introduce importlib.abc. The module contains various ABCs related to imports
(mostly stuff specified by PEP 302). There are two ABCs, PyLoader and
PyPycLoader, which help with implementing source and source/bytecode loaders by
implementing load_module in terms of other methods. This removes a lot of
gritty details loaders typically have to worry about.

15 years agofix StringIO constructor docs #5452
Benjamin Peterson [Mon, 9 Mar 2009 02:02:23 +0000 (02:02 +0000)]
fix StringIO constructor docs #5452

15 years agoRemove a dead XXX comment.
Brett Cannon [Mon, 9 Mar 2009 01:58:13 +0000 (01:58 +0000)]
Remove a dead XXX comment.

15 years agoFix importlib._bootstrap.PyPycLoader.load_module() to better handle
Brett Cannon [Mon, 9 Mar 2009 00:14:37 +0000 (00:14 +0000)]
Fix importlib._bootstrap.PyPycLoader.load_module() to better handle
source/bytecode paths and what to do when they don't exist.

15 years agohack StringIO's repr, so it doesn't give an encoding
Benjamin Peterson [Mon, 9 Mar 2009 00:09:44 +0000 (00:09 +0000)]
hack StringIO's repr, so it doesn't give an encoding

15 years agogive TextIOWrapper a repr that tells you the encoding
Benjamin Peterson [Mon, 9 Mar 2009 00:07:03 +0000 (00:07 +0000)]
give TextIOWrapper a repr that tells you the encoding

15 years agoMake importlib.test.source.util.write_bytecode reset sys.dont_write_bytecode.
Brett Cannon [Mon, 9 Mar 2009 00:02:01 +0000 (00:02 +0000)]
Make importlib.test.source.util.write_bytecode reset sys.dont_write_bytecode.

15 years agoPyObject_Unicode -> PyObject_Str
Benjamin Peterson [Sun, 8 Mar 2009 23:51:13 +0000 (23:51 +0000)]
PyObject_Unicode -> PyObject_Str