Skip to content

Commit 05e8be1

Browse files
committed
Merged revisions 60990-61002 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r60990 | eric.smith | 2008-02-23 17:05:26 +0100 (Sat, 23 Feb 2008) | 1 line Removed duplicate Py_CHARMASK define. It's already defined in Python.h. ........ r60991 | andrew.kuchling | 2008-02-23 17:23:05 +0100 (Sat, 23 Feb 2008) | 4 lines #1330538: Improve comparison of xmlrpclib.DateTime and datetime instances. Remove automatic handling of datetime.date and datetime.time. This breaks backward compatibility, but python-dev discussion was strongly against this automatic conversion; see the bug for a link. ........ r60994 | andrew.kuchling | 2008-02-23 17:39:43 +0100 (Sat, 23 Feb 2008) | 1 line #835521: Add index entries for various pickle-protocol methods and attributes ........ r60995 | andrew.kuchling | 2008-02-23 18:10:46 +0100 (Sat, 23 Feb 2008) | 2 lines #1433694: minidom's .normalize() failed to set .nextSibling for last element. Fix by Malte Helmert ........ r61000 | christian.heimes | 2008-02-23 18:40:11 +0100 (Sat, 23 Feb 2008) | 1 line Patch python#2167 from calvin: Remove unused imports ........ r61001 | christian.heimes | 2008-02-23 18:42:31 +0100 (Sat, 23 Feb 2008) | 1 line Patch python#1957: syslogmodule: Release GIL when calling syslog(3) ........ r61002 | christian.heimes | 2008-02-23 18:52:07 +0100 (Sat, 23 Feb 2008) | 2 lines Issue python#2051 and patch from Alexander Belopolsky: Permission for pyc and pyo files are inherited from the py file. ........
1 parent 5abe912 commit 05e8be1

161 files changed

Lines changed: 160 additions & 288 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Doc/library/pickle.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,11 @@ can do what they want. [#]_
451451
Pickling and unpickling extension types
452452
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
453453

454+
.. index::
455+
single: __reduce__() (pickle protocol)
456+
single: __reduce_ex__() (pickle protocol)
457+
single: __safe_for_unpickling__ (pickle protocol)
458+
454459
When the :class:`Pickler` encounters an object of a type it knows nothing about
455460
--- such as an extension type --- it looks in two places for a hint of how to
456461
pickle it. One alternative is for the object to implement a :meth:`__reduce__`
@@ -526,6 +531,10 @@ unpickling as described above.
526531
Pickling and unpickling external objects
527532
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
528533

534+
.. index::
535+
single: persistent_id (pickle protocol)
536+
single: persistent_load (pickle protocol)
537+
529538
For the benefit of object persistence, the :mod:`pickle` module supports the
530539
notion of a reference to an object outside the pickled data stream. Such
531540
objects are referenced by a "persistent id", which is just an arbitrary string
@@ -615,6 +624,10 @@ with the :meth:`noload` method on the Unpickler.
615624
Subclassing Unpicklers
616625
----------------------
617626

627+
.. index::
628+
single: load_global() (pickle protocol)
629+
single: find_global() (pickle protocol)
630+
618631
By default, unpickling will import any class that it finds in the pickle data.
619632
You can control exactly what gets unpickled and what gets called by customizing
620633
your unpickler. Unfortunately, exactly how you do this is different depending

Doc/library/xmlrpclib.rst

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ between conformable Python objects and XML on the wire.
3232
all clients and servers; see http://ontosys.com/xml-rpc/extensions.php for a
3333
description. The *use_datetime* flag can be used to cause date/time values to
3434
be presented as :class:`datetime.datetime` objects; this is false by default.
35-
:class:`datetime.datetime`, :class:`datetime.date` and :class:`datetime.time`
36-
objects may be passed to calls. :class:`datetime.date` objects are converted
37-
with a time of "00:00:00". :class:`datetime.time` objects are converted using
38-
today's date.
35+
:class:`datetime.datetime` objects may be passed to calls.
3936

4037
Both the HTTP and HTTPS transports support the URL syntax extension for HTTP
4138
Basic Authentication: ``http://user:pass@host:port/path``. The ``user:pass``
@@ -79,9 +76,7 @@ between conformable Python objects and XML on the wire.
7976
+---------------------------------+---------------------------------------------+
8077
| :const:`dates` | in seconds since the epoch (pass in an |
8178
| | instance of the :class:`DateTime` class) or |
82-
| | a :class:`datetime.datetime`, |
83-
| | :class:`datetime.date` or |
84-
| | :class:`datetime.time` instance |
79+
| | a :class:`datetime.datetime` instance. |
8580
+---------------------------------+---------------------------------------------+
8681
| :const:`binary data` | pass in an instance of the :class:`Binary` |
8782
| | wrapper class |
@@ -211,10 +206,10 @@ The client code for the preceding server::
211206
DateTime Objects
212207
----------------
213208

214-
This class may be initialized with seconds since the epoch, a time tuple, an ISO
215-
8601 time/date string, or a :class:`datetime.datetime`, :class:`datetime.date`
216-
or :class:`datetime.time` instance. It has the following methods, supported
217-
mainly for internal use by the marshalling/unmarshalling code:
209+
This class may be initialized with seconds since the epoch, a time
210+
tuple, an ISO 8601 time/date string, or a :class:`datetime.datetime`
211+
instance. It has the following methods, supported mainly for internal
212+
use by the marshalling/unmarshalling code:
218213

219214

220215
.. method:: DateTime.decode(string)
@@ -495,10 +490,7 @@ Convenience Functions
495490
``None`` if no method name is present in the packet. If the XML-RPC packet
496491
represents a fault condition, this function will raise a :exc:`Fault` exception.
497492
The *use_datetime* flag can be used to cause date/time values to be presented as
498-
:class:`datetime.datetime` objects; this is false by default. Note that even if
499-
you call an XML-RPC method with :class:`datetime.date` or :class:`datetime.time`
500-
objects, they are converted to :class:`DateTime` objects internally, so only
501-
:class:`datetime.datetime` objects will be returned.
493+
:class:`datetime.datetime` objects; this is false by default.
502494

503495

504496
.. _xmlrpc-client-example:

Doc/whatsnew/2.6.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,15 @@ code:
15111511

15121512
.. Issue 1706815
15131513
1514+
* The :mod:`xmlrpclib` module no longer automatically converts
1515+
:class:`datetime.date` and :class:`datetime.time` to the
1516+
:class:`xmlrpclib.DateTime` type; the conversion semantics were
1517+
not necessarily correct for all applications. Code using
1518+
:mod:`xmlrpclib` should convert :class:`date` and :class:`time`
1519+
instances.
1520+
1521+
.. Issue 1330538
1522+
15141523
.. ======================================================================
15151524
15161525

Lib/SimpleHTTPServer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import posixpath
1515
import BaseHTTPServer
1616
import urllib
17-
import urlparse
1817
import cgi
1918
import shutil
2019
import mimetypes

Lib/ctypes/test/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import glob, os, sys, unittest, getopt, time
1+
import os, sys, unittest, getopt, time
22

33
use_resources = []
44

Lib/ctypes/test/test_checkretval.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import unittest
2-
import sys
32

43
from ctypes import *
54

Lib/ctypes/test/test_find.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import unittest
2-
import os, sys
2+
import sys
33
from ctypes import *
44
from ctypes.util import find_library
55
from ctypes.test import is_resource_enabled

Lib/ctypes/test/test_libc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import sys, os
21
import unittest
32

43
from ctypes import *

Lib/ctypes/test/test_numbers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from ctypes import *
22
import unittest
3-
import sys, struct
3+
import struct
44

55
def valid_ranges(*types):
66
# given a sequence of numeric types, collect their _type_

Lib/curses/wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
"""
99

10-
import sys, curses
10+
import curses
1111

1212
def wrapper(func, *args, **kwds):
1313
"""Wrapper function that initializes curses and calls another function,

0 commit comments

Comments
 (0)