Merge improvements to the suspicious builder and cleanup from 3.3.

This commit is contained in:
Ezio Melotti 2013-03-28 17:46:20 +02:00
commit f2c64ed9eb
2 changed files with 13 additions and 112 deletions

View File

@ -1,9 +1,7 @@
c-api/arg,,:ref,"PyArg_ParseTuple(args, ""O|O:ref"", &object, &callback)"
c-api/list,,:high,list[low:high]
c-api/list,,:high,list[low:high] = itemlist
c-api/sequence,,:i2,del o[i1:i2]
c-api/sequence,,:i2,o[i1:i2]
c-api/sequence,,:i2,o[i1:i2] = v
c-api/unicode,,:end,str[start:end]
c-api/unicode,,:start,unicode[start:start+length]
distutils/examples,267,`,This is the description of the ``foobar`` package.
@ -18,9 +16,6 @@ faq/programming,,::,for x in sequence[::-1]:
faq/programming,,:reduce,"print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,"
faq/programming,,:reduce,"Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,"
faq/windows,,:bd8afb90ebf2,"Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32"
faq/windows,229,:EOF,@setlocal enableextensions & python -x %~f0 %* & goto :EOF
faq/windows,393,:REG,.py :REG_SZ: c:\<path to python>\python.exe -u %s %s
howto/cporting,,:add,"if (!PyArg_ParseTuple(args, ""ii:add_ints"", &one, &two))"
howto/cporting,,:encode,"if (!PyArg_ParseTuple(args, ""O:encode_object"", &myobj))"
howto/cporting,,:say,"if (!PyArg_ParseTuple(args, ""U:say_hello"", &name))"
howto/curses,,:black,"They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and"
@ -35,8 +30,6 @@ howto/ipaddress,,:DB8,>>> ipaddress.ip_address('2001:DB8::1')
howto/ipaddress,,::,>>> ipaddress.ip_address('2001:DB8::1')
howto/ipaddress,,:db8,IPv6Address('2001:db8::1')
howto/ipaddress,,::,IPv6Address('2001:db8::1')
howto/ipaddress,,:db8,IPv6Address('2001:db8::1')
howto/ipaddress,,::,IPv6Address('2001:db8::1')
howto/ipaddress,,::,IPv6Address('::1')
howto/ipaddress,,:db8,>>> ipaddress.ip_network('2001:db8::0/96')
howto/ipaddress,,::,>>> ipaddress.ip_network('2001:db8::0/96')
@ -44,29 +37,18 @@ howto/ipaddress,,:db8,IPv6Network('2001:db8::/96')
howto/ipaddress,,::,IPv6Network('2001:db8::/96')
howto/ipaddress,,:db8,IPv6Network('2001:db8::/128')
howto/ipaddress,,::,IPv6Network('2001:db8::/128')
howto/ipaddress,,:db8,>>> ipaddress.ip_network('2001:db8::1/96')
howto/ipaddress,,::,>>> ipaddress.ip_network('2001:db8::1/96')
howto/ipaddress,,:db8,IPv6Interface('2001:db8::1/96')
howto/ipaddress,,::,IPv6Interface('2001:db8::1/96')
howto/ipaddress,,:db8,>>> addr6 = ipaddress.ip_address('2001:db8::1')
howto/ipaddress,,::,>>> addr6 = ipaddress.ip_address('2001:db8::1')
howto/ipaddress,,:db8,>>> host6 = ipaddress.ip_interface('2001:db8::1/96')
howto/ipaddress,,::,>>> host6 = ipaddress.ip_interface('2001:db8::1/96')
howto/ipaddress,,:db8,IPv6Network('2001:db8::/96')
howto/ipaddress,,::,IPv6Network('2001:db8::/96')
howto/ipaddress,,:db8,>>> net6 = ipaddress.ip_network('2001:db8::0/96')
howto/ipaddress,,::,>>> net6 = ipaddress.ip_network('2001:db8::0/96')
howto/ipaddress,,:db8,>>> net6 = ipaddress.ip_network('2001:db8::0/96')
howto/ipaddress,,::,>>> net6 = ipaddress.ip_network('2001:db8::0/96')
howto/ipaddress,,:ffff,IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
howto/ipaddress,,::,IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
howto/ipaddress,,::,IPv6Address('::ffff:ffff')
howto/ipaddress,,:ffff,IPv6Address('::ffff:ffff')
howto/ipaddress,,::,IPv6Address('2001::1')
howto/ipaddress,,::,IPv6Address('2001::ffff:ffff')
howto/ipaddress,,:ffff,IPv6Address('2001::ffff:ffff')
howto/ipaddress,,:db8,'2001:db8::'
howto/ipaddress,,::,'2001:db8::'
howto/ipaddress,,:db8,'2001:db8::/96'
howto/ipaddress,,::,'2001:db8::/96'
howto/ipaddress,,:db8,>>> ipaddress.ip_interface('2001:db8::1/96')
@ -103,7 +85,6 @@ howto/pyporting,75,::,'Programming Language :: Python :: 3'
howto/regex,,::,
howto/regex,,:foo,(?:foo)
howto/urllib2,,:example,"for example ""joe@password:example.com"""
howto/webservers,,.. image:,.. image:: http.png
library/audioop,,:ipos,"# factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)],"
library/bisect,32,:hi,all(val >= x for val in a[i:hi])
library/bisect,42,:hi,all(val > x for val in a[i:hi])
@ -112,10 +93,7 @@ library/configparser,,:home,my_dir: ${Common:home_dir}/twosheds
library/configparser,,:option,${section:option}
library/configparser,,:path,python_dir: ${Frameworks:path}/Python/Versions/${Frameworks:Python}
library/configparser,,:Python,python_dir: ${Frameworks:path}/Python/Versions/${Frameworks:Python}
library/configparser,,`,# Set the optional `raw` argument of get() to True if you wish to disable
library/configparser,,:system,path: ${Common:system_dir}/Library/Frameworks/
library/configparser,,`,# The optional `fallback` argument can be used to provide a fallback value
library/configparser,,`,# The optional `vars` argument is a dict with members that will take
library/datetime,,:MM,
library/datetime,,:SS,
library/decimal,,:optional,"trailneg:optional trailing minus indicator"
@ -124,8 +102,6 @@ library/difflib,,:bhi,b[blo:bhi]
library/difflib,,:i1,
library/difflib,,:i2,
library/difflib,,:j2,
library/dis,,:TOS,
library/dis,,`,TOS = `TOS`
library/doctest,,`,``factorial`` from the ``example`` module:
library/doctest,,`,The ``example`` module
library/doctest,,`,Using ``factorial``
@ -133,7 +109,6 @@ library/exceptions,,:err,err.object[err.start:err.end]
library/functions,,:step,a[start:stop:step]
library/functions,,:stop,"a[start:stop, i]"
library/functions,,:stop,a[start:stop:step]
library/hotshot,,:lineno,"ncalls tottime percall cumtime percall filename:lineno(function)"
library/http.client,,:port,host:port
library/http.cookies,,`,!#$%&'*+-.^_`|~:
library/imaplib,,:MM,"""DD-Mmm-YYYY HH:MM:SS"
@ -149,24 +124,6 @@ library/ipaddress,,:db8,>>> ipaddress.IPv6Address('2001:db8::1000')
library/ipaddress,,::,>>> ipaddress.IPv6Address('2001:db8::1000')
library/ipaddress,,:db8,IPv6Address('2001:db8::1000')
library/ipaddress,,::,IPv6Address('2001:db8::1000')
library/ipaddress,,:db8,>>> ipaddress.IPv6Interface('2001:db8::1000/96')
library/ipaddress,,::,>>> ipaddress.IPv6Interface('2001:db8::1000/96')
library/ipaddress,,:db8,IPv6Interface('2001:db8::1000/96')
library/ipaddress,,::,IPv6Interface('2001:db8::1000/96')
library/ipaddress,,:db8,>>> ipaddress.IPv6Interface('2001:db8::1000/96').network
library/ipaddress,,::,>>> ipaddress.IPv6Interface('2001:db8::1000/96').network
library/ipaddress,,:db8,IPv6Network('2001:db8::/96')
library/ipaddress,,::,IPv6Network('2001:db8::/96')
library/ipaddress,,:db8,>>> ipaddress.IPv6Network('2001:db8::/96')
library/ipaddress,,::,>>> ipaddress.IPv6Network('2001:db8::/96')
library/ipaddress,,:db8,IPv6Network('2001:db8::/96')
library/ipaddress,,::,IPv6Network('2001:db8::/96')
library/ipaddress,,:db8,>>> ipaddress.IPv6Network('2001:db8::/96').netmask
library/ipaddress,,::,>>> ipaddress.IPv6Network('2001:db8::/96').netmask
library/ipaddress,,:ffff,IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
library/ipaddress,,::,IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
library/ipaddress,,:db8,">>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)"
library/ipaddress,,::,">>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)"
library/ipaddress,,::,"""::abc:7:def"""
library/ipaddress,,:def,"""::abc:7:def"""
library/ipaddress,,::,::FFFF/96
@ -174,41 +131,20 @@ library/ipaddress,,::,2002::/16
library/ipaddress,,::,2001::/32
library/ipaddress,,::,>>> str(ipaddress.IPv6Address('::1'))
library/ipaddress,,::,'::1'
library/ipaddress,,::,>>> int(ipaddress.IPv6Address('::1'))
library/ipaddress,,:ff00,ffff:ff00::
library/ipaddress,,:db00,2001:db00::0/24
library/ipaddress,,::,2001:db00::0/24
library/ipaddress,,:db00,2001:db00::0/ffff:ff00::
library/ipaddress,,::,2001:db00::0/ffff:ff00::
library/ipaddress,,:ff00,2001:db00::0/ffff:ff00::
library/itertools,,:step,elements from seq[start:stop:step]
library/itertools,,:stop,elements from seq[start:stop:step]
library/linecache,,:sys,"sys:x:3:3:sys:/dev:/bin/sh"
library/logging,,:And,
library/logging,,:Doing,INFO:root:Doing something
library/logging,,:Finished,INFO:root:Finished
library/logging,,:logger,severity:logger name:message
library/logging,,:Look,WARNING:root:Look before you leap!
library/logging,,:message,severity:logger name:message
library/logging,,:package1,
library/logging,,:package2,
library/logging,,:port,host:port
library/logging,,:root,
library/logging,,:So,INFO:root:So should this
library/logging,,:So,INFO:So should this
library/logging,,:Started,INFO:root:Started
library/logging,,:This,
library/logging,,:Watch,WARNING:root:Watch out!
library/logging.handlers,,:port,host:port
library/mmap,,:i2,obj[i1:i2]
library/multiprocessing,,`,# Add more tasks using `put()`
library/multiprocessing,,`,# A test file for the `multiprocessing` package
library/multiprocessing,,`,# A test of `multiprocessing.Pool` class
library/multiprocessing,,`,# `BaseManager`.
library/multiprocessing,,`,`Cluster` is a subclass of `SyncManager` so it allows creation of
library/multiprocessing,,`,# create server for a `HostManager` object
library/multiprocessing,,`,# Depends on `multiprocessing` package -- tested with `processing-0.60`
library/multiprocessing,,`,`hostname` gives the name of the host. If hostname is not
library/multiprocessing,,`,# in the original order then consider using `Pool.map()` or
library/multiprocessing,,`,">>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]`"
library/multiprocessing,,`,">>> l._callmethod('__getslice__', (2, 7)) # equiv to `l[2:7]`"
@ -219,44 +155,25 @@ library/multiprocessing,,:queue,">>> QueueManager.register('get_queue', callable
library/multiprocessing,,`,# register the Foo class; make `f()` and `g()` accessible via proxy
library/multiprocessing,,`,# register the Foo class; make `g()` and `_h()` accessible via proxy
library/multiprocessing,,`,# register the generator function baz; use `GeneratorProxy` to make proxies
library/multiprocessing,,`,`slots` is used to specify the number of slots for processes on
library/nntplib,,:bytes,:bytes
library/nntplib,,:bytes,"['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', 'subject']"
library/nntplib,,:lines,:lines
library/nntplib,,:lines,"['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', 'subject']"
library/optparse,,:len,"del parser.rargs[:len(value)]"
library/os.path,,:foo,c:foo
library/parser,,`,"""Make a function that raises an argument to the exponent `exp`."""
library/pdb,,:lineno,filename:lineno
library/pdb,,:lineno,[filename:lineno | bpnumber [bpnumber ...]]
library/pickle,,:memory,"conn = sqlite3.connect("":memory:"")"
library/posix,,`,"CFLAGS=""`getconf LFS_CFLAGS`"" OPT=""-g -O2 $CFLAGS"""
library/pprint,,::,"'Programming Language :: Python :: 2 :: Only'],"
library/pprint,209,::,"'classifiers': ['Development Status :: 4 - Beta',"
library/pprint,209,::,"'Intended Audience :: Developers',"
library/pprint,209,::,"'License :: OSI Approved :: MIT License',"
library/pprint,209,::,"'Natural Language :: English',"
library/pprint,209,::,"'Operating System :: OS Independent',"
library/pprint,209,::,"'Programming Language :: Python',"
library/pprint,209,::,"'Programming Language :: Python :: 2',"
library/pprint,209,::,"'Programming Language :: Python :: 2.6',"
library/pprint,209,::,"'Programming Language :: Python :: 2.7',"
library/pprint,209,::,"'Topic :: Software Development :: Libraries',"
library/pprint,209,::,"'Topic :: Software Development :: Libraries :: Python Modules'],"
library/pprint,,::,"'Programming Language :: Python :: 2.6',"
library/pprint,,::,"'Programming Language :: Python :: 2.7',"
library/profile,,:lineno,filename:lineno(function)
library/profile,,:lineno,ncalls tottime percall cumtime percall filename:lineno(function)
library/profile,,:lineno,"(sort by filename:lineno),"
library/pyexpat,,:elem1,<py:elem1 />
library/pyexpat,,:py,"xmlns:py = ""http://www.python.org/ns/"">"
library/repr,,`,"return `obj`"
library/smtplib,,:port,"as well as a regular host:port server."
library/smtplib,,:port,method must support that as well as a regular host:port
library/socket,,::,"(10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]"
library/socket,,::,'5aef:2b::8'
library/socket,,:can,"return (can_id, can_dlc, data[:can_dlc])"
library/socket,,:len,fds.fromstring(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
library/sqlite3,,:age,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})"
library/sqlite3,,:age,"select name_last, age from people where name_last=:who and age=:age"
library/sqlite3,,:memory,
library/sqlite3,,:who,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})"
library/sqlite3,,:path,"db = sqlite3.connect('file:path/to/database?mode=ro', uri=True)"
@ -274,7 +191,6 @@ library/stdtypes,,::,>>> hash(v[::-2]) == hash(b'abcefg'[::-2])
library/stdtypes,,:len,s[len(s):len(s)]
library/stdtypes,,::,>>> y = m[::2]
library/stdtypes,,::,>>> z = y[::-2]
library/string,,:end,s[start:end]
library/subprocess,,`,"output=`dmesg | grep hda`"
library/subprocess,,`,"output=`mycmd myarg`"
library/tarfile,,:bz2,
@ -286,8 +202,6 @@ library/tarfile,,:xz,'w:xz'
library/time,,:mm,
library/time,,:ss,
library/turtle,,::,Example::
library/urllib2,,:password,"""joe:password@python.org"""
library/urllib,,:port,:port
library/urllib.request,,:close,Connection:close
library/urllib.request,,:lang,"xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en"">\n\n<head>\n"
library/urllib.request,,:password,"""joe:password@python.org"""
@ -306,16 +220,7 @@ license,,`,THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AN
license,,`,* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
license,,`,THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
license,,:zooko,mailto:zooko@zooko.com
reference/datamodel,,:max,
reference/datamodel,,:step,a[i:j:step]
reference/expressions,,:datum,{key:datum...}
reference/expressions,,`,`expressions...`
reference/expressions,,:index,x[index:index]
reference/grammar,,:output,#diagram:output
reference/grammar,,:rules,#diagram:rules
reference/grammar,,`,'`' testlist1 '`'
reference/grammar,,:token,#diagram:token
reference/lexical_analysis,,`,", : . ` = ;"
reference/lexical_analysis,,`,$ ? `
reference/lexical_analysis,,:fileencoding,# vim:fileencoding=<encoding-name>
tutorial/datastructures,,:value,It is also possible to delete a key:value
@ -363,15 +268,12 @@ whatsnew/3.2,,:cafe,"netloc='[dead:beef:cafe:5417:affe:8FA3:deaf:feed]',"
whatsnew/3.2,,:cafe,>>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
whatsnew/3.2,,:deaf,"netloc='[dead:beef:cafe:5417:affe:8FA3:deaf:feed]',"
whatsnew/3.2,,:deaf,>>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
whatsnew/3.2,,:directory,... ${buildout:directory}/downloads/dist
whatsnew/3.2,,:directory,${buildout:directory}/downloads/dist
whatsnew/3.2,,::,"$ export PYTHONWARNINGS='ignore::RuntimeWarning::,once::UnicodeWarning::'"
whatsnew/3.2,,:feed,"netloc='[dead:beef:cafe:5417:affe:8FA3:deaf:feed]',"
whatsnew/3.2,,:feed,>>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
whatsnew/3.2,,:gz,">>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') as tf:"
whatsnew/3.2,,:location,... zope9-location = ${zope9:location}
whatsnew/3.2,,:location,zope9-location = ${zope9:location}
whatsnew/3.2,,:prefix,... zope-conf = ${custom:prefix}/etc/zope.conf
whatsnew/3.2,,:prefix,zope-conf = ${custom:prefix}/etc/zope.conf
whatsnew/changelog,,:platform,:platform:
whatsnew/changelog,,:password,: Unquote before b64encoding user:password during Basic
@ -380,15 +282,3 @@ whatsnew/changelog,,:PythonCmd,"With Tk < 8.5 _tkinter.c:PythonCmd() raised Unic
whatsnew/changelog,,:close,: Connection:close header is sent by requests using URLOpener
whatsnew/changelog,,::,": Fix FTP tests for IPv6, bind to ""::1"" instead of ""localhost""."
whatsnew/changelog,,:test,: test_subprocess:test_leaking_fds_on_error no longer gives a
whatsnew/news,,:platform,:platform:
whatsnew/news,,:password,: Unquote before b64encoding user:password during Basic
whatsnew/news,,:close,Connection:close header.
whatsnew/news,,:PythonCmd,"With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused"
whatsnew/news,,:close,: Connection:close header is sent by requests using URLOpener
whatsnew/news,,::,": Fix FTP tests for IPv6, bind to ""::1"" instead of ""localhost""."
whatsnew/news,,:test,: test_subprocess:test_leaking_fds_on_error no longer gives a
whatsnew/news,,:test,: Fix test_posix:test_getgroups failure under Solaris. Patch
whatsnew/news,,:Olimit,Drop -OPT:Olimit compiler option.
whatsnew/news,,:MAXYEAR,timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
whatsnew/news,,:bz2,with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
whatsnew/news,,:db2,: Add configure option --with-dbmliborder=db1:db2:... to specify

1 c-api/arg :ref PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
2 c-api/list :high list[low:high]
c-api/list :high list[low:high] = itemlist
3 c-api/sequence :i2 del o[i1:i2]
4 c-api/sequence :i2 o[i1:i2]
c-api/sequence :i2 o[i1:i2] = v
5 c-api/unicode :end str[start:end]
6 c-api/unicode :start unicode[start:start+length]
7 distutils/examples 267 ` This is the description of the ``foobar`` package.
16 faq/programming :reduce print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,
17 faq/programming :reduce Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,
18 faq/windows :bd8afb90ebf2 Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
faq/windows 229 :EOF @setlocal enableextensions & python -x %~f0 %* & goto :EOF
faq/windows 393 :REG .py :REG_SZ: c:\<path to python>\python.exe -u %s %s
howto/cporting :add if (!PyArg_ParseTuple(args, "ii:add_ints", &one, &two))
19 howto/cporting :encode if (!PyArg_ParseTuple(args, "O:encode_object", &myobj))
20 howto/cporting :say if (!PyArg_ParseTuple(args, "U:say_hello", &name))
21 howto/curses :black They are: 0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and
30 howto/ipaddress :: >>> ipaddress.ip_address('2001:DB8::1')
31 howto/ipaddress :db8 IPv6Address('2001:db8::1')
32 howto/ipaddress :: IPv6Address('2001:db8::1')
howto/ipaddress :db8 IPv6Address('2001:db8::1')
howto/ipaddress :: IPv6Address('2001:db8::1')
33 howto/ipaddress :: IPv6Address('::1')
34 howto/ipaddress :db8 >>> ipaddress.ip_network('2001:db8::0/96')
35 howto/ipaddress :: >>> ipaddress.ip_network('2001:db8::0/96')
37 howto/ipaddress :: IPv6Network('2001:db8::/96')
38 howto/ipaddress :db8 IPv6Network('2001:db8::/128')
39 howto/ipaddress :: IPv6Network('2001:db8::/128')
howto/ipaddress :db8 >>> ipaddress.ip_network('2001:db8::1/96')
howto/ipaddress :: >>> ipaddress.ip_network('2001:db8::1/96')
40 howto/ipaddress :db8 IPv6Interface('2001:db8::1/96')
41 howto/ipaddress :: IPv6Interface('2001:db8::1/96')
42 howto/ipaddress :db8 >>> addr6 = ipaddress.ip_address('2001:db8::1')
43 howto/ipaddress :: >>> addr6 = ipaddress.ip_address('2001:db8::1')
44 howto/ipaddress :db8 >>> host6 = ipaddress.ip_interface('2001:db8::1/96')
45 howto/ipaddress :: >>> host6 = ipaddress.ip_interface('2001:db8::1/96')
howto/ipaddress :db8 IPv6Network('2001:db8::/96')
howto/ipaddress :: IPv6Network('2001:db8::/96')
howto/ipaddress :db8 >>> net6 = ipaddress.ip_network('2001:db8::0/96')
howto/ipaddress :: >>> net6 = ipaddress.ip_network('2001:db8::0/96')
46 howto/ipaddress :db8 >>> net6 = ipaddress.ip_network('2001:db8::0/96')
47 howto/ipaddress :: >>> net6 = ipaddress.ip_network('2001:db8::0/96')
48 howto/ipaddress :ffff IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
49 howto/ipaddress :: IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
50 howto/ipaddress :: IPv6Address('::ffff:ffff')
51 howto/ipaddress :ffff IPv6Address('::ffff:ffff')
howto/ipaddress :: IPv6Address('2001::1')
howto/ipaddress :: IPv6Address('2001::ffff:ffff')
howto/ipaddress :ffff IPv6Address('2001::ffff:ffff')
howto/ipaddress :db8 '2001:db8::'
howto/ipaddress :: '2001:db8::'
52 howto/ipaddress :db8 '2001:db8::/96'
53 howto/ipaddress :: '2001:db8::/96'
54 howto/ipaddress :db8 >>> ipaddress.ip_interface('2001:db8::1/96')
85 howto/regex ::
86 howto/regex :foo (?:foo)
87 howto/urllib2 :example for example "joe@password:example.com"
howto/webservers .. image: .. image:: http.png
88 library/audioop :ipos # factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)],
89 library/bisect 32 :hi all(val >= x for val in a[i:hi])
90 library/bisect 42 :hi all(val > x for val in a[i:hi])
93 library/configparser :option ${section:option}
94 library/configparser :path python_dir: ${Frameworks:path}/Python/Versions/${Frameworks:Python}
95 library/configparser :Python python_dir: ${Frameworks:path}/Python/Versions/${Frameworks:Python}
library/configparser ` # Set the optional `raw` argument of get() to True if you wish to disable
96 library/configparser :system path: ${Common:system_dir}/Library/Frameworks/
library/configparser ` # The optional `fallback` argument can be used to provide a fallback value
library/configparser ` # The optional `vars` argument is a dict with members that will take
97 library/datetime :MM
98 library/datetime :SS
99 library/decimal :optional trailneg:optional trailing minus indicator
102 library/difflib :i1
103 library/difflib :i2
104 library/difflib :j2
library/dis :TOS
library/dis ` TOS = `TOS`
105 library/doctest ` ``factorial`` from the ``example`` module:
106 library/doctest ` The ``example`` module
107 library/doctest ` Using ``factorial``
109 library/functions :step a[start:stop:step]
110 library/functions :stop a[start:stop, i]
111 library/functions :stop a[start:stop:step]
library/hotshot :lineno ncalls tottime percall cumtime percall filename:lineno(function)
112 library/http.client :port host:port
113 library/http.cookies ` !#$%&'*+-.^_`|~:
114 library/imaplib :MM "DD-Mmm-YYYY HH:MM:SS
124 library/ipaddress :: >>> ipaddress.IPv6Address('2001:db8::1000')
125 library/ipaddress :db8 IPv6Address('2001:db8::1000')
126 library/ipaddress :: IPv6Address('2001:db8::1000')
library/ipaddress :db8 >>> ipaddress.IPv6Interface('2001:db8::1000/96')
library/ipaddress :: >>> ipaddress.IPv6Interface('2001:db8::1000/96')
library/ipaddress :db8 IPv6Interface('2001:db8::1000/96')
library/ipaddress :: IPv6Interface('2001:db8::1000/96')
library/ipaddress :db8 >>> ipaddress.IPv6Interface('2001:db8::1000/96').network
library/ipaddress :: >>> ipaddress.IPv6Interface('2001:db8::1000/96').network
library/ipaddress :db8 IPv6Network('2001:db8::/96')
library/ipaddress :: IPv6Network('2001:db8::/96')
library/ipaddress :db8 >>> ipaddress.IPv6Network('2001:db8::/96')
library/ipaddress :: >>> ipaddress.IPv6Network('2001:db8::/96')
library/ipaddress :db8 IPv6Network('2001:db8::/96')
library/ipaddress :: IPv6Network('2001:db8::/96')
library/ipaddress :db8 >>> ipaddress.IPv6Network('2001:db8::/96').netmask
library/ipaddress :: >>> ipaddress.IPv6Network('2001:db8::/96').netmask
library/ipaddress :ffff IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
library/ipaddress :: IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff::')
library/ipaddress :db8 >>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)
library/ipaddress :: >>> ipaddress.IPv6Network('2001:db8::1000/96', strict=False)
127 library/ipaddress :: "::abc:7:def"
128 library/ipaddress :def "::abc:7:def"
129 library/ipaddress :: ::FFFF/96
131 library/ipaddress :: 2001::/32
132 library/ipaddress :: >>> str(ipaddress.IPv6Address('::1'))
133 library/ipaddress :: '::1'
library/ipaddress :: >>> int(ipaddress.IPv6Address('::1'))
134 library/ipaddress :ff00 ffff:ff00::
135 library/ipaddress :db00 2001:db00::0/24
136 library/ipaddress :: 2001:db00::0/24
137 library/ipaddress :db00 2001:db00::0/ffff:ff00::
138 library/ipaddress :: 2001:db00::0/ffff:ff00::
library/ipaddress :ff00 2001:db00::0/ffff:ff00::
139 library/itertools :step elements from seq[start:stop:step]
140 library/itertools :stop elements from seq[start:stop:step]
141 library/linecache :sys sys:x:3:3:sys:/dev:/bin/sh
library/logging :And
library/logging :Doing INFO:root:Doing something
library/logging :Finished INFO:root:Finished
library/logging :logger severity:logger name:message
library/logging :Look WARNING:root:Look before you leap!
library/logging :message severity:logger name:message
library/logging :package1
library/logging :package2
library/logging :port host:port
library/logging :root
library/logging :So INFO:root:So should this
library/logging :So INFO:So should this
library/logging :Started INFO:root:Started
library/logging :This
library/logging :Watch WARNING:root:Watch out!
142 library/logging.handlers :port host:port
143 library/mmap :i2 obj[i1:i2]
144 library/multiprocessing ` # Add more tasks using `put()`
145 library/multiprocessing ` # A test file for the `multiprocessing` package
146 library/multiprocessing ` # A test of `multiprocessing.Pool` class
147 library/multiprocessing ` # `BaseManager`.
library/multiprocessing ` `Cluster` is a subclass of `SyncManager` so it allows creation of
library/multiprocessing ` # create server for a `HostManager` object
library/multiprocessing ` # Depends on `multiprocessing` package -- tested with `processing-0.60`
library/multiprocessing ` `hostname` gives the name of the host. If hostname is not
148 library/multiprocessing ` # in the original order then consider using `Pool.map()` or
149 library/multiprocessing ` >>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]`
150 library/multiprocessing ` >>> l._callmethod('__getslice__', (2, 7)) # equiv to `l[2:7]`
155 library/multiprocessing ` # register the Foo class; make `f()` and `g()` accessible via proxy
156 library/multiprocessing ` # register the Foo class; make `g()` and `_h()` accessible via proxy
157 library/multiprocessing ` # register the generator function baz; use `GeneratorProxy` to make proxies
library/multiprocessing ` `slots` is used to specify the number of slots for processes on
158 library/nntplib :bytes :bytes
library/nntplib :bytes ['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', 'subject']
159 library/nntplib :lines :lines
library/nntplib :lines ['xref', 'from', ':lines', ':bytes', 'references', 'date', 'message-id', 'subject']
160 library/optparse :len del parser.rargs[:len(value)]
161 library/os.path :foo c:foo
library/parser ` "Make a function that raises an argument to the exponent `exp`."
162 library/pdb :lineno filename:lineno
library/pdb :lineno [filename:lineno | bpnumber [bpnumber ...]]
163 library/pickle :memory conn = sqlite3.connect(":memory:")
164 library/posix ` CFLAGS="`getconf LFS_CFLAGS`" OPT="-g -O2 $CFLAGS"
165 library/pprint :: 'Programming Language :: Python :: 2 :: Only'],
166 library/pprint 209 :: 'classifiers': ['Development Status :: 4 - Beta', 'Programming Language :: Python :: 2.6',
167 library/pprint 209 :: 'Intended Audience :: Developers', 'Programming Language :: Python :: 2.7',
library/pprint 209 :: 'License :: OSI Approved :: MIT License',
library/pprint 209 :: 'Natural Language :: English',
library/pprint 209 :: 'Operating System :: OS Independent',
library/pprint 209 :: 'Programming Language :: Python',
library/pprint 209 :: 'Programming Language :: Python :: 2',
library/pprint 209 :: 'Programming Language :: Python :: 2.6',
library/pprint 209 :: 'Programming Language :: Python :: 2.7',
library/pprint 209 :: 'Topic :: Software Development :: Libraries',
library/pprint 209 :: 'Topic :: Software Development :: Libraries :: Python Modules'],
168 library/profile :lineno filename:lineno(function)
library/profile :lineno ncalls tottime percall cumtime percall filename:lineno(function)
library/profile :lineno (sort by filename:lineno),
169 library/pyexpat :elem1 <py:elem1 />
170 library/pyexpat :py xmlns:py = "http://www.python.org/ns/">
library/repr ` return `obj`
library/smtplib :port as well as a regular host:port server.
171 library/smtplib :port method must support that as well as a regular host:port
172 library/socket :: (10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]
173 library/socket :: '5aef:2b::8'
174 library/socket :can return (can_id, can_dlc, data[:can_dlc])
175 library/socket :len fds.fromstring(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
176 library/sqlite3 :age cur.execute("select * from people where name_last=:who and age=:age", {"who": who, "age": age})
library/sqlite3 :age select name_last, age from people where name_last=:who and age=:age
177 library/sqlite3 :memory
178 library/sqlite3 :who cur.execute("select * from people where name_last=:who and age=:age", {"who": who, "age": age})
179 library/sqlite3 :path db = sqlite3.connect('file:path/to/database?mode=ro', uri=True)
191 library/stdtypes :len s[len(s):len(s)]
192 library/stdtypes :: >>> y = m[::2]
193 library/stdtypes :: >>> z = y[::-2]
library/string :end s[start:end]
194 library/subprocess ` output=`dmesg | grep hda`
195 library/subprocess ` output=`mycmd myarg`
196 library/tarfile :bz2
202 library/time :mm
203 library/time :ss
204 library/turtle :: Example::
library/urllib2 :password "joe:password@python.org"
library/urllib :port :port
205 library/urllib.request :close Connection:close
206 library/urllib.request :lang xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n\n<head>\n
207 library/urllib.request :password "joe:password@python.org"
220 license ` * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
221 license ` THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
222 license :zooko mailto:zooko@zooko.com
reference/datamodel :max
reference/datamodel :step a[i:j:step]
reference/expressions :datum {key:datum...}
reference/expressions ` `expressions...`
223 reference/expressions :index x[index:index]
reference/grammar :output #diagram:output
reference/grammar :rules #diagram:rules
reference/grammar ` '`' testlist1 '`'
reference/grammar :token #diagram:token
reference/lexical_analysis ` , : . ` = ;
224 reference/lexical_analysis ` $ ? `
225 reference/lexical_analysis :fileencoding # vim:fileencoding=<encoding-name>
226 tutorial/datastructures :value It is also possible to delete a key:value
268 whatsnew/3.2 :cafe >>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
269 whatsnew/3.2 :deaf netloc='[dead:beef:cafe:5417:affe:8FA3:deaf:feed]',
270 whatsnew/3.2 :deaf >>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
whatsnew/3.2 :directory ... ${buildout:directory}/downloads/dist
271 whatsnew/3.2 :directory ${buildout:directory}/downloads/dist
272 whatsnew/3.2 :: $ export PYTHONWARNINGS='ignore::RuntimeWarning::,once::UnicodeWarning::'
273 whatsnew/3.2 :feed netloc='[dead:beef:cafe:5417:affe:8FA3:deaf:feed]',
274 whatsnew/3.2 :feed >>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
275 whatsnew/3.2 :gz >>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') as tf:
whatsnew/3.2 :location ... zope9-location = ${zope9:location}
276 whatsnew/3.2 :location zope9-location = ${zope9:location}
whatsnew/3.2 :prefix ... zope-conf = ${custom:prefix}/etc/zope.conf
277 whatsnew/3.2 :prefix zope-conf = ${custom:prefix}/etc/zope.conf
278 whatsnew/changelog :platform :platform:
279 whatsnew/changelog :password : Unquote before b64encoding user:password during Basic
282 whatsnew/changelog :close : Connection:close header is sent by requests using URLOpener
283 whatsnew/changelog :: : Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
284 whatsnew/changelog :test : test_subprocess:test_leaking_fds_on_error no longer gives a
whatsnew/news :platform :platform:
whatsnew/news :password : Unquote before b64encoding user:password during Basic
whatsnew/news :close Connection:close header.
whatsnew/news :PythonCmd With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused
whatsnew/news :close : Connection:close header is sent by requests using URLOpener
whatsnew/news :: : Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
whatsnew/news :test : test_subprocess:test_leaking_fds_on_error no longer gives a
whatsnew/news :test : Fix test_posix:test_getgroups failure under Solaris. Patch
whatsnew/news :Olimit Drop -OPT:Olimit compiler option.
whatsnew/news :MAXYEAR timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
whatsnew/news :bz2 with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
whatsnew/news :db2 : Add configure option --with-dbmliborder=db1:db2:... to specify

View File

@ -68,6 +68,10 @@ class Rule:
# None -> don't care
self.issue = issue # the markup fragment that triggered this rule
self.line = line # text of the container element (single line only)
self.used = False
def __repr__(self):
return '{0.docname},,{0.issue},{0.line}'.format(self)
@ -107,6 +111,12 @@ class CheckSuspiciousMarkupBuilder(Builder):
doctree.walk(visitor)
def finish(self):
unused_rules = [rule for rule in self.rules if not rule.used]
if unused_rules:
self.warn('Found %s/%s unused rules:' %
(len(unused_rules), len(self.rules)))
for rule in unused_rules:
self.info(repr(rule))
return
def check_issue(self, line, lineno, issue):
@ -131,6 +141,7 @@ class CheckSuspiciousMarkupBuilder(Builder):
if (rule.lineno is not None) and \
abs(rule.lineno - lineno) > 5: continue
# if it came this far, the rule matched
rule.used = True
return True
return False