Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

cpython (merge 3.2 -> default): merge 3.2

 

 

First page Previous page 1 2 3 4 5 6 7 8 Next page Last page  View All Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

Oct 14, 2011, 7:57 AM

Post #101 of 192 (475 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/2b24f446c443
changeset: 72933:2b24f446c443
parent: 72932:5b6b53da3e40
parent: 72931:f87187e61961
user: Éric Araujo <merwok [at] netwok>
date: Fri Oct 14 16:56:17 2011 +0200
summary:
Merge 3.2

files:



--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 14, 2011, 8:38 AM

Post #102 of 192 (477 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/30e5ce077554
changeset: 72937:30e5ce077554
parent: 72935:5ae03b1e147a
parent: 72936:9ef20fbd340f
user: Éric Araujo <merwok [at] netwok>
date: Fri Oct 14 17:38:10 2011 +0200
summary:
Merge 3.2

files:
Doc/faq/general.rst | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)


diff --git a/Doc/faq/general.rst b/Doc/faq/general.rst
--- a/Doc/faq/general.rst
+++ b/Doc/faq/general.rst
@@ -164,8 +164,6 @@
several useful pieces of freely distributable software. The source will compile
and run out of the box on most UNIX platforms.

-.. XXX update link once the dev faq is relocated
-
Consult the `Developer FAQ <http://docs.python.org/devguide/faq>`__ for more
information on getting the source code and compiling it.

@@ -221,8 +219,6 @@
newsgroups and on the Python home page at http://www.python.org/; an RSS feed of
news is available.

-.. XXX update link once the dev faq is relocated
-
You can also access the development version of Python through Subversion. See
http://docs.python.org/devguide/faq for details.

@@ -239,8 +235,6 @@
report bugs to Python, you can obtain your Roundup password through Roundup's
`password reset procedure <http://bugs.python.org/user?@template=forgotten>`_.

-.. XXX adapt link to dev guide
-
For more information on how Python is developed, consult `the Python Developer's
Guide <http://docs.python.org/devguide/>`_.


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 19, 2011, 1:58 PM

Post #103 of 192 (476 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/08f8a0fd483f
changeset: 73011:08f8a0fd483f
parent: 73009:5cced40374df
parent: 73010:9c79a25f4a8b
user: Benjamin Peterson <benjamin [at] python>
date: Wed Oct 19 16:58:15 2011 -0400
summary:
merge 3.2

files:
Objects/genobject.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)


diff --git a/Objects/genobject.c b/Objects/genobject.c
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -232,8 +232,9 @@

/* First, check the traceback argument, replacing None with
NULL. */
- if (tb == Py_None)
+ if (tb == Py_None) {
tb = NULL;
+ }
else if (tb != NULL && !PyTraceBack_Check(tb)) {
PyErr_SetString(PyExc_TypeError,
"throw() third argument must be a traceback object");
@@ -244,9 +245,8 @@
Py_XINCREF(val);
Py_XINCREF(tb);

- if (PyExceptionClass_Check(typ)) {
+ if (PyExceptionClass_Check(typ))
PyErr_NormalizeException(&typ, &val, &tb);
- }

else if (PyExceptionInstance_Check(typ)) {
/* Raising an instance. The value should be a dummy. */
@@ -262,10 +262,9 @@
typ = PyExceptionInstance_Class(typ);
Py_INCREF(typ);

- if (tb == NULL) {
+ if (tb == NULL)
/* Returns NULL if there's no traceback */
tb = PyException_GetTraceback(val);
- }
}
}
else {

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 23, 2011, 11:33 AM

Post #104 of 192 (469 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/e3c5f6778ef5
changeset: 73070:e3c5f6778ef5
parent: 73068:eef1027ab2f0
parent: 73069:46c82c4141c9
user: Petri Lehtinen <petri [at] digip>
date: Sun Oct 23 21:07:50 2011 +0300
summary:
Merge 3.2

files:
Doc/data/refcounts.dat | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat
--- a/Doc/data/refcounts.dat
+++ b/Doc/data/refcounts.dat
@@ -376,6 +376,8 @@
PyEval_EvalCode:PyObject*:globals:0:
PyEval_EvalCode:PyObject*:locals:0:

+PyException_GetTraceback:PyObject*::+1:
+
PyFile_AsFile:FILE*:::
PyFile_AsFile:PyFileObject*:p:0:


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 23, 2011, 1:48 PM

Post #105 of 192 (471 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/7f8d22a7bec3
changeset: 73080:7f8d22a7bec3
parent: 73077:94e275e6450c
parent: 73079:d34beaaf7060
user: Florent Xicluna <florent.xicluna [at] gmail>
date: Sun Oct 23 22:44:19 2011 +0200
summary:
Merge 3.2

files:
Doc/library/socketserver.rst | 64 ++++++++++++-----------
Misc/NEWS | 2 +
2 files changed, 36 insertions(+), 30 deletions(-)


diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst
--- a/Doc/library/socketserver.rst
+++ b/Doc/library/socketserver.rst
@@ -361,7 +361,7 @@
def handle(self):
# self.request is the TCP socket connected to the client
self.data = self.request.recv(1024).strip()
- print("%s wrote:" % self.client_address[0])
+ print("{} wrote:".format(self.client_address[0]))
print(self.data)
# just send back the same data, but upper-cased
self.request.send(self.data.upper())
@@ -385,7 +385,7 @@
# self.rfile is a file-like object created by the handler;
# we can now use e.g. readline() instead of raw recv() calls
self.data = self.rfile.readline().strip()
- print("%s wrote:" % self.client_address[0])
+ print("{} wrote:".format(self.client_address[0]))
print(self.data)
# Likewise, self.wfile is a file-like object used to write back
# to the client
@@ -408,16 +408,18 @@
# Create a socket (SOCK_STREAM means a TCP socket)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

- # Connect to server and send data
- sock.connect((HOST, PORT))
- sock.send(bytes(data + "\n","utf8"))
+ try:
+ # Connect to server and send data
+ sock.connect((HOST, PORT))
+ sock.send(bytes(data + "\n", "utf-8"))

- # Receive data from the server and shut down
- received = sock.recv(1024)
- sock.close()
+ # Receive data from the server and shut down
+ received = str(sock.recv(1024), "utf-8")
+ finally:
+ sock.close()

- print("Sent: %s" % data)
- print("Received: %s" % received)
+ print("Sent: {}".format(data))
+ print("Received: {}".format(received))


The output of the example should look something like this:
@@ -434,10 +436,10 @@

$ python TCPClient.py hello world with TCP
Sent: hello world with TCP
- Received: b'HELLO WORLD WITH TCP'
+ Received: HELLO WORLD WITH TCP
$ python TCPClient.py python is nice
Sent: python is nice
- Received: b'PYTHON IS NICE'
+ Received: PYTHON IS NICE


:class:`socketserver.UDPServer` Example
@@ -458,7 +460,7 @@
def handle(self):
data = self.request[0].strip()
socket = self.request[1]
- print("%s wrote:" % self.client_address[0])
+ print("{} wrote:".format(self.client_address[0]))
print(data)
socket.sendto(data.upper(), self.client_address)

@@ -480,11 +482,11 @@

# As you can see, there is no connect() call; UDP has no connections.
# Instead, data is directly sent to the recipient via sendto().
- sock.sendto(bytes(data + "\n","utf8"), (HOST, PORT))
- received = sock.recv(1024)
+ sock.sendto(bytes(data + "\n", "utf-8"), (HOST, PORT))
+ received = str(sock.recv(1024), "utf-8")

- print("Sent: %s" % data)
- print("Received: %s" % received)
+ print("Sent: {}".format(data))
+ print("Received: {}".format(received))

The output of the example should look exactly like for the TCP server example.

@@ -504,9 +506,9 @@
class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):

def handle(self):
- data = self.request.recv(1024)
+ data = str(self.request.recv(1024), 'ascii')
cur_thread = threading.current_thread()
- response = bytes("%s: %s" % (cur_thread.getName(), data),'ascii')
+ response = bytes("{}: {}".format(cur_thread.name, data), 'ascii')
self.request.send(response)

class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
@@ -515,10 +517,12 @@
def client(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
- sock.send(message)
- response = sock.recv(1024)
- print("Received: %s" % response)
- sock.close()
+ try:
+ sock.send(bytes(message, 'ascii'))
+ response = str(sock.recv(1024), 'ascii')
+ print("Received: {}".format(response))
+ finally:
+ sock.close()

if __name__ == "__main__":
# Port 0 means to select an arbitrary unused port
@@ -531,13 +535,13 @@
# more thread for each request
server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
- server_thread.setDaemon(True)
+ server_thread.daemon = True
server_thread.start()
print("Server loop running in thread:", server_thread.name)

- client(ip, port, b"Hello World 1")
- client(ip, port, b"Hello World 2")
- client(ip, port, b"Hello World 3")
+ client(ip, port, "Hello World 1")
+ client(ip, port, "Hello World 2")
+ client(ip, port, "Hello World 3")

server.shutdown()

@@ -546,9 +550,9 @@

$ python ThreadedTCPServer.py
Server loop running in thread: Thread-1
- Received: b"Thread-2: b'Hello World 1'"
- Received: b"Thread-3: b'Hello World 2'"
- Received: b"Thread-4: b'Hello World 3'"
+ Received: Thread-2: Hello World 1
+ Received: Thread-3: Hello World 2
+ Received: Thread-4: Hello World 3


The :class:`ForkingMixIn` class is used in the same way, except that the server
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1678,6 +1678,8 @@
Documentation
-------------

+- Issue #13141: Demonstrate recommended style for socketserver examples.
+
- Issue #11818: Fix tempfile examples for Python 3.



--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 24, 2011, 5:52 AM

Post #106 of 192 (468 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/9d8a14a550a3
changeset: 73098:9d8a14a550a3
parent: 73093:b82e68cf3b0d
parent: 73097:d9571fb37269
user: Benjamin Peterson <benjamin [at] python>
date: Mon Oct 24 08:52:30 2011 -0400
summary:
merge 3.2

files:
Doc/library/2to3.rst | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -123,7 +123,9 @@
.. 2to3fixer:: callable

Converts ``callable(x)`` to ``isinstance(x, collections.Callable)``, adding
- an import to :mod:`collections` if needed.
+ an import to :mod:`collections` if needed. Note ``callable(x)`` has returned
+ in Python 3.2, so if you do not intend to support Python 3.1, you can disable
+ this fixer.

.. 2to3fixer:: dict


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 24, 2011, 11:33 AM

Post #107 of 192 (467 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/db85b1cdcae2
changeset: 73104:db85b1cdcae2
parent: 73072:479a7dd1ea6a
parent: 73103:df24a8b57148
user: Petri Lehtinen <petri [at] digip>
date: Mon Oct 24 21:17:52 2011 +0300
summary:
Merge 3.2

files:
Misc/NEWS | 3 +++
Objects/dictobject.c | 16 ++++++++++++----
2 files changed, 15 insertions(+), 4 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
Core and Builtins
-----------------

+- Issue #13018: Fix reference leaks in error paths in dictobject.c.
+ Patch by Suman Saha.
+
- Issue #13201: Define '==' and '!=' to compare range objects based on
the sequence of values they define (instead of comparing based on
object identity).
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1314,14 +1314,18 @@
PyObject *key;
Py_hash_t hash;

- if (dictresize(mp, Py_SIZE(seq)))
+ if (dictresize(mp, Py_SIZE(seq))) {
+ Py_DECREF(d);
return NULL;
+ }

while (_PyDict_Next(seq, &pos, &key, &oldvalue, &hash)) {
Py_INCREF(key);
Py_INCREF(value);
- if (insertdict(mp, key, hash, value))
+ if (insertdict(mp, key, hash, value)) {
+ Py_DECREF(d);
return NULL;
+ }
}
return d;
}
@@ -1332,14 +1336,18 @@
PyObject *key;
Py_hash_t hash;

- if (dictresize(mp, PySet_GET_SIZE(seq)))
+ if (dictresize(mp, PySet_GET_SIZE(seq))) {
+ Py_DECREF(d);
return NULL;
+ }

while (_PySet_NextEntry(seq, &pos, &key, &hash)) {
Py_INCREF(key);
Py_INCREF(value);
- if (insertdict(mp, key, hash, value))
+ if (insertdict(mp, key, hash, value)) {
+ Py_DECREF(d);
return NULL;
+ }
}
return d;
}

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 24, 2011, 9:07 PM

Post #108 of 192 (467 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/b81f400b2f88
changeset: 73115:b81f400b2f88
parent: 73114:82f720480ae1
parent: 73113:b0aabf83afb6
user: Benjamin Peterson <benjamin [at] python>
date: Tue Oct 25 00:07:05 2011 -0400
summary:
merge 3.2

files:



--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 28, 2011, 2:23 AM

Post #109 of 192 (470 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/8d85dda39663
changeset: 73154:8d85dda39663
parent: 73152:0d5f17872e06
parent: 73153:54abca0ab03b
user: Florent Xicluna <florent.xicluna [at] gmail>
date: Fri Oct 28 11:23:25 2011 +0200
summary:
Merge 3.2

files:
Doc/library/argparse.rst | 2 +-
Doc/library/stdtypes.rst | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)


diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -722,7 +722,7 @@
>>> parser.add_argument('--str', dest='types', action='append_const', const=str)
>>> parser.add_argument('--int', dest='types', action='append_const', const=int)
>>> parser.parse_args('--str --int'.split())
- Namespace(types=[<type 'str'>, <type 'int'>])
+ Namespace(types=[<class 'str'>, <class 'int'>])

* ``'version'`` - This expects a ``version=`` keyword argument in the
:meth:`~ArgumentParser.add_argument` call, and prints version information
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2808,8 +2808,6 @@
The name of the class or type.


-The following attributes are only supported by :term:`new-style class`\ es.
-
.. attribute:: class.__mro__

This attribute is a tuple of classes that are considered when looking for
@@ -2825,12 +2823,12 @@

.. method:: class.__subclasses__

- Each new-style class keeps a list of weak references to its immediate
- subclasses. This method returns a list of all those references still alive.
+ Each class keeps a list of weak references to its immediate subclasses. This
+ method returns a list of all those references still alive.
Example::

>>> int.__subclasses__()
- [<type 'bool'>]
+ [<class 'bool'>]


.. rubric:: Footnotes

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 28, 2011, 5:53 AM

Post #110 of 192 (469 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/fb828a3b1bf8
changeset: 73166:fb828a3b1bf8
parent: 73164:2cb611aaca68
parent: 73165:8e57b5d8f58f
user: Florent Xicluna <florent.xicluna [at] gmail>
date: Fri Oct 28 14:52:29 2011 +0200
summary:
Merge 3.2

files:
Lib/argparse.py | 10 +++-------
Lib/copyreg.py | 4 ++--
Lib/distutils/dist.py | 2 +-
Lib/encodings/__init__.py | 11 +++++------
Lib/fileinput.py | 9 +++++----
Lib/hmac.py | 2 +-
Lib/idlelib/rpc.py | 4 ++--
Lib/logging/config.py | 4 ++--
Lib/multiprocessing/managers.py | 4 ++--
Lib/multiprocessing/pool.py | 2 +-
Lib/optparse.py | 2 +-
Lib/packaging/dist.py | 4 ++--
Lib/packaging/run.py | 2 +-
Lib/pickle.py | 2 +-
Lib/pydoc.py | 4 ++--
Lib/re.py | 2 +-
Lib/rlcompleter.py | 2 +-
Lib/shutil.py | 4 ++--
Lib/test/test_nntplib.py | 3 +--
Lib/timeit.py | 6 +++---
Lib/tkinter/__init__.py | 8 ++++----
Lib/tkinter/tix.py | 2 +-
Lib/unittest/loader.py | 4 ++--
Lib/unittest/suite.py | 2 +-
Lib/warnings.py | 2 +-
Lib/xmlrpc/server.py | 2 +-
Misc/NEWS | 2 ++
27 files changed, 51 insertions(+), 54 deletions(-)


diff --git a/Lib/argparse.py b/Lib/argparse.py
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -93,10 +93,6 @@
from gettext import gettext as _, ngettext


-def _callable(obj):
- return hasattr(obj, '__call__') or hasattr(obj, '__bases__')
-
-
SUPPRESS = '==SUPPRESS=='

OPTIONAL = '?'
@@ -1311,13 +1307,13 @@

# create the action object, and add it to the parser
action_class = self._pop_action_class(kwargs)
- if not _callable(action_class):
+ if not callable(action_class):
raise ValueError('unknown action "%s"' % (action_class,))
action = action_class(**kwargs)

# raise an error if the action type is not callable
type_func = self._registry_get('type', action.type, action.type)
- if not _callable(type_func):
+ if not callable(type_func):
raise ValueError('%r is not callable' % (type_func,))

# raise an error if the metavar does not match the type
@@ -2260,7 +2256,7 @@

def _get_value(self, action, arg_string):
type_func = self._registry_get('type', action.type, action.type)
- if not _callable(type_func):
+ if not callable(type_func):
msg = _('%r is not callable')
raise ArgumentError(action, msg % type_func)

diff --git a/Lib/copyreg.py b/Lib/copyreg.py
--- a/Lib/copyreg.py
+++ b/Lib/copyreg.py
@@ -10,7 +10,7 @@
dispatch_table = {}

def pickle(ob_type, pickle_function, constructor_ob=None):
- if not hasattr(pickle_function, '__call__'):
+ if not callable(pickle_function):
raise TypeError("reduction functions must be callable")
dispatch_table[ob_type] = pickle_function

@@ -20,7 +20,7 @@
constructor(constructor_ob)

def constructor(object):
- if not hasattr(object, '__call__'):
+ if not callable(object):
raise TypeError("constructors must be callable")

# Example: provide pickling support for complex numbers.
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py
--- a/Lib/distutils/dist.py
+++ b/Lib/distutils/dist.py
@@ -537,7 +537,7 @@
for (help_option, short, desc, func) in cmd_class.help_options:
if hasattr(opts, parser.get_attr_name(help_option)):
help_option_found=1
- if hasattr(func, '__call__'):
+ if callable(func):
func()
else:
raise DistutilsClassError(
diff --git a/Lib/encodings/__init__.py b/Lib/encodings/__init__.py
--- a/Lib/encodings/__init__.py
+++ b/Lib/encodings/__init__.py
@@ -120,12 +120,11 @@
if not 4 <= len(entry) <= 7:
raise CodecRegistryError('module "%s" (%s) failed to register'
% (mod.__name__, mod.__file__))
- if not hasattr(entry[0], '__call__') or \
- not hasattr(entry[1], '__call__') or \
- (entry[2] is not None and not hasattr(entry[2], '__call__')) or \
- (entry[3] is not None and not hasattr(entry[3], '__call__')) or \
- (len(entry) > 4 and entry[4] is not None and not hasattr(entry[4], '__call__')) or \
- (len(entry) > 5 and entry[5] is not None and not hasattr(entry[5], '__call__')):
+ if not callable(entry[0]) or not callable(entry[1]) or \
+ (entry[2] is not None and not callable(entry[2])) or \
+ (entry[3] is not None and not callable(entry[3])) or \
+ (len(entry) > 4 and entry[4] is not None and not callable(entry[4])) or \
+ (len(entry) > 5 and entry[5] is not None and not callable(entry[5])):
raise CodecRegistryError('incompatible codecs in module "%s" (%s)'
% (mod.__name__, mod.__file__))
if len(entry)<7 or entry[6] is None:
diff --git a/Lib/fileinput.py b/Lib/fileinput.py
--- a/Lib/fileinput.py
+++ b/Lib/fileinput.py
@@ -225,10 +225,11 @@
raise ValueError("FileInput opening mode must be one of "
"'r', 'rU', 'U' and 'rb'")
self._mode = mode
- if inplace and openhook:
- raise ValueError("FileInput cannot use an opening hook in inplace mode")
- elif openhook and not hasattr(openhook, '__call__'):
- raise ValueError("FileInput openhook must be callable")
+ if openhook:
+ if inplace:
+ raise ValueError("FileInput cannot use an opening hook in inplace mode")
+ if not callable(openhook):
+ raise ValueError("FileInput openhook must be callable")
self._openhook = openhook

def __del__(self):
diff --git a/Lib/hmac.py b/Lib/hmac.py
--- a/Lib/hmac.py
+++ b/Lib/hmac.py
@@ -39,7 +39,7 @@
import hashlib
digestmod = hashlib.md5

- if hasattr(digestmod, '__call__'):
+ if callable(digestmod):
self.digest_cons = digestmod
else:
self.digest_cons = lambda d=b'': digestmod.new(d)
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -574,7 +574,7 @@
# Adds names to dictionary argument 'methods'
for name in dir(obj):
attr = getattr(obj, name)
- if hasattr(attr, '__call__'):
+ if callable(attr):
methods[name] = 1
if isinstance(obj, type):
for super in obj.__bases__:
@@ -583,7 +583,7 @@
def _getattributes(obj, attributes):
for name in dir(obj):
attr = getattr(obj, name)
- if not hasattr(attr, '__call__'):
+ if not callable(attr):
attributes[name] = 1

class MethodProxy(object):
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -471,7 +471,7 @@
def configure_custom(self, config):
"""Configure an object with a user-supplied factory."""
c = config.pop('()')
- if not hasattr(c, '__call__'):
+ if not callable(c):
c = self.resolve(c)
props = config.pop('.', None)
# Check for valid identifiers
@@ -690,7 +690,7 @@
filters = config.pop('filters', None)
if '()' in config:
c = config.pop('()')
- if not hasattr(c, '__call__') and hasattr(types, 'ClassType') and type(c) != types.ClassType:
+ if not callable(c):
c = self.resolve(c)
factory = c
else:
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -134,7 +134,7 @@
temp = []
for name in dir(obj):
func = getattr(obj, name)
- if hasattr(func, '__call__'):
+ if callable(func):
temp.append(name)
return temp

@@ -510,7 +510,7 @@
'''
assert self._state.value == State.INITIAL

- if initializer is not None and not hasattr(initializer, '__call__'):
+ if initializer is not None and not callable(initializer):
raise TypeError('initializer must be a callable')

# pipe over which we will retrieve address of server
diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py
--- a/Lib/multiprocessing/pool.py
+++ b/Lib/multiprocessing/pool.py
@@ -151,7 +151,7 @@
if processes < 1:
raise ValueError("Number of processes must be at least 1")

- if initializer is not None and not hasattr(initializer, '__call__'):
+ if initializer is not None and not callable(initializer):
raise TypeError('initializer must be a callable')

self._processes = processes
diff --git a/Lib/optparse.py b/Lib/optparse.py
--- a/Lib/optparse.py
+++ b/Lib/optparse.py
@@ -708,7 +708,7 @@

def _check_callback(self):
if self.action == "callback":
- if not hasattr(self.callback, '__call__'):
+ if not callable(self.callback):
raise OptionError(
"callback not callable: %r" % self.callback, self)
if (self.callback_args is not None and
diff --git a/Lib/packaging/dist.py b/Lib/packaging/dist.py
--- a/Lib/packaging/dist.py
+++ b/Lib/packaging/dist.py
@@ -409,7 +409,7 @@
for help_option, short, desc, func in cmd_class.help_options:
if hasattr(opts, help_option.replace('-', '_')):
help_option_found = True
- if hasattr(func, '__call__'):
+ if callable(func):
func()
else:
raise PackagingClassError(
@@ -733,7 +733,7 @@
else:
hook_obj = hook

- if not hasattr(hook_obj, '__call__'):
+ if not callable(hook_obj):
raise PackagingOptionError('hook %r is not callable' % hook)

logger.info('running %s %s for command %s',
diff --git a/Lib/packaging/run.py b/Lib/packaging/run.py
--- a/Lib/packaging/run.py
+++ b/Lib/packaging/run.py
@@ -500,7 +500,7 @@
for help_option, short, desc, func in cmd_class.help_options:
if hasattr(opts, help_option.replace('-', '_')):
help_option_found = True
- if hasattr(func, '__call__'):
+ if callable(func):
func()
else:
raise PackagingClassError(
diff --git a/Lib/pickle.py b/Lib/pickle.py
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -362,7 +362,7 @@
raise PicklingError("args from save_reduce() should be a tuple")

# Assert that func is callable
- if not hasattr(func, '__call__'):
+ if not callable(func):
raise PicklingError("func from save_reduce() should be callable")

save = self.save
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -769,7 +769,7 @@
push(msg)
for name, kind, homecls, value in ok:
base = self.docother(getattr(object, name), name, mod)
- if hasattr(value, '__call__') or inspect.isdatadescriptor(value):
+ if callable(value) or inspect.isdatadescriptor(value):
doc = getattr(value, "__doc__", None)
else:
doc = None
@@ -1196,7 +1196,7 @@
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
- if hasattr(value, '__call__') or inspect.isdatadescriptor(value):
+ if callable(value) or inspect.isdatadescriptor(value):
doc = getdoc(value)
else:
doc = None
diff --git a/Lib/re.py b/Lib/re.py
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -325,7 +325,7 @@
if i == j:
break
action = self.lexicon[m.lastindex-1][1]
- if hasattr(action, "__call__"):
+ if callable(action):
self.match = m
action = action(self, m.group())
if action is not None:
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py
--- a/Lib/rlcompleter.py
+++ b/Lib/rlcompleter.py
@@ -87,7 +87,7 @@
return None

def _callable_postfix(self, val, word):
- if hasattr(val, '__call__'):
+ if callable(val):
word = word + "("
return word

diff --git a/Lib/shutil.py b/Lib/shutil.py
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -525,7 +525,7 @@
"""
if extra_args is None:
extra_args = []
- if not isinstance(function, collections.Callable):
+ if not callable(function):
raise TypeError('The %s object is not callable' % function)
if not isinstance(extra_args, (tuple, list)):
raise TypeError('extra_args needs to be a sequence')
@@ -618,7 +618,7 @@
raise RegistryError(msg % (extension,
existing_extensions[extension]))

- if not isinstance(function, collections.Callable):
+ if not callable(function):
raise TypeError('The registered function must be a callable')


diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py
--- a/Lib/test/test_nntplib.py
+++ b/Lib/test/test_nntplib.py
@@ -5,7 +5,6 @@
import unittest
import functools
import contextlib
-import collections.abc
from test import support
from nntplib import NNTP, GroupInfo, _have_ssl
import nntplib
@@ -247,7 +246,7 @@
if not name.startswith('test_'):
continue
meth = getattr(cls, name)
- if not isinstance(meth, collections.abc.Callable):
+ if not callable(meth):
continue
# Need to use a closure so that meth remains bound to its current
# value
diff --git a/Lib/timeit.py b/Lib/timeit.py
--- a/Lib/timeit.py
+++ b/Lib/timeit.py
@@ -127,7 +127,7 @@
if isinstance(setup, str):
setup = reindent(setup, 4)
src = template.format(stmt=stmt, setup=setup)
- elif hasattr(setup, '__call__'):
+ elif callable(setup):
src = template.format(stmt=stmt, setup='_setup()')
ns['_setup'] = setup
else:
@@ -136,13 +136,13 @@
code = compile(src, dummy_src_name, "exec")
exec(code, globals(), ns)
self.inner = ns["inner"]
- elif hasattr(stmt, '__call__'):
+ elif callable(stmt):
self.src = None
if isinstance(setup, str):
_setup = setup
def setup():
exec(_setup, globals(), ns)
- elif not hasattr(setup, '__call__'):
+ elif not callable(setup):
raise ValueError("setup is neither a string nor callable")
self.inner = _template_func(setup, stmt)
else:
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -1037,7 +1037,7 @@
for k, v in cnf.items():
if v is not None:
if k[-1] == '_': k = k[:-1]
- if hasattr(v, '__call__'):
+ if callable(v):
v = self._register(v)
elif isinstance(v, (tuple, list)):
nv = []
@@ -1606,7 +1606,7 @@
"""Bind function FUNC to command NAME for this widget.
Return the function bound to NAME if None is given. NAME could be
e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW"."""
- if hasattr(func, '__call__'):
+ if callable(func):
command = self._register(func)
else:
command = func
@@ -3176,7 +3176,7 @@
elif kw: cnf = kw
options = ()
for k, v in cnf.items():
- if hasattr(v, '__call__'):
+ if callable(v):
v = self._register(v)
options = options + ('-'+k, v)
self.tk.call(('image', 'create', imgtype, name,) + options)
@@ -3199,7 +3199,7 @@
for k, v in _cnfmerge(kw).items():
if v is not None:
if k[-1] == '_': k = k[:-1]
- if hasattr(v, '__call__'):
+ if callable(v):
v = self._register(v)
res = res + ('-'+k, v)
self.tk.call((self.name, 'config') + res)
diff --git a/Lib/tkinter/tix.py b/Lib/tkinter/tix.py
--- a/Lib/tkinter/tix.py
+++ b/Lib/tkinter/tix.py
@@ -405,7 +405,7 @@
elif kw: cnf = kw
options = ()
for k, v in cnf.items():
- if hasattr(v, '__call__'):
+ if callable(v):
v = self._register(v)
options = options + ('-'+k, v)
return master.tk.call(('image', 'create', imgtype,) + options)
diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py
--- a/Lib/unittest/loader.py
+++ b/Lib/unittest/loader.py
@@ -113,7 +113,7 @@
return self.suiteClass([inst])
elif isinstance(obj, suite.TestSuite):
return obj
- if hasattr(obj, '__call__'):
+ if callable(obj):
test = obj()
if isinstance(test, suite.TestSuite):
return test
@@ -138,7 +138,7 @@
def isTestMethod(attrname, testCaseClass=testCaseClass,
prefix=self.testMethodPrefix):
return attrname.startswith(prefix) and \
- hasattr(getattr(testCaseClass, attrname), '__call__')
+ callable(getattr(testCaseClass, attrname))
testFnNames = testFnNames = list(filter(isTestMethod,
dir(testCaseClass)))
if self.sortTestMethodsUsing:
diff --git a/Lib/unittest/suite.py b/Lib/unittest/suite.py
--- a/Lib/unittest/suite.py
+++ b/Lib/unittest/suite.py
@@ -42,7 +42,7 @@

def addTest(self, test):
# sanity checks
- if not hasattr(test, '__call__'):
+ if not callable(test):
raise TypeError("{} is not callable".format(repr(test)))
if isinstance(test, type) and issubclass(test,
(case.TestCase, TestSuite)):
diff --git a/Lib/warnings.py b/Lib/warnings.py
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -259,7 +259,7 @@
raise RuntimeError(
"Unrecognized action (%r) in warnings.filters:\n %s" %
(action, item))
- if not hasattr(showwarning, "__call__"):
+ if not callable(showwarning):
raise TypeError("warnings.showwarning() must be set to a "
"function or method")
# Print message and context
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
--- a/Lib/xmlrpc/server.py
+++ b/Lib/xmlrpc/server.py
@@ -149,7 +149,7 @@

return [.member for member in dir(obj)
if not member.startswith('_') and
- hasattr(getattr(obj, member), '__call__')]
+ callable(getattr(obj, member))]

class SimpleXMLRPCDispatcher:
"""Mix-in class that dispatches XML-RPC requests.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -341,6 +341,8 @@
Library
-------

+- Issue #13258: Use callable() built-in in the standard library.
+
- Issue #13273: fix a bug that prevented HTMLParser to properly detect some
tags when strict=False.


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 28, 2011, 1:05 PM

Post #111 of 192 (471 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/a100cb756cb8
changeset: 73172:a100cb756cb8
parent: 73170:5bd8a04206e8
parent: 73171:6f56e81da8f6
user: Florent Xicluna <florent.xicluna [at] gmail>
date: Fri Oct 28 22:05:12 2011 +0200
summary:
Merge 3.2

files:
Doc/library/urllib.request.rst | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -1288,11 +1288,11 @@
pair: HTTP; protocol
pair: FTP; protocol

-* Currently, only the following protocols are supported: HTTP, (versions 0.9 and
- 1.0), FTP, and local files.
+* Currently, only the following protocols are supported: HTTP (versions 0.9 and
+ 1.0), FTP, and local files.

-* The caching feature of :func:`urlretrieve` has been disabled until I find the
- time to hack proper processing of Expiration time headers.
+* The caching feature of :func:`urlretrieve` has been disabled until someone find
+ the time to hack proper processing of Expiration time headers.

* There should be a function to query whether a particular URL is in the cache.


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 28, 2011, 1:16 PM

Post #112 of 192 (468 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/ae78a2250b4c
changeset: 73174:ae78a2250b4c
parent: 73172:a100cb756cb8
parent: 73173:efd28631b2a5
user: Florent Xicluna <florent.xicluna [at] gmail>
date: Fri Oct 28 22:16:23 2011 +0200
summary:
Merge 3.2

files:
Doc/library/urllib.request.rst | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -1291,8 +1291,8 @@
* Currently, only the following protocols are supported: HTTP (versions 0.9 and
1.0), FTP, and local files.

-* The caching feature of :func:`urlretrieve` has been disabled until someone find
- the time to hack proper processing of Expiration time headers.
+* The caching feature of :func:`urlretrieve` has been disabled until someone
+ finds the time to hack proper processing of Expiration time headers.

* There should be a function to query whether a particular URL is in the cache.


--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 28, 2011, 4:44 PM

Post #113 of 192 (468 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/d9ad109dd82e
changeset: 73182:d9ad109dd82e
parent: 73179:472219ffa1d7
parent: 73180:2098bd4eed21
user: Benjamin Peterson <benjamin [at] python>
date: Fri Oct 28 19:44:00 2011 -0400
summary:
merge 3.2

files:
Lib/test/test_float.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py
--- a/Lib/test/test_float.py
+++ b/Lib/test/test_float.py
@@ -128,6 +128,12 @@
self.assertRaises(TypeError, float, Foo4(42))
self.assertAlmostEqual(float(FooStr('8')), 9.)

+ def test_is_integer(self):
+ self.assertFalse((1.1).is_integer())
+ self.assertTrue((1.).is_integer())
+ self.assertFalse(float("nan").is_integer())
+ self.assertFalse(float("inf").is_integer())
+
def test_floatasratio(self):
for f, ratio in [
(0.875, (7, 8)),

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 30, 2011, 11:25 AM

Post #114 of 192 (470 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/d4860087f664
changeset: 73209:d4860087f664
parent: 73206:728595c16acd
parent: 73207:cdd9a97f3d28
user: Benjamin Peterson <benjamin [at] python>
date: Sun Oct 30 14:24:59 2011 -0400
summary:
merge 3.2

files:
Objects/setobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/setobject.c b/Objects/setobject.c
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1906,7 +1906,7 @@
static PyObject *
set_discard(PySetObject *so, PyObject *key)
{
- PyObject *tmpkey, *result;
+ PyObject *tmpkey;
int rv;

rv = set_discard_key(so, key);

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Oct 30, 2011, 12:26 PM

Post #115 of 192 (469 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/908791916611
changeset: 73216:908791916611
parent: 73209:d4860087f664
parent: 73215:013d2881beb5
user: Florent Xicluna <florent.xicluna [at] gmail>
date: Sun Oct 30 20:24:40 2011 +0100
summary:
Merge 3.2

files:
Lib/test/test_xmlrpc.py | 63 ++++++++++++++++++++++++----
Lib/xmlrpc/client.py | 36 +++------------
Lib/xmlrpc/server.py | 10 ++--
Misc/NEWS | 6 ++
4 files changed, 72 insertions(+), 43 deletions(-)


diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -66,15 +66,6 @@
(newdt,), m = xmlrpclib.loads(s, use_datetime=0)
self.assertEqual(newdt, xmlrpclib.DateTime('00010210T11:41:23'))

- def test_cmp_datetime_DateTime(self):
- now = datetime.datetime.now()
- dt = xmlrpclib.DateTime(now.timetuple())
- self.assertTrue(dt == now)
- self.assertTrue(now == dt)
- then = now + datetime.timedelta(seconds=4)
- self.assertTrue(then >= dt)
- self.assertTrue(dt < then)
-
def test_bug_1164912 (self):
d = xmlrpclib.DateTime()
((new_d,), dummy) = xmlrpclib.loads(xmlrpclib.dumps((d,),
@@ -149,6 +140,9 @@
('host.tld',
[('Authorization', 'Basic dXNlcg==')], {}))

+ def test_dump_bytes(self):
+ self.assertRaises(TypeError, xmlrpclib.dumps, (b"my dog has fleas",))
+
def test_ssl_presence(self):
try:
import ssl
@@ -186,7 +180,7 @@
self.assertRaises(xmlrpclib.Fault, xmlrpclib.loads, s)

def test_dotted_attribute(self):
- # this will raise AttirebuteError because code don't want us to use
+ # this will raise AttributeError because code don't want us to use
# private methods
self.assertRaises(AttributeError,
xmlrpc.server.resolve_dotted_attribute, str, '__add')
@@ -233,6 +227,45 @@
t2 = xmlrpclib._datetime(d)
self.assertEqual(t1, tref)

+ def test_comparison(self):
+ now = datetime.datetime.now()
+ dtime = xmlrpclib.DateTime(now.timetuple())
+
+ # datetime vs. DateTime
+ self.assertTrue(dtime == now)
+ self.assertTrue(now == dtime)
+ then = now + datetime.timedelta(seconds=4)
+ self.assertTrue(then >= dtime)
+ self.assertTrue(dtime < then)
+
+ # str vs. DateTime
+ dstr = now.strftime("%Y%m%dT%H:%M:%S")
+ self.assertTrue(dtime == dstr)
+ self.assertTrue(dstr == dtime)
+ dtime_then = xmlrpclib.DateTime(then.timetuple())
+ self.assertTrue(dtime_then >= dstr)
+ self.assertTrue(dstr < dtime_then)
+
+ # some other types
+ dbytes = dstr.encode('ascii')
+ dtuple = now.timetuple()
+ with self.assertRaises(TypeError):
+ dtime == 1970
+ with self.assertRaises(TypeError):
+ dtime != dbytes
+ with self.assertRaises(TypeError):
+ dtime == bytearray(dbytes)
+ with self.assertRaises(TypeError):
+ dtime != dtuple
+ with self.assertRaises(TypeError):
+ dtime < float(1970)
+ with self.assertRaises(TypeError):
+ dtime > dbytes
+ with self.assertRaises(TypeError):
+ dtime <= bytearray(dbytes)
+ with self.assertRaises(TypeError):
+ dtime >= dtuple
+
class BinaryTestCase(unittest.TestCase):

# XXX What should str(Binary(b"\xff")) return? I'm chosing "\xff"
@@ -346,6 +379,10 @@
class MyRequestHandler(requestHandler):
rpc_paths = []

+ class BrokenDispatcher:
+ def _marshaled_dispatch(self, data, dispatch_method=None, path=None):
+ raise RuntimeError("broken dispatcher")
+
serv = MyXMLRPCServer(("localhost", 0), MyRequestHandler,
logRequests=False, bind_and_activate=False)
serv.socket.settimeout(3)
@@ -366,6 +403,7 @@
d.register_multicall_functions()
serv.get_dispatcher(paths[0]).register_function(pow)
serv.get_dispatcher(paths[1]).register_function(lambda x,y: x+y, 'add')
+ serv.add_dispatcher("/is/broken", BrokenDispatcher())
evt.set()

# handle up to 'numrequests' requests
@@ -595,11 +633,16 @@
p = xmlrpclib.ServerProxy(URL+"/foo")
self.assertEqual(p.pow(6,8), 6**8)
self.assertRaises(xmlrpclib.Fault, p.add, 6, 8)
+
def test_path2(self):
p = xmlrpclib.ServerProxy(URL+"/foo/bar")
self.assertEqual(p.add(6,8), 6+8)
self.assertRaises(xmlrpclib.Fault, p.pow, 6, 8)

+ def test_path3(self):
+ p = xmlrpclib.ServerProxy(URL+"/is/broken")
+ self.assertRaises(xmlrpclib.Fault, p.add, 6, 8)
+
#A test case that verifies that a server using the HTTP/1.1 keep-alive mechanism
#does indeed serve subsequent requests on the same connection
class BaseKeepaliveServerTestCase(BaseServerTestCase):
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -85,11 +85,6 @@
# OF THIS SOFTWARE.
# --------------------------------------------------------------------

-#
-# things to look into some day:
-
-# TODO: sort out True/False/boolean issues for Python 2.3
-
"""
An XML-RPC client interface for Python.

@@ -120,8 +115,7 @@

Exported constants:

- True
- False
+ (none)

Exported functions:

@@ -133,7 +127,8 @@
name (None if not present).
"""

-import re, time, operator
+import base64
+import time
import http.client
from xml.parsers import expat
import socket
@@ -230,7 +225,7 @@
##
# Indicates an XML-RPC fault response package. This exception is
# raised by the unmarshalling layer, if the XML-RPC response contains
-# a fault string. This exception can also used as a class, to
+# a fault string. This exception can also be used as a class, to
# generate a fault XML-RPC message.
#
# @param faultCode The XML-RPC fault code.
@@ -243,10 +238,7 @@
self.faultCode = faultCode
self.faultString = faultString
def __repr__(self):
- return (
- "<Fault %s: %s>" %
- (self.faultCode, repr(self.faultString))
- )
+ return "<Fault %s: %r>" % (self.faultCode, self.faultString)

# --------------------------------------------------------------------
# Special values
@@ -302,7 +294,7 @@
elif datetime and isinstance(other, datetime.datetime):
s = self.value
o = other.strftime("%Y%m%dT%H:%M:%S")
- elif isinstance(other, (str, unicode)):
+ elif isinstance(other, str):
s = self.value
o = other
elif hasattr(other, "timetuple"):
@@ -352,7 +344,7 @@
return self.value

def __repr__(self):
- return "<DateTime %s at %x>" % (repr(self.value), id(self))
+ return "<DateTime %r at %x>" % (self.value, id(self))

def decode(self, data):
self.value = str(data).strip()
@@ -378,9 +370,6 @@
#
# @param data An 8-bit string containing arbitrary data.

-import base64
-import io
-
class Binary:
"""Wrapper for binary data."""

@@ -514,9 +503,7 @@
f = self.dispatch[type(value)]
except KeyError:
# check if this object can be marshalled as a structure
- try:
- value.__dict__
- except:
+ if not hasattr(value, '__dict__'):
raise TypeError("cannot marshal %s objects" % type(value))
# check if this class is a sub-class of a basic type,
# because we don't know how to marshal these types
@@ -558,12 +545,6 @@
write("</double></value>\n")
dispatch[float] = dump_double

- def dump_string(self, value, write, escape=escape):
- write("<value><string>")
- write(escape(value))
- write("</string></value>\n")
- dispatch[bytes] = dump_string
-
def dump_unicode(self, value, write, escape=escape):
write("<value><string>")
write(escape(value))
@@ -1192,7 +1173,6 @@
auth, host = urllib.parse.splituser(host)

if auth:
- import base64
auth = urllib.parse.unquote_to_bytes(auth)
auth = base64.encodebytes(auth).decode("utf-8")
auth = "".join(auth.split()) # get rid of whitespace
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
--- a/Lib/xmlrpc/server.py
+++ b/Lib/xmlrpc/server.py
@@ -329,7 +329,6 @@
if method is None:
return ""
else:
- import pydoc
return pydoc.getdoc(method)

def system_multicall(self, call_list):
@@ -560,7 +559,7 @@
Simple XML-RPC server that allows functions and a single instance
to be installed to handle requests. The default implementation
attempts to dispatch XML-RPC calls to the functions or instance
- installed in the server. Override the _dispatch method inhereted
+ installed in the server. Override the _dispatch method inherited
from SimpleXMLRPCDispatcher to change this behavior.
"""

@@ -602,7 +601,7 @@
encoding, bind_and_activate)
self.dispatchers = {}
self.allow_none = allow_none
- self.encoding = encoding
+ self.encoding = encoding or 'utf-8'

def add_dispatcher(self, path, dispatcher):
self.dispatchers[path] = dispatcher
@@ -620,9 +619,10 @@
# (each dispatcher should have handled their own
# exceptions)
exc_type, exc_value = sys.exc_info()[:2]
- response = xmlrpclib.dumps(
- xmlrpclib.Fault(1, "%s:%s" % (exc_type, exc_value)),
+ response = dumps(
+ Fault(1, "%s:%s" % (exc_type, exc_value)),
encoding=self.encoding, allow_none=self.allow_none)
+ response = response.encode(self.encoding)
return response

class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -340,9 +340,15 @@
- Issue #12380: The rjust, ljust and center methods of bytes and bytearray
now accept a bytearray argument.

+
Library
-------

+- Issue #13293: Better error message when trying to marshal bytes using
+ xmlrpc.client.
+
+- Issue #13291: NameError in xmlrpc package.
+
- Issue #13258: Use callable() built-in in the standard library.

- Issue #13273: fix a bug that prevented HTMLParser to properly detect some

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Nov 3, 2011, 8:45 AM

Post #116 of 192 (453 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/6df109464e9d
changeset: 73330:6df109464e9d
parent: 73326:a1c17a5a460f
parent: 73329:3e4c0caf56a8
user: Éric Araujo <merwok [at] netwok>
date: Thu Nov 03 16:45:33 2011 +0100
summary:
Merge 3.2

files:
Lib/numbers.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/numbers.py b/Lib/numbers.py
--- a/Lib/numbers.py
+++ b/Lib/numbers.py
@@ -303,7 +303,7 @@
raise NotImplementedError

def __index__(self):
- """someobject[self]"""
+ """Called whenever an index is needed, such as in slicing"""
return int(self)

@abstractmethod

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Nov 5, 2011, 1:13 PM

Post #117 of 192 (454 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/bf8a0cf32305
changeset: 73384:bf8a0cf32305
parent: 73382:3f22e4f4c761
parent: 73383:dc839da60f13
user: Petri Lehtinen <petri [at] digip>
date: Sat Nov 05 22:06:49 2011 +0200
summary:
Merge 3.2

files:
.gitignore | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@
Modules/Setup.local
Modules/config.c
Modules/ld_so_aix
+Modules/_testembed
PCbuild/*.bsc
PCbuild/*.dll
PCbuild/*.exe

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Nov 7, 2011, 9:11 AM

Post #118 of 192 (456 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/902ec9463312
changeset: 73432:902ec9463312
parent: 73431:78532ab28271
parent: 73430:4facbfdc7700
user: Éric Araujo <merwok [at] netwok>
date: Mon Nov 07 18:11:27 2011 +0100
summary:
Merge 3.2

files:
Doc/library/shutil.rst | 3 ++-
Lib/http/cookiejar.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -295,7 +295,8 @@
*owner* and *group* are used when creating a tar archive. By default,
uses the current owner and group.

- *logger* is an instance of :class:`logging.Logger`.
+ *logger* must be an object compatible with :pep:`282`, usually an instance of
+ :class:`logging.Logger`.

.. versionadded:: 3.2

diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py
@@ -1,4 +1,4 @@
-"""HTTP cookie handling for web clients.
+r"""HTTP cookie handling for web clients.

This module has (now fairly distant) origins in Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Nov 11, 2011, 7:41 AM

Post #119 of 192 (457 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/4ef224fbf34e
changeset: 73504:4ef224fbf34e
parent: 73502:ed0944c5e2d5
parent: 73503:3fdc5a75d6e1
user: Brian Curtin <brian [at] python>
date: Fri Nov 11 09:41:17 2011 -0600
summary:
Merge 3.2

files:
Lib/random.py | 1 -
Misc/NEWS | 2 ++
2 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/random.py b/Lib/random.py
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -36,7 +36,6 @@

"""

-from __future__ import division
from warnings import warn as _warn
from types import MethodType as _MethodType, BuiltinMethodType as _BuiltinMethodType
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -365,6 +365,8 @@
Library
-------

+- Issue #13384: Remove unnecessary __future__ import in Lib/random.py
+
- Issue #13149: Speed up append-only StringIO objects.

- Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Nov 15, 2011, 7:14 AM

Post #120 of 192 (456 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/c7d1768d4fac
changeset: 73572:c7d1768d4fac
parent: 73570:69fb7933434a
parent: 73571:a00bb30cf775
user: Éric Araujo <merwok [at] netwok>
date: Tue Nov 15 16:13:16 2011 +0100
summary:
Merge 3.2

files:
Doc/whatsnew/3.2.rst | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -234,8 +234,8 @@
namespace, *concurrent*. Its first member is a *futures* package which provides
a uniform high-level interface for managing threads and processes.

-The design for :mod:`concurrent.futures` was inspired by
-*java.util.concurrent.package*. In that model, a running call and its result
+The design for :mod:`concurrent.futures` was inspired by the
+*java.util.concurrent* package. In that model, a running call and its result
are represented by a :class:`~concurrent.futures.Future` object that abstracts
features common to threads, processes, and remote procedure calls. That object
supports status checks (running or done), timeouts, cancellations, adding

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Nov 22, 2011, 9:17 PM

Post #121 of 192 (435 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/f775e6d08410
changeset: 73717:f775e6d08410
parent: 73715:1b8db8aa5589
parent: 73716:714b76882eb8
user: Benjamin Peterson <benjamin [at] python>
date: Tue Nov 22 23:14:47 2011 -0600
summary:
merge 3.2

files:
Modules/posixmodule.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)


diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7844,12 +7844,16 @@
int err;

if (!PyArg_ParseTuple(args, "O&:unsetenv",
+
PyUnicode_FSConverter, &name))
return NULL;

+
err = unsetenv(PyBytes_AS_STRING(name));
- if (err)
- return posix_error();
+ if (err) {
+ Py_DECREF(name);
+ return posix_error();
+ }

/* Remove the key from posix_putenv_garbage;
* this will cause it to be collected. This has to

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Nov 29, 2011, 8:15 AM

Post #122 of 192 (431 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/599763461943
changeset: 73790:599763461943
parent: 73782:5d42f22189be
parent: 73789:2ef359d7a2e9
user: Éric Araujo <merwok [at] netwok>
date: Tue Nov 29 17:14:27 2011 +0100
summary:
Merge 3.2

files:
Doc/library/socket.rst | 16 ++++++++--------
Doc/library/sysconfig.rst | 2 +-
Lib/inspect.py | 2 +-
Lib/keyword.py | 2 +-
Lib/locale.py | 3 +--
Lib/symbol.py | 2 +-
Lib/test/regrtest.py | 18 ++++++++++++++++++
Lib/token.py | 2 +-
Misc/ACKS | 1 +
Misc/NEWS | 3 +++
Misc/python.man | 2 +-
11 files changed, 37 insertions(+), 16 deletions(-)


diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -64,20 +64,20 @@
tuple, and the fields depend on the address type. The general tuple form is
``(addr_type, v1, v2, v3 [, scope])``, where:

- - *addr_type* is one of TIPC_ADDR_NAMESEQ, TIPC_ADDR_NAME, or
- TIPC_ADDR_ID.
- - *scope* is one of TIPC_ZONE_SCOPE, TIPC_CLUSTER_SCOPE, and
- TIPC_NODE_SCOPE.
- - If *addr_type* is TIPC_ADDR_NAME, then *v1* is the server type, *v2* is
+ - *addr_type* is one of :const:`TIPC_ADDR_NAMESEQ`, :const:`TIPC_ADDR_NAME`,
+ or :const:`TIPC_ADDR_ID`.
+ - *scope* is one of :const:`TIPC_ZONE_SCOPE`, :const:`TIPC_CLUSTER_SCOPE`, and
+ :const:`TIPC_NODE_SCOPE`.
+ - If *addr_type* is :const:`TIPC_ADDR_NAME`, then *v1* is the server type, *v2* is
the port identifier, and *v3* should be 0.

- If *addr_type* is TIPC_ADDR_NAMESEQ, then *v1* is the server type, *v2*
+ If *addr_type* is :const:`TIPC_ADDR_NAMESEQ`, then *v1* is the server type, *v2*
is the lower port number, and *v3* is the upper port number.

- If *addr_type* is TIPC_ADDR_ID, then *v1* is the node, *v2* is the
+ If *addr_type* is :const:`TIPC_ADDR_ID`, then *v1* is the node, *v2* is the
reference, and *v3* should be set to 0.

- If *addr_type* is TIPC_ADDR_ID, then *v1* is the node, *v2* is the
+ If *addr_type* is :const:`TIPC_ADDR_ID`, then *v1* is the node, *v2* is the
reference, and *v3* should be set to 0.

- A tuple ``(interface, )`` is used for the :const:`AF_CAN` address family,
diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst
--- a/Doc/library/sysconfig.rst
+++ b/Doc/library/sysconfig.rst
@@ -130,7 +130,7 @@
one may call this function and get the default value.

If *scheme* is provided, it must be a value from the list returned by
- :func:`get_path_names`. Otherwise, the default scheme for the current
+ :func:`get_scheme_names`. Otherwise, the default scheme for the current
platform is used.

If *vars* is provided, it must be a dictionary of variables that will update
diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -482,7 +482,7 @@
return sys.modules.get(modulesbyfile[file])
# Update the filename to module name cache and check yet again
# Copy sys.modules in order to cope with changes while iterating
- for modname, module in sys.modules.items():
+ for modname, module in list(sys.modules.items()):
if ismodule(module) and hasattr(module, '__file__'):
f = module.__file__
if f == _filesbymodname.get(modname, None):
diff --git a/Lib/keyword.py b/Lib/keyword.py
--- a/Lib/keyword.py
+++ b/Lib/keyword.py
@@ -7,7 +7,7 @@
To update the symbols in this file, 'cd' to the top directory of
the python source tree after building the interpreter and run:

- python Lib/keyword.py
+ ./python Lib/keyword.py
"""

__all__ = ["iskeyword", "kwlist"]
diff --git a/Lib/locale.py b/Lib/locale.py
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -1598,8 +1598,7 @@
# to include every locale up to Windows Vista.
#
# NOTE: this mapping is incomplete. If your language is missing, please
-# submit a bug report to Python bug manager, which you can find via:
-# http://www.python.org/dev/
+# submit a bug report to the Python bug tracker at http://bugs.python.org/
# Make sure you include the missing language identifier and the suggested
# locale code.
#
diff --git a/Lib/symbol.py b/Lib/symbol.py
--- a/Lib/symbol.py
+++ b/Lib/symbol.py
@@ -7,7 +7,7 @@
# To update the symbols in this file, 'cd' to the top directory of
# the python source tree after building the interpreter and run:
#
-# python Lib/symbol.py
+# ./python Lib/symbol.py

#--start constants--
single_input = 256
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -177,6 +177,7 @@
import platform
import random
import re
+import shutil
import signal
import sys
import sysconfig
@@ -1042,6 +1043,23 @@
asyncore.close_all(ignore_all=True)
asyncore.socket_map.update(saved_map)

+ def get_shutil_archive_formats(self):
+ # we could call get_archives_formats() but that only returns the
+ # registry keys; we want to check the values too (the functions that
+ # are registered)
+ return shutil._ARCHIVE_FORMATS, shutil._ARCHIVE_FORMATS.copy()
+ def restore_shutil_archive_formats(self, saved):
+ shutil._ARCHIVE_FORMATS = saved[0]
+ shutil._ARCHIVE_FORMATS.clear()
+ shutil._ARCHIVE_FORMATS.update(saved[1])
+
+ def get_shutil_unpack_formats(self):
+ return shutil._UNPACK_FORMATS, shutil._UNPACK_FORMATS.copy()
+ def restore_shutil_unpack_formats(self, saved):
+ shutil._UNPACK_FORMATS = saved[0]
+ shutil._UNPACK_FORMATS.clear()
+ shutil._UNPACK_FORMATS.update(saved[1])
+
def get_logging__handlers(self):
# _handlers is a WeakValueDictionary
return id(logging._handlers), logging._handlers, logging._handlers.copy()
diff --git a/Lib/token.py b/Lib/token.py
--- a/Lib/token.py
+++ b/Lib/token.py
@@ -7,7 +7,7 @@
# To update the symbols in this file, 'cd' to the top directory of
# the python source tree after building the interpreter and run:
#
-# python Lib/token.py
+# ./python Lib/token.py

#--start constants--
ENDMARKER = 0
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -978,6 +978,7 @@
Bennett Todd
R Lindsay Todd
Eugene Toder
+Erik Tollerud
Matias Torchinsky
Sandro Tosi
Richard Townsend
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -399,6 +399,9 @@
Library
-------

+- Issue #13487: Make inspect.getmodule robust against changes done to
+ sys.modules while it is iterating over it.
+
- Issue #12618: Fix a bug that prevented py_compile from creating byte
compiled files in the current directory. Initial patch by Sjoerd de Vries.

diff --git a/Misc/python.man b/Misc/python.man
--- a/Misc/python.man
+++ b/Misc/python.man
@@ -409,7 +409,7 @@
.br
Documentation: http://docs.python.org/py3k/
.br
-Developer resources: http://www.python.org/dev/
+Developer resources: http://docs.python.org/devguide/
.br
Downloads: http://python.org/download/
.br

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Dec 9, 2011, 2:42 PM

Post #123 of 192 (432 views)
Permalink
cpython (merge 3.2 -> default): Merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/b7c5e30582d1
changeset: 73913:b7c5e30582d1
parent: 73909:9fe28f52eaaa
parent: 73912:ee0c9ca09c84
user: Florent Xicluna <florent.xicluna [at] gmail>
date: Fri Dec 09 23:42:29 2011 +0100
summary:
Merge 3.2

files:
Modules/arraymodule.c | 2 +-
Python/_warnings.c | 1 -
2 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -2619,7 +2619,7 @@
\n\
Return a new array whose items are restricted by typecode, and\n\
initialized from the optional initializer value, which must be a list,\n\
-string. or iterable over elements of the appropriate type.\n\
+string or iterable over elements of the appropriate type.\n\
\n\
Arrays represent basic values and behave very much like lists, except\n\
the type of objects stored in them is constrained.\n\
diff --git a/Python/_warnings.c b/Python/_warnings.c
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -895,7 +895,6 @@
static PyObject *
init_filters(void)
{
- /* Don't silence DeprecationWarning if -3 was used. */
PyObject *filters = PyList_New(5);
unsigned int pos = 0; /* Post-incremented in each use. */
unsigned int x;

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Dec 10, 2011, 9:40 AM

Post #124 of 192 (421 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/423f47499e4a
changeset: 73924:423f47499e4a
parent: 73921:e37a7dc8944e
parent: 73923:245f6094ccba
user: Benjamin Peterson <benjamin [at] python>
date: Sat Dec 10 12:38:52 2011 -0500
summary:
merge 3.2

files:
Lib/test/test_subprocess.py | 28 +++++++++++++++---------
1 files changed, 17 insertions(+), 11 deletions(-)


diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -18,6 +18,12 @@
except ImportError:
gc = None

+
+try:
+ import resource
+except ImportError:
+ resource = None
+
mswindows = (sys.platform == "win32")

#
@@ -824,12 +830,12 @@

def __enter__(self):
"""Try to save previous ulimit, then set it to (0, 0)."""
- try:
- import resource
- self.old_limit = resource.getrlimit(resource.RLIMIT_CORE)
- resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
- except (ImportError, ValueError, resource.error):
- pass
+ if resource is not None:
+ try:
+ self.old_limit = resource.getrlimit(resource.RLIMIT_CORE)
+ resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
+ except (ValueError, resource.error):
+ pass

if sys.platform == 'darwin':
# Check if the 'Crash Reporter' on OSX was configured
@@ -850,11 +856,11 @@
"""Return core file behavior to default."""
if self.old_limit is None:
return
- try:
- import resource
- resource.setrlimit(resource.RLIMIT_CORE, self.old_limit)
- except (ImportError, ValueError, resource.error):
- pass
+ if resource is not None:
+ try:
+ resource.setrlimit(resource.RLIMIT_CORE, self.old_limit)
+ except (ValueError, resource.error):
+ pass


@unittest.skipIf(mswindows, "POSIX specific tests")

--
Repository URL: http://hg.python.org/cpython


python-checkins at python

Dec 10, 2011, 9:45 AM

Post #125 of 192 (423 views)
Permalink
cpython (merge 3.2 -> default): merge 3.2 [In reply to]

http://hg.python.org/cpython/rev/aab45b904141
changeset: 73926:aab45b904141
parent: 73924:423f47499e4a
parent: 73925:6040c248a199
user: Benjamin Peterson <benjamin [at] python>
date: Sat Dec 10 12:44:37 2011 -0500
summary:
merge 3.2

files:
Lib/test/test_subprocess.py | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)


diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -13,11 +13,7 @@
import warnings
import select
import shutil
-try:
- import gc
-except ImportError:
- gc = None
-
+import gc

try:
import resource
@@ -951,7 +947,6 @@
self.fail("Exception raised by preexec_fn did not make it "
"to the parent process.")

- @unittest.skipUnless(gc, "Requires a gc module.")
def test_preexec_gc_module_failure(self):
# This tests the code that disables garbage collection if the child
# process will execute any Python.

--
Repository URL: http://hg.python.org/cpython

First page Previous page 1 2 3 4 5 6 7 8 Next page Last page  View All Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.