Commit graph

1521 commits

Author SHA1 Message Date
Antoine Pitrou
6e6cc830c4 Issue #9757: memoryview objects get a release() method to release the
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.
2010-09-09 12:59:39 +00:00
Raymond Hettinger
6c60d099e5 Improve the repr for the TokenInfo named tuple. 2010-09-09 04:32:39 +00:00
Raymond Hettinger
44d7b6ad60 Add docstring to cmd.Cmd.do_help() 2010-09-09 03:53:22 +00:00
Raymond Hettinger
bd889e8c40 Add a working example for the cmd module. 2010-09-09 01:40:50 +00:00
Giampaolo Rodolà
b383dbb45e Fix issue 9794: adds context manager protocol to socket.socket so that socket.create_connection() can be used with the 'with' statement. 2010-09-08 22:44:12 +00:00
Vinay Sajip
121a1c4e11 logging: Added QueueHandler. 2010-09-08 10:46:15 +00:00
Amaury Forgeot d'Arc
4b6fdf3852 #6394: Add os.getppid() support for Windows. 2010-09-07 21:31:17 +00:00
Antoine Pitrou
e339651b6f Update nntplib examples to use a public news server.
The example still doesn't work as-is under py3k, due to incomplete
or buggy porting of the nntplib module.
2010-09-07 18:44:12 +00:00
Raymond Hettinger
3149f9c614 typo 2010-09-07 05:35:10 +00:00
Raymond Hettinger
b21dac1e38 Remove outdated reference to Wichmann-Hill algorithm. 2010-09-07 05:32:49 +00:00
Raymond Hettinger
0515661314 Issues #7889, #9025 and #9379: Improvements to the random module. 2010-09-07 04:44:52 +00:00
Raymond Hettinger
f763a728ad Document which part of the random module module are guaranteed. 2010-09-07 00:38:15 +00:00
Raymond Hettinger
435cb0f233 Document which part of the random module module are guaranteed. 2010-09-06 23:36:31 +00:00
Vinay Sajip
c31be6307f Updated information on logging contextual information. 2010-09-06 22:18:20 +00:00
Raymond Hettinger
f45abc97bf Add method to OrderedDict for repositioning keys to the ends. 2010-09-06 21:26:09 +00:00
Antoine Pitrou
4bc12ef47d Issue #9754: Similarly to assertRaises and assertRaisesRegexp, unittest
test cases now also have assertWarns and assertWarnsRegexp methods to
check that a given warning type was triggered by the code under test.
2010-09-06 19:25:46 +00:00
Antoine Pitrou
972ee13e03 Issue #5506: BytesIO objects now have a getbuffer() method exporting a
view of their contents without duplicating them.  The view is both readable
and writable.
2010-09-06 18:48:21 +00:00
Brian Curtin
6285774f06 Implement #7566 - os.path.sameopenfile for Windows.
This uses the GetFileInformationByHandle function to return a tuple of values
to identify a file, then ntpath.sameopenfile compares file tuples, which
is exposed as os.path.sameopenfile.
2010-09-06 17:07:27 +00:00
Gregory P. Smith
13b55291ac hashlib has two new constant attributes: algorithms_guaranteed and
algorithms_avaiable that respectively list the names of hash algorithms
guaranteed to exist in all Python implementations and the names of hash
algorithms available in the current process.

Renames the attribute new in 3.2a0 'algorithms' to 'algorithms_guaranteed'.
2010-09-06 08:30:23 +00:00
Georg Brandl
c86adb4c5c #9780: both { and } are not valid fill characters. 2010-09-06 06:49:07 +00:00
Raymond Hettinger
7fefaffcc2 Clean-up example of using fileinput as a context manager. 2010-09-05 23:50:32 +00:00
Georg Brandl
a9b51d2a0e #9747: fix copy-paste error in getresgid() doc. 2010-09-05 17:07:12 +00:00
Raymond Hettinger
02566ec89f Adopt more descriptive attribute names as suggested on python-dev. 2010-09-04 22:46:06 +00:00
Antoine Pitrou
74a69fa662 Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced
by the new (and simpler) DUP_TOP_TWO.  Performance isn't changed, but
our bytecode is a bit simplified.  Patch by Demur Rumed.
2010-09-04 18:43:52 +00:00
Fred Drake
cc645b9a59 add consistent support for the vars and default arguments on all
configuration parser classes
(http://bugs.python.org/issue9421)
2010-09-04 04:35:34 +00:00
Georg Brandl
0b37b333a8 Fix missing word. 2010-09-03 22:49:27 +00:00
Georg Brandl
0bb73b8be8 #9767: doctest run over json docs. 2010-09-03 22:36:22 +00:00
Daniel Stutzbach
045b3ba184 Issue #9212: Added the missing isdisjoint method to the dict_keys and
dict_items views.  The method is required by the collections.Set ABC,
which the views register as supporting.
2010-09-02 15:06:06 +00:00
Raymond Hettinger
6f80b4c8b7 Cleanup heapq docs 2010-09-01 21:27:31 +00:00
Antoine Pitrou
1ce3eb5c5b Issue #8990: array.fromstring() and array.tostring() get renamed to
frombytes() and tobytes(), respectively, to avoid confusion.  Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects.  Patch by Thomas Jollans.
2010-09-01 20:29:34 +00:00
Antoine Pitrou
fce7fd6426 Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
2010-09-01 18:54:56 +00:00
Raymond Hettinger
d292a17fc7 2-to-3 fixup for map() example in docs 2010-09-01 07:46:54 +00:00
Raymond Hettinger
20933e08b1 Clean-up bisect docs.
* Document the post conditions for bisect_left() and bisect_right().
* Fix the grades example to use more obvious breakpoints
  and to use a list comprehension instead of map() which returns
  an iterator in Py3.x.
* Improve and expand the examples of searching sorted lists.
* Issue 4356 -- move up reference to the SortedCollection recipe.
2010-09-01 06:58:25 +00:00
Vinay Sajip
40d9a4e854 Improved logging.Formatter date/time formatting documentation. 2010-08-30 18:10:03 +00:00
Benjamin Peterson
6b4fa776ac rewrite and move open() docs only to functions.rst 2010-08-30 13:19:53 +00:00
Benjamin Peterson
4e4ffb1181 sync open() doc 2010-08-30 12:46:09 +00:00
Antoine Pitrou
b530e1438b Issue #9715: improve documentation of the io module 2010-08-30 12:41:00 +00:00
Mark Dickinson
64a38c0eb5 Issue #1512791: In setframerate method of Wave_write, round non-integral
inputs to the nearest integer.  Thanks Neil Tallim for the patch.
2010-08-28 17:22:16 +00:00
Georg Brandl
816756182e #9681: typo. 2010-08-26 14:30:56 +00:00
Georg Brandl
179249f493 #9689: add links from overview to in-depth class API descriptions. 2010-08-26 14:30:15 +00:00
Brian Curtin
8790a07927 Fix #7579. Add docstrings to msvcrt and adjust some wording for bytes. 2010-08-24 05:20:30 +00:00
Benjamin Peterson
17689991e6 only catch AttributeError in hasattr() #9666 2010-08-24 03:26:23 +00:00
Georg Brandl
6a74da3cdb #9649: fix default value description. 2010-08-22 20:23:38 +00:00
Benjamin Peterson
2d55e2aab3 provide sample implementations for attrgetter and methodcaller 2010-08-21 20:08:36 +00:00
Benjamin Peterson
c16f8b33e0 fix more indentation 2010-08-21 20:03:15 +00:00
Benjamin Peterson
ffec810d88 indent properly 2010-08-21 20:01:28 +00:00
Senthil Kumaran
6cbe4275cb Add info about HTTP/1.1 and Connection:Close header. 2010-08-21 16:08:32 +00:00
Benjamin Peterson
23110e7361 alias macintosh to mac_roman #843590 2010-08-21 02:54:44 +00:00
Vinay Sajip
8101021eae Issue #9606: Updated documentation for Filter objects. 2010-08-19 19:17:41 +00:00
Victor Stinner
e8d5145e18 Create os.fsdecode(): decode from the filesystem encoding with surrogateescape
error handler, or strict error handler on Windows.

 * Rewrite os.fsencode() documentation
 * Improve os.fsencode and os.fsdecode() tests using the new PYTHONFSENCODING
   environment variable
2010-08-19 01:05:19 +00:00