~ubuntu-branches/ubuntu/oneiric/python2.5/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/svn-doc-updates.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-12-21 08:57:49 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20081221085749-bijjr25h8na5jdsu
Tags: 2.5.3-0ubuntu1
* New upstream version.
* Regenerate the included documentation.
* Add an option --install-layout=deb, which is ignored for 2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh -e
2
2
 
3
 
# DP: SVN updates of the release25-maint branch (until 2008-11-22).
 
3
# DP: SVN updates of the release25-maint branch (until 200x-xx-xx).
4
4
 
5
5
dir=
6
6
if [ $# -eq 3 -a "$2" = '-d' ]; then
25
25
esac
26
26
exit 0
27
27
 
28
 
# svn diff http://svn.python.org/projects/python/tags/r252 http://svn.python.org/projects/python/branches/release25-maint
 
28
# svn diff http://svn.python.org/projects/python/tags/r253 http://svn.python.org/projects/python/branches/release25-maint
29
29
# diff -urN --exclude=.svn Python-2.5 svn
30
30
 
31
 
Index: Doc/dist/dist.tex
32
 
===================================================================
33
 
--- Doc/dist/dist.tex   (.../tags/r252) (Revision 67348)
34
 
+++ Doc/dist/dist.tex   (.../branches/release25-maint)  (Revision 67348)
35
 
@@ -1213,7 +1213,8 @@
36
 
 be included in the source distribution:
37
 
 \begin{itemize}
38
 
 \item all files in the Distutils ``build'' tree (default \file{build/})
39
 
-\item all files in directories named \file{RCS}, \file{CVS} or \file{.svn}
40
 
+\item all files in directories named \file{RCS}, \file{CVS}, \file{.svn},
41
 
+      \file{.hg}, \file{.git}, \file{.bzr}, or \file{\_darcs}
42
 
 \end{itemize}
43
 
 Now we have our complete list of files, which is written to the manifest
44
 
 for future reference, and then used to build the source distribution
45
 
@@ -1246,7 +1247,8 @@
46
 
   \code{prune} command in the manifest template comes after the
47
 
   \code{recursive-include} command
48
 
 \item exclude the entire \file{build} tree, and any \file{RCS},
49
 
-  \file{CVS} and \file{.svn} directories
50
 
+  \file{CVS}, \file{.svn}, \file{.hg}, \file{.git}, \file{.bzr}, or
51
 
+  \file{\_darcs} directories
52
 
 \end{enumerate}
53
 
 Just like in the setup script, file and directory names in the manifest
54
 
 template should always be slash-separated; the Distutils will take care
55
 
Index: Doc/lib/emailmessage.tex
56
 
===================================================================
57
 
--- Doc/lib/emailmessage.tex    (.../tags/r252) (Revision 67348)
58
 
+++ Doc/lib/emailmessage.tex    (.../branches/release25-maint)  (Revision 67348)
59
 
@@ -34,7 +34,7 @@
60
 
 \end{classdesc}
61
 
 
62
 
 \begin{methoddesc}[Message]{as_string}{\optional{unixfrom}}
63
 
-Return the entire message flatten as a string.  When optional
64
 
+Return the entire message flattened as a string.  When optional
65
 
 \var{unixfrom} is \code{True}, the envelope header is included in the
66
 
 returned string.  \var{unixfrom} defaults to \code{False}.
67
 
 
68
 
Index: Doc/lib/tzinfo-examples.py
69
 
===================================================================
70
 
--- Doc/lib/tzinfo-examples.py  (.../tags/r252) (Revision 67348)
71
 
+++ Doc/lib/tzinfo-examples.py  (.../branches/release25-maint)  (Revision 67348)
72
 
@@ -87,12 +87,32 @@
73
 
         dt += timedelta(days_to_go)
74
 
     return dt
75
 
 
76
 
-# In the US, DST starts at 2am (standard time) on the first Sunday in April.
77
 
-DSTSTART = datetime(1, 4, 1, 2)
78
 
-# and ends at 2am (DST time; 1am standard time) on the last Sunday of Oct.
79
 
-# which is the first Sunday on or after Oct 25.
80
 
-DSTEND = datetime(1, 10, 25, 1)
81
 
 
82
 
+# US DST Rules
83
 
+#
84
 
+# This is a simplified (i.e., wrong for a few cases) set of rules for US
85
 
+# DST start and end times. For a complete and up-to-date set of DST rules
86
 
+# and timezone definitions, visit the Olson Database (or try pytz):
87
 
+# http://www.twinsun.com/tz/tz-link.htm
88
 
+# http://sourceforge.net/projects/pytz/ (might not be up-to-date)
89
 
+#
90
 
+# In the US, since 2007, DST starts at 2am (standard time) on the second
91
 
+# Sunday in March, which is the first Sunday on or after Mar 8.
92
 
+DSTSTART_2007 = datetime(1, 3, 8, 2)
93
 
+# and ends at 2am (DST time; 1am standard time) on the first Sunday of Nov.
94
 
+DSTEND_2007 = datetime(1, 11, 1, 1)
95
 
+# From 1987 to 2006, DST used to start at 2am (standard time) on the first
96
 
+# Sunday in April and to end at 2am (DST time; 1am standard time) on the last
97
 
+# Sunday of October, which is the first Sunday on or after Oct 25.
98
 
+DSTSTART_1987_2006 = datetime(1, 4, 1, 2)
99
 
+DSTEND_1987_2006 = datetime(1, 10, 25, 1)
100
 
+# From 1967 to 1986, DST used to start at 2am (standard time) on the last
101
 
+# Sunday in April (the one on or after April 24) and to end at 2am (DST time;
102
 
+# 1am standard time) on the last Sunday of October, which is the first Sunday
103
 
+# on or after Oct 25.
104
 
+DSTSTART_1967_1986 = datetime(1, 4, 24, 2)
105
 
+DSTEND_1967_1986 = DSTEND_1987_2006
106
 
+
107
 
 class USTimeZone(tzinfo):
108
 
 
109
 
     def __init__(self, hours, reprname, stdname, dstname):
110
 
@@ -122,10 +142,20 @@
111
 
             return ZERO
112
 
         assert dt.tzinfo is self
113
 
 
114
 
-        # Find first Sunday in April & the last in October.
115
 
-        start = first_sunday_on_or_after(DSTSTART.replace(year=dt.year))
116
 
-        end = first_sunday_on_or_after(DSTEND.replace(year=dt.year))
117
 
+        # Find start and end times for US DST. For years before 1967, return
118
 
+        # ZERO for no DST.
119
 
+        if 2006 < dt.year:
120
 
+            dststart, dstend = DSTSTART_2007, DSTEND_2007
121
 
+        elif 1986 < dt.year < 2007:
122
 
+            dststart, dstend = DSTSTART_1987_2006, DSTEND_1987_2006
123
 
+        elif 1966 < dt.year < 1987:
124
 
+            dststart, dstend = DSTSTART_1967_1986, DSTEND_1967_1986
125
 
+        else:
126
 
+            return ZERO
127
 
 
128
 
+        start = first_sunday_on_or_after(dststart.replace(year=dt.year))
129
 
+        end = first_sunday_on_or_after(dstend.replace(year=dt.year))
130
 
+
131
 
         # Can't compare naive to aware objects, so strip the timezone from
132
 
         # dt first.
133
 
         if start <= dt.replace(tzinfo=None) < end:
134
 
Index: Doc/lib/libitertools.tex
135
 
===================================================================
136
 
--- Doc/lib/libitertools.tex    (.../tags/r252) (Revision 67348)
137
 
+++ Doc/lib/libitertools.tex    (.../branches/release25-maint)  (Revision 67348)
138
 
@@ -68,6 +68,7 @@
139
 
 
140
 
   \begin{verbatim}
141
 
      def chain(*iterables):
142
 
+         # chain('ABC', 'DEF') --> A B C D E F
143
 
          for it in iterables:
144
 
              for element in it:
145
 
                  yield element
146
 
@@ -83,6 +84,7 @@
147
 
 
148
 
   \begin{verbatim}
149
 
      def count(n=0):
150
 
+         # count(10) --> 10 11 12 13 14 ...
151
 
          while True:
152
 
              yield n
153
 
              n += 1
154
 
@@ -100,6 +102,7 @@
155
 
 
156
 
   \begin{verbatim}
157
 
      def cycle(iterable):
158
 
+         # cycle('ABCD') --> A B C D A B C D A B C D ...
159
 
          saved = []
160
 
          for element in iterable:
161
 
              yield element
162
 
@@ -121,6 +124,7 @@
163
 
 
164
 
   \begin{verbatim}
165
 
      def dropwhile(predicate, iterable):
166
 
+         # dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1
167
 
          iterable = iter(iterable)
168
 
          for x in iterable:
169
 
              if not predicate(x):
170
 
@@ -156,6 +160,8 @@
171
 
 
172
 
   \begin{verbatim}
173
 
     class groupby(object):
174
 
+        # [k for k, g in groupby('AAAABBBCCDAABBB')] --> A B C D A B
175
 
+        # [(list(g)) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D
176
 
         def __init__(self, iterable, key=None):
177
 
             if key is None:
178
 
                 key = lambda x: x
179
 
@@ -187,6 +193,7 @@
180
 
 
181
 
   \begin{verbatim}
182
 
      def ifilter(predicate, iterable):
183
 
+         # ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9
184
 
          if predicate is None:
185
 
              predicate = bool
186
 
          for x in iterable:
187
 
@@ -203,6 +210,7 @@
188
 
 
189
 
   \begin{verbatim}
190
 
      def ifilterfalse(predicate, iterable):
191
 
+         # ifilterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8
192
 
          if predicate is None:
193
 
              predicate = bool
194
 
          for x in iterable:
195
 
@@ -225,6 +233,7 @@
196
 
 
197
 
   \begin{verbatim}
198
 
      def imap(function, *iterables):
199
 
+         # imap(pow, (2,3,10), (5,2,3)) --> 32 9 1000
200
 
          iterables = map(iter, iterables)
201
 
          while True:
202
 
              args = [i.next() for i in iterables]
203
 
@@ -251,6 +260,10 @@
204
 
 
205
 
   \begin{verbatim}
206
 
      def islice(iterable, *args):
207
 
+         # islice('ABCDEFG', 2) --> A B
208
 
+         # islice('ABCDEFG', 2, 4) --> C D
209
 
+         # islice('ABCDEFG', 2, None) --> C D E F G
210
 
+         # islice('ABCDEFG', 0, None, 2) --> A C E G
211
 
          s = slice(*args)
212
 
          it = iter(xrange(s.start or 0, s.stop or sys.maxint, s.step or 1))
213
 
          nexti = it.next()
214
 
@@ -274,6 +287,7 @@
215
 
 
216
 
   \begin{verbatim}
217
 
      def izip(*iterables):
218
 
+         # izip('ABCD', 'xy') --> Ax By
219
 
          iterables = map(iter, iterables)
220
 
          while iterables:
221
 
              result = [it.next() for it in iterables]
222
 
@@ -311,6 +325,7 @@
223
 
 
224
 
   \begin{verbatim}
225
 
      def repeat(object, times=None):
226
 
+         # repeat(10, 3) --> 10 10 10
227
 
          if times is None:
228
 
              while True:
229
 
                  yield object
230
 
@@ -331,6 +346,7 @@
231
 
 
232
 
   \begin{verbatim}
233
 
      def starmap(function, iterable):
234
 
+         # starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000
235
 
          iterable = iter(iterable)
236
 
          while True:
237
 
              yield function(*iterable.next())
238
 
@@ -343,6 +359,7 @@
239
 
 
240
 
   \begin{verbatim}
241
 
      def takewhile(predicate, iterable):
242
 
+         # takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4
243
 
          for x in iterable:
244
 
              if predicate(x):
245
 
                  yield x
246
 
@@ -389,34 +406,6 @@
247
 
 
248
 
 \begin{verbatim}
249
 
 
250
 
->>> amounts = [120.15, 764.05, 823.14]
251
 
->>> for checknum, amount in izip(count(1200), amounts):
252
 
-...     print 'Check %d is for $%.2f' % (checknum, amount)
253
 
-...
254
 
-Check 1200 is for $120.15
255
 
-Check 1201 is for $764.05
256
 
-Check 1202 is for $823.14
257
 
-
258
 
->>> import operator
259
 
->>> for cube in imap(operator.pow, xrange(1,5), repeat(3)):
260
 
-...    print cube
261
 
-...
262
 
-1
263
 
-8
264
 
-27
265
 
-64
266
 
-
267
 
->>> reportlines = ['EuroPython', 'Roster', '', 'alex', '', 'laura',
268
 
-                  '', 'martin', '', 'walter', '', 'mark']
269
 
->>> for name in islice(reportlines, 3, None, 2):
270
 
-...    print name.title()
271
 
-...
272
 
-Alex
273
 
-Laura
274
 
-Martin
275
 
-Walter
276
 
-Mark
277
 
-
278
 
 # Show a dictionary sorted and grouped by value
279
 
 >>> from operator import itemgetter
280
 
 >>> d = dict(a=1, b=2, c=1, d=2, e=1, f=2, g=3)
281
 
@@ -529,10 +518,8 @@
282
 
 def pairwise(iterable):
283
 
     "s -> (s0,s1), (s1,s2), (s2, s3), ..."
284
 
     a, b = tee(iterable)
285
 
-    try:
286
 
-        b.next()
287
 
-    except StopIteration:
288
 
-        pass
289
 
+    for elem in b:
290
 
+        break
291
 
     return izip(a, b)
292
 
 
293
 
 def grouper(n, iterable, padvalue=None):
294
 
@@ -543,4 +530,24 @@
295
 
     "Return a new dict with swapped keys and values"
296
 
     return dict(izip(d.itervalues(), d))
297
 
 
298
 
+def roundrobin(*iterables):
299
 
+    "roundrobin('abc', 'd', 'ef') --> 'a', 'd', 'e', 'b', 'f', 'c'"
300
 
+    # Recipe credited to George Sakkis
301
 
+    pending = len(iterables)
302
 
+    nexts = cycle(iter(it).next for it in iterables)
303
 
+    while pending:
304
 
+        try:
305
 
+            for next in nexts:
306
 
+                yield next()
307
 
+        except StopIteration:
308
 
+            pending -= 1
309
 
+            nexts = cycle(islice(nexts, pending))
310
 
+
311
 
+def powerset(iterable):
312
 
+    "powerset('ab') --> set([]), set(['a']), set(['b']), set(['a', 'b'])"
313
 
+    # Recipe credited to Eric Raymond
314
 
+    pairs = [(2**i, x) for i, x in enumerate(iterable)]
315
 
+    for n in xrange(2**len(pairs)):
316
 
+        yield set(x for m, x in pairs if m&n)
317
 
+
318
 
 \end{verbatim}
319
 
Index: Doc/lib/libuserdict.tex
320
 
===================================================================
321
 
--- Doc/lib/libuserdict.tex     (.../tags/r252) (Revision 67348)
322
 
+++ Doc/lib/libuserdict.tex     (.../branches/release25-maint)  (Revision 67348)
323
 
@@ -10,7 +10,7 @@
324
 
 greatly simplifies writing classes that need to be substitutable for
325
 
 dictionaries (such as the shelve module).
326
 
 
327
 
-This also module defines a class, \class{UserDict}, that acts as a wrapper
328
 
+This module also defines a class, \class{UserDict}, that acts as a wrapper
329
 
 around dictionary objects.  The need for this class has been largely
330
 
 supplanted by the ability to subclass directly from \class{dict} (a feature
331
 
 that became available starting with Python version 2.2).  Prior to the
332
 
Index: Doc/inst/inst.tex
333
 
===================================================================
334
 
--- Doc/inst/inst.tex   (.../tags/r252) (Revision 67348)
335
 
+++ Doc/inst/inst.tex   (.../branches/release25-maint)  (Revision 67348)
336
 
@@ -703,7 +703,7 @@
337
 
 Paths can be absolute or relative, in which case they're relative to
338
 
 the directory containing the \file{.pth} file.  Any directories added
339
 
 to the search path will be scanned in turn for \file{.pth} files.  See
340
 
-\citetitle[http://www.python.org/doc/devel/lib/module-site.html]
341
 
+\citetitle[http://docs.python.org/lib/module-site.html]
342
 
 {site module documentation} for more information.
343
 
 
344
 
 A slightly less convenient way is to edit the \file{site.py} file in