135 KB
/srv/reproducible-results/archlinuxrb-build-RYD3pIYG/b1/python-webob/python-webob-docs-1.8.7-7-any.pkg.tar.zst vs.
/srv/reproducible-results/archlinuxrb-build-RYD3pIYG/b2/python-webob/python-webob-docs-1.8.7-7-any.pkg.tar.zst
134 KB
python-webob-docs-1.8.7-7-any.pkg.tar
7.61 KB
file list
    
Offset 1, 9 lines modifiedOffset 1, 9 lines modified
1 -rw-r--r--···0·root·········(0)·root·········(0)·····9243·2024-03-08·11:59:56.000000·.BUILDINFO1 -rw-r--r--···0·root·········(0)·root·········(0)·····9243·2024-03-08·11:59:56.000000·.BUILDINFO
2 -rw-r--r--···0·root·········(0)·root·········(0)·····5294·2024-03-08·11:59:56.000000·.MTREE2 -rw-r--r--···0·root·········(0)·root·········(0)·····5297·2024-03-08·11:59:56.000000·.MTREE
3 -rw-r--r--···0·root·········(0)·root·········(0)······523·2024-03-08·11:59:56.000000·.PKGINFO3 -rw-r--r--···0·root·········(0)·root·········(0)······523·2024-03-08·11:59:56.000000·.PKGINFO
4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/4 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/
5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/5 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/
6 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/doc/6 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/doc/
7 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/doc/python-webob/7 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/doc/python-webob/
8 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/doc/python-webob/html/8 drwxr-xr-x···0·root·········(0)·root·········(0)········0·2024-03-08·11:59:56.000000·usr/share/doc/python-webob/html/
9 -rw-r--r--···0·root·········(0)·root·········(0)······230·2024-03-08·11:59:56.000000·usr/share/doc/python-webob/html/.buildinfo9 -rw-r--r--···0·root·········(0)·root·········(0)······230·2024-03-08·11:59:56.000000·usr/share/doc/python-webob/html/.buildinfo
11.7 KB
.MTREE
11.7 KB
.MTREE-content
    
Offset 1, 38 lines modifiedOffset 1, 38 lines modified
1 #mtree1 #mtree
2 /set·type=file·uid=0·gid=0·mode=6442 /set·type=file·uid=0·gid=0·mode=644
3 ./.BUILDINFO·time=1709899196.0·size=9243·md5digest=65e3730cc36b318b6d4fa24854d9e2a3·sha256digest=4634abf42442fe0e827852216b34f8b4948ba506b85ac7f644b3f92ce795d8e53 ./.BUILDINFO·time=1709899196.0·size=9243·md5digest=65e3730cc36b318b6d4fa24854d9e2a3·sha256digest=4634abf42442fe0e827852216b34f8b4948ba506b85ac7f644b3f92ce795d8e5
4 ./.PKGINFO·time=1709899196.0·size=523·md5digest=1116e62149595fea0188fc999c8a71b5·sha256digest=a5f8d759b9ed1bc0694586f402654c8323c249e9ef568bcb93e2e9035bfeabfb4 ./.PKGINFO·time=1709899196.0·size=523·md5digest=c7ca449b39c6d17af600cc9c66076f85·sha256digest=ec7dda333c8a495925fc07ac00fb1f5e3d2bc8da4760465a04097009c9647c6e
5 ./usr·time=1709899196.0·mode=755·type=dir5 ./usr·time=1709899196.0·mode=755·type=dir
6 /set·mode=7556 /set·mode=755
7 ./usr/share·time=1709899196.0·type=dir7 ./usr/share·time=1709899196.0·type=dir
8 ./usr/share/doc·time=1709899196.0·type=dir8 ./usr/share/doc·time=1709899196.0·type=dir
9 ./usr/share/doc/python-webob·time=1709899196.0·type=dir9 ./usr/share/doc/python-webob·time=1709899196.0·type=dir
10 /set·mode=64410 /set·mode=644
11 ./usr/share/doc/python-webob/html·time=1709899196.0·mode=755·type=dir11 ./usr/share/doc/python-webob/html·time=1709899196.0·mode=755·type=dir
12 ./usr/share/doc/python-webob/html/.buildinfo·time=1709899196.0·size=230·md5digest=54a43d7fb7bb47439d1e0f194c774202·sha256digest=f69935059115f689bef5a0ca087c07e9e26886fdd02832acec0c9b7a7765413712 ./usr/share/doc/python-webob/html/.buildinfo·time=1709899196.0·size=230·md5digest=54a43d7fb7bb47439d1e0f194c774202·sha256digest=f69935059115f689bef5a0ca087c07e9e26886fdd02832acec0c9b7a77654137
13 ./usr/share/doc/python-webob/html/changes.html·time=1709899196.0·size=133827·md5digest=c6b20f7e786c91cf3960d102ed9d782d·sha256digest=abd87ffb40c1fa958013ba3dc5abdc1932ee6048a4de0ff823643cab37185cbe13 ./usr/share/doc/python-webob/html/changes.html·time=1709899196.0·size=133827·md5digest=c6b20f7e786c91cf3960d102ed9d782d·sha256digest=abd87ffb40c1fa958013ba3dc5abdc1932ee6048a4de0ff823643cab37185cbe
14 ./usr/share/doc/python-webob/html/comment-example.html·time=1709899196.0·size=52620·md5digest=50fede98338d87c7bbe0a8ddaa036020·sha256digest=1daf646016787848a47b622e9034f5292cb789f9297569cd565521bb77e827d714 ./usr/share/doc/python-webob/html/comment-example.html·time=1709899196.0·size=52620·md5digest=50fede98338d87c7bbe0a8ddaa036020·sha256digest=1daf646016787848a47b622e9034f5292cb789f9297569cd565521bb77e827d7
15 ./usr/share/doc/python-webob/html/differences.html·time=1709899196.0·size=63995·md5digest=cdba8eefc514455344867d472a2379e2·sha256digest=ad3ae366bcb8483078fa2094ccc057617f3daed699d26b936567e60c272788ca 
16 ./usr/share/doc/python-webob/html/do-it-yourself.html·time=1709899196.0·size=84066·md5digest=ebe933f4f80706526b5efa06c9e6a9da·sha256digest=e3426df1aa63b7c4cdd8126169fc75143b32e2dff421c47656ca3ead7206e0f515 ./usr/share/doc/python-webob/html/differences.html·time=1709899196.0·size=63857·md5digest=d78839fa90b03d07b82836ac8fc35f03·sha256digest=4204bcf2dd6a959f740c0456848ed66911b5901a89531e5f67afbbe24da76a2f
 16 ./usr/share/doc/python-webob/html/do-it-yourself.html·time=1709899196.0·size=83794·md5digest=07ce4a1be5b87e344d2fb12a45d54953·sha256digest=35f7e243460c77866e66501c98c49a9a471f9181e0f0046a8b12ddd3de2e8724
17 ./usr/share/doc/python-webob/html/file-example.html·time=1709899196.0·size=37205·md5digest=4af79f4220df2eaab2beca11bfd3f64c·sha256digest=a6018bdcb8637797b1c169b08653b4218cec621fc4a05e477de8a2a2b432149317 ./usr/share/doc/python-webob/html/file-example.html·time=1709899196.0·size=37205·md5digest=4af79f4220df2eaab2beca11bfd3f64c·sha256digest=a6018bdcb8637797b1c169b08653b4218cec621fc4a05e477de8a2a2b4321493
18 ./usr/share/doc/python-webob/html/genindex.html·time=1709899196.0·size=81647·md5digest=0cbb40a3b1b2d533735d6ccf134c7ee8·sha256digest=73ca879d2cefc761395df28ba35c476961b4b5b2af51a91181dd4da9ebff9e7418 ./usr/share/doc/python-webob/html/genindex.html·time=1709899196.0·size=81647·md5digest=0cbb40a3b1b2d533735d6ccf134c7ee8·sha256digest=73ca879d2cefc761395df28ba35c476961b4b5b2af51a91181dd4da9ebff9e74
19 ./usr/share/doc/python-webob/html/index.html·time=1709899196.0·size=39601·md5digest=99874117df4f229cadc70bb17d012ef0·sha256digest=50acdf65f87ce293c46b68cb8e43dc8c5e626b3ea55fe92bef419f69cd9d9c43 
20 ./usr/share/doc/python-webob/html/jsonrpc-example.html·time=1709899196.0·size=73756·md5digest=62a8a1443d5909813385b35fe6589625·sha256digest=222a3022fd189f48c0905924c05bf5f8e76fa063307b36b46694e0ad2424e82119 ./usr/share/doc/python-webob/html/index.html·time=1709899196.0·size=39468·md5digest=3050c58982b82c281b3fab428d307387·sha256digest=48804fff7bf4fb07dfdead06c3c062ac6c1d07cb43428d602bcfb7553fa0aebe
 20 ./usr/share/doc/python-webob/html/jsonrpc-example.html·time=1709899196.0·size=73484·md5digest=9ee213c5603a6342cdf95824b9df5a4e·sha256digest=1ecd602fb37b2c9992fff561b633c7c6cad94136251680b00ab9421dd5401e63
21 ./usr/share/doc/python-webob/html/license.html·time=1709899196.0·size=7776·md5digest=265bd42dfa7a07b18412c298a0539e3e·sha256digest=ee8716c224d3d80804b33ee139146e07b0770130cd0820f5f566a7cc024e3f9221 ./usr/share/doc/python-webob/html/license.html·time=1709899196.0·size=7776·md5digest=265bd42dfa7a07b18412c298a0539e3e·sha256digest=ee8716c224d3d80804b33ee139146e07b0770130cd0820f5f566a7cc024e3f92
22 ./usr/share/doc/python-webob/html/objects.inv·time=1709899196.0·size=3800·md5digest=fe1064968e6c706e4d6e9c4de990e5ad·sha256digest=13a6eb792003a2b417e3e49331b0e413ac7c117e4dacc6a0ce64614e6e497c3422 ./usr/share/doc/python-webob/html/objects.inv·time=1709899196.0·size=3800·md5digest=fe1064968e6c706e4d6e9c4de990e5ad·sha256digest=13a6eb792003a2b417e3e49331b0e413ac7c117e4dacc6a0ce64614e6e497c34
23 ./usr/share/doc/python-webob/html/py-modindex.html·time=1709899196.0·size=9169·md5digest=e5eb988a5e794b5d5e17f452e94ed0ca·sha256digest=73fd6ec315b8b0a88214b1f104ec22fe96bc5a091ab538920e03eba173e181f723 ./usr/share/doc/python-webob/html/py-modindex.html·time=1709899196.0·size=9169·md5digest=e5eb988a5e794b5d5e17f452e94ed0ca·sha256digest=73fd6ec315b8b0a88214b1f104ec22fe96bc5a091ab538920e03eba173e181f7
24 ./usr/share/doc/python-webob/html/reference.html·time=1709899196.0·size=106419·md5digest=5bd45f9a371c9757e129f45940f3c2bd·sha256digest=cfa02f328295cc5e1d145662cc57303c479a79d5500510811306b12650fb606224 ./usr/share/doc/python-webob/html/reference.html·time=1709899196.0·size=106156·md5digest=c14ad332f87b0950db7b85e50d0330b7·sha256digest=94f4546072cc96b9c4911ed110f19bb265c11af180d478d6874891896e408962
25 ./usr/share/doc/python-webob/html/search.html·time=1709899196.0·size=6154·md5digest=cce85458fcec557dd963f1af11ea2cd8·sha256digest=b039c3a2bad3de72c286fed98de9606c7e926e26f0b36467a258296c6773b5a625 ./usr/share/doc/python-webob/html/search.html·time=1709899196.0·size=6154·md5digest=cce85458fcec557dd963f1af11ea2cd8·sha256digest=b039c3a2bad3de72c286fed98de9606c7e926e26f0b36467a258296c6773b5a6
26 ./usr/share/doc/python-webob/html/searchindex.js·time=1709899196.0·size=146279·md5digest=14ac0cc7dec55587373290fe8665c67b·sha256digest=85f92a54a382bd9b23aa22757d9cd495d537ef18911c168dea10668366130ebe26 ./usr/share/doc/python-webob/html/searchindex.js·time=1709899196.0·size=146279·md5digest=14ac0cc7dec55587373290fe8665c67b·sha256digest=85f92a54a382bd9b23aa22757d9cd495d537ef18911c168dea10668366130ebe
27 ./usr/share/doc/python-webob/html/whatsnew-1.5.html·time=1709899196.0·size=14543·md5digest=99c2c74969064ab4d9935d38048f66bb·sha256digest=e72461d0a1438ac5c332ee617507b0afba55551cc845bf473992193741f0e9c227 ./usr/share/doc/python-webob/html/whatsnew-1.5.html·time=1709899196.0·size=14543·md5digest=99c2c74969064ab4d9935d38048f66bb·sha256digest=e72461d0a1438ac5c332ee617507b0afba55551cc845bf473992193741f0e9c2
28 ./usr/share/doc/python-webob/html/whatsnew-1.6.html·time=1709899196.0·size=12080·md5digest=e4a4826e65a2ff490f13fa9baba109b6·sha256digest=442ae81d5da2fc3a6f0d929d8c7ee4199fa91c88ce7213856732d41d1008a36628 ./usr/share/doc/python-webob/html/whatsnew-1.6.html·time=1709899196.0·size=12080·md5digest=e4a4826e65a2ff490f13fa9baba109b6·sha256digest=442ae81d5da2fc3a6f0d929d8c7ee4199fa91c88ce7213856732d41d1008a366
29 ./usr/share/doc/python-webob/html/whatsnew-1.7.html·time=1709899196.0·size=28483·md5digest=867c0d0f9ab071ae554c951fb3f21038·sha256digest=a1738faa36930647b9ed17edf5b360e50a285fa6b418d8378fda48b31130d9ef 
30 ./usr/share/doc/python-webob/html/whatsnew-1.8.html·time=1709899196.0·size=17946·md5digest=177bdf0e18ba4fe7df28349ee93636d1·sha256digest=8e7a80eae1c50d2b08d5b90fc12ef48052cecb6cf77273e59bd97022f2756b2f 
31 ./usr/share/doc/python-webob/html/wiki-example.html·time=1709899196.0·size=79563·md5digest=36276dd1d0a60b3ca4ed984b9cd92b9a·sha256digest=565c2108341632b7143decd651de96c2a3c4bd6c058244a0469c804f9fe9079929 ./usr/share/doc/python-webob/html/whatsnew-1.7.html·time=1709899196.0·size=28350·md5digest=b1dc2467a5c75b0eccfac8616fff6622·sha256digest=520f7faa3200c509860a622938baa8ed7208cb077c23892e71a1cea0852bc48b
 30 ./usr/share/doc/python-webob/html/whatsnew-1.8.html·time=1709899196.0·size=17818·md5digest=95af7058b512117e25af09bbb954b175·sha256digest=2388e415b22956ae5aca88fd0560719469b59af800599ffe4f1a65a5f773460c
 31 ./usr/share/doc/python-webob/html/wiki-example.html·time=1709899196.0·size=79158·md5digest=594457a71719f527289a6337b8000cdd·sha256digest=dcf7f6d81dcec4b7490aebd5e299c8a8e451adab72beccd305b7e4dc2be14708
32 ./usr/share/doc/python-webob/html/_sources·time=1709899196.0·mode=755·type=dir32 ./usr/share/doc/python-webob/html/_sources·time=1709899196.0·mode=755·type=dir
33 ./usr/share/doc/python-webob/html/_sources/changes.txt·time=1709899196.0·size=116·md5digest=b03ad01af40f5bba234c6f367cce59dc·sha256digest=68fafa94fc4a1b1dedb2025bbfb17789908a0292d0e3280d54c58c33c5f942f233 ./usr/share/doc/python-webob/html/_sources/changes.txt·time=1709899196.0·size=116·md5digest=b03ad01af40f5bba234c6f367cce59dc·sha256digest=68fafa94fc4a1b1dedb2025bbfb17789908a0292d0e3280d54c58c33c5f942f2
34 ./usr/share/doc/python-webob/html/_sources/comment-example.txt·time=1709899196.0·size=13985·md5digest=279eaeb0931ac423be8e106afd4b61ea·sha256digest=cd833ca15e744f67fbd05599754b18d44b5c6108a60d65cc1730a0a7a86d67e634 ./usr/share/doc/python-webob/html/_sources/comment-example.txt·time=1709899196.0·size=13985·md5digest=279eaeb0931ac423be8e106afd4b61ea·sha256digest=cd833ca15e744f67fbd05599754b18d44b5c6108a60d65cc1730a0a7a86d67e6
35 ./usr/share/doc/python-webob/html/_sources/differences.txt·time=1709899196.0·size=19641·md5digest=36886ef3b8e5ddcad684cfad909a38ae·sha256digest=56a3de5e516b9c79eaf1e3939a8d8fed965530b5084d01416012c1c2015bcce135 ./usr/share/doc/python-webob/html/_sources/differences.txt·time=1709899196.0·size=19641·md5digest=36886ef3b8e5ddcad684cfad909a38ae·sha256digest=56a3de5e516b9c79eaf1e3939a8d8fed965530b5084d01416012c1c2015bcce1
36 ./usr/share/doc/python-webob/html/_sources/do-it-yourself.txt·time=1709899196.0·size=27080·md5digest=43c748ba714a1d605c0dbf853d25915f·sha256digest=0c7cbbec4233c641a3198cee4b9bcb36d6afac2dfe6720352731964bb87643d136 ./usr/share/doc/python-webob/html/_sources/do-it-yourself.txt·time=1709899196.0·size=27080·md5digest=43c748ba714a1d605c0dbf853d25915f·sha256digest=0c7cbbec4233c641a3198cee4b9bcb36d6afac2dfe6720352731964bb87643d1
37 ./usr/share/doc/python-webob/html/_sources/file-example.txt·time=1709899196.0·size=7779·md5digest=99cda9ee7e6b2de46d3dca39e6eb4066·sha256digest=8a0bfbba767552d5c15367a66ff3809b000aeec6317f9b1dd128841ec4dd790037 ./usr/share/doc/python-webob/html/_sources/file-example.txt·time=1709899196.0·size=7779·md5digest=99cda9ee7e6b2de46d3dca39e6eb4066·sha256digest=8a0bfbba767552d5c15367a66ff3809b000aeec6317f9b1dd128841ec4dd7900
38 ./usr/share/doc/python-webob/html/_sources/index.txt·time=1709899196.0·size=12188·md5digest=b75805b3a884c3f1ce6cc217f142b48f·sha256digest=889e77dbbc674414bbe71243fb81f5fa7751dc9baa490a896770f9cbf29bfb1638 ./usr/share/doc/python-webob/html/_sources/index.txt·time=1709899196.0·size=12188·md5digest=b75805b3a884c3f1ce6cc217f142b48f·sha256digest=889e77dbbc674414bbe71243fb81f5fa7751dc9baa490a896770f9cbf29bfb16
475 B
.PKGINFO
    
Offset 3, 15 lines modifiedOffset 3, 15 lines modified
3 pkgname·=·python-webob-docs3 pkgname·=·python-webob-docs
4 pkgbase·=·python-webob4 pkgbase·=·python-webob
5 pkgver·=·1.8.7-75 pkgver·=·1.8.7-7
6 pkgdesc·=·WSGI·request·and·response·object6 pkgdesc·=·WSGI·request·and·response·object
7 url·=·http://pythonpaste.org/webob/7 url·=·http://pythonpaste.org/webob/
8 builddate·=·17098991968 builddate·=·1709899196
9 packager·=·Reproducible·Arch·Linux·tests·<reproducible@archlinux.org>9 packager·=·Reproducible·Arch·Linux·tests·<reproducible@archlinux.org>
10 size·=·207198810 size·=·2065339
11 arch·=·any11 arch·=·any
12 license·=·MIT12 license·=·MIT
13 depend·=·python13 depend·=·python
14 makedepend·=·python-setuptools14 makedepend·=·python-setuptools
15 makedepend·=·python-sphinx15 makedepend·=·python-sphinx
16 makedepend·=·python-build16 makedepend·=·python-build
17 makedepend·=·python-installer17 makedepend·=·python-installer
11.1 KB
usr/share/doc/python-webob/html/api/cookies.html
    
Offset 65, 29 lines modifiedOffset 65, 29 lines modified
65 Can·be·passed·an·iterable·containing·multiple·domains,·this·will·set65 Can·be·passed·an·iterable·containing·multiple·domains,·this·will·set
66 multiple·cookies·one·for·each·domain.</p>66 multiple·cookies·one·for·each·domain.</p>
67 </dd>67 </dd>
68 <dt><code·class="docutils·literal·notranslate"><span·class="pre">serializer</span></code></dt><dd><p>An·object·with·two·methods:·<code·class="docutils·literal·notranslate"><span·class="pre">loads</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">dumps</span></code>.··The·<code·class="docutils·literal·notranslate"><span·class="pre">loads</span></code>·method68 <dt><code·class="docutils·literal·notranslate"><span·class="pre">serializer</span></code></dt><dd><p>An·object·with·two·methods:·<code·class="docutils·literal·notranslate"><span·class="pre">loads</span></code>·and·<code·class="docutils·literal·notranslate"><span·class="pre">dumps</span></code>.··The·<code·class="docutils·literal·notranslate"><span·class="pre">loads</span></code>·method
69 should·accept·a·bytestring·and·return·a·Python·object.··The·<code·class="docutils·literal·notranslate"><span·class="pre">dumps</span></code>69 should·accept·a·bytestring·and·return·a·Python·object.··The·<code·class="docutils·literal·notranslate"><span·class="pre">dumps</span></code>
70 method·should·accept·a·Python·object·and·return·bytes.··A·<code·class="docutils·literal·notranslate"><span·class="pre">ValueError</span></code>70 method·should·accept·a·Python·object·and·return·bytes.··A·<code·class="docutils·literal·notranslate"><span·class="pre">ValueError</span></code>
71 should·be·raised·for·malformed·inputs.··Default:·<code·class="docutils·literal·notranslate"><span·class="pre">None</span></code>,·which·will·use71 should·be·raised·for·malformed·inputs.··Default:·<code·class="docutils·literal·notranslate"><span·class="pre">None</span></code>,·which·will·use
72 a·derivation·of·<a·class="reference·external"·href="https://docs.python.org/3/library/json.html#json.dumps"·title="(in·Python·v3.12)"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">json.dumps()</span></code></a>·and·<a·class="reference·externa[·...·truncated·by·diffoscope;·len:·197,·SHA:·4eb9a92b4ee08ac148338c65b733d6624caa0f45ee183a3cf51a75b7fd9422f8·...·]>.</p>72 a·derivation·of·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">json.dumps()</span></code>·and·<code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">json.loads()</span></code>.</p>
73 </dd>73 </dd>
74 </dl>74 </dl>
75 <dl·class="py·method">75 <dl·class="py·method">
76 <dt·class="sig·sig-object·py"·id="webob.cookies.CookieProfile.bind">76 <dt·class="sig·sig-object·py"·id="webob.cookies.CookieProfile.bind">
77 <span·class="sig-name·descname"><span·class="pre">bind</span></span><span·class="sig-paren">(</span><em·class="sig-param"><span·class="n"><span·class="pre">request</span></span></em><span·class="sig-paren">)</span><a·class="headerlink"·href="#webob.cookies.CookieProfile.bind"·title="Link·to·this·definition">¶</a></dt>77 <span·class="sig-name·descname"><span·class="pre">bind</span></span><span·class="sig-paren">(</span><em·class="sig-param"><span·class="n"><span·class="pre">request</span></span></em><span·class="sig-paren">)</span><a·class="headerlink"·href="#webob.cookies.CookieProfile.bind"·title="Link·to·this·definition">¶</a></dt>
78 <dd><p>Bind·a·request·to·a·copy·of·this·instance·and·return·it</p>78 <dd><p>Bind·a·request·to·a·copy·of·this·instance·and·return·it</p>
79 </dd></dl>79 </dd></dl>
  
80 <dl·class="py·method">80 <dl·class="py·method">
81 <dt·class="sig·sig-object·py"·id="webob.cookies.CookieProfile.get_value">81 <dt·class="sig·sig-object·py"·id="webob.cookies.CookieProfile.get_value">
82 <span·class="sig-name·descname"><span·class="pre">get_value</span></span><span·class="sig-paren">(</span><span·class="sig-paren">)</span><a·class="headerlink"·href="#webob.cookies.CookieProfile.get_value"·title="Link·to·this·definition">¶</a></dt>82 <span·class="sig-name·descname"><span·class="pre">get_value</span></span><span·class="sig-paren">(</span><span·class="sig-paren">)</span><a·class="headerlink"·href="#webob.cookies.CookieProfile.get_value"·title="Link·to·this·definition">¶</a></dt>
83 <dd><p>Looks·for·a·cookie·by·name·in·the·currently·bound·request,·and83 <dd><p>Looks·for·a·cookie·by·name·in·the·currently·bound·request,·and
84 returns·its·value.··If·the·cookie·profile·is·not·bound·to·a·request,84 returns·its·value.··If·the·cookie·profile·is·not·bound·to·a·request,
85 this·method·will·raise·a·<a·class="reference·external"·href="https://docs.python.org/3/library/exceptions.html#ValueError"·title="(in·Python·v3.12)"><code·class="xref·py·py-exc·docutils·literal·notranslate"><span·class="pre">ValueError</span></code></a>.</p>85 this·method·will·raise·a·<code·class="xref·py·py-exc·docutils·literal·notranslate"><span·class="pre">ValueError</span></code>.</p>
86 <p>Looks·for·the·cookie·in·the·cookies·jar,·and·if·it·can·find·it·it·will86 <p>Looks·for·the·cookie·in·the·cookies·jar,·and·if·it·can·find·it·it·will
87 attempt·to·deserialize·it.··Returns·<code·class="docutils·literal·notranslate"><span·class="pre">None</span></code>·if·there·is·no·cookie·or87 attempt·to·deserialize·it.··Returns·<code·class="docutils·literal·notranslate"><span·class="pre">None</span></code>·if·there·is·no·cookie·or
88 if·the·value·in·the·cookie·cannot·be·successfully·deserialized.</p>88 if·the·value·in·the·cookie·cannot·be·successfully·deserialized.</p>
89 </dd></dl>89 </dd></dl>
  
90 <dl·class="py·method">90 <dl·class="py·method">
91 <dt·class="sig·sig-object·py"·id="webob.cookies.CookieProfile.set_cookies">91 <dt·class="sig·sig-object·py"·id="webob.cookies.CookieProfile.set_cookies">
3.62 KB
html2text {}
    
Offset 28, 21 lines modifiedOffset 28, 21 lines modified
28 ············domain).·Can·be·passed·an·iterable·containing·multiple·domains,28 ············domain).·Can·be·passed·an·iterable·containing·multiple·domains,
29 ············this·will·set·multiple·cookies·one·for·each·domain.29 ············this·will·set·multiple·cookies·one·for·each·domain.
30 ········serializer30 ········serializer
31 ············An·object·with·two·methods:·loads·and·dumps.·The·loads·method31 ············An·object·with·two·methods:·loads·and·dumps.·The·loads·method
32 ············should·accept·a·bytestring·and·return·a·Python·object.·The·dumps32 ············should·accept·a·bytestring·and·return·a·Python·object.·The·dumps
33 ············method·should·accept·a·Python·object·and·return·bytes.·A·ValueError33 ············method·should·accept·a·Python·object·and·return·bytes.·A·ValueError
34 ············should·be·raised·for·malformed·inputs.·Default:·None,·which·will34 ············should·be·raised·for·malformed·inputs.·Default:·None,·which·will
35 ············use·a·derivation·of·_.j_.s_.o_.n_.._.d_.u_.m_.p_.s_.(_.)·and·_.j_.s_.o_.n_.._.l_.o_.a_.d_.s_.(_.).35 ············use·a·derivation·of·json.dumps()·and·json.loads().
36 ········bind(r\x8re\x8eq\x8qu\x8ue\x8es\x8st\x8t)_\x836 ········bind(r\x8re\x8eq\x8qu\x8ue\x8es\x8st\x8t)_\x8
37 ············Bind·a·request·to·a·copy·of·this·instance·and·return·it37 ············Bind·a·request·to·a·copy·of·this·instance·and·return·it
38 ········get_value()_\x838 ········get_value()_\x8
39 ············Looks·for·a·cookie·by·name·in·the·currently·bound·request,·and39 ············Looks·for·a·cookie·by·name·in·the·currently·bound·request,·and
40 ············returns·its·value.·If·the·cookie·profile·is·not·bound·to·a·request,40 ············returns·its·value.·If·the·cookie·profile·is·not·bound·to·a·request,
41 ············this·method·will·raise·a·_.V_.a_.l_.u_.e_.E_.r_.r_.o_.r.41 ············this·method·will·raise·a·ValueError.
42 ············Looks·for·the·cookie·in·the·cookies·jar,·and·if·it·can·find·it·it42 ············Looks·for·the·cookie·in·the·cookies·jar,·and·if·it·can·find·it·it
43 ············will·attempt·to·deserialize·it.·Returns·None·if·there·is·no·cookie43 ············will·attempt·to·deserialize·it.·Returns·None·if·there·is·no·cookie
44 ············or·if·the·value·in·the·cookie·cannot·be·successfully·deserialized.44 ············or·if·the·value·in·the·cookie·cannot·be·successfully·deserialized.
45 ········set_cookies(r\x8re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e,·v\x8va\x8al\x8lu\x8ue\x8e,·d\x8do\x8om\x8ma\x8ai\x8in\x8ns\x8s=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·m\x8ma\x8ax\x8x_\x8_a\x8ag\x8ge\x8e=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t45 ········set_cookies(r\x8re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e,·v\x8va\x8al\x8lu\x8ue\x8e,·d\x8do\x8om\x8ma\x8ai\x8in\x8ns\x8s=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·m\x8ma\x8ax\x8x_\x8_a\x8ag\x8ge\x8e=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t
46 ········o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·p\x8pa\x8at\x8th\x8h=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·s\x8se\x8ec\x8cu\x8ur\x8re\x8e=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·h\x8ht\x8tt\x8tp\x8po\x8on\x8nl\x8ly\x8y=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t46 ········o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·p\x8pa\x8at\x8th\x8h=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·s\x8se\x8ec\x8cu\x8ur\x8re\x8e=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·h\x8ht\x8tt\x8tp\x8po\x8on\x8nl\x8ly\x8y=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t
47 ········o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·s\x8sa\x8am\x8me\x8es\x8si\x8it\x8te\x8e=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>)_\x847 ········o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·s\x8sa\x8am\x8me\x8es\x8si\x8it\x8te\x8e=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t·o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>)_\x8
48 ············Set·the·cookies·on·a·response.48 ············Set·the·cookies·on·a·response.
21.0 KB
usr/share/doc/python-webob/html/api/response.html
    
Offset 42, 46 lines modifiedOffset 42, 46 lines modified
42 <dd><p>Represents·a·WSGI·response.</p>42 <dd><p>Represents·a·WSGI·response.</p>
43 <p>If·no·arguments·are·passed,·creates·a·<a·class="reference·internal"·href="#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response</span></code></a>·that·uses·a43 <p>If·no·arguments·are·passed,·creates·a·<a·class="reference·internal"·href="#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response</span></code></a>·that·uses·a
44 variety·of·defaults.·The·defaults·may·be·changed·by·sub-classing·the44 variety·of·defaults.·The·defaults·may·be·changed·by·sub-classing·the
45 <a·class="reference·internal"·href="#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response</span></code></a>.·See·the·<a·class="reference·internal"·href="#response-subclassing-notes"><span·class="std·std-ref">sub-classing·notes</span></a>.</p>45 <a·class="reference·internal"·href="#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response</span></code></a>.·See·the·<a·class="reference·internal"·href="#response-subclassing-notes"><span·class="std·std-ref">sub-classing·notes</span></a>.</p>
46 <dl·class="field-list·simple">46 <dl·class="field-list·simple">
47 <dt·class="field-odd">Variables<span·class="colon">:</span></dt>47 <dt·class="field-odd">Variables<span·class="colon">:</span></dt>
48 <dd·class="field-odd"><ul·class="simple">48 <dd·class="field-odd"><ul·class="simple">
49 <li><p><strong>~Response.body</strong>·(<a·class="reference·external"·href="https://docs.python.org/3/library/stdtypes.html#bytes"·title="(in·Python·v3.12)"><em>bytes</em></a><em>·or·</em><em>text_type</em>)·--·If·<code·class="docutils·literal·notranslate"><span·class="pre">body</span></code>·is·a·<code·class="docutils·literal·notranslate"><span·class="pre">text_type</span></code>,·then·it·will·be49 <li><p><strong>~Response.body</strong>·(<em>bytes</em><em>·or·</em><em>text_type</em>)·--·If·<code·class="docutils·literal·notranslate"><span·class="pre">body</span></code>·is·a·<code·class="docutils·literal·notranslate"><span·class="pre">text_type</span></code>,·then·it·will·be
50 encoded·using·either·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·when·provided·or·<code·class="docutils·literal·notranslate"><span·class="pre">default_encoding</span></code>50 encoded·using·either·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·when·provided·or·<code·class="docutils·literal·notranslate"><span·class="pre">default_encoding</span></code>
51 when·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·is·not·provided·if·the·<code·class="docutils·literal·notranslate"><span·class="pre">content_type</span></code>·allows·for·a51 when·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·is·not·provided·if·the·<code·class="docutils·literal·notranslate"><span·class="pre">content_type</span></code>·allows·for·a
52 <code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>.·This·argument·is·mutually··exclusive·with·<code·class="docutils·literal·notranslate"><span·class="pre">app_iter</span></code>.</p></li>52 <code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>.·This·argument·is·mutually··exclusive·with·<code·class="docutils·literal·notranslate"><span·class="pre">app_iter</span></code>.</p></li>
53 <li><p><strong>~Response.status</strong>·(<a·class="reference·external"·href="https://docs.python.org/3/library/functions.html#int"·title="(in·Python·v3.12)"><em>int</em></a><em>·or·</em><a·class="reference·external"·href="https://docs.python.org/3/library/stdtypes.html#str"·title="(in·Python·v3.12[·...·truncated·by·diffoscope;·len:·248,·SHA:·192f18608500ebaf20887da99867e63a50697475087a4a91bea337ead9435646·...·]>·or·a·string·that·is53 <li><p><strong>~Response.status</strong>·(<em>int</em><em>·or·</em><em>str</em>)·--·Either·an·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">int</span></code>·or·a·string·that·is
54 an·integer·followed·by·the·status·text.·If·it·is·an·integer,·it·will·be54 an·integer·followed·by·the·status·text.·If·it·is·an·integer,·it·will·be
55 converted·to·a·proper·status·that·also·includes·the·status·text.··Any55 converted·to·a·proper·status·that·also·includes·the·status·text.··Any
56 existing·status·text·will·be·kept.·Non-standard·values·are·allowed.</p></li>56 existing·status·text·will·be·kept.·Non-standard·values·are·allowed.</p></li>
57 <li><p><strong>~Response.headerlist</strong>·(<a·class="reference·external"·href="https://docs.python.org/3/library/stdtypes.html#list"·title="(in·Python·v3.12)"><em>list</em></a>)·--·A·list·of·HTTP·headers·for·the·response.</p></li>57 <li><p><strong>~Response.headerlist</strong>·(<em>list</em>)·--·A·list·of·HTTP·headers·for·the·response.</p></li>
58 <li><p><strong>~Response.app_iter</strong>·(<em>iterable</em>)·--·An·iterator·that·is·used·as·the·body·of·the58 <li><p><strong>~Response.app_iter</strong>·(<em>iterable</em>)·--·An·iterator·that·is·used·as·the·body·of·the
59 response.·Should·conform·to·the·WSGI·requirements·and·should·provide59 response.·Should·conform·to·the·WSGI·requirements·and·should·provide
60 bytes.·This·argument·is·mutually·exclusive·with·<code·class="docutils·literal·notranslate"><span·class="pre">body</span></code>.</p></li>60 bytes.·This·argument·is·mutually·exclusive·with·<code·class="docutils·literal·notranslate"><span·class="pre">body</span></code>.</p></li>
61 <li><p><strong>~Response.content_type</strong>·(<a·class="reference·external"·href="https://docs.python.org/3/library/stdtypes.html#str"·title="(in·Python·v3.12)"><em>str</em></a><em>·or·</em><em>None</em>)·--·Sets·the·<code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·header.·If·no61 <li><p><strong>~Response.content_type</strong>·(<em>str</em><em>·or·</em><em>None</em>)·--·Sets·the·<code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·header.·If·no
62 <code·class="docutils·literal·notranslate"><span·class="pre">content_type</span></code>·is·provided,·and·there·is·no·<code·class="docutils·literal·notranslate"><span·class="pre">headerlist</span></code>,·the62 <code·class="docutils·literal·notranslate"><span·class="pre">content_type</span></code>·is·provided,·and·there·is·no·<code·class="docutils·literal·notranslate"><span·class="pre">headerlist</span></code>,·the
63 <code·class="docutils·literal·notranslate"><span·class="pre">default_content_type</span></code>·will·be·automatically·set.·If·<code·class="docutils·literal·notranslate"><span·class="pre">headerlist</span></code>63 <code·class="docutils·literal·notranslate"><span·class="pre">default_content_type</span></code>·will·be·automatically·set.·If·<code·class="docutils·literal·notranslate"><span·class="pre">headerlist</span></code>
64 is·provided·then·this·value·is·ignored.</p></li>64 is·provided·then·this·value·is·ignored.</p></li>
65 <li><p><strong>conditional_response</strong>·(<a·class="reference·external"·href="https://docs.python.org/3/library/functions.html#bool"·title="(in·Python·v3.12)"><em>bool</em></a>)·--·Used·to·change·the·behavior·of·the65 <li><p><strong>conditional_response</strong>·(<em>bool</em>)·--·Used·to·change·the·behavior·of·the
66 <a·class="reference·internal"·href="#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response</span></code></a>·to·check·the·original·request·for·conditional66 <a·class="reference·internal"·href="#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response</span></code></a>·to·check·the·original·request·for·conditional
67 response·headers.·See·<a·class="reference·internal"·href="#webob.response.Response.conditional_response_app"·title="webob.response.Response.conditional_response_app"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">conditional_response_app()</span></code></a>·for67 response·headers.·See·<a·class="reference·internal"·href="#webob.response.Response.conditional_response_app"·title="webob.response.Response.conditional_response_app"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">conditional_response_app()</span></code></a>·for
68 more·information.</p></li>68 more·information.</p></li>
69 <li><p><strong>~Response.charset</strong>·(<a·class="reference·external"·href="https://docs.python.org/3/library/stdtypes.html#str"·title="(in·Python·v3.12)"><em>str</em></a><em>·or·</em><em>None</em>)·--·Adds·a·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·<code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·parameter.·If69 <li><p><strong>~Response.charset</strong>·(<em>str</em><em>·or·</em><em>None</em>)·--·Adds·a·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·<code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·parameter.·If
70 no·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·is·provided·and·the·<code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·is·text,·then·the70 no·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·is·provided·and·the·<code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·is·text,·then·the
71 <code·class="docutils·literal·notranslate"><span·class="pre">default_charset</span></code>·will·automatically·be·added.··Currently·the·only71 <code·class="docutils·literal·notranslate"><span·class="pre">default_charset</span></code>·will·automatically·be·added.··Currently·the·only
72 <code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>'s·that·allow·for·a·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·are·defined·to·be72 <code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>'s·that·allow·for·a·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·are·defined·to·be
73 <code·class="docutils·literal·notranslate"><span·class="pre">text/*</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">application/xml</span></code>,·and·<code·class="docutils·literal·notranslate"><span·class="pre">*/*+xml</span></code>.·Any·other73 <code·class="docutils·literal·notranslate"><span·class="pre">text/*</span></code>,·<code·class="docutils·literal·notranslate"><span·class="pre">application/xml</span></code>,·and·<code·class="docutils·literal·notranslate"><span·class="pre">*/*+xml</span></code>.·Any·other
74 <code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>'s·will·not·have·a·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·added.·If·a74 <code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>'s·will·not·have·a·<code·class="docutils·literal·notranslate"><span·class="pre">charset</span></code>·added.·If·a
75 <code·class="docutils·literal·notranslate"><span·class="pre">headerlist</span></code>·is·provided·this·value·is·ignored.</p></li>75 <code·class="docutils·literal·notranslate"><span·class="pre">headerlist</span></code>·is·provided·this·value·is·ignored.</p></li>
76 </ul>76 </ul>
77 </dd>77 </dd>
78 </dl>78 </dl>
79 <p>All·other·response·attributes·may·be·set·on·the·response·by·providing·them79 <p>All·other·response·attributes·may·be·set·on·the·response·by·providing·them
80 as·keyword·arguments.·A·<a·class="reference·external"·href="https://docs.python.org/3/library/exceptions.html#TypeError"·title="(in·Python·v3.12)"><code·class="xref·py·py-exc·docutils·literal·notranslate"><span·class="pre">TypeError</span></code></a>·will·be·raised·for·any·unexpected80 as·keyword·arguments.·A·<code·class="xref·py·py-exc·docutils·literal·notranslate"><span·class="pre">TypeError</span></code>·will·be·raised·for·any·unexpected
81 keywords.</p>81 keywords.</p>
82 <p·id="response-subclassing-notes"><strong>Sub-classing·notes:</strong></p>82 <p·id="response-subclassing-notes"><strong>Sub-classing·notes:</strong></p>
83 <ul·class="simple">83 <ul·class="simple">
84 <li><p>The·<code·class="docutils·literal·notranslate"><span·class="pre">default_content_type</span></code>·is·used·as·the·default·for·the84 <li><p>The·<code·class="docutils·literal·notranslate"><span·class="pre">default_content_type</span></code>·is·used·as·the·default·for·the
85 <code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·header·that·is·returned·on·the·response.·It·is85 <code·class="docutils·literal·notranslate"><span·class="pre">Content-Type</span></code>·header·that·is·returned·on·the·response.·It·is
86 <code·class="docutils·literal·notranslate"><span·class="pre">text/html</span></code>.</p></li>86 <code·class="docutils·literal·notranslate"><span·class="pre">text/html</span></code>.</p></li>
87 <li><p>The·<code·class="docutils·literal·notranslate"><span·class="pre">default_charset</span></code>·is·used·as·the·default·character·set·to·return·on87 <li><p>The·<code·class="docutils·literal·notranslate"><span·class="pre">default_charset</span></code>·is·used·as·the·default·character·set·to·return·on
6.67 KB
html2text {}
    
Offset 4, 47 lines modifiedOffset 4, 47 lines modified
4 ··a\x8ap\x8pp\x8p_\x8_i\x8it\x8te\x8er\x8r=\x8=N\x8No\x8on\x8ne\x8e,·c\x8co\x8on\x8nt\x8te\x8en\x8nt\x8t_\x8_t\x8ty\x8yp\x8pe\x8e=\x8=N\x8No\x8on\x8ne\x8e,·c\x8co\x8on\x8nd\x8di\x8it\x8ti\x8io\x8on\x8na\x8al\x8l_\x8_r\x8re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e=\x8=N\x8No\x8on\x8ne\x8e,·c\x8ch\x8ha\x8ar\x8rs\x8se\x8et\x8t=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t4 ··a\x8ap\x8pp\x8p_\x8_i\x8it\x8te\x8er\x8r=\x8=N\x8No\x8on\x8ne\x8e,·c\x8co\x8on\x8nt\x8te\x8en\x8nt\x8t_\x8_t\x8ty\x8yp\x8pe\x8e=\x8=N\x8No\x8on\x8ne\x8e,·c\x8co\x8on\x8nd\x8di\x8it\x8ti\x8io\x8on\x8na\x8al\x8l_\x8_r\x8re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e=\x8=N\x8No\x8on\x8ne\x8e,·c\x8ch\x8ha\x8ar\x8rs\x8se\x8et\x8t=\x8=<\x8<o\x8ob\x8bj\x8je\x8ec\x8ct\x8t
5 ··o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·*\x8**\x8*k\x8kw\x8w)_\x85 ··o\x8ob\x8bj\x8je\x8ec\x8ct\x8t>\x8>,·*\x8**\x8*k\x8kw\x8w)_\x8
6 ······Represents·a·WSGI·response.6 ······Represents·a·WSGI·response.
7 ······If·no·arguments·are·passed,·creates·a·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e·that·uses·a·variety·of7 ······If·no·arguments·are·passed,·creates·a·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e·that·uses·a·variety·of
8 ······defaults.·The·defaults·may·be·changed·by·sub-classing·the·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e.·See8 ······defaults.·The·defaults·may·be·changed·by·sub-classing·the·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e.·See
9 ······the·_\x8s_\x8u_\x8b_\x8-_\x8c_\x8l_\x8a_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8n_\x8o_\x8t_\x8e_\x8s.9 ······the·_\x8s_\x8u_\x8b_\x8-_\x8c_\x8l_\x8a_\x8s_\x8s_\x8i_\x8n_\x8g_\x8·_\x8n_\x8o_\x8t_\x8e_\x8s.
10 ········Variables:10 ········Variables:
11 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.b\x8bo\x8od\x8dy\x8y·(_.b.b_.y.y_.t.t_.e.e_.s\x8s·o\x8or\x8r·t\x8te\x8ex\x8xt\x8t_\x8_t\x8ty\x8yp\x8pe\x8e)·--·If·body·is·a11 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.b\x8bo\x8od\x8dy\x8y·(b.by.yt.te.es\x8s·o\x8or\x8r·t\x8te\x8ex\x8xt\x8t_\x8_t\x8ty\x8yp\x8pe\x8e)·--·If·body·is·a
12 ··················text_type,·then·it·will·be·encoded·using·either·charset·when12 ··················text_type,·then·it·will·be·encoded·using·either·charset·when
13 ··················provided·or·default_encoding·when·charset·is·not·provided·if13 ··················provided·or·default_encoding·when·charset·is·not·provided·if
14 ··················the·content_type·allows·for·a·charset.·This·argument·is14 ··················the·content_type·allows·for·a·charset.·This·argument·is
15 ··················mutually·exclusive·with·app_iter.15 ··················mutually·exclusive·with·app_iter.
16 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.s\x8st\x8ta\x8at\x8tu\x8us\x8s·(_.i.i_.n.n_.t.t·o.or.r·_.s.s_.t.t_.r.r)·--·Either·an·_.i_.n_.t·or·a·string16 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.s\x8st\x8ta\x8at\x8tu\x8us\x8s·(i.in.nt.t·o.or.r·s.st.tr.r)·--·Either·an·int·or·a·string
17 ··················that·is·an·integer·followed·by·the·status·text.·If·it·is·an17 ··················that·is·an·integer·followed·by·the·status·text.·If·it·is·an
18 ··················integer,·it·will·be·converted·to·a·proper·status·that·also18 ··················integer,·it·will·be·converted·to·a·proper·status·that·also
19 ··················includes·the·status·text.·Any·existing·status·text·will·be19 ··················includes·the·status·text.·Any·existing·status·text·will·be
20 ··················kept.·Non-standard·values·are·allowed.20 ··················kept.·Non-standard·values·are·allowed.
21 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.h\x8he\x8ea\x8ad\x8de\x8er\x8rl\x8li\x8is\x8st\x8t·(_.l.l_.i.i_.s.s_.t\x8t)·--·A·list·of·HTTP·headers·for·the21 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.h\x8he\x8ea\x8ad\x8de\x8er\x8rl\x8li\x8is\x8st\x8t·(l.li.is.st\x8t)·--·A·list·of·HTTP·headers·for·the
22 ··················response.22 ··················response.
23 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.a\x8ap\x8pp\x8p_\x8_i\x8it\x8te\x8er\x8r·(i\x8it\x8te\x8er\x8ra\x8ab\x8bl\x8le\x8e)·--·An·iterator·that·is·used·as23 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.a\x8ap\x8pp\x8p_\x8_i\x8it\x8te\x8er\x8r·(i\x8it\x8te\x8er\x8ra\x8ab\x8bl\x8le\x8e)·--·An·iterator·that·is·used·as
24 ··················the·body·of·the·response.·Should·conform·to·the·WSGI24 ··················the·body·of·the·response.·Should·conform·to·the·WSGI
25 ··················requirements·and·should·provide·bytes.·This·argument·is25 ··················requirements·and·should·provide·bytes.·This·argument·is
26 ··················mutually·exclusive·with·body.26 ··················mutually·exclusive·with·body.
27 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.c\x8co\x8on\x8nt\x8te\x8en\x8nt\x8t_\x8_t\x8ty\x8yp\x8pe\x8e·(_.s.s_.t.t_.r\x8r·o\x8or\x8r·N\x8No\x8on\x8ne\x8e)·--·Sets·the·Content-Type27 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.c\x8co\x8on\x8nt\x8te\x8en\x8nt\x8t_\x8_t\x8ty\x8yp\x8pe\x8e·(s.st.tr\x8r·o\x8or\x8r·N\x8No\x8on\x8ne\x8e)·--·Sets·the·Content-Type
28 ··················header.·If·no·content_type·is·provided,·and·there·is·no28 ··················header.·If·no·content_type·is·provided,·and·there·is·no
29 ··················headerlist,·the·default_content_type·will·be·automatically29 ··················headerlist,·the·default_content_type·will·be·automatically
30 ··················set.·If·headerlist·is·provided·then·this·value·is·ignored.30 ··················set.·If·headerlist·is·provided·then·this·value·is·ignored.
31 ················*·c\x8co\x8on\x8nd\x8di\x8it\x8ti\x8io\x8on\x8na\x8al\x8l_\x8_r\x8re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e·(_.b.b_.o.o_.o.o_.l\x8l)·--·Used·to·change·the·behavior·of31 ················*·c\x8co\x8on\x8nd\x8di\x8it\x8ti\x8io\x8on\x8na\x8al\x8l_\x8_r\x8re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e·(b.bo.oo.ol\x8l)·--·Used·to·change·the·behavior·of
32 ··················the·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e·to·check·the·original·request·for·conditional32 ··················the·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e·to·check·the·original·request·for·conditional
33 ··················response·headers.·See·_\x8c_\x8o_\x8n_\x8d_\x8i_\x8t_\x8i_\x8o_\x8n_\x8a_\x8l_\x8__\x8r_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8__\x8a_\x8p_\x8p_\x8(_\x8)·for·more33 ··················response·headers.·See·_\x8c_\x8o_\x8n_\x8d_\x8i_\x8t_\x8i_\x8o_\x8n_\x8a_\x8l_\x8__\x8r_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8__\x8a_\x8p_\x8p_\x8(_\x8)·for·more
34 ··················information.34 ··················information.
35 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.c\x8ch\x8ha\x8ar\x8rs\x8se\x8et\x8t·(_.s.s_.t.t_.r\x8r·o\x8or\x8r·N\x8No\x8on\x8ne\x8e)·--·Adds·a·charset·Content-35 ················*·~\x8~R\x8Re\x8es\x8sp\x8po\x8on\x8ns\x8se\x8e.\x8.c\x8ch\x8ha\x8ar\x8rs\x8se\x8et\x8t·(s.st.tr\x8r·o\x8or\x8r·N\x8No\x8on\x8ne\x8e)·--·Adds·a·charset·Content-
36 ··················Type·parameter.·If·no·charset·is·provided·and·the·Content-36 ··················Type·parameter.·If·no·charset·is·provided·and·the·Content-
37 ··················Type·is·text,·then·the·default_charset·will·automatically·be37 ··················Type·is·text,·then·the·default_charset·will·automatically·be
38 ··················added.·Currently·the·only·Content-Type's·that·allow·for·a38 ··················added.·Currently·the·only·Content-Type's·that·allow·for·a
39 ··················charset·are·defined·to·be·text/*,·application/xml,·and·*/39 ··················charset·are·defined·to·be·text/*,·application/xml,·and·*/
40 ··················*+xml.·Any·other·Content-Type's·will·not·have·a·charset40 ··················*+xml.·Any·other·Content-Type's·will·not·have·a·charset
41 ··················added.·If·a·headerlist·is·provided·this·value·is·ignored.41 ··················added.·If·a·headerlist·is·provided·this·value·is·ignored.
42 ······All·other·response·attributes·may·be·set·on·the·response·by·providing42 ······All·other·response·attributes·may·be·set·on·the·response·by·providing
43 ······them·as·keyword·arguments.·A·_.T_.y_.p_.e_.E_.r_.r_.o_.r·will·be·raised·for·any·unexpected43 ······them·as·keyword·arguments.·A·TypeError·will·be·raised·for·any·unexpected
44 ······keywords.44 ······keywords.
45 ······S\x8Su\x8ub\x8b-\x8-c\x8cl\x8la\x8as\x8ss\x8si\x8in\x8ng\x8g·n\x8no\x8ot\x8te\x8es\x8s:\x8:45 ······S\x8Su\x8ub\x8b-\x8-c\x8cl\x8la\x8as\x8ss\x8si\x8in\x8ng\x8g·n\x8no\x8ot\x8te\x8es\x8s:\x8:
46 ··········*·The·default_content_type·is·used·as·the·default·for·the·Content-46 ··········*·The·default_content_type·is·used·as·the·default·for·the·Content-
47 ············Type·header·that·is·returned·on·the·response.·It·is·text/html.47 ············Type·header·that·is·returned·on·the·response.·It·is·text/html.
48 ··········*·The·default_charset·is·used·as·the·default·character·set·to·return48 ··········*·The·default_charset·is·used·as·the·default·character·set·to·return
49 ············on·the·Content-Type·header,·if·the·Content-Type·allows·for·a49 ············on·the·Content-Type·header,·if·the·Content-Type·allows·for·a
50 ············charset·parameter.·Currently·the·only·Content-Type's·that·allow·for50 ············charset·parameter.·Currently·the·only·Content-Type's·that·allow·for
40.9 KB
usr/share/doc/python-webob/html/api/webob.html
    
Offset 181, 15 lines modifiedOffset 181, 15 lines modified
181 <div·class="line"><em>extension_params</em>·is·the·extension·parameters,·as·a·list181 <div·class="line"><em>extension_params</em>·is·the·extension·parameters,·as·a·list
182 where·each·item·is·either·a·parameter·string·or·a·(parameter182 where·each·item·is·either·a·parameter·string·or·a·(parameter
183 name,·value)·tuple.</div>183 name,·value)·tuple.</div>
184 </div>184 </div>
185 </p>185 </p>
186 </dd>186 </dd>
187 <dt·class="field-odd">Raises<span·class="colon">:</span></dt>187 <dt·class="field-odd">Raises<span·class="colon">:</span></dt>
188 <dd·class="field-odd"><p><a·class="reference·external"·href="https://docs.python.org/3/library/exceptions.html#ValueError"·title="(in·Python·v3.12)"><strong>ValueError</strong></a>·--·if·<cite>value</cite>·is·an·invalid·header</p>188 <dd·class="field-odd"><p><strong>ValueError</strong>·--·if·<cite>value</cite>·is·an·invalid·header</p>
189 </dd>189 </dd>
190 </dl>190 </dl>
191 </dd></dl>191 </dd></dl>
  
192 </dd></dl>192 </dd></dl>
  
193 <dl·class="py·class">193 <dl·class="py·class">
19.4 KB
html2text {}
    
Offset 19, 15 lines modifiedOffset 19, 15 lines modified
19 ··c\x8cl\x8la\x8as\x8ss\x8s·webob.acceptparse.Accept_\x819 ··c\x8cl\x8la\x8as\x8ss\x8s·webob.acceptparse.Accept_\x8
20 ······Represent·an·Accept·header.20 ······Represent·an·Accept·header.
21 ······Base·class·for·_\x8A_\x8c_\x8c_\x8e_\x8p_\x8t_\x8V_\x8a_\x8l_\x8i_\x8d_\x8H_\x8e_\x8a_\x8d_\x8e_\x8r,·_\x8A_\x8c_\x8c_\x8e_\x8p_\x8t_\x8N_\x8o_\x8H_\x8e_\x8a_\x8d_\x8e_\x8r,·and21 ······Base·class·for·_\x8A_\x8c_\x8c_\x8e_\x8p_\x8t_\x8V_\x8a_\x8l_\x8i_\x8d_\x8H_\x8e_\x8a_\x8d_\x8e_\x8r,·_\x8A_\x8c_\x8c_\x8e_\x8p_\x8t_\x8N_\x8o_\x8H_\x8e_\x8a_\x8d_\x8e_\x8r,·and
22 ······_\x8A_\x8c_\x8c_\x8e_\x8p_\x8t_\x8I_\x8n_\x8v_\x8a_\x8l_\x8i_\x8d_\x8H_\x8e_\x8a_\x8d_\x8e_\x8r.22 ······_\x8A_\x8c_\x8c_\x8e_\x8p_\x8t_\x8I_\x8n_\x8v_\x8a_\x8l_\x8i_\x8d_\x8H_\x8e_\x8a_\x8d_\x8e_\x8r.
23 ········c\x8cl\x8la\x8as\x8ss\x8sm\x8me\x8et\x8th\x8ho\x8od\x8d·parse(v\x8va\x8al\x8lu\x8ue\x8e)_\x823 ········c\x8cl\x8la\x8as\x8ss\x8sm\x8me\x8et\x8th\x8ho\x8od\x8d·parse(v\x8va\x8al\x8lu\x8ue\x8e)_\x8
24 ············Parse·an·Accept·header.24 ············Parse·an·Accept·header.
25 ··············Raises:25 ··············Raises:
26 ··················_.V.V_.a.a_.l.l_.u.u_.e.e_.E.E_.r.r_.r.r_.o.o_.r\x8r·--·ifvalueis·an·invalid·header26 ··················V.Va.al.lu.ue.eE.Er.rr.ro.or\x8r·--·ifvalueis·an·invalid·header
27 ··c\x8cl\x8la\x8as\x8ss\x8s·webob.acceptparse.AcceptOffer(t\x8ty\x8yp\x8pe\x8e,·s\x8su\x8ub\x8bt\x8ty\x8yp\x8pe\x8e,·p\x8pa\x8ar\x8ra\x8am\x8ms\x8s)_\x827 ··c\x8cl\x8la\x8as\x8ss\x8s·webob.acceptparse.AcceptOffer(t\x8ty\x8yp\x8pe\x8e,·s\x8su\x8ub\x8bt\x8ty\x8yp\x8pe\x8e,·p\x8pa\x8ar\x8ra\x8am\x8ms\x8s)_\x8
28 ······A·pre-parsed·offer·tuple·represeting·a·value·in·the·format·type/28 ······A·pre-parsed·offer·tuple·represeting·a·value·in·the·format·type/
29 ······subtype;param0=value0;param1=value1.29 ······subtype;param0=value0;param1=value1.
30 ········Variables:30 ········Variables:
31 ················*·t\x8ty\x8yp\x8pe\x8e·--·The·media·type's·root·category.31 ················*·t\x8ty\x8yp\x8pe\x8e·--·The·media·type's·root·category.
32 ················*·s\x8su\x8ub\x8bt\x8ty\x8yp\x8pe\x8e·--·The·media·type's·subtype.32 ················*·s\x8su\x8ub\x8bt\x8ty\x8yp\x8pe\x8e·--·The·media·type's·subtype.
33 ················*·p\x8pa\x8ar\x8ra\x8am\x8ms\x8s·--·A·tuple·of·2-tuples·containing·parameter·names·and33 ················*·p\x8pa\x8ar\x8ra\x8am\x8ms\x8s·--·A·tuple·of·2-tuples·containing·parameter·names·and
2.67 KB
usr/share/doc/python-webob/html/differences.html
    
Offset 588, 15 lines modifiedOffset 588, 15 lines modified
588 your·preferred·encoding,·it·always·uses·UTF-8).··The·WebOb·method588 your·preferred·encoding,·it·always·uses·UTF-8).··The·WebOb·method
589 <code·class="docutils·literal·notranslate"><span·class="pre">resp.write(text)</span></code>·is·basically·equivalent,·and·also·accepts589 <code·class="docutils·literal·notranslate"><span·class="pre">resp.write(text)</span></code>·is·basically·equivalent,·and·also·accepts
590 unicode·(using·<code·class="docutils·literal·notranslate"><span·class="pre">resp.charset</span></code>·for·the·encoding).··You·can·also590 unicode·(using·<code·class="docutils·literal·notranslate"><span·class="pre">resp.charset</span></code>·for·the·encoding).··You·can·also
591 write·to·<code·class="docutils·literal·notranslate"><span·class="pre">resp.body_file</span></code>,·but·it·does·not·allow·unicode.</p>591 write·to·<code·class="docutils·literal·notranslate"><span·class="pre">resp.body_file</span></code>,·but·it·does·not·allow·unicode.</p>
592 </dd>592 </dd>
593 </dl>593 </dl>
594 <p>Besides·exposing·a·<code·class="docutils·literal·notranslate"><span·class="pre">.headers</span></code>·attribute·(based·on594 <p>Besides·exposing·a·<code·class="docutils·literal·notranslate"><span·class="pre">.headers</span></code>·attribute·(based·on
595 <a·class="reference·external"·href="https://docs.python.org/3/library/wsgiref.html#wsgiref.headers.Headers"·title="(in·Python·v3.12)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">wsgiref.headers.Headers</span></code></a>)595 <code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">wsgiref.headers.Headers</span></code>)
596 there·is·no·other·API·for·the·webapp·response·object.··This·means·the596 there·is·no·other·API·for·the·webapp·response·object.··This·means·the
597 response·lacks:</p>597 response·lacks:</p>
598 <ul·class="simple">598 <ul·class="simple">
599 <li><p>A·usefully·readable·body·or·status.</p></li>599 <li><p>A·usefully·readable·body·or·status.</p></li>
600 <li><p>A·useful·constructor·that·makes·it·easy·to·treat·responses·like600 <li><p>A·useful·constructor·that·makes·it·easy·to·treat·responses·like
601 objects.</p></li>601 objects.</p></li>
602 <li><p>Providing·a·non-string·<code·class="docutils·literal·notranslate"><span·class="pre">app_iter</span></code>·for·the·body·(like·a·generator).</p></li>602 <li><p>Providing·a·non-string·<code·class="docutils·literal·notranslate"><span·class="pre">app_iter</span></code>·for·the·body·(like·a·generator).</p></li>
1.18 KB
html2text {}
    
Offset 417, 15 lines modifiedOffset 417, 15 lines modified
417 ······This·writes·to·an·internal·StringIO·instance·of·the·response.·This·uses417 ······This·writes·to·an·internal·StringIO·instance·of·the·response.·This·uses
418 ······the·ability·of·the·standard·StringIO·object·to·hold·either·unicode·or·str418 ······the·ability·of·the·standard·StringIO·object·to·hold·either·unicode·or·str
419 ······text,·and·so·long·as·you·are·always·consistent·it·will·encode·your419 ······text,·and·so·long·as·you·are·always·consistent·it·will·encode·your
420 ······content·(but·it·does·not·respect·your·preferred·encoding,·it·always·uses420 ······content·(but·it·does·not·respect·your·preferred·encoding,·it·always·uses
421 ······UTF-8).·The·WebOb·method·resp.write(text)·is·basically·equivalent,·and421 ······UTF-8).·The·WebOb·method·resp.write(text)·is·basically·equivalent,·and
422 ······also·accepts·unicode·(using·resp.charset·for·the·encoding).·You·can·also422 ······also·accepts·unicode·(using·resp.charset·for·the·encoding).·You·can·also
423 ······write·to·resp.body_file,·but·it·does·not·allow·unicode.423 ······write·to·resp.body_file,·but·it·does·not·allow·unicode.
424 Besides·exposing·a·.headers·attribute·(based·on·_.w_.s_.g_.i_.r_.e_.f_.._.h_.e_.a_.d_.e_.r_.s_.._.H_.e_.a_.d_.e_.r_.s)·there424 Besides·exposing·a·.headers·attribute·(based·on·wsgiref.headers.Headers)·there
425 is·no·other·API·for·the·webapp·response·object.·This·means·the·response·lacks:425 is·no·other·API·for·the·webapp·response·object.·This·means·the·response·lacks:
426 ····*·A·usefully·readable·body·or·status.426 ····*·A·usefully·readable·body·or·status.
427 ····*·A·useful·constructor·that·makes·it·easy·to·treat·responses·like·objects.427 ····*·A·useful·constructor·that·makes·it·easy·to·treat·responses·like·objects.
428 ····*·Providing·a·non-string·app_iter·for·the·body·(like·a·generator).428 ····*·Providing·a·non-string·app_iter·for·the·body·(like·a·generator).
429 ····*·Parsing·of·the·Content-Type·charset.429 ····*·Parsing·of·the·Content-Type·charset.
430 ····*·Getter/setters·for·parsed·forms·of·headers,·specifically·cache_control430 ····*·Getter/setters·for·parsed·forms·of·headers,·specifically·cache_control
431 ······and·last_modified.431 ······and·last_modified.
8.63 KB
usr/share/doc/python-webob/html/do-it-yourself.html
    
Offset 125, 15 lines modifiedOffset 125, 15 lines modified
125 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">Serving·Your·Application</a><a·class="headerlink"·href="#serving-your-application"·title="Link·to·this·heading">¶</a></h2>125 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">Serving·Your·Application</a><a·class="headerlink"·href="#serving-your-application"·title="Link·to·this·heading">¶</a></h2>
126 <p>While·we·can·test·the·application·using·WebOb,·you·might·want·to·serve·the·application.··Here's·the·basic·recipe,·using·the·<a·class="reference·external"·href="https://pypi.python.org/pypi/Paste">Paste</a>·HTTP·server:</p>126 <p>While·we·can·test·the·application·using·WebOb,·you·might·want·to·serve·the·application.··Here's·the·basic·recipe,·using·the·<a·class="reference·external"·href="https://pypi.python.org/pypi/Paste">Paste</a>·HTTP·server:</p>
127 <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="k">if</span>·<span·class="vm">__name__</span>·<span·class="o">==</span>·<span·class="s1">&#39;__main__&#39;</span><span·class="p">:</span>127 <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="k">if</span>·<span·class="vm">__name__</span>·<span·class="o">==</span>·<span·class="s1">&#39;__main__&#39;</span><span·class="p">:</span>
128 ····<span·class="kn">from</span>·<span·class="nn">paste</span>·<span·class="kn">import</span>·<span·class="n">httpserver</span>128 ····<span·class="kn">from</span>·<span·class="nn">paste</span>·<span·class="kn">import</span>·<span·class="n">httpserver</span>
129 ····<span·class="n">httpserver</span><span·class="o">.</span><span·class="n">serve</span><span·class="p">(</span><span·class="n">app</span><span·class="p">,</span>·<span·class="n">host</span><span·class="o">=</span><span·class="s1">&#39;127.0.0.1&#39;</span><span·class="p">,</span>·<span·class="n">port</span><span·class="o">=</span><span·class="mi">8080</span><span·class="p">)</span>129 ····<span·class="n">httpserver</span><span·class="o">.</span><span·class="n">serve</span><span·class="p">(</span><span·class="n">app</span><span·class="p">,</span>·<span·class="n">host</span><span·class="o">=</span><span·class="s1">&#39;127.0.0.1&#39;</span><span·class="p">,</span>·<span·class="n">port</span><span·class="o">=</span><span·class="mi">8080</span><span·class="p">)</span>
130 </pre></div>130 </pre></div>
131 </div>131 </div>
132 <p>You·could·also·use·<a·class="reference·external"·href="https://docs.python.org/3/library/wsgiref.html#module-wsgiref.simple_server"·title="(in·Python·v3.12)"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">wsgiref.simple_server</span></code></a>·from·the·standard·library,·but·this·is·mostly·appropriate·for·testing·as·it·is·single-threaded:</p>132 <p>You·could·also·use·<code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">wsgiref.simple_server</span></code>·from·the·standard·library,·but·this·is·mostly·appropriate·for·testing·as·it·is·single-threaded:</p>
133 <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="k">if</span>·<span·class="vm">__name__</span>·<span·class="o">==</span>·<span·class="s1">&#39;__main__&#39;</span><span·class="p">:</span>133 <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="k">if</span>·<span·class="vm">__name__</span>·<span·class="o">==</span>·<span·class="s1">&#39;__main__&#39;</span><span·class="p">:</span>
134 ····<span·class="kn">from</span>·<span·class="nn">wsgiref.simple_server</span>·<span·class="kn">import</span>·<span·class="n">make_server</span>134 ····<span·class="kn">from</span>·<span·class="nn">wsgiref.simple_server</span>·<span·class="kn">import</span>·<span·class="n">make_server</span>
135 ····<span·class="n">server</span>·<span·class="o">=</span>·<span·class="n">make_server</span><span·class="p">(</span><span·class="s1">&#39;127.0.0.1&#39;</span><span·class="p">,</span>·<span·class="mi">8080</span><span·class="p">,</span>·<span·class="n">app</span><span·class="p">)</span>135 ····<span·class="n">server</span>·<span·class="o">=</span>·<span·class="n">make_server</span><span·class="p">(</span><span·class="s1">&#39;127.0.0.1&#39;</span><span·class="p">,</span>·<span·class="mi">8080</span><span·class="p">,</span>·<span·class="n">app</span><span·class="p">)</span>
136 ····<span·class="n">server</span><span·class="o">.</span><span·class="n">serve_forever</span><span·class="p">()</span>136 ····<span·class="n">server</span><span·class="o">.</span><span·class="n">serve_forever</span><span·class="p">()</span>
137 </pre></div>137 </pre></div>
138 </div>138 </div>
139 </section>139 </section>
2.25 KB
html2text {}
    
Offset 94, 15 lines modifiedOffset 94, 15 lines modified
94 number·of·unicode·issues.94 number·of·unicode·issues.
95 *\x8**\x8**\x8**\x8**\x8*·_\x8S\x8S_\x8e\x8e_\x8r\x8r_\x8v\x8v_\x8i\x8i_\x8n\x8n_\x8g\x8g_\x8·_\x8Y\x8Y_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8·_\x8A\x8A_\x8p\x8p_\x8p\x8p_\x8l\x8l_\x8i\x8i_\x8c\x8c_\x8a\x8a_\x8t\x8t_\x8i\x8i_\x8o\x8o_\x8n\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*95 *\x8**\x8**\x8**\x8**\x8*·_\x8S\x8S_\x8e\x8e_\x8r\x8r_\x8v\x8v_\x8i\x8i_\x8n\x8n_\x8g\x8g_\x8·_\x8Y\x8Y_\x8o\x8o_\x8u\x8u_\x8r\x8r_\x8·_\x8A\x8A_\x8p\x8p_\x8p\x8p_\x8l\x8l_\x8i\x8i_\x8c\x8c_\x8a\x8a_\x8t\x8t_\x8i\x8i_\x8o\x8o_\x8n\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
96 While·we·can·test·the·application·using·WebOb,·you·might·want·to·serve·the96 While·we·can·test·the·application·using·WebOb,·you·might·want·to·serve·the
97 application.·Here's·the·basic·recipe,·using·the·_\x8P_\x8a_\x8s_\x8t_\x8e·HTTP·server:97 application.·Here's·the·basic·recipe,·using·the·_\x8P_\x8a_\x8s_\x8t_\x8e·HTTP·server:
98 if·__name__·==·'__main__':98 if·__name__·==·'__main__':
99 ····from·paste·import·httpserver99 ····from·paste·import·httpserver
100 ····httpserver.serve(app,·host='127.0.0.1',·port=8080)100 ····httpserver.serve(app,·host='127.0.0.1',·port=8080)
101 You·could·also·use·_.w_.s_.g_.i_.r_.e_.f_.._.s_.i_.m_.p_.l_.e_.__.s_.e_.r_.v_.e_.r·from·the·standard·library,·but·this·is101 You·could·also·use·wsgiref.simple_server·from·the·standard·library,·but·this·is
102 mostly·appropriate·for·testing·as·it·is·single-threaded:102 mostly·appropriate·for·testing·as·it·is·single-threaded:
103 if·__name__·==·'__main__':103 if·__name__·==·'__main__':
104 ····from·wsgiref.simple_server·import·make_server104 ····from·wsgiref.simple_server·import·make_server
105 ····server·=·make_server('127.0.0.1',·8080,·app)105 ····server·=·make_server('127.0.0.1',·8080,·app)
106 ····server.serve_forever()106 ····server.serve_forever()
107 *\x8**\x8**\x8**\x8**\x8*·_\x8M\x8M_\x8a\x8a_\x8k\x8k_\x8i\x8i_\x8n\x8n_\x8g\x8g_\x8·_\x8A\x8A_\x8·_\x8F\x8F_\x8r\x8r_\x8a\x8a_\x8m\x8m_\x8e\x8e_\x8w\x8w_\x8o\x8o_\x8r\x8r_\x8k\x8k_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*107 *\x8**\x8**\x8**\x8**\x8*·_\x8M\x8M_\x8a\x8a_\x8k\x8k_\x8i\x8i_\x8n\x8n_\x8g\x8g_\x8·_\x8A\x8A_\x8·_\x8F\x8F_\x8r\x8r_\x8a\x8a_\x8m\x8m_\x8e\x8e_\x8w\x8w_\x8o\x8o_\x8r\x8r_\x8k\x8k_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
108 Well,·now·we·need·to·start·work·on·our·framework.108 Well,·now·we·need·to·start·work·on·our·framework.
3.98 KB
usr/share/doc/python-webob/html/index.html
    
Offset 153, 15 lines modifiedOffset 153, 15 lines modified
153 </div></blockquote>153 </div></blockquote>
154 <p>Also·for·standard·HTTP·request·headers,·there·are·usually·attributes,·e.g.,154 <p>Also·for·standard·HTTP·request·headers,·there·are·usually·attributes,·e.g.,
155 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.accept_language"·title="webob.request.BaseRequest.accept_language"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.accept_language</span></code></a>,155 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.accept_language"·title="webob.request.BaseRequest.accept_language"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.accept_language</span></code></a>,
156 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.content_length"·title="webob.request.BaseRequest.content_length"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.content_length</span></code></a>,·and156 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.content_length"·title="webob.request.BaseRequest.content_length"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.content_length</span></code></a>,·and
157 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.user_agent"·title="webob.request.BaseRequest.user_agent"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.user_agent</span></code></a>.·These·properties157 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.user_agent"·title="webob.request.BaseRequest.user_agent"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.user_agent</span></code></a>.·These·properties
158 expose·the·<em>parsed</em>·form·of·each·header,·for·whatever·parsing·makes·sense.·For158 expose·the·<em>parsed</em>·form·of·each·header,·for·whatever·parsing·makes·sense.·For
159 instance,·<a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.if_modified_since"·title="webob.request.BaseRequest.if_modified_since"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.if_modified_since</span></code></a>·returns·a159 instance,·<a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.if_modified_since"·title="webob.request.BaseRequest.if_modified_since"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">req.if_modified_since</span></code></a>·returns·a
160 <a·class="reference·external"·href="https://docs.python.org/3/library/datetime.html#datetime.datetime"·title="(in·Python·v3.12)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">datetime</span></code></a>·object·(or·<code·class="docutils·literal·notranslate"><span·class="pre">None</span></code>·if·the·header·is·was·not160 <code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">datetime</span></code>·object·(or·<code·class="docutils·literal·notranslate"><span·class="pre">None</span></code>·if·the·header·is·was·not
161 provided).·Details·are·in·the·<a·class="reference·internal"·href="api/request.html#module-webob.request"·title="webob.request"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">Request</span>·<span·class="pre">object</span>·<span·class="pre">API</span>·<span·class="pre">documentation</span></code></a>.</p>161 provided).·Details·are·in·the·<a·class="reference·internal"·href="api/request.html#module-webob.request"·title="webob.request"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">Request</span>·<span·class="pre">object</span>·<span·class="pre">API</span>·<span·class="pre">documentation</span></code></a>.</p>
162 <section·id="urls">162 <section·id="urls">
163 <h3>URLs<a·class="headerlink"·href="#urls"·title="Link·to·this·heading">¶</a></h3>163 <h3>URLs<a·class="headerlink"·href="#urls"·title="Link·to·this·heading">¶</a></h3>
164 <p>In·addition·to·these·attributes,·there·are·several·ways·to·get·the·URL164 <p>In·addition·to·these·attributes,·there·are·several·ways·to·get·the·URL
165 of·the·request.··I'll·show·various·values·for·an·example·URL165 of·the·request.··I'll·show·various·values·for·an·example·URL
166 <code·class="docutils·literal·notranslate"><span·class="pre">http://localhost/app-root/doc?article_id=10</span></code>,·where·the·application166 <code·class="docutils·literal·notranslate"><span·class="pre">http://localhost/app-root/doc?article_id=10</span></code>,·where·the·application
167 is·mounted·at·<code·class="docutils·literal·notranslate"><span·class="pre">http://localhost/app-root</span></code>.</p>167 is·mounted·at·<code·class="docutils·literal·notranslate"><span·class="pre">http://localhost/app-root</span></code>.</p>
1.26 KB
html2text {}
    
Offset 70, 15 lines modifiedOffset 70, 15 lines modified
70 ·················A·simple·dictionary·of·all·the·cookies.70 ·················A·simple·dictionary·of·all·the·cookies.
71 ·········*···_\x8r_\x8e_\x8q_\x8._\x8h_\x8e_\x8a_\x8d_\x8e_\x8r_\x8s:71 ·········*···_\x8r_\x8e_\x8q_\x8._\x8h_\x8e_\x8a_\x8d_\x8e_\x8r_\x8s:
72 ·················A·dictionary·of·all·the·headers.·This·dictionary·is·case-72 ·················A·dictionary·of·all·the·headers.·This·dictionary·is·case-
73 ·················insensitive.73 ·················insensitive.
74 Also·for·standard·HTTP·request·headers,·there·are·usually·attributes,·e.g.,74 Also·for·standard·HTTP·request·headers,·there·are·usually·attributes,·e.g.,
75 _\x8r_\x8e_\x8q_\x8._\x8a_\x8c_\x8c_\x8e_\x8p_\x8t_\x8__\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e,·_\x8r_\x8e_\x8q_\x8._\x8c_\x8o_\x8n_\x8t_\x8e_\x8n_\x8t_\x8__\x8l_\x8e_\x8n_\x8g_\x8t_\x8h,·and·_\x8r_\x8e_\x8q_\x8._\x8u_\x8s_\x8e_\x8r_\x8__\x8a_\x8g_\x8e_\x8n_\x8t.·These·properties75 _\x8r_\x8e_\x8q_\x8._\x8a_\x8c_\x8c_\x8e_\x8p_\x8t_\x8__\x8l_\x8a_\x8n_\x8g_\x8u_\x8a_\x8g_\x8e,·_\x8r_\x8e_\x8q_\x8._\x8c_\x8o_\x8n_\x8t_\x8e_\x8n_\x8t_\x8__\x8l_\x8e_\x8n_\x8g_\x8t_\x8h,·and·_\x8r_\x8e_\x8q_\x8._\x8u_\x8s_\x8e_\x8r_\x8__\x8a_\x8g_\x8e_\x8n_\x8t.·These·properties
76 expose·the·p\x8pa\x8ar\x8rs\x8se\x8ed\x8d·form·of·each·header,·for·whatever·parsing·makes·sense.·For76 expose·the·p\x8pa\x8ar\x8rs\x8se\x8ed\x8d·form·of·each·header,·for·whatever·parsing·makes·sense.·For
77 instance,·_\x8r_\x8e_\x8q_\x8._\x8i_\x8f_\x8__\x8m_\x8o_\x8d_\x8i_\x8f_\x8i_\x8e_\x8d_\x8__\x8s_\x8i_\x8n_\x8c_\x8e·returns·a·_.d_.a_.t_.e_.t_.i_.m_.e·object·(or·None·if·the77 instance,·_\x8r_\x8e_\x8q_\x8._\x8i_\x8f_\x8__\x8m_\x8o_\x8d_\x8i_\x8f_\x8i_\x8e_\x8d_\x8__\x8s_\x8i_\x8n_\x8c_\x8e·returns·a·datetime·object·(or·None·if·the
78 header·is·was·not·provided).·Details·are·in·the·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8·_\x8o_\x8b_\x8j_\x8e_\x8c_\x8t_\x8·_\x8A_\x8P_\x8I78 header·is·was·not·provided).·Details·are·in·the·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8·_\x8o_\x8b_\x8j_\x8e_\x8c_\x8t_\x8·_\x8A_\x8P_\x8I
79 _\x8d_\x8o_\x8c_\x8u_\x8m_\x8e_\x8n_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n.79 _\x8d_\x8o_\x8c_\x8u_\x8m_\x8e_\x8n_\x8t_\x8a_\x8t_\x8i_\x8o_\x8n.
80 *\x8**\x8**\x8**\x8*·U\x8UR\x8RL\x8Ls\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*80 *\x8**\x8**\x8**\x8*·U\x8UR\x8RL\x8Ls\x8s_\x8?\x8·*\x8**\x8**\x8**\x8*
81 In·addition·to·these·attributes,·there·are·several·ways·to·get·the·URL·of·the81 In·addition·to·these·attributes,·there·are·several·ways·to·get·the·URL·of·the
82 request.·I'll·show·various·values·for·an·example·URL·http://localhost/app-root/82 request.·I'll·show·various·values·for·an·example·URL·http://localhost/app-root/
83 doc?article_id=10,·where·the·application·is·mounted·at·http://localhost/app-83 doc?article_id=10,·where·the·application·is·mounted·at·http://localhost/app-
84 root.84 root.
5.2 KB
usr/share/doc/python-webob/html/jsonrpc-example.html
    
Offset 117, 15 lines modifiedOffset 117, 15 lines modified
117 HTTP,·we·choose·a·500·resonse,·as·giving·an·error·with·a·200117 HTTP,·we·choose·a·500·resonse,·as·giving·an·error·with·a·200
118 response·is·irresponsible.</p></li>118 response·is·irresponsible.</p></li>
119 </ul>119 </ul>
120 </section>120 </section>
121 <section·id="infrastructure">121 <section·id="infrastructure">
122 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">Infrastructure</a><a·class="headerlink"·href="#infrastructure"·title="Link·to·this·heading">¶</a></h2>122 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">Infrastructure</a><a·class="headerlink"·href="#infrastructure"·title="Link·to·this·heading">¶</a></h2>
123 <p>To·make·this·easier·to·test,·we'll·set·up·a·bit·of·infrastructure.123 <p>To·make·this·easier·to·test,·we'll·set·up·a·bit·of·infrastructure.
124 This·will·open·up·a·server·(using·<a·class="reference·external"·href="https://docs.python.org/3/library/wsgiref.html#module-wsgiref.simple_server"·title="(in·Python·v3.12)"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">wsgiref.simple_server</span></code></a>)124 This·will·open·up·a·server·(using·<code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">wsgiref.simple_server</span></code>)
125 and·serve·up·our·application·(note·that·<em>creating</em>·the·application·is125 and·serve·up·our·application·(note·that·<em>creating</em>·the·application·is
126 left·out·to·start·with):</p>126 left·out·to·start·with):</p>
127 <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="kn">import</span>·<span·class="nn">sys</span>127 <div·class="highlight-python·notranslate"><div·class="highlight"><pre><span></span><span·class="kn">import</span>·<span·class="nn">sys</span>
  
128 <span·class="k">def</span>·<span·class="nf">main</span><span·class="p">(</span><span·class="n">args</span><span·class="o">=</span><span·class="kc">None</span><span·class="p">):</span>128 <span·class="k">def</span>·<span·class="nf">main</span><span·class="p">(</span><span·class="n">args</span><span·class="o">=</span><span·class="kc">None</span><span·class="p">):</span>
129 ····<span·class="kn">import</span>·<span·class="nn">optparse</span>129 ····<span·class="kn">import</span>·<span·class="nn">optparse</span>
130 ····<span·class="kn">from</span>·<span·class="nn">wsgiref</span>·<span·class="kn">import</span>·<span·class="n">simple_server</span>130 ····<span·class="kn">from</span>·<span·class="nn">wsgiref</span>·<span·class="kn">import</span>·<span·class="n">simple_server</span>
1.94 KB
html2text {}
    
Offset 51, 15 lines modifiedOffset 51, 15 lines modified
51 ·······"id":·"arbitrary-something"}51 ·······"id":·"arbitrary-something"}
52 ····*·It·doesn't·seem·to·indicate·if·an·error·response·should·have·a·20052 ····*·It·doesn't·seem·to·indicate·if·an·error·response·should·have·a·200
53 ······response·or·a·500·response.·So·as·not·to·be·completely·stupid·about·HTTP,53 ······response·or·a·500·response.·So·as·not·to·be·completely·stupid·about·HTTP,
54 ······we·choose·a·500·resonse,·as·giving·an·error·with·a·200·response·is54 ······we·choose·a·500·resonse,·as·giving·an·error·with·a·200·response·is
55 ······irresponsible.55 ······irresponsible.
56 *\x8**\x8**\x8**\x8**\x8*·_\x8I\x8I_\x8n\x8n_\x8f\x8f_\x8r\x8r_\x8a\x8a_\x8s\x8s_\x8t\x8t_\x8r\x8r_\x8u\x8u_\x8c\x8c_\x8t\x8t_\x8u\x8u_\x8r\x8r_\x8e\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*56 *\x8**\x8**\x8**\x8**\x8*·_\x8I\x8I_\x8n\x8n_\x8f\x8f_\x8r\x8r_\x8a\x8a_\x8s\x8s_\x8t\x8t_\x8r\x8r_\x8u\x8u_\x8c\x8c_\x8t\x8t_\x8u\x8u_\x8r\x8r_\x8e\x8e_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
57 To·make·this·easier·to·test,·we'll·set·up·a·bit·of·infrastructure.·This·will57 To·make·this·easier·to·test,·we'll·set·up·a·bit·of·infrastructure.·This·will
58 open·up·a·server·(using·_.w_.s_.g_.i_.r_.e_.f_.._.s_.i_.m_.p_.l_.e_.__.s_.e_.r_.v_.e_.r)·and·serve·up·our·application58 open·up·a·server·(using·wsgiref.simple_server)·and·serve·up·our·application
59 (note·that·c\x8cr\x8re\x8ea\x8at\x8ti\x8in\x8ng\x8g·the·application·is·left·out·to·start·with):59 (note·that·c\x8cr\x8re\x8ea\x8at\x8ti\x8in\x8ng\x8g·the·application·is·left·out·to·start·with):
60 import·sys60 import·sys
  
61 def·main(args=None):61 def·main(args=None):
62 ····import·optparse62 ····import·optparse
63 ····from·wsgiref·import·simple_server63 ····from·wsgiref·import·simple_server
64 ····parser·=·optparse.OptionParser(64 ····parser·=·optparse.OptionParser(
5.01 KB
usr/share/doc/python-webob/html/reference.html
    
Offset 81, 15 lines modifiedOffset 81, 15 lines modified
81 </ul>81 </ul>
82 </li>82 </li>
83 </ul>83 </ul>
84 </nav>84 </nav>
85 <section·id="introduction">85 <section·id="introduction">
86 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">Introduction</a><a·class="headerlink"·href="#introduction"·title="Link·to·this·heading">¶</a></h2>86 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">Introduction</a><a·class="headerlink"·href="#introduction"·title="Link·to·this·heading">¶</a></h2>
87 <p>This·document·covers·all·the·details·of·the·Request·and·Response87 <p>This·document·covers·all·the·details·of·the·Request·and·Response
88 objects.··It·is·written·to·be·testable·with·<a·class="reference·external"·href="https://docs.python.org/3/library/doctest.html#module-doctest"·title="(in·Python·v3.12)"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">doctest</span></code></a>·--·this88 objects.··It·is·written·to·be·testable·with·<code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">doctest</span></code>·--·this
89 affects·the·flavor·of·the·documentation,·perhaps·to·its·detriment.89 affects·the·flavor·of·the·documentation,·perhaps·to·its·detriment.
90 But·it·also·means·you·can·feel·confident·that·the·documentation·is90 But·it·also·means·you·can·feel·confident·that·the·documentation·is
91 correct.</p>91 correct.</p>
92 <div·class="admonition·note">92 <div·class="admonition·note">
93 <p·class="admonition-title">Note</p>93 <p·class="admonition-title">Note</p>
94 <p>All·of·the·code·samples·below·are·for·Python·3,·and·will·not·function·as-is94 <p>All·of·the·code·samples·below·are·for·Python·3,·and·will·not·function·as-is
95 on·Python·2.</p>95 on·Python·2.</p>
1.72 KB
html2text {}
    
Offset 23, 15 lines modifiedOffset 23, 15 lines modified
23 ················#·_\x8C_\x8o_\x8o_\x8k_\x8i_\x8e_\x8s23 ················#·_\x8C_\x8o_\x8o_\x8k_\x8i_\x8e_\x8s
24 ················#·_\x8B_\x8i_\x8n_\x8d_\x8i_\x8n_\x8g_\x8·_\x8a_\x8·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t24 ················#·_\x8B_\x8i_\x8n_\x8d_\x8i_\x8n_\x8g_\x8·_\x8a_\x8·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t
25 ················#·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8·_\x8a_\x8s_\x8·_\x8a_\x8·_\x8W_\x8S_\x8G_\x8I_\x8·_\x8a_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n25 ················#·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8·_\x8a_\x8s_\x8·_\x8a_\x8·_\x8W_\x8S_\x8G_\x8I_\x8·_\x8a_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n
26 ··········o·_\x8E_\x8x_\x8c_\x8e_\x8p_\x8t_\x8i_\x8o_\x8n_\x8s26 ··········o·_\x8E_\x8x_\x8c_\x8e_\x8p_\x8t_\x8i_\x8o_\x8n_\x8s
27 ················#·_\x8C_\x8o_\x8n_\x8d_\x8i_\x8t_\x8i_\x8o_\x8n_\x8a_\x8l_\x8·_\x8W_\x8S_\x8G_\x8I_\x8·_\x8A_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n27 ················#·_\x8C_\x8o_\x8n_\x8d_\x8i_\x8t_\x8i_\x8o_\x8n_\x8a_\x8l_\x8·_\x8W_\x8S_\x8G_\x8I_\x8·_\x8A_\x8p_\x8p_\x8l_\x8i_\x8c_\x8a_\x8t_\x8i_\x8o_\x8n
28 *\x8**\x8**\x8**\x8**\x8*·_\x8I\x8I_\x8n\x8n_\x8t\x8t_\x8r\x8r_\x8o\x8o_\x8d\x8d_\x8u\x8u_\x8c\x8c_\x8t\x8t_\x8i\x8i_\x8o\x8o_\x8n\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*28 *\x8**\x8**\x8**\x8**\x8*·_\x8I\x8I_\x8n\x8n_\x8t\x8t_\x8r\x8r_\x8o\x8o_\x8d\x8d_\x8u\x8u_\x8c\x8c_\x8t\x8t_\x8i\x8i_\x8o\x8o_\x8n\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
29 This·document·covers·all·the·details·of·the·Request·and·Response·objects.·It·is29 This·document·covers·all·the·details·of·the·Request·and·Response·objects.·It·is
30 written·to·be·testable·with·_.d_.o_.c_.t_.e_.s_.t·--·this·affects·the·flavor·of·the30 written·to·be·testable·with·doctest·--·this·affects·the·flavor·of·the
31 documentation,·perhaps·to·its·detriment.·But·it·also·means·you·can·feel31 documentation,·perhaps·to·its·detriment.·But·it·also·means·you·can·feel
32 confident·that·the·documentation·is·correct.32 confident·that·the·documentation·is·correct.
33 Note33 Note
34 All·of·the·code·samples·below·are·for·Python·3,·and·will·not·function·as-is·on34 All·of·the·code·samples·below·are·for·Python·3,·and·will·not·function·as-is·on
35 Python·2.35 Python·2.
36 This·is·a·somewhat·different·approach·to·reference·documentation·compared·to36 This·is·a·somewhat·different·approach·to·reference·documentation·compared·to
37 the·extracted·documentation·for·the·_\x8r_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t·and·_\x8r_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e.37 the·extracted·documentation·for·the·_\x8r_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t·and·_\x8r_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e.
3.77 KB
usr/share/doc/python-webob/html/whatsnew-1.7.html
    
Offset 186, 15 lines modifiedOffset 186, 15 lines modified
186 <section·id="bugfix">186 <section·id="bugfix">
187 <h2>Bugfix<a·class="headerlink"·href="#bugfix"·title="Link·to·this·heading">¶</a></h2>187 <h2>Bugfix<a·class="headerlink"·href="#bugfix"·title="Link·to·this·heading">¶</a></h2>
188 <ul>188 <ul>
189 <li><p>Fixup·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">cgi.FieldStorage</span></code>·on·Python·3.x·to·work-around·issue·reported189 <li><p>Fixup·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">cgi.FieldStorage</span></code>·on·Python·3.x·to·work-around·issue·reported
190 in·Python·bug·report·27777·and·24764.·This·is·currently·applied·for·Python190 in·Python·bug·report·27777·and·24764.·This·is·currently·applied·for·Python
191 versions·less·than·3.7.·See·<a·class="reference·external"·href="https://github.com/Pylons/webob/pull/294">https://github.com/Pylons/webob/pull/294</a></p></li>191 versions·less·than·3.7.·See·<a·class="reference·external"·href="https://github.com/Pylons/webob/pull/294">https://github.com/Pylons/webob/pull/294</a></p></li>
192 <li><p><a·class="reference·internal"·href="api/response.html#webob.response.Response.set_cookie"·title="webob.response.Response.set_cookie"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">Response.set_cookie</span></code></a>·now·accepts192 <li><p><a·class="reference·internal"·href="api/response.html#webob.response.Response.set_cookie"·title="webob.response.Response.set_cookie"><code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">Response.set_cookie</span></code></a>·now·accepts
193 <a·class="reference·external"·href="https://docs.python.org/3/library/datetime.html#datetime.datetime"·title="(in·Python·v3.12)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">datetime</span></code></a>·objects·for·the·<code·class="docutils·literal·notranslate"><span·class="pre">expires</span></code>·kwarg·and·will193 <code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">datetime</span></code>·objects·for·the·<code·class="docutils·literal·notranslate"><span·class="pre">expires</span></code>·kwarg·and·will
194 correctly·convert·them·to·UTC·with·no·<code·class="docutils·literal·notranslate"><span·class="pre">tzinfo</span></code>·for·use·in·calculating·the194 correctly·convert·them·to·UTC·with·no·<code·class="docutils·literal·notranslate"><span·class="pre">tzinfo</span></code>·for·use·in·calculating·the
195 <code·class="docutils·literal·notranslate"><span·class="pre">max_age</span></code>.·See·<a·class="reference·external"·href="https://github.com/Pylons/webob/issues/254">https://github.com/Pylons/webob/issues/254</a>·and195 <code·class="docutils·literal·notranslate"><span·class="pre">max_age</span></code>.·See·<a·class="reference·external"·href="https://github.com/Pylons/webob/issues/254">https://github.com/Pylons/webob/issues/254</a>·and
196 <a·class="reference·external"·href="https://github.com/Pylons/webob/pull/292">https://github.com/Pylons/webob/pull/292</a></p></li>196 <a·class="reference·external"·href="https://github.com/Pylons/webob/pull/292">https://github.com/Pylons/webob/pull/292</a></p></li>
197 <li><p>Fixes·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">request.PATH_SAFE</span></code>·to·contain·all·of197 <li><p>Fixes·<code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">request.PATH_SAFE</span></code>·to·contain·all·of
198 the·path·safe·characters·according·to·RFC3986.·See198 the·path·safe·characters·according·to·RFC3986.·See
199 <a·class="reference·external"·href="https://github.com/Pylons/webob/pull/291">https://github.com/Pylons/webob/pull/291</a></p></li>199 <a·class="reference·external"·href="https://github.com/Pylons/webob/pull/291">https://github.com/Pylons/webob/pull/291</a></p></li>
200 <li><p>WebOb's·exceptions·will·lazily·read·underlying·variables·when·inserted·into200 <li><p>WebOb's·exceptions·will·lazily·read·underlying·variables·when·inserted·into
1.44 KB
html2text {}
    
Offset 105, 15 lines modifiedOffset 105, 15 lines modified
105 ······@wsgify105 ······@wsgify
106 ······def·app(req):106 ······def·app(req):
107 ············return·'hi'107 ············return·'hi'
108 *\x8**\x8**\x8**\x8**\x8*·B\x8Bu\x8ug\x8gf\x8fi\x8ix\x8x_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*108 *\x8**\x8**\x8**\x8**\x8*·B\x8Bu\x8ug\x8gf\x8fi\x8ix\x8x_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
109 ····*·Fixup·cgi.FieldStorage·on·Python·3.x·to·work-around·issue·reported·in109 ····*·Fixup·cgi.FieldStorage·on·Python·3.x·to·work-around·issue·reported·in
110 ······Python·bug·report·27777·and·24764.·This·is·currently·applied·for·Python110 ······Python·bug·report·27777·and·24764.·This·is·currently·applied·for·Python
111 ······versions·less·than·3.7.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x89_\x84111 ······versions·less·than·3.7.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x89_\x84
112 ····*·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8._\x8s_\x8e_\x8t_\x8__\x8c_\x8o_\x8o_\x8k_\x8i_\x8e·now·accepts·_.d_.a_.t_.e_.t_.i_.m_.e·objects·for·the·expires·kwarg112 ····*·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8._\x8s_\x8e_\x8t_\x8__\x8c_\x8o_\x8o_\x8k_\x8i_\x8e·now·accepts·datetime·objects·for·the·expires·kwarg
113 ······and·will·correctly·convert·them·to·UTC·with·no·tzinfo·for·use·in113 ······and·will·correctly·convert·them·to·UTC·with·no·tzinfo·for·use·in
114 ······calculating·the·max_age.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8i_\x8s_\x8s_\x8u_\x8e_\x8s_\x8/_\x82_\x85_\x84114 ······calculating·the·max_age.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8i_\x8s_\x8s_\x8u_\x8e_\x8s_\x8/_\x82_\x85_\x84
115 ······and·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x89_\x82115 ······and·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x89_\x82
116 ····*·Fixes·request.PATH_SAFE·to·contain·all·of·the·path·safe·characters116 ····*·Fixes·request.PATH_SAFE·to·contain·all·of·the·path·safe·characters
117 ······according·to·RFC3986.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x89_\x81117 ······according·to·RFC3986.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x89_\x81
118 ····*·WebOb's·exceptions·will·lazily·read·underlying·variables·when·inserted118 ····*·WebOb's·exceptions·will·lazily·read·underlying·variables·when·inserted
119 ······into·templates·to·avoid·expensive·computations/crashes·when·inserting119 ······into·templates·to·avoid·expensive·computations/crashes·when·inserting
4.43 KB
usr/share/doc/python-webob/html/whatsnew-1.8.html
    
Offset 112, 15 lines modifiedOffset 112, 15 lines modified
112 <ul·class="simple">112 <ul·class="simple">
113 <li><p><a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.host_url"·title="webob.request.BaseRequest.host_url"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.host_url</span></code></a>,113 <li><p><a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.host_url"·title="webob.request.BaseRequest.host_url"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.host_url</span></code></a>,
114 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.host_port"·title="webob.request.BaseRequest.host_port"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.host_port</span></code></a>,114 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.host_port"·title="webob.request.BaseRequest.host_port"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.host_port</span></code></a>,
115 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.domain"·title="webob.request.BaseRequest.domain"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.domain</span></code></a>·correctly·parse115 <a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.domain"·title="webob.request.BaseRequest.domain"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.domain</span></code></a>·correctly·parse
116 IPv6·Host·headers·as·provided·by·a·browser.·See116 IPv6·Host·headers·as·provided·by·a·browser.·See
117 <a·class="reference·external"·href="https://github.com/Pylons/webob/pull/332">https://github.com/Pylons/webob/pull/332</a></p></li>117 <a·class="reference·external"·href="https://github.com/Pylons/webob/pull/332">https://github.com/Pylons/webob/pull/332</a></p></li>
118 <li><p><a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.authorization"·title="webob.request.BaseRequest.authorization"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.authorization</span></code></a>·would118 <li><p><a·class="reference·internal"·href="api/request.html#webob.request.BaseRequest.authorization"·title="webob.request.BaseRequest.authorization"><code·class="xref·py·py-attr·docutils·literal·notranslate"><span·class="pre">Request.authorization</span></code></a>·would
119 raise·<a·class="reference·external"·href="https://docs.python.org/3/library/exceptions.html#ValueError"·title="(in·Python·v3.12)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">ValueError</span></code></a>·for·unusual·or·malformed·header119 raise·<code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">ValueError</span></code>·for·unusual·or·malformed·header
120 values.·Now·it·simply·returns·an·empty·value.·See120 values.·Now·it·simply·returns·an·empty·value.·See
121 <a·class="reference·external"·href="https://github.com/Pylons/webob/issues/231">https://github.com/Pylons/webob/issues/231</a></p></li>121 <a·class="reference·external"·href="https://github.com/Pylons/webob/issues/231">https://github.com/Pylons/webob/issues/231</a></p></li>
122 <li><p>Allow·unnamed·fields·in·form·data·to·be·properly·transcoded·when·calling122 <li><p>Allow·unnamed·fields·in·form·data·to·be·properly·transcoded·when·calling
123 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">request.decode</span></code>·with·an·alternate123 <code·class="xref·py·py-func·docutils·literal·notranslate"><span·class="pre">request.decode</span></code>·with·an·alternate
124 encoding.·See·<a·class="reference·external"·href="https://github.com/Pylons/webob/pull/309">https://github.com/Pylons/webob/pull/309</a></p></li>124 encoding.·See·<a·class="reference·external"·href="https://github.com/Pylons/webob/pull/309">https://github.com/Pylons/webob/pull/309</a></p></li>
125 <li><p><a·class="reference·internal"·href="api/response.html#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response.__init__</span></code></a>·would·discard125 <li><p><a·class="reference·internal"·href="api/response.html#webob.response.Response"·title="webob.response.Response"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">Response.__init__</span></code></a>·would·discard
126 <code·class="docutils·literal·notranslate"><span·class="pre">app_iter</span></code>·when·a·<code·class="docutils·literal·notranslate"><span·class="pre">Response</span></code>·had·no·body,·this·would·cause·issues·when126 <code·class="docutils·literal·notranslate"><span·class="pre">app_iter</span></code>·when·a·<code·class="docutils·literal·notranslate"><span·class="pre">Response</span></code>·had·no·body,·this·would·cause·issues·when
1.73 KB
html2text {}
    
Offset 47, 15 lines modifiedOffset 47, 15 lines modified
47 ····*·The·cookie·APIs·now·have·the·ability·to·set·the·SameSite·attribute·on·a47 ····*·The·cookie·APIs·now·have·the·ability·to·set·the·SameSite·attribute·on·a
48 ······cookie·in·both·_\x8w_\x8e_\x8b_\x8o_\x8b_\x8._\x8c_\x8o_\x8o_\x8k_\x8i_\x8e_\x8s_\x8._\x8m_\x8a_\x8k_\x8e_\x8__\x8c_\x8o_\x8o_\x8k_\x8i_\x8e_\x8(_\x8)·and48 ······cookie·in·both·_\x8w_\x8e_\x8b_\x8o_\x8b_\x8._\x8c_\x8o_\x8o_\x8k_\x8i_\x8e_\x8s_\x8._\x8m_\x8a_\x8k_\x8e_\x8__\x8c_\x8o_\x8o_\x8k_\x8i_\x8e_\x8(_\x8)·and
49 ······_\x8w_\x8e_\x8b_\x8o_\x8b_\x8._\x8c_\x8o_\x8o_\x8k_\x8i_\x8e_\x8s_\x8._\x8C_\x8o_\x8o_\x8k_\x8i_\x8e_\x8P_\x8r_\x8o_\x8f_\x8i_\x8l_\x8e.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x85_\x8549 ······_\x8w_\x8e_\x8b_\x8o_\x8b_\x8._\x8c_\x8o_\x8o_\x8k_\x8i_\x8e_\x8s_\x8._\x8C_\x8o_\x8o_\x8k_\x8i_\x8e_\x8P_\x8r_\x8o_\x8f_\x8i_\x8l_\x8e.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x82_\x85_\x85
50 *\x8**\x8**\x8**\x8**\x8*·B\x8Bu\x8ug\x8gf\x8fi\x8ix\x8x_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*50 *\x8**\x8**\x8**\x8**\x8*·B\x8Bu\x8ug\x8gf\x8fi\x8ix\x8x_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
51 ····*·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8h_\x8o_\x8s_\x8t_\x8__\x8u_\x8r_\x8l,·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8h_\x8o_\x8s_\x8t_\x8__\x8p_\x8o_\x8r_\x8t,·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8d_\x8o_\x8m_\x8a_\x8i_\x8n·correctly·parse·IPv651 ····*·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8h_\x8o_\x8s_\x8t_\x8__\x8u_\x8r_\x8l,·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8h_\x8o_\x8s_\x8t_\x8__\x8p_\x8o_\x8r_\x8t,·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8d_\x8o_\x8m_\x8a_\x8i_\x8n·correctly·parse·IPv6
52 ······Host·headers·as·provided·by·a·browser.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/52 ······Host·headers·as·provided·by·a·browser.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/
53 ······_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x83_\x83_\x8253 ······_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x83_\x83_\x82
54 ····*·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8a_\x8u_\x8t_\x8h_\x8o_\x8r_\x8i_\x8z_\x8a_\x8t_\x8i_\x8o_\x8n·would·raise·_.V_.a_.l_.u_.e_.E_.r_.r_.o_.r·for·unusual·or·malformed54 ····*·_\x8R_\x8e_\x8q_\x8u_\x8e_\x8s_\x8t_\x8._\x8a_\x8u_\x8t_\x8h_\x8o_\x8r_\x8i_\x8z_\x8a_\x8t_\x8i_\x8o_\x8n·would·raise·ValueError·for·unusual·or·malformed
55 ······header·values.·Now·it·simply·returns·an·empty·value.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/55 ······header·values.·Now·it·simply·returns·an·empty·value.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/
56 ······_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8i_\x8s_\x8s_\x8u_\x8e_\x8s_\x8/_\x82_\x83_\x8156 ······_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8i_\x8s_\x8s_\x8u_\x8e_\x8s_\x8/_\x82_\x83_\x81
57 ····*·Allow·unnamed·fields·in·form·data·to·be·properly·transcoded·when·calling57 ····*·Allow·unnamed·fields·in·form·data·to·be·properly·transcoded·when·calling
58 ······request.decode·with·an·alternate·encoding.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/58 ······request.decode·with·an·alternate·encoding.·See·_\x8h_\x8t_\x8t_\x8p_\x8s_\x8:_\x8/_\x8/_\x8g_\x8i_\x8t_\x8h_\x8u_\x8b_\x8._\x8c_\x8o_\x8m_\x8/_\x8P_\x8y_\x8l_\x8o_\x8n_\x8s_\x8/
59 ······_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x83_\x80_\x8959 ······_\x8w_\x8e_\x8b_\x8o_\x8b_\x8/_\x8p_\x8u_\x8l_\x8l_\x8/_\x83_\x80_\x89
60 ····*·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8._\x8__\x8__\x8i_\x8n_\x8i_\x8t_\x8__\x8_·would·discard·app_iter·when·a·Response·had·no·body,60 ····*·_\x8R_\x8e_\x8s_\x8p_\x8o_\x8n_\x8s_\x8e_\x8._\x8__\x8__\x8i_\x8n_\x8i_\x8t_\x8__\x8_·would·discard·app_iter·when·a·Response·had·no·body,
61 ······this·would·cause·issues·when·app_iter·was·an·object·that·was·tied·to·the61 ······this·would·cause·issues·when·app_iter·was·an·object·that·was·tied·to·the
7.73 KB
usr/share/doc/python-webob/html/wiki-example.html
    
Offset 125, 15 lines modifiedOffset 125, 15 lines modified
125 ········<span·class="n">httpd</span><span·class="o">.</span><span·class="n">serve_forever</span><span·class="p">()</span>125 ········<span·class="n">httpd</span><span·class="o">.</span><span·class="n">serve_forever</span><span·class="p">()</span>
126 ····<span·class="k">except</span>·<span·class="ne">KeyboardInterrupt</span><span·class="p">:</span>126 ····<span·class="k">except</span>·<span·class="ne">KeyboardInterrupt</span><span·class="p">:</span>
127 ········<span·class="nb">print</span>·<span·class="s1">&#39;^C&#39;</span>127 ········<span·class="nb">print</span>·<span·class="s1">&#39;^C&#39;</span>
128 </pre></div>128 </pre></div>
129 </div>129 </div>
130 <p>There's·not·much·to·talk·about·in·this·code·block.··The·application·is130 <p>There's·not·much·to·talk·about·in·this·code·block.··The·application·is
131 instantiated·and·served·with·the·built-in·module131 instantiated·and·served·with·the·built-in·module
132 <a·class="reference·external"·href="https://docs.python.org/3/library/wsgiref.html#module-wsgiref.simple_server"·title="(in·Python·v3.12)"><code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">wsgiref.simple_server</span></code></a>.</p>132 <code·class="xref·py·py-mod·docutils·literal·notranslate"><span·class="pre">wsgiref.simple_server</span></code>.</p>
133 </section>133 </section>
134 <section·id="the-wsgi-application">134 <section·id="the-wsgi-application">
135 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">The·WSGI·Application</a><a·class="headerlink"·href="#the-wsgi-application"·title="Link·to·this·heading">¶</a></h2>135 <h2><a·class="toc-backref"·href="#id5"·role="doc-backlink">The·WSGI·Application</a><a·class="headerlink"·href="#the-wsgi-application"·title="Link·to·this·heading">¶</a></h2>
136 <p>Of·course·all·the·interesting·stuff·is·in·that·<code·class="docutils·literal·notranslate"><span·class="pre">__call__</span></code>·method.136 <p>Of·course·all·the·interesting·stuff·is·in·that·<code·class="docutils·literal·notranslate"><span·class="pre">__call__</span></code>·method.
137 WebOb·lets·you·ignore·some·of·the·details·of·WSGI,·like·what137 WebOb·lets·you·ignore·some·of·the·details·of·WSGI,·like·what
138 <code·class="docutils·literal·notranslate"><span·class="pre">start_response</span></code>·really·is.··<code·class="docutils·literal·notranslate"><span·class="pre">environ</span></code>·is·a·CGI-like·dictionary,138 <code·class="docutils·literal·notranslate"><span·class="pre">start_response</span></code>·really·is.··<code·class="docutils·literal·notranslate"><span·class="pre">environ</span></code>·is·a·CGI-like·dictionary,
139 but·<code·class="docutils·literal·notranslate"><span·class="pre">webob.Request</span></code>·gives·an·object·interface·to·it.139 but·<code·class="docutils·literal·notranslate"><span·class="pre">webob.Request</span></code>·gives·an·object·interface·to·it.
2.75 KB
html2text {}
    
Offset 63, 15 lines modifiedOffset 63, 15 lines modified
63 ····httpd·=·make_server('localhost',·options.port,·app)63 ····httpd·=·make_server('localhost',·options.port,·app)
64 ····print·'Serving·on·http://localhost:%s'·%·options.port64 ····print·'Serving·on·http://localhost:%s'·%·options.port
65 ····try:65 ····try:
66 ········httpd.serve_forever()66 ········httpd.serve_forever()
67 ····except·KeyboardInterrupt:67 ····except·KeyboardInterrupt:
68 ········print·'^C'68 ········print·'^C'
69 There's·not·much·to·talk·about·in·this·code·block.·The·application·is69 There's·not·much·to·talk·about·in·this·code·block.·The·application·is
70 instantiated·and·served·with·the·built-in·module·_.w_.s_.g_.i_.r_.e_.f_.._.s_.i_.m_.p_.l_.e_.__.s_.e_.r_.v_.e_.r.70 instantiated·and·served·with·the·built-in·module·wsgiref.simple_server.
71 *\x8**\x8**\x8**\x8**\x8*·_\x8T\x8T_\x8h\x8h_\x8e\x8e_\x8·_\x8W\x8W_\x8S\x8S_\x8G\x8G_\x8I\x8I_\x8·_\x8A\x8A_\x8p\x8p_\x8p\x8p_\x8l\x8l_\x8i\x8i_\x8c\x8c_\x8a\x8a_\x8t\x8t_\x8i\x8i_\x8o\x8o_\x8n\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*71 *\x8**\x8**\x8**\x8**\x8*·_\x8T\x8T_\x8h\x8h_\x8e\x8e_\x8·_\x8W\x8W_\x8S\x8S_\x8G\x8G_\x8I\x8I_\x8·_\x8A\x8A_\x8p\x8p_\x8p\x8p_\x8l\x8l_\x8i\x8i_\x8c\x8c_\x8a\x8a_\x8t\x8t_\x8i\x8i_\x8o\x8o_\x8n\x8n_\x8?\x8·*\x8**\x8**\x8**\x8**\x8*
72 Of·course·all·the·interesting·stuff·is·in·that·__call__·method.·WebOb·lets·you72 Of·course·all·the·interesting·stuff·is·in·that·__call__·method.·WebOb·lets·you
73 ignore·some·of·the·details·of·WSGI,·like·what·start_response·really·is.·environ73 ignore·some·of·the·details·of·WSGI,·like·what·start_response·really·is.·environ
74 is·a·CGI-like·dictionary,·but·webob.Request·gives·an·object·interface·to·it.74 is·a·CGI-like·dictionary,·but·webob.Request·gives·an·object·interface·to·it.
75 webob.Response·represents·a·response,·and·is·itself·a·WSGI·application.·Here's75 webob.Response·represents·a·response,·and·is·itself·a·WSGI·application.·Here's
76 kind·of·the·hello·world·of·WSGI·applications·using·these·objects:76 kind·of·the·hello·world·of·WSGI·applications·using·these·objects:
77 from·webob·import·Request,·Response77 from·webob·import·Request,·Response