Discussion:
[Python-3000-checkins] r67111 - in python/branches/py3k: Doc/library/select.rst Doc/library/socket.rst Lib/test/test_fileio.py Lib/test/test_io.py
benjamin.peterson
2008-11-05 21:42:46 UTC
Permalink
Author: benjamin.peterson
Date: Wed Nov 5 22:42:45 2008
New Revision: 67111

Log:
Merged revisions 67089,67091,67101 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk

........
r67089 | benjamin.peterson | 2008-11-03 14:43:20 -0600 (Mon, 03 Nov 2008) | 1 line

clarify by splitting into multiple paragraphs
........
r67091 | benjamin.peterson | 2008-11-03 16:34:57 -0600 (Mon, 03 Nov 2008) | 1 line

move a FileIO test to test_fileio
........
r67101 | georg.brandl | 2008-11-04 14:49:35 -0600 (Tue, 04 Nov 2008) | 2 lines

#4167: fix markup glitches.
........


Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/library/select.rst
python/branches/py3k/Doc/library/socket.rst
python/branches/py3k/Lib/test/test_fileio.py
python/branches/py3k/Lib/test/test_io.py

Modified: python/branches/py3k/Doc/library/select.rst
==============================================================================
--- python/branches/py3k/Doc/library/select.rst (original)
+++ python/branches/py3k/Doc/library/select.rst Wed Nov 5 22:42:45 2008
@@ -355,7 +355,7 @@
Filter specific flags


- *:const:`KQ_FILTER_READ` and :const:`KQ_FILTER_WRITE` filter flags*
+ :const:`KQ_FILTER_READ` and :const:`KQ_FILTER_WRITE` filter flags

+----------------------------+--------------------------------------------+
| Constant | Meaning |
@@ -364,7 +364,7 @@
+----------------------------+--------------------------------------------+


- *:const:`KQ_FILTER_VNODE` filter flags*
+ :const:`KQ_FILTER_VNODE` filter flags

+----------------------------+--------------------------------------------+
| Constant | Meaning |
@@ -385,7 +385,7 @@
+----------------------------+--------------------------------------------+


- *:const:`KQ_FILTER_PROC` filter flags*
+ :const:`KQ_FILTER_PROC` filter flags

+----------------------------+--------------------------------------------+
| Constant | Meaning |
@@ -408,7 +408,7 @@
| :const:`KQ_NOTE_TRACKERR` | unable to attach to a child |
+----------------------------+--------------------------------------------+

- *:const:`KQ_FILTER_NETDEV` filter flags* [not available on Mac OS X]
+ :const:`KQ_FILTER_NETDEV` filter flags [not available on Mac OS X]

+----------------------------+--------------------------------------------+
| Constant | Meaning |

Modified: python/branches/py3k/Doc/library/socket.rst
==============================================================================
--- python/branches/py3k/Doc/library/socket.rst (original)
+++ python/branches/py3k/Doc/library/socket.rst Wed Nov 5 22:42:45 2008
@@ -260,11 +260,15 @@
.. function:: gethostname()

Return a string containing the hostname of the machine where the Python
- interpreter is currently executing. If you want to know the current machine's IP
- address, you may want to use ``gethostbyname(gethostname())``. This operation
- assumes that there is a valid address-to-host mapping for the host, and the
- assumption does not always hold. Note: :func:`gethostname` doesn't always return
- the fully qualified domain name; use ``getfqdn()`` (see above).
+ interpreter is currently executing.
+
+ If you want to know the current machine's IP address, you may want to use
+ ``gethostbyname(gethostname())``. This operation assumes that there is a
+ valid address-to-host mapping for the host, and the assumption does not
+ always hold.
+
+ Note: :func:`gethostname` doesn't always return the fully qualified domain
+ name; use ``getfqdn()`` (see above).


.. function:: gethostbyaddr(ip_address)

Modified: python/branches/py3k/Lib/test/test_fileio.py
==============================================================================
--- python/branches/py3k/Lib/test/test_fileio.py (original)
+++ python/branches/py3k/Lib/test/test_fileio.py Wed Nov 5 22:42:45 2008
@@ -6,7 +6,7 @@
from array import array
from weakref import proxy

-from test.support import TESTFN, findfile, run_unittest
+from test.support import TESTFN, findfile, check_warnings, run_unittest
from collections import UserList

import _fileio
@@ -240,6 +240,14 @@
def testInvalidInit(self):
self.assertRaises(TypeError, _fileio._FileIO, "1", 0, 0)

+ def testWarnings(self):
+ with check_warnings() as w:
+ self.assertEqual(w.warnings, [])
+ self.assertRaises(TypeError, _fileio._FileIO, [])
+ self.assertEqual(w.warnings, [])
+ self.assertRaises(ValueError, _fileio._FileIO, "/some/invalid/name", "rt")
+ self.assertEqual(w.warnings, [])
+

def test_main():
# Historically, these tests have been sloppy about removing TESTFN.

Modified: python/branches/py3k/Lib/test/test_io.py
==============================================================================
--- python/branches/py3k/Lib/test/test_io.py (original)
+++ python/branches/py3k/Lib/test/test_io.py Wed Nov 5 22:42:45 2008
@@ -1260,6 +1260,7 @@
else:
self.assert_(issubclass(obj, io.IOBase))

+
def test_main():
support.run_unittest(IOTest, BytesIOTest, StringIOTest,
BufferedReaderTest, BufferedWriterTest,

Loading...