[Python-checkins] r67565 - in python/branches/release26-maint: Doc/includes/mp_benchmarks.py Doc/includes/mp_distributing.py Doc/includes/mp_newtype.py Doc/includes/mp_pool.py Doc/includes/mp_synchronize.py Doc/includes/mp_webserver.py Doc/includes/mp_workers.py Doc/library/sqlite3.rst Doc/library/stringio.rst Lib/multiprocessing/__init__.py Lib/test/test_httplib.py Modules/_multiprocessing/semaphore.c Objects/unicodeobject.c Tools/scripts/svneol.py configure.in

georg.brandl python-checkins at python.org
Fri Dec 5 10:00:55 CET 2008


Author: georg.brandl
Date: Fri Dec 5 10:00:55 2008
New Revision: 67565
Log:
Merged revisions 67398,67423-67424,67432,67440-67441,67444-67445,67454,67457,67463 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r67398 | benjamin.peterson | 2008年11月26日 18:39:17 +0100 (2008年11月26日) | 1 line
 
 fix typo in sqlite3 docs
........
 r67423 | jesse.noller | 2008年11月28日 19:59:35 +0100 (2008年11月28日) | 2 lines
 
 issue4238: bsd support for cpu_count
........
 r67424 | christian.heimes | 2008年11月28日 20:33:33 +0100 (2008年11月28日) | 1 line
 
 Retain copyright of processing examples. This was requested by a Debian maintainer during packaging of the multiprocessing package for 2.4/2.5
........
 r67432 | benjamin.peterson | 2008年11月29日 00:18:46 +0100 (2008年11月29日) | 1 line
 
 SVN format 9 is the same it seems
........
 r67440 | jeremy.hylton | 2008年11月29日 00:42:59 +0100 (2008年11月29日) | 4 lines
 
 Move definition int sval into branch of ifdef where it is used.
 
 Otherwise, you get a warning about an undefined variable.
........
 r67441 | jeremy.hylton | 2008年11月29日 01:09:16 +0100 (2008年11月29日) | 2 lines
 
 Reflow long lines.
........
 r67444 | amaury.forgeotdarc | 2008年11月29日 03:03:32 +0100 (2008年11月29日) | 2 lines
 
 Fix a small typo in docstring
........
 r67445 | benjamin.peterson | 2008年11月30日 04:07:33 +0100 (2008年11月30日) | 1 line
 
 StringIO.close() stops you from using the buffer, too
........
 r67454 | benjamin.peterson | 2008年11月30日 15:43:23 +0100 (2008年11月30日) | 1 line
 
 note the version that works
........
 r67457 | christian.heimes | 2008年11月30日 22:16:28 +0100 (2008年11月30日) | 1 line
 
 w# requires Py_ssize_t
........
 r67463 | skip.montanaro | 2008年12月01日 02:55:22 +0100 (2008年12月01日) | 1 line
 
 typo in comment
........
Modified:
 python/branches/release26-maint/ (props changed)
 python/branches/release26-maint/Doc/includes/mp_benchmarks.py
 python/branches/release26-maint/Doc/includes/mp_distributing.py
 python/branches/release26-maint/Doc/includes/mp_newtype.py
 python/branches/release26-maint/Doc/includes/mp_pool.py
 python/branches/release26-maint/Doc/includes/mp_synchronize.py
 python/branches/release26-maint/Doc/includes/mp_webserver.py
 python/branches/release26-maint/Doc/includes/mp_workers.py
 python/branches/release26-maint/Doc/library/sqlite3.rst
 python/branches/release26-maint/Doc/library/stringio.rst
 python/branches/release26-maint/Lib/multiprocessing/__init__.py
 python/branches/release26-maint/Lib/test/test_httplib.py
 python/branches/release26-maint/Modules/_multiprocessing/semaphore.c
 python/branches/release26-maint/Objects/unicodeobject.c
 python/branches/release26-maint/Tools/scripts/svneol.py
 python/branches/release26-maint/configure.in
Modified: python/branches/release26-maint/Doc/includes/mp_benchmarks.py
==============================================================================
--- python/branches/release26-maint/Doc/includes/mp_benchmarks.py	(original)
+++ python/branches/release26-maint/Doc/includes/mp_benchmarks.py	Fri Dec 5 10:00:55 2008
@@ -1,6 +1,9 @@
 #
 # Simple benchmarks for the multiprocessing package
 #
+# Copyright (c) 2006-2008, R Oudkerk
+# All rights reserved.
+#
 
 import time, sys, multiprocessing, threading, Queue, gc
 
Modified: python/branches/release26-maint/Doc/includes/mp_distributing.py
==============================================================================
--- python/branches/release26-maint/Doc/includes/mp_distributing.py	(original)
+++ python/branches/release26-maint/Doc/includes/mp_distributing.py	Fri Dec 5 10:00:55 2008
@@ -3,6 +3,9 @@
 #
 # Depends on `multiprocessing` package -- tested with `processing-0.60`
 #
+# Copyright (c) 2006-2008, R Oudkerk
+# All rights reserved.
+#
 
 __all__ = ['Cluster', 'Host', 'get_logger', 'current_process']
 
Modified: python/branches/release26-maint/Doc/includes/mp_newtype.py
==============================================================================
--- python/branches/release26-maint/Doc/includes/mp_newtype.py	(original)
+++ python/branches/release26-maint/Doc/includes/mp_newtype.py	Fri Dec 5 10:00:55 2008
@@ -2,6 +2,9 @@
 # This module shows how to use arbitrary callables with a subclass of
 # `BaseManager`.
 #
+# Copyright (c) 2006-2008, R Oudkerk
+# All rights reserved.
+#
 
 from multiprocessing import freeze_support
 from multiprocessing.managers import BaseManager, BaseProxy
Modified: python/branches/release26-maint/Doc/includes/mp_pool.py
==============================================================================
--- python/branches/release26-maint/Doc/includes/mp_pool.py	(original)
+++ python/branches/release26-maint/Doc/includes/mp_pool.py	Fri Dec 5 10:00:55 2008
@@ -1,6 +1,9 @@
 #
 # A test of `multiprocessing.Pool` class
 #
+# Copyright (c) 2006-2008, R Oudkerk
+# All rights reserved.
+#
 
 import multiprocessing
 import time
Modified: python/branches/release26-maint/Doc/includes/mp_synchronize.py
==============================================================================
--- python/branches/release26-maint/Doc/includes/mp_synchronize.py	(original)
+++ python/branches/release26-maint/Doc/includes/mp_synchronize.py	Fri Dec 5 10:00:55 2008
@@ -1,6 +1,9 @@
 #
 # A test file for the `multiprocessing` package
 #
+# Copyright (c) 2006-2008, R Oudkerk
+# All rights reserved.
+#
 
 import time, sys, random
 from Queue import Empty
Modified: python/branches/release26-maint/Doc/includes/mp_webserver.py
==============================================================================
--- python/branches/release26-maint/Doc/includes/mp_webserver.py	(original)
+++ python/branches/release26-maint/Doc/includes/mp_webserver.py	Fri Dec 5 10:00:55 2008
@@ -8,6 +8,9 @@
 # Not sure if we should synchronize access to `socket.accept()` method by
 # using a process-shared lock -- does not seem to be necessary.
 #
+# Copyright (c) 2006-2008, R Oudkerk
+# All rights reserved.
+#
 
 import os
 import sys
Modified: python/branches/release26-maint/Doc/includes/mp_workers.py
==============================================================================
--- python/branches/release26-maint/Doc/includes/mp_workers.py	(original)
+++ python/branches/release26-maint/Doc/includes/mp_workers.py	Fri Dec 5 10:00:55 2008
@@ -7,6 +7,9 @@
 # in the original order then consider using `Pool.map()` or
 # `Pool.imap()` (which will save on the amount of code needed anyway).
 #
+# Copyright (c) 2006-2008, R Oudkerk
+# All rights reserved.
+#
 
 import time
 import random
Modified: python/branches/release26-maint/Doc/library/sqlite3.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/sqlite3.rst	(original)
+++ python/branches/release26-maint/Doc/library/sqlite3.rst	Fri Dec 5 10:00:55 2008
@@ -223,8 +223,8 @@
 
 .. attribute:: Connection.isolation_level
 
- Get or set the current isolation level. :const:`None` for autocommit mode or one of
- "DEFERRED", "IMMEDIATE" or "EXLUSIVE". See section
+ Get or set the current isolation level. :const:`None` for autocommit mode or
+ one of "DEFERRED", "IMMEDIATE" or "EXCLUSIVE". See section
 :ref:`sqlite3-controlling-transactions` for a more detailed explanation.
 
 
Modified: python/branches/release26-maint/Doc/library/stringio.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/stringio.rst	(original)
+++ python/branches/release26-maint/Doc/library/stringio.rst	Fri Dec 5 10:00:55 2008
@@ -37,7 +37,8 @@
 
 .. method:: StringIO.close()
 
- Free the memory buffer.
+ Free the memory buffer. Attempting to do further operations with a closed
+ :class:`StringIO` object will raise a :exc:`ValueError`.
 
 Example usage::
 
Modified: python/branches/release26-maint/Lib/multiprocessing/__init__.py
==============================================================================
--- python/branches/release26-maint/Lib/multiprocessing/__init__.py	(original)
+++ python/branches/release26-maint/Lib/multiprocessing/__init__.py	Fri Dec 5 10:00:55 2008
@@ -113,7 +113,7 @@
 num = int(os.environ['NUMBER_OF_PROCESSORS'])
 except (ValueError, KeyError):
 num = 0
- elif sys.platform == 'darwin':
+ elif 'bsd' in sys.platform or sys.platform == 'darwin':
 try:
 num = int(os.popen('sysctl -n hw.ncpu').read())
 except ValueError:
Modified: python/branches/release26-maint/Lib/test/test_httplib.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_httplib.py	(original)
+++ python/branches/release26-maint/Lib/test/test_httplib.py	Fri Dec 5 10:00:55 2008
@@ -107,19 +107,23 @@
 for hp in ("www.python.org:abc", "www.python.org:"):
 self.assertRaises(httplib.InvalidURL, httplib.HTTP, hp)
 
- for hp, h, p in (("[fe80::207:e9ff:fe9b]:8000", "fe80::207:e9ff:fe9b", 8000),
+ for hp, h, p in (("[fe80::207:e9ff:fe9b]:8000", "fe80::207:e9ff:fe9b",
+ 8000),
 ("www.python.org:80", "www.python.org", 80),
 ("www.python.org", "www.python.org", 80),
 ("[fe80::207:e9ff:fe9b]", "fe80::207:e9ff:fe9b", 80)):
 http = httplib.HTTP(hp)
 c = http._conn
- if h != c.host: self.fail("Host incorrectly parsed: %s != %s" % (h, c.host))
- if p != c.port: self.fail("Port incorrectly parsed: %s != %s" % (p, c.host))
+ if h != c.host:
+ self.fail("Host incorrectly parsed: %s != %s" % (h, c.host))
+ if p != c.port:
+ self.fail("Port incorrectly parsed: %s != %s" % (p, c.host))
 
 def test_response_headers(self):
 # test response with multiple message headers with the same field name.
 text = ('HTTP/1.1 200 OK\r\n'
- 'Set-Cookie: Customer="WILE_E_COYOTE"; Version="1"; Path="/acme"\r\n'
+ 'Set-Cookie: Customer="WILE_E_COYOTE";'
+ ' Version="1"; Path="/acme"\r\n'
 'Set-Cookie: Part_Number="Rocket_Launcher_0001"; Version="1";'
 ' Path="/acme"\r\n'
 '\r\n'
@@ -187,7 +191,8 @@
 resp.close()
 
 def test_negative_content_length(self):
- sock = FakeSocket('HTTP/1.1 200 OK\r\nContent-Length: -1\r\n\r\nHello\r\n')
+ sock = FakeSocket('HTTP/1.1 200 OK\r\n'
+ 'Content-Length: -1\r\n\r\nHello\r\n')
 resp = httplib.HTTPResponse(sock, method="GET")
 resp.begin()
 self.assertEquals(resp.read(), 'Hello\r\n')
Modified: python/branches/release26-maint/Modules/_multiprocessing/semaphore.c
==============================================================================
--- python/branches/release26-maint/Modules/_multiprocessing/semaphore.c	(original)
+++ python/branches/release26-maint/Modules/_multiprocessing/semaphore.c	Fri Dec 5 10:00:55 2008
@@ -512,7 +512,6 @@
 static PyObject *
 semlock_iszero(SemLockObject *self)
 {
-	int sval;
 #if HAVE_BROKEN_SEM_GETVALUE
 	if (sem_trywait(self->handle) < 0) {
 		if (errno == EAGAIN)
@@ -524,6 +523,7 @@
 		Py_RETURN_FALSE;
 	}
 #else
+	int sval;
 	if (SEM_GETVALUE(self->handle, &sval) < 0)
 		return mp_SetError(NULL, MP_STANDARD_ERROR);
 	return PyBool_FromLong((long)sval == 0);
Modified: python/branches/release26-maint/Objects/unicodeobject.c
==============================================================================
--- python/branches/release26-maint/Objects/unicodeobject.c	(original)
+++ python/branches/release26-maint/Objects/unicodeobject.c	Fri Dec 5 10:00:55 2008
@@ -7680,7 +7680,7 @@
 }
 
 PyDoc_STRVAR(splitlines__doc__,
-"S.splitlines([keepends]]) -> list of strings\n\
+"S.splitlines([keepends]) -> list of strings\n\
 \n\
 Return a list of the lines in S, breaking at line boundaries.\n\
 Line breaks are not included in the resulting list unless keepends\n\
Modified: python/branches/release26-maint/Tools/scripts/svneol.py
==============================================================================
--- python/branches/release26-maint/Tools/scripts/svneol.py	(original)
+++ python/branches/release26-maint/Tools/scripts/svneol.py	Fri Dec 5 10:00:55 2008
@@ -39,9 +39,9 @@
 format = int(open(os.path.join(root, ".svn", "format")).read().strip())
 except IOError:
 return []
- if format == 8:
- # In version 8, committed props are stored in prop-base,
- # local modifications in props
+ if format in (8, 9):
+ # In version 8 and 9, committed props are stored in prop-base, local
+ # modifications in props
 return [os.path.join(root, ".svn", "prop-base", fn+".svn-base"),
 os.path.join(root, ".svn", "props", fn+".svn-work")]
 raise ValueError, "Unknown repository format"
Modified: python/branches/release26-maint/configure.in
==============================================================================
--- python/branches/release26-maint/configure.in	(original)
+++ python/branches/release26-maint/configure.in	Fri Dec 5 10:00:55 2008
@@ -1,7 +1,7 @@
 dnl ***********************************************
 dnl * Please run autoreconf to test your changes! *
 dnl ***********************************************
-dnl NOTE: autoconf 2.64 doesn't seem to work (use 2.63).
+dnl NOTE: autoconf 2.64 doesn't seem to work (use 2.61).
 
 # Set VERSION so we only need to edit in one place (i.e., here)
 m4_define(PYTHON_VERSION, 2.6)
@@ -1844,7 +1844,7 @@
 AC_CHECK_LIB(dl, dlopen)	# Dynamic linking for SunOS/Solaris and SYSV
 AC_CHECK_LIB(dld, shl_load)	# Dynamic linking for HP-UX
 
-# only check for sem_ini if thread support is requested
+# only check for sem_init if thread support is requested
 if test "$with_threads" = "yes" -o -z "$with_threads"; then
 AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
 						# posix4 on Solaris 2.6


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /