docutils 0.20rc1__tar.gz → 0.21__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {docutils-0.20rc1 → docutils-0.21}/COPYING.txt +4 -4
- {docutils-0.20rc1 → docutils-0.21}/PKG-INFO +7 -13
- {docutils-0.20rc1 → docutils-0.21}/docutils/__init__.py +5 -5
- {docutils-0.20rc1 → docutils-0.21}/docutils/frontend.py +146 -39
- {docutils-0.20rc1 → docutils-0.21}/docutils/io.py +29 -56
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/ca.py +21 -16
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/cs.py +10 -10
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/eo.py +10 -10
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/es.py +12 -12
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/fi.py +15 -15
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/fr.py +7 -7
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/gl.py +8 -8
- docutils-0.21/docutils/languages/he.py +62 -0
- docutils-0.21/docutils/languages/ka.py +58 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/pl.py +7 -7
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/pt_br.py +14 -14
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/sk.py +10 -10
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/sv.py +2 -2
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/zh_cn.py +2 -6
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/zh_tw.py +26 -30
- {docutils-0.20rc1 → docutils-0.21}/docutils/nodes.py +16 -30
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/commonmark_wrapper.py +4 -4
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/__init__.py +7 -1
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/admonitions.py +3 -1
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/body.py +3 -2
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/images.py +12 -2
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/misc.py +40 -28
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/tables.py +33 -41
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/af.py +3 -2
- docutils-0.21/docutils/parsers/rst/languages/ca.py +130 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/cs.py +8 -8
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/da.py +3 -2
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/de.py +3 -3
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/en.py +2 -2
- docutils-0.21/docutils/parsers/rst/languages/eo.py +119 -0
- docutils-0.21/docutils/parsers/rst/languages/es.py +123 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/fi.py +7 -7
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/fr.py +5 -2
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/gl.py +28 -33
- docutils-0.21/docutils/parsers/rst/languages/he.py +110 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/it.py +3 -2
- docutils-0.21/docutils/parsers/rst/languages/ka.py +90 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/nl.py +3 -2
- docutils-0.21/docutils/parsers/rst/languages/pl.py +101 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/pt_br.py +29 -28
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/sk.py +2 -2
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/states.py +43 -33
- {docutils-0.20rc1 → docutils-0.21}/docutils/readers/standalone.py +7 -7
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/__init__.py +3 -1
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/frontmatter.py +27 -52
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/references.py +2 -2
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/universal.py +3 -9
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/__init__.py +26 -5
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/math/__init__.py +22 -1
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/math/latex2mathml.py +247 -485
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/math/math2html.py +2 -8
- docutils-0.21/docutils/utils/math/mathalphabet2unichar.py +892 -0
- docutils-0.21/docutils/utils/math/mathml_elements.py +478 -0
- docutils-0.21/docutils/utils/math/tex2mathml_extern.py +261 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/roman.py +83 -15
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/smartquotes.py +79 -68
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/_html_base.py +346 -248
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/docutils_xml.py +4 -3
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/html4css1/__init__.py +20 -12
- {docutils-0.20rc1/test/functional/input/data → docutils-0.21/docutils/writers/html4css1}/html4css1.css +4 -3
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/html5_polyglot/__init__.py +39 -72
- docutils-0.21/docutils/writers/html5_polyglot/italic-field-names.css +26 -0
- {docutils-0.20rc1/test/functional/input/data → docutils-0.21/docutils/writers/html5_polyglot}/math.css +3 -3
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/html5_polyglot/minimal.css +24 -7
- {docutils-0.20rc1/test/functional/input/data → docutils-0.21/docutils/writers/html5_polyglot}/plain.css +5 -11
- {docutils-0.20rc1/test/functional/input/data → docutils-0.21/docutils/writers/html5_polyglot}/responsive.css +15 -25
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/html5_polyglot/tuftig.css +8 -10
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/latex2e/__init__.py +41 -19
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/manpage.py +49 -19
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/odf_odt/__init__.py +56 -62
- docutils-0.20rc1/tools/rst2odt_prepstyles.py → docutils-0.21/docutils/writers/odf_odt/prepstyles.py +1 -1
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/pep_html/__init__.py +1 -3
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/__init__.py +20 -18
- docutils-0.21/pyproject.toml +155 -0
- docutils-0.20rc1/BUGS.txt +0 -293
- docutils-0.20rc1/FAQ.txt +0 -1341
- docutils-0.20rc1/HISTORY.txt +0 -4186
- docutils-0.20rc1/MANIFEST +0 -711
- docutils-0.20rc1/MANIFEST.in +0 -11
- docutils-0.20rc1/README.txt +0 -402
- docutils-0.20rc1/RELEASE-NOTES.txt +0 -1189
- docutils-0.20rc1/THANKS.txt +0 -169
- docutils-0.20rc1/TODO.txt +0 -6
- docutils-0.20rc1/docs/api/publisher.txt +0 -521
- docutils-0.20rc1/docs/api/runtime-settings.txt +0 -220
- docutils-0.20rc1/docs/api/transforms.txt +0 -209
- docutils-0.20rc1/docs/dev/distributing.txt +0 -151
- docutils-0.20rc1/docs/dev/enthought-plan.txt +0 -480
- docutils-0.20rc1/docs/dev/enthought-rfp.txt +0 -146
- docutils-0.20rc1/docs/dev/hacking.txt +0 -278
- docutils-0.20rc1/docs/dev/packaging.txt +0 -50
- docutils-0.20rc1/docs/dev/policies.txt +0 -684
- docutils-0.20rc1/docs/dev/pysource.dtd +0 -260
- docutils-0.20rc1/docs/dev/pysource.txt +0 -133
- docutils-0.20rc1/docs/dev/release-old.txt +0 -258
- docutils-0.20rc1/docs/dev/release.txt +0 -135
- docutils-0.20rc1/docs/dev/repository.txt +0 -310
- docutils-0.20rc1/docs/dev/rst/alternatives.txt +0 -3213
- docutils-0.20rc1/docs/dev/rst/problems.txt +0 -873
- docutils-0.20rc1/docs/dev/runtime-settings-processing.txt +0 -308
- docutils-0.20rc1/docs/dev/semantics.txt +0 -121
- docutils-0.20rc1/docs/dev/testing.txt +0 -294
- docutils-0.20rc1/docs/dev/todo.txt +0 -2850
- docutils-0.20rc1/docs/dev/website.txt +0 -109
- docutils-0.20rc1/docs/header.txt +0 -14
- docutils-0.20rc1/docs/header0.txt +0 -14
- docutils-0.20rc1/docs/header2.txt +0 -15
- docutils-0.20rc1/docs/howto/cmdline-tool.txt +0 -68
- docutils-0.20rc1/docs/howto/html-stylesheets.txt +0 -96
- docutils-0.20rc1/docs/howto/i18n.txt +0 -194
- docutils-0.20rc1/docs/howto/rst-directives.txt +0 -432
- docutils-0.20rc1/docs/howto/rst-roles.txt +0 -237
- docutils-0.20rc1/docs/howto/security.txt +0 -208
- docutils-0.20rc1/docs/index.txt +0 -248
- docutils-0.20rc1/docs/peps/pep-0256.txt +0 -303
- docutils-0.20rc1/docs/peps/pep-0257.txt +0 -328
- docutils-0.20rc1/docs/peps/pep-0258.txt +0 -1034
- docutils-0.20rc1/docs/peps/pep-0287.txt +0 -815
- docutils-0.20rc1/docs/ref/doctree.txt +0 -5426
- docutils-0.20rc1/docs/ref/docutils.dtd +0 -682
- docutils-0.20rc1/docs/ref/rst/definitions.txt +0 -182
- docutils-0.20rc1/docs/ref/rst/directives.txt +0 -2152
- docutils-0.20rc1/docs/ref/rst/introduction.txt +0 -313
- docutils-0.20rc1/docs/ref/rst/mathematics.txt +0 -1123
- docutils-0.20rc1/docs/ref/rst/restructuredtext.txt +0 -3276
- docutils-0.20rc1/docs/ref/rst/roles.txt +0 -433
- docutils-0.20rc1/docs/ref/soextblx.dtd +0 -312
- docutils-0.20rc1/docs/user/Makefile.docutils-update +0 -9
- docutils-0.20rc1/docs/user/config.txt +0 -2381
- docutils-0.20rc1/docs/user/emacs.txt +0 -962
- docutils-0.20rc1/docs/user/html.txt +0 -243
- docutils-0.20rc1/docs/user/images/big-black.png +0 -0
- docutils-0.20rc1/docs/user/images/big-white.png +0 -0
- docutils-0.20rc1/docs/user/images/default.png +0 -0
- docutils-0.20rc1/docs/user/images/happy_monkey.png +0 -0
- docutils-0.20rc1/docs/user/images/medium-black.png +0 -0
- docutils-0.20rc1/docs/user/images/medium-white.png +0 -0
- docutils-0.20rc1/docs/user/images/rsp-all.png +0 -0
- docutils-0.20rc1/docs/user/images/rsp-breaks.png +0 -0
- docutils-0.20rc1/docs/user/images/rsp-covers.png +0 -0
- docutils-0.20rc1/docs/user/images/rsp-cuts.png +0 -0
- docutils-0.20rc1/docs/user/images/rsp-empty.png +0 -0
- docutils-0.20rc1/docs/user/images/rsp-objects.png +0 -0
- docutils-0.20rc1/docs/user/images/rsp.svg +0 -636
- docutils-0.20rc1/docs/user/images/s5-files.png +0 -0
- docutils-0.20rc1/docs/user/images/s5-files.svg +0 -639
- docutils-0.20rc1/docs/user/images/small-black.png +0 -0
- docutils-0.20rc1/docs/user/images/small-white.png +0 -0
- docutils-0.20rc1/docs/user/latex.txt +0 -2172
- docutils-0.20rc1/docs/user/links.txt +0 -458
- docutils-0.20rc1/docs/user/mailing-lists.txt +0 -152
- docutils-0.20rc1/docs/user/manpage.txt +0 -170
- docutils-0.20rc1/docs/user/odt.txt +0 -1196
- docutils-0.20rc1/docs/user/rst/cheatsheet.txt +0 -132
- docutils-0.20rc1/docs/user/rst/demo.txt +0 -567
- docutils-0.20rc1/docs/user/rst/images/biohazard-bitmap-scaling.svg +0 -51
- docutils-0.20rc1/docs/user/rst/images/biohazard-bitmap.svg +0 -50
- docutils-0.20rc1/docs/user/rst/images/biohazard-scaling.svg +0 -5
- docutils-0.20rc1/docs/user/rst/images/biohazard.png +0 -0
- docutils-0.20rc1/docs/user/rst/images/biohazard.svg +0 -5
- docutils-0.20rc1/docs/user/rst/images/biohazard.swf +0 -0
- docutils-0.20rc1/docs/user/rst/images/pens.mp4 +0 -0
- docutils-0.20rc1/docs/user/rst/images/title-scaling.svg +0 -11
- docutils-0.20rc1/docs/user/rst/images/title.png +0 -0
- docutils-0.20rc1/docs/user/rst/images/title.svg +0 -11
- docutils-0.20rc1/docs/user/rst/quickref.html +0 -1359
- docutils-0.20rc1/docs/user/rst/quickstart.txt +0 -406
- docutils-0.20rc1/docs/user/slide-shows.txt +0 -995
- docutils-0.20rc1/docs/user/smartquotes.txt +0 -485
- docutils-0.20rc1/docs/user/todo-lists.txt +0 -154
- docutils-0.20rc1/docs/user/tools.txt +0 -579
- docutils-0.20rc1/docutils/languages/he.py +0 -61
- docutils-0.20rc1/docutils/parsers/rst/languages/ca.py +0 -126
- docutils-0.20rc1/docutils/parsers/rst/languages/eo.py +0 -118
- docutils-0.20rc1/docutils/parsers/rst/languages/es.py +0 -122
- docutils-0.20rc1/docutils/parsers/rst/languages/he.py +0 -109
- docutils-0.20rc1/docutils/parsers/rst/languages/pl.py +0 -101
- docutils-0.20rc1/docutils/utils/math/tex2mathml_extern.py +0 -185
- docutils-0.20rc1/docutils/writers/html4css1/html4css1.css +0 -349
- docutils-0.20rc1/docutils/writers/html5_polyglot/math.css +0 -332
- docutils-0.20rc1/docutils/writers/html5_polyglot/plain.css +0 -313
- docutils-0.20rc1/docutils/writers/html5_polyglot/responsive.css +0 -496
- docutils-0.20rc1/docutils.egg-info/PKG-INFO +0 -67
- docutils-0.20rc1/docutils.egg-info/SOURCES.html +0 -681
- docutils-0.20rc1/docutils.egg-info/SOURCES.txt +0 -729
- docutils-0.20rc1/docutils.egg-info/dependency_links.html +0 -24
- docutils-0.20rc1/docutils.egg-info/dependency_links.txt +0 -1
- docutils-0.20rc1/docutils.egg-info/entry_points.txt +0 -3
- docutils-0.20rc1/docutils.egg-info/top_level.html +0 -24
- docutils-0.20rc1/docutils.egg-info/top_level.txt +0 -1
- docutils-0.20rc1/install.py +0 -27
- docutils-0.20rc1/licenses/BSD-2-Clause.txt +0 -25
- docutils-0.20rc1/licenses/docutils.conf +0 -5
- docutils-0.20rc1/licenses/gpl-3-0.txt +0 -674
- docutils-0.20rc1/licenses/python-2-1-1.txt +0 -232
- docutils-0.20rc1/manpage-URUE.txt +0 -18
- docutils-0.20rc1/math.txt +0 -105
- docutils-0.20rc1/mwe-test.txt +0 -43
- docutils-0.20rc1/setup.cfg +0 -8
- docutils-0.20rc1/setup.py +0 -150
- docutils-0.20rc1/test/__init__.py +0 -1
- docutils-0.20rc1/test/alltests.py +0 -95
- docutils-0.20rc1/test/conftest.py +0 -28
- docutils-0.20rc1/test/data/config_1.txt +0 -35
- docutils-0.20rc1/test/data/config_2.txt +0 -16
- docutils-0.20rc1/test/data/config_encoding.txt +0 -3
- docutils-0.20rc1/test/data/config_encoding_2.txt +0 -3
- docutils-0.20rc1/test/data/config_list.txt +0 -16
- docutils-0.20rc1/test/data/config_list_2.txt +0 -12
- docutils-0.20rc1/test/data/config_old.txt +0 -14
- docutils-0.20rc1/test/data/config_syntax_error.txt +0 -5
- docutils-0.20rc1/test/data/csv_data.txt +0 -1
- docutils-0.20rc1/test/data/csv_dep.txt +0 -2
- docutils-0.20rc1/test/data/dependencies.txt +0 -37
- docutils-0.20rc1/test/data/full-template.txt +0 -106
- docutils-0.20rc1/test/data/ham.css +0 -2
- docutils-0.20rc1/test/data/ham.tex +0 -1
- docutils-0.20rc1/test/data/help/docutils.txt +0 -218
- docutils-0.20rc1/test/data/help/rst2html.txt +0 -213
- docutils-0.20rc1/test/data/help/rst2latex.txt +0 -255
- docutils-0.20rc1/test/data/include.txt +0 -1
- docutils-0.20rc1/test/data/latin1.txt +0 -1
- docutils-0.20rc1/test/data/latin2.txt +0 -3
- docutils-0.20rc1/test/data/raw.txt +0 -1
- docutils-0.20rc1/test/data/stylesheet.txt +0 -0
- docutils-0.20rc1/test/data/utf-16-le-sig.txt +0 -0
- docutils-0.20rc1/test/data/utf-8-sig.txt +0 -1
- docutils-0.20rc1/test/data/utf8.txt +0 -1
- docutils-0.20rc1/test/docutils.conf +0 -11
- docutils-0.20rc1/test/functional/README.txt +0 -5
- docutils-0.20rc1/test/functional/expected/compact_lists.html +0 -49
- docutils-0.20rc1/test/functional/expected/cyrillic.tex +0 -58
- docutils-0.20rc1/test/functional/expected/dangerous.html +0 -68
- docutils-0.20rc1/test/functional/expected/embed_images_html5.html +0 -33
- docutils-0.20rc1/test/functional/expected/field_name_limit.html +0 -30
- docutils-0.20rc1/test/functional/expected/footnotes_html5.html +0 -132
- docutils-0.20rc1/test/functional/expected/latex_babel.tex +0 -59
- docutils-0.20rc1/test/functional/expected/latex_cornercases.tex +0 -995
- docutils-0.20rc1/test/functional/expected/latex_docinfo.tex +0 -43
- docutils-0.20rc1/test/functional/expected/latex_leavevmode.tex +0 -407
- docutils-0.20rc1/test/functional/expected/latex_literal_block.tex +0 -163
- docutils-0.20rc1/test/functional/expected/latex_literal_block_fancyvrb.tex +0 -163
- docutils-0.20rc1/test/functional/expected/latex_literal_block_listings.tex +0 -166
- docutils-0.20rc1/test/functional/expected/latex_literal_block_verbatim.tex +0 -162
- docutils-0.20rc1/test/functional/expected/latex_literal_block_verbatimtab.tex +0 -163
- docutils-0.20rc1/test/functional/expected/latex_memoir.tex +0 -2126
- docutils-0.20rc1/test/functional/expected/math_output_html.html +0 -179
- docutils-0.20rc1/test/functional/expected/math_output_latex.html +0 -104
- docutils-0.20rc1/test/functional/expected/math_output_mathjax.html +0 -123
- docutils-0.20rc1/test/functional/expected/math_output_mathml.html +0 -502
- docutils-0.20rc1/test/functional/expected/misc_rst_html4css1.html +0 -66
- docutils-0.20rc1/test/functional/expected/misc_rst_html5.html +0 -148
- docutils-0.20rc1/test/functional/expected/odt_basic.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_classifier.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_contents.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_custom_headfoot.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_footnotes.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_header_footer.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_literal_block.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_nested_class.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_no_class.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_raw.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_tables1.odt +0 -0
- docutils-0.20rc1/test/functional/expected/odt_unnested_class.odt +0 -0
- docutils-0.20rc1/test/functional/expected/pep_html.html +0 -88
- docutils-0.20rc1/test/functional/expected/rst_html5_tuftig.html +0 -143
- docutils-0.20rc1/test/functional/expected/standalone_rst_docutils_xml.xml +0 -1787
- docutils-0.20rc1/test/functional/expected/standalone_rst_html4css1.html +0 -1382
- docutils-0.20rc1/test/functional/expected/standalone_rst_html5.html +0 -1800
- docutils-0.20rc1/test/functional/expected/standalone_rst_latex.tex +0 -2158
- docutils-0.20rc1/test/functional/expected/standalone_rst_manpage.man +0 -105
- docutils-0.20rc1/test/functional/expected/standalone_rst_pseudoxml.txt +0 -2418
- docutils-0.20rc1/test/functional/expected/standalone_rst_s5_html_1.html +0 -154
- docutils-0.20rc1/test/functional/expected/standalone_rst_s5_html_2.html +0 -150
- docutils-0.20rc1/test/functional/expected/standalone_rst_xetex.tex +0 -2214
- docutils-0.20rc1/test/functional/expected/ui/default/framing.css +0 -25
- docutils-0.20rc1/test/functional/expected/ui/default/opera.css +0 -8
- docutils-0.20rc1/test/functional/expected/ui/default/outline.css +0 -16
- docutils-0.20rc1/test/functional/expected/ui/default/pretty.css +0 -120
- docutils-0.20rc1/test/functional/expected/ui/default/print.css +0 -24
- docutils-0.20rc1/test/functional/expected/ui/default/s5-core.css +0 -11
- docutils-0.20rc1/test/functional/expected/ui/default/slides.css +0 -10
- docutils-0.20rc1/test/functional/expected/ui/default/slides.js +0 -558
- docutils-0.20rc1/test/functional/expected/ui/small-black/framing.css +0 -24
- docutils-0.20rc1/test/functional/expected/ui/small-black/opera.css +0 -8
- docutils-0.20rc1/test/functional/expected/ui/small-black/outline.css +0 -16
- docutils-0.20rc1/test/functional/expected/ui/small-black/pretty.css +0 -116
- docutils-0.20rc1/test/functional/expected/ui/small-black/print.css +0 -24
- docutils-0.20rc1/test/functional/expected/ui/small-black/s5-core.css +0 -11
- docutils-0.20rc1/test/functional/expected/ui/small-black/slides.css +0 -10
- docutils-0.20rc1/test/functional/expected/ui/small-black/slides.js +0 -558
- docutils-0.20rc1/test/functional/expected/xetex-cyrillic.tex +0 -65
- docutils-0.20rc1/test/functional/input/compact_lists.txt +0 -39
- docutils-0.20rc1/test/functional/input/cyrillic.txt +0 -22
- docutils-0.20rc1/test/functional/input/dangerous.txt +0 -16
- docutils-0.20rc1/test/functional/input/data/classes_latex.txt +0 -87
- docutils-0.20rc1/test/functional/input/data/comprehensive-math-test.txt +0 -527
- docutils-0.20rc1/test/functional/input/data/custom_roles.txt +0 -49
- docutils-0.20rc1/test/functional/input/data/custom_roles_latex.txt +0 -55
- docutils-0.20rc1/test/functional/input/data/embed_images.txt +0 -24
- docutils-0.20rc1/test/functional/input/data/errors.txt +0 -9
- docutils-0.20rc1/test/functional/input/data/header_footer.txt +0 -2
- docutils-0.20rc1/test/functional/input/data/html5-features.txt +0 -240
- docutils-0.20rc1/test/functional/input/data/html5-text-level-tags.txt +0 -263
- docutils-0.20rc1/test/functional/input/data/hyperlinking.txt +0 -32
- docutils-0.20rc1/test/functional/input/data/latex-problematic.txt +0 -181
- docutils-0.20rc1/test/functional/input/data/latex_encoding.txt +0 -39
- docutils-0.20rc1/test/functional/input/data/list_table.txt +0 -36
- docutils-0.20rc1/test/functional/input/data/math.txt +0 -103
- docutils-0.20rc1/test/functional/input/data/minimal.css +0 -276
- docutils-0.20rc1/test/functional/input/data/nonalphanumeric.txt +0 -13
- docutils-0.20rc1/test/functional/input/data/option_lists.txt +0 -18
- docutils-0.20rc1/test/functional/input/data/section_titles.txt +0 -53
- docutils-0.20rc1/test/functional/input/data/standard.txt +0 -985
- docutils-0.20rc1/test/functional/input/data/svg_images.txt +0 -107
- docutils-0.20rc1/test/functional/input/data/swf_images.txt +0 -23
- docutils-0.20rc1/test/functional/input/data/table_colspan.txt +0 -15
- docutils-0.20rc1/test/functional/input/data/table_complex.txt +0 -21
- docutils-0.20rc1/test/functional/input/data/table_rowspan.txt +0 -15
- docutils-0.20rc1/test/functional/input/data/tables_latex.txt +0 -154
- docutils-0.20rc1/test/functional/input/data/tuftig.css +0 -568
- docutils-0.20rc1/test/functional/input/data/unicode.txt +0 -55
- docutils-0.20rc1/test/functional/input/data/urls.txt +0 -62
- docutils-0.20rc1/test/functional/input/data/video.txt +0 -36
- docutils-0.20rc1/test/functional/input/field_list.txt +0 -5
- docutils-0.20rc1/test/functional/input/footnotes.txt +0 -41
- docutils-0.20rc1/test/functional/input/latex_babel.txt +0 -36
- docutils-0.20rc1/test/functional/input/latex_cornercases.txt +0 -61
- docutils-0.20rc1/test/functional/input/latex_docinfo.txt +0 -10
- docutils-0.20rc1/test/functional/input/latex_leavevmode.txt +0 -164
- docutils-0.20rc1/test/functional/input/latex_literal_block.txt +0 -88
- docutils-0.20rc1/test/functional/input/misc_rst_html4css1.txt +0 -5
- docutils-0.20rc1/test/functional/input/misc_rst_html5.txt +0 -9
- docutils-0.20rc1/test/functional/input/odt_basic.txt +0 -8
- docutils-0.20rc1/test/functional/input/odt_classifier.txt +0 -11
- docutils-0.20rc1/test/functional/input/odt_contents.txt +0 -15
- docutils-0.20rc1/test/functional/input/odt_custom_headfoot.txt +0 -6
- docutils-0.20rc1/test/functional/input/odt_footnotes.txt +0 -8
- docutils-0.20rc1/test/functional/input/odt_header_footer.txt +0 -13
- docutils-0.20rc1/test/functional/input/odt_literal_block.txt +0 -3
- docutils-0.20rc1/test/functional/input/odt_nested_class.txt +0 -4
- docutils-0.20rc1/test/functional/input/odt_no_class.txt +0 -3
- docutils-0.20rc1/test/functional/input/odt_raw.txt +0 -11
- docutils-0.20rc1/test/functional/input/odt_tables1.txt +0 -171
- docutils-0.20rc1/test/functional/input/odt_unnested_class.txt +0 -4
- docutils-0.20rc1/test/functional/input/pep_html.txt +0 -32
- docutils-0.20rc1/test/functional/input/rst_html5_tuftig.txt +0 -125
- docutils-0.20rc1/test/functional/input/simple.txt +0 -1
- docutils-0.20rc1/test/functional/input/standalone_rst_docutils_xml.txt +0 -7
- docutils-0.20rc1/test/functional/input/standalone_rst_html4css1.txt +0 -24
- docutils-0.20rc1/test/functional/input/standalone_rst_html5.txt +0 -34
- docutils-0.20rc1/test/functional/input/standalone_rst_latex.txt +0 -21
- docutils-0.20rc1/test/functional/input/standalone_rst_manpage.txt +0 -76
- docutils-0.20rc1/test/functional/input/standalone_rst_pseudoxml.txt +0 -7
- docutils-0.20rc1/test/functional/input/standalone_rst_s5_html.txt +0 -126
- docutils-0.20rc1/test/functional/input/standalone_rst_xetex.txt +0 -20
- docutils-0.20rc1/test/functional/output/README.txt +0 -3
- docutils-0.20rc1/test/functional/tests/compact_lists.py +0 -10
- docutils-0.20rc1/test/functional/tests/dangerous.py +0 -12
- docutils-0.20rc1/test/functional/tests/field_name_limit.py +0 -12
- docutils-0.20rc1/test/functional/tests/footnotes_html5.py +0 -14
- docutils-0.20rc1/test/functional/tests/latex_babel.py +0 -10
- docutils-0.20rc1/test/functional/tests/latex_cornercases.py +0 -10
- docutils-0.20rc1/test/functional/tests/latex_cyrillic.py +0 -14
- docutils-0.20rc1/test/functional/tests/latex_docinfo.py +0 -11
- docutils-0.20rc1/test/functional/tests/latex_leavevmode.py +0 -11
- docutils-0.20rc1/test/functional/tests/latex_literal_block.py +0 -11
- docutils-0.20rc1/test/functional/tests/latex_literal_block_fancyvrb.py +0 -12
- docutils-0.20rc1/test/functional/tests/latex_literal_block_listings.py +0 -21
- docutils-0.20rc1/test/functional/tests/latex_literal_block_verbatim.py +0 -12
- docutils-0.20rc1/test/functional/tests/latex_literal_block_verbatimtab.py +0 -12
- docutils-0.20rc1/test/functional/tests/latex_memoir.py +0 -15
- docutils-0.20rc1/test/functional/tests/math_output_html.py +0 -11
- docutils-0.20rc1/test/functional/tests/math_output_latex.py +0 -11
- docutils-0.20rc1/test/functional/tests/math_output_mathjax.py +0 -11
- docutils-0.20rc1/test/functional/tests/math_output_mathml.py +0 -11
- docutils-0.20rc1/test/functional/tests/misc_rst_html4css1.py +0 -15
- docutils-0.20rc1/test/functional/tests/misc_rst_html5.py +0 -15
- docutils-0.20rc1/test/functional/tests/pep_html.py +0 -15
- docutils-0.20rc1/test/functional/tests/standalone_rst_docutils_xml.py +0 -13
- docutils-0.20rc1/test/functional/tests/standalone_rst_html4css1.py +0 -11
- docutils-0.20rc1/test/functional/tests/standalone_rst_html5.py +0 -13
- docutils-0.20rc1/test/functional/tests/standalone_rst_html5_tuftig.py +0 -15
- docutils-0.20rc1/test/functional/tests/standalone_rst_latex.py +0 -13
- docutils-0.20rc1/test/functional/tests/standalone_rst_manpage.py +0 -9
- docutils-0.20rc1/test/functional/tests/standalone_rst_pseudoxml.py +0 -11
- docutils-0.20rc1/test/functional/tests/standalone_rst_s5_html_1.py +0 -12
- docutils-0.20rc1/test/functional/tests/standalone_rst_s5_html_2.py +0 -12
- docutils-0.20rc1/test/functional/tests/standalone_rst_xetex.py +0 -17
- docutils-0.20rc1/test/functional/tests/xetex_cyrillic.py +0 -13
- docutils-0.20rc1/test/local-parser.py +0 -20
- docutils-0.20rc1/test/local-reader.py +0 -19
- docutils-0.20rc1/test/local-writer.py +0 -32
- docutils-0.20rc1/test/local_dummy_lang.py +0 -155
- docutils-0.20rc1/test/svn-commit.tmp +0 -4
- docutils-0.20rc1/test/test_CLI.py +0 -112
- docutils-0.20rc1/test/test__init__.py +0 -141
- docutils-0.20rc1/test/test_dependencies.py +0 -149
- docutils-0.20rc1/test/test_error_reporting.py +0 -264
- docutils-0.20rc1/test/test_functional.py +0 -122
- docutils-0.20rc1/test/test_io.py +0 -322
- docutils-0.20rc1/test/test_language.py +0 -120
- docutils-0.20rc1/test/test_nodes.py +0 -792
- docutils-0.20rc1/test/test_parsers/__init__.py +0 -0
- docutils-0.20rc1/test/test_parsers/test_get_parser_class.py +0 -58
- docutils-0.20rc1/test/test_parsers/test_parser.py +0 -34
- docutils-0.20rc1/test/test_parsers/test_recommonmark/__init__.py +0 -7
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_block_quotes.py +0 -124
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_bullet_lists.py +0 -214
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_enumerated_lists.py +0 -400
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_html_blocks.py +0 -109
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_inline_markup.py +0 -540
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_line_length_limit.py +0 -73
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_line_length_limit_default.py +0 -73
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_literal_blocks.py +0 -225
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_misc.py +0 -73
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_paragraphs.py +0 -96
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_section_headers.py +0 -258
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_targets.py +0 -161
- docutils-0.20rc1/test/test_parsers/test_recommonmark/test_transitions.py +0 -333
- docutils-0.20rc1/test/test_parsers/test_rst/__init__.py +0 -0
- docutils-0.20rc1/test/test_parsers/test_rst/includes/include14.txt +0 -12
- docutils-0.20rc1/test/test_parsers/test_rst/includes/include9.txt +0 -3
- docutils-0.20rc1/test/test_parsers/test_rst/test_SimpleTableParser.py +0 -165
- docutils-0.20rc1/test/test_parsers/test_rst/test_TableParser.py +0 -251
- docutils-0.20rc1/test/test_parsers/test_rst/test_block_quotes.py +0 -404
- docutils-0.20rc1/test/test_parsers/test_rst/test_bullet_lists.py +0 -225
- docutils-0.20rc1/test/test_parsers/test_rst/test_character_level_inline_markup.py +0 -705
- docutils-0.20rc1/test/test_parsers/test_rst/test_citations.py +0 -202
- docutils-0.20rc1/test/test_parsers/test_rst/test_comments.py +0 -337
- docutils-0.20rc1/test/test_parsers/test_rst/test_definition_lists.py +0 -451
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/__init__.py +0 -0
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/empty.txt +0 -0
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include 11.txt +0 -1
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include.md +0 -7
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include1.txt +0 -4
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include10.txt +0 -78
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include12.txt +0 -9
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include13.txt +0 -11
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include2.txt +0 -5
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include3.txt +0 -3
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include8.txt +0 -3
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/include_literal.txt +0 -6
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/includes/include14.txt +0 -4
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/includes/include15.txt +0 -3
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/includes/include16.txt +0 -8
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/includes/include4.txt +0 -10
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/includes/include5.txt +0 -3
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/includes/more/include6.txt +0 -3
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/includes/sibling/include7.txt +0 -1
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/raw1.txt +0 -1
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test__init__.py +0 -60
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_admonitions.py +0 -235
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_admonitions_de.py +0 -264
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_admonitions_dummy_lang.py +0 -68
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_block_quotes.py +0 -89
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_class.py +0 -72
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_code.py +0 -336
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_code_long.py +0 -184
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_code_none.py +0 -100
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_code_parsing.py +0 -69
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_compound.py +0 -123
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_container.py +0 -109
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_contents.py +0 -266
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_date.py +0 -95
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_decorations.py +0 -107
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_default_role.py +0 -101
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_figures.py +0 -313
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_images.py +0 -484
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_include.py +0 -1553
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_line_blocks.py +0 -112
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_math.py +0 -115
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_meta.py +0 -191
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_parsed_literals.py +0 -93
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_raw.py +0 -201
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_replace.py +0 -154
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_replace_fr.py +0 -94
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_role.py +0 -301
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_rubrics.py +0 -102
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_sectnum.py +0 -74
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_sidebars.py +0 -120
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_tables.py +0 -1612
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_target_notes.py +0 -95
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_test_directives.py +0 -226
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_title.py +0 -52
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_topics.py +0 -273
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_unicode.py +0 -200
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/test_unknown.py +0 -85
- docutils-0.20rc1/test/test_parsers/test_rst/test_directives/utf-16.csv +0 -0
- docutils-0.20rc1/test/test_parsers/test_rst/test_doctest_blocks.py +0 -92
- docutils-0.20rc1/test/test_parsers/test_rst/test_east_asian_text.py +0 -330
- docutils-0.20rc1/test/test_parsers/test_rst/test_enumerated_lists.py +0 -926
- docutils-0.20rc1/test/test_parsers/test_rst/test_field_lists.py +0 -703
- docutils-0.20rc1/test/test_parsers/test_rst/test_footnotes.py +0 -350
- docutils-0.20rc1/test/test_parsers/test_rst/test_inline_markup.py +0 -2011
- docutils-0.20rc1/test/test_parsers/test_rst/test_interpreted.py +0 -451
- docutils-0.20rc1/test/test_parsers/test_rst/test_interpreted_fr.py +0 -80
- docutils-0.20rc1/test/test_parsers/test_rst/test_line_blocks.py +0 -351
- docutils-0.20rc1/test/test_parsers/test_rst/test_line_length_limit.py +0 -102
- docutils-0.20rc1/test/test_parsers/test_rst/test_line_length_limit_default.py +0 -72
- docutils-0.20rc1/test/test_parsers/test_rst/test_literal_blocks.py +0 -389
- docutils-0.20rc1/test/test_parsers/test_rst/test_option_lists.py +0 -791
- docutils-0.20rc1/test/test_parsers/test_rst/test_outdenting.py +0 -108
- docutils-0.20rc1/test/test_parsers/test_rst/test_paragraphs.py +0 -107
- docutils-0.20rc1/test/test_parsers/test_rst/test_section_headers.py +0 -931
- docutils-0.20rc1/test/test_parsers/test_rst/test_source_line.py +0 -237
- docutils-0.20rc1/test/test_parsers/test_rst/test_substitutions.py +0 -316
- docutils-0.20rc1/test/test_parsers/test_rst/test_tables.py +0 -1334
- docutils-0.20rc1/test/test_parsers/test_rst/test_targets.py +0 -557
- docutils-0.20rc1/test/test_parsers/test_rst/test_transitions.py +0 -337
- docutils-0.20rc1/test/test_pickle.py +0 -35
- docutils-0.20rc1/test/test_publisher.py +0 -238
- docutils-0.20rc1/test/test_readers/__init__.py +0 -0
- docutils-0.20rc1/test/test_readers/test_get_reader_class.py +0 -44
- docutils-0.20rc1/test/test_readers/test_pep/__init__.py +0 -0
- docutils-0.20rc1/test/test_readers/test_pep/test_inline_markup.py +0 -157
- docutils-0.20rc1/test/test_readers/test_pep/test_rfc2822.py +0 -311
- docutils-0.20rc1/test/test_settings.py +0 -361
- docutils-0.20rc1/test/test_statemachine.py +0 -295
- docutils-0.20rc1/test/test_transforms/__init__.py +0 -0
- docutils-0.20rc1/test/test_transforms/test___init__.py +0 -51
- docutils-0.20rc1/test/test_transforms/test_class.py +0 -212
- docutils-0.20rc1/test/test_transforms/test_contents.py +0 -455
- docutils-0.20rc1/test/test_transforms/test_docinfo.py +0 -533
- docutils-0.20rc1/test/test_transforms/test_doctitle.py +0 -290
- docutils-0.20rc1/test/test_transforms/test_expose_internals.py +0 -61
- docutils-0.20rc1/test/test_transforms/test_filter.py +0 -62
- docutils-0.20rc1/test/test_transforms/test_filter_messages.py +0 -94
- docutils-0.20rc1/test/test_transforms/test_footnotes.py +0 -566
- docutils-0.20rc1/test/test_transforms/test_hyperlinks.py +0 -961
- docutils-0.20rc1/test/test_transforms/test_hyperlinks_de.py +0 -96
- docutils-0.20rc1/test/test_transforms/test_messages.py +0 -86
- docutils-0.20rc1/test/test_transforms/test_peps.py +0 -88
- docutils-0.20rc1/test/test_transforms/test_sectnum.py +0 -402
- docutils-0.20rc1/test/test_transforms/test_smartquotes.py +0 -537
- docutils-0.20rc1/test/test_transforms/test_strip_comments.py +0 -71
- docutils-0.20rc1/test/test_transforms/test_strip_elements_with_class.py +0 -84
- docutils-0.20rc1/test/test_transforms/test_substitution_expansion_length_limit.py +0 -91
- docutils-0.20rc1/test/test_transforms/test_substitutions.py +0 -399
- docutils-0.20rc1/test/test_transforms/test_target_notes.py +0 -105
- docutils-0.20rc1/test/test_transforms/test_transitions.py +0 -329
- docutils-0.20rc1/test/test_transforms/test_writer_aux.py +0 -83
- docutils-0.20rc1/test/test_traversals.py +0 -83
- docutils-0.20rc1/test/test_utils.py +0 -415
- docutils-0.20rc1/test/test_viewlist.py +0 -220
- docutils-0.20rc1/test/test_writers/__init__.py +0 -0
- docutils-0.20rc1/test/test_writers/test_docutils_xml.py +0 -205
- docutils-0.20rc1/test/test_writers/test_get_writer_class.py +0 -44
- docutils-0.20rc1/test/test_writers/test_html4css1_misc.py +0 -225
- docutils-0.20rc1/test/test_writers/test_html4css1_parts.py +0 -504
- docutils-0.20rc1/test/test_writers/test_html4css1_template.py +0 -267
- docutils-0.20rc1/test/test_writers/test_html5_polyglot_misc.py +0 -244
- docutils-0.20rc1/test/test_writers/test_html5_polyglot_parts.py +0 -753
- docutils-0.20rc1/test/test_writers/test_html5_template.py +0 -252
- docutils-0.20rc1/test/test_writers/test_latex2e.py +0 -1263
- docutils-0.20rc1/test/test_writers/test_latex2e_misc.py +0 -108
- docutils-0.20rc1/test/test_writers/test_manpage.py +0 -502
- docutils-0.20rc1/test/test_writers/test_null.py +0 -52
- docutils-0.20rc1/test/test_writers/test_odt.py +0 -190
- docutils-0.20rc1/test/test_writers/test_pseudoxml.py +0 -115
- docutils-0.20rc1/test/test_writers/test_s5.py +0 -198
- docutils-0.20rc1/tools/buildhtml.py +0 -276
- docutils-0.20rc1/tools/dev/README.txt +0 -1
- docutils-0.20rc1/tools/dev/create_unimap.py +0 -76
- docutils-0.20rc1/tools/dev/generate_punctuation_chars.py +0 -403
- docutils-0.20rc1/tools/dev/profile_docutils.py +0 -39
- docutils-0.20rc1/tools/dev/quicktest.py +0 -221
- docutils-0.20rc1/tools/dev/unicode2rstsubs.py +0 -201
- docutils-0.20rc1/tools/docutils-cli.py +0 -24
- docutils-0.20rc1/tools/docutils.conf +0 -18
- docutils-0.20rc1/tools/editors/README.txt +0 -27
- docutils-0.20rc1/tools/editors/emacs/IDEAS.rst +0 -730
- docutils-0.20rc1/tools/editors/emacs/README.txt +0 -30
- docutils-0.20rc1/tools/editors/emacs/rst.el +0 -4619
- docutils-0.20rc1/tools/editors/emacs/tests/Ado.el +0 -150
- docutils-0.20rc1/tools/editors/emacs/tests/Hdr.el +0 -123
- docutils-0.20rc1/tools/editors/emacs/tests/Makefile +0 -25
- docutils-0.20rc1/tools/editors/emacs/tests/README.txt +0 -20
- docutils-0.20rc1/tools/editors/emacs/tests/Stn.el +0 -253
- docutils-0.20rc1/tools/editors/emacs/tests/Ttl.el +0 -361
- docutils-0.20rc1/tools/editors/emacs/tests/adjust-section.el +0 -929
- docutils-0.20rc1/tools/editors/emacs/tests/adjust-uc.el +0 -2928
- docutils-0.20rc1/tools/editors/emacs/tests/adjust-uc_doc.rst +0 -204
- docutils-0.20rc1/tools/editors/emacs/tests/adornment.el +0 -1565
- docutils-0.20rc1/tools/editors/emacs/tests/apply-block.el +0 -519
- docutils-0.20rc1/tools/editors/emacs/tests/buffer.el +0 -179
- docutils-0.20rc1/tools/editors/emacs/tests/comment.el +0 -215
- docutils-0.20rc1/tools/editors/emacs/tests/ert-buffer.el +0 -407
- docutils-0.20rc1/tools/editors/emacs/tests/fill.el +0 -583
- docutils-0.20rc1/tools/editors/emacs/tests/font-lock.el +0 -358
- docutils-0.20rc1/tools/editors/emacs/tests/helpers.el +0 -250
- docutils-0.20rc1/tools/editors/emacs/tests/imenu.el +0 -127
- docutils-0.20rc1/tools/editors/emacs/tests/indent.el +0 -470
- docutils-0.20rc1/tools/editors/emacs/tests/init.el +0 -31
- docutils-0.20rc1/tools/editors/emacs/tests/items.el +0 -639
- docutils-0.20rc1/tools/editors/emacs/tests/movement.el +0 -888
- docutils-0.20rc1/tools/editors/emacs/tests/re.el +0 -889
- docutils-0.20rc1/tools/editors/emacs/tests/shift.el +0 -916
- docutils-0.20rc1/tools/editors/emacs/tests/toc.el +0 -376
- docutils-0.20rc1/tools/editors/emacs/tests/tree.el +0 -278
- docutils-0.20rc1/tools/rst2html.py +0 -23
- docutils-0.20rc1/tools/rst2html4.py +0 -26
- docutils-0.20rc1/tools/rst2html5.py +0 -33
- docutils-0.20rc1/tools/rst2latex.py +0 -26
- docutils-0.20rc1/tools/rst2man.py +0 -27
- docutils-0.20rc1/tools/rst2odt.py +0 -28
- docutils-0.20rc1/tools/rst2pseudoxml.py +0 -23
- docutils-0.20rc1/tools/rst2s5.py +0 -24
- docutils-0.20rc1/tools/rst2xetex.py +0 -27
- docutils-0.20rc1/tools/rst2xml.py +0 -23
- docutils-0.20rc1/tools/rstpep2html.py +0 -25
- docutils-0.20rc1/tools/test/test_buildhtml.py +0 -110
- {docutils-0.20rc1 → docutils-0.21}/docutils/__main__.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/core.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/docutils.conf +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/examples.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/__init__.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/af.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/ar.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/da.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/de.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/en.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/fa.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/it.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/ja.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/ko.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/lt.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/lv.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/nl.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/ru.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/languages/uk.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/__init__.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/null.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/recommonmark_wrapper.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/__init__.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/html.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/parts.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/directives/references.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/README.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isoamsa.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isoamsb.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isoamsc.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isoamsn.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isoamso.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isoamsr.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isobox.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isocyr1.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isocyr2.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isodia.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isogrk1.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isogrk2.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isogrk3.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isogrk4-wide.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isogrk4.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isolat1.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isolat2.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isomfrk-wide.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isomfrk.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isomopf-wide.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isomopf.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isomscr-wide.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isomscr.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isonum.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isopub.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/isotech.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/mmlalias.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/mmlextra-wide.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/mmlextra.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/s5defs.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/xhtml1-lat1.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/xhtml1-special.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/include/xhtml1-symbol.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/__init__.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/ar.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/fa.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/ja.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/ko.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/lt.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/lv.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/ru.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/sv.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/uk.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/zh_cn.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/languages/zh_tw.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/roles.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/parsers/rst/tableparser.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/readers/__init__.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/readers/doctree.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/readers/pep.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/statemachine.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/components.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/misc.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/parts.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/peps.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/transforms/writer_aux.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/code_analyzer.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/error_reporting.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/math/tex2unichar.py +1 -1
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/math/unichar2tex.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/punctuation_chars.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/utils/urischemes.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/__init__.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/html4css1/template.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/html5_polyglot/template.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/latex2e/default.tex +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/latex2e/docutils.sty +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/latex2e/titlepage.tex +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/latex2e/titlingpage.tex +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/latex2e/xelatex.tex +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/null.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/odf_odt/pygmentsformatter.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/odf_odt/styles.odt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/pep_html/pep.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/pep_html/template.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/pseudoxml.py +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/README.txt +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/big-black/__base__ +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/big-black/framing.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/big-black/pretty.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/big-white/framing.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/big-white/pretty.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/framing.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/opera.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/outline.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/pretty.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/print.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/s5-core.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/slides.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/default/slides.js +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/medium-black/__base__ +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/medium-black/pretty.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/medium-white/framing.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/medium-white/pretty.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/small-black/__base__ +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/small-black/pretty.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/small-white/framing.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/s5_html/themes/small-white/pretty.css +0 -0
- {docutils-0.20rc1 → docutils-0.21}/docutils/writers/xetex/__init__.py +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
:Author: David Goodger
|
|
8
8
|
:Contact: goodger@python.org
|
|
9
|
-
:Date: $Date:
|
|
9
|
+
:Date: $Date: 2023-06-22 17:34:37 +0200 (Do, 22. Jun 2023) $
|
|
10
10
|
:Web site: https://docutils.sourceforge.io/
|
|
11
11
|
:Copyright: This document has been placed in the public domain.
|
|
12
12
|
|
|
@@ -131,9 +131,9 @@ The exceptions to the `Public Domain Dedication`_ above are:
|
|
|
131
131
|
* docutils/utils/roman.py
|
|
132
132
|
|
|
133
133
|
copyright by Mark Pilgrim, released under the
|
|
134
|
-
`
|
|
134
|
+
`Zope Public License Version 2.1`_ (`local copy`__).
|
|
135
135
|
|
|
136
|
-
__ licenses/
|
|
136
|
+
__ licenses/ZPL-2-1.txt
|
|
137
137
|
|
|
138
138
|
* tools/editors/emacs/rst.el
|
|
139
139
|
|
|
@@ -150,10 +150,10 @@ licenses_ directory.
|
|
|
150
150
|
|
|
151
151
|
.. _sandbox: https://docutils.sourceforge.io/sandbox/README.html
|
|
152
152
|
.. _licenses: licenses/
|
|
153
|
-
.. _Python 2.1.1 license: https://docs.python.org/3/license.html
|
|
154
153
|
.. _GNU General Public License: https://www.gnu.org/copyleft/gpl.html
|
|
155
154
|
.. _BSD 2-Clause License: http://opensource.org/licenses/BSD-2-Clause
|
|
156
155
|
.. _BSD 3-Clause License: https://opensource.org/licenses/BSD-3-Clause
|
|
156
|
+
.. _Zope Public License Version 2.1: https://opensource.org/license/zpl-2-1/
|
|
157
157
|
.. _OSI-approved: http://opensource.org/licenses/
|
|
158
158
|
.. _license-list:
|
|
159
159
|
.. _GPL-compatible: https://www.gnu.org/licenses/license-list.html
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: docutils
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.21
|
|
4
4
|
Summary: Docutils -- Python Documentation Utilities
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Maintainer-email: docutils-develop@lists.sourceforge.net
|
|
10
|
-
License: public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)
|
|
11
|
-
Platform: OS-independent
|
|
5
|
+
Author-email: David Goodger <goodger@python.org>
|
|
6
|
+
Maintainer-email: docutils-develop list <docutils-develop@lists.sourceforge.net>
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/plain
|
|
12
9
|
Classifier: Development Status :: 4 - Beta
|
|
13
10
|
Classifier: Environment :: Console
|
|
14
11
|
Classifier: Intended Audience :: End Users/Desktop
|
|
@@ -21,8 +18,7 @@ Classifier: License :: OSI Approved :: BSD License
|
|
|
21
18
|
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
|
|
22
19
|
Classifier: Operating System :: OS Independent
|
|
23
20
|
Classifier: Programming Language :: Python :: 3
|
|
24
|
-
Classifier: Programming Language :: Python :: 3
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
26
22
|
Classifier: Programming Language :: Python :: 3.9
|
|
27
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
28
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -57,11 +53,9 @@ Classifier: Natural Language :: Slovak
|
|
|
57
53
|
Classifier: Natural Language :: Spanish
|
|
58
54
|
Classifier: Natural Language :: Swedish
|
|
59
55
|
Classifier: Natural Language :: Ukrainian
|
|
60
|
-
|
|
61
|
-
License-File: COPYING.txt
|
|
56
|
+
Project-URL: Homepage, https://docutils.sourceforge.io
|
|
62
57
|
|
|
63
58
|
Docutils is a modular system for processing documentation
|
|
64
59
|
into useful formats, such as HTML, XML, and LaTeX. For
|
|
65
60
|
input Docutils supports reStructuredText, an easy-to-read,
|
|
66
61
|
what-you-see-is-what-you-get plaintext markup syntax.
|
|
67
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# $Id: __init__.py
|
|
1
|
+
# $Id: __init__.py 9621 2024-04-09 18:03:15Z grubert $
|
|
2
2
|
# Author: David Goodger <goodger@python.org>
|
|
3
3
|
# Copyright: This module has been placed in the public domain.
|
|
4
4
|
|
|
@@ -54,7 +54,7 @@ from collections import namedtuple
|
|
|
54
54
|
|
|
55
55
|
__docformat__ = 'reStructuredText'
|
|
56
56
|
|
|
57
|
-
__version__ = '0.
|
|
57
|
+
__version__ = '0.21'
|
|
58
58
|
"""Docutils version identifier (complies with PEP 440)::
|
|
59
59
|
|
|
60
60
|
major.minor[.micro][releaselevel[serial]][.dev]
|
|
@@ -116,10 +116,10 @@ class VersionInfo(namedtuple('VersionInfo',
|
|
|
116
116
|
|
|
117
117
|
__version_info__ = VersionInfo(
|
|
118
118
|
major=0,
|
|
119
|
-
minor=
|
|
119
|
+
minor=21,
|
|
120
120
|
micro=0,
|
|
121
|
-
releaselevel='
|
|
122
|
-
serial=
|
|
121
|
+
releaselevel='final', # one of 'alpha', 'beta', 'candidate', 'final'
|
|
122
|
+
serial=0, # pre-release number (0 for final releases and snapshots)
|
|
123
123
|
release=True # True for official releases and pre-releases
|
|
124
124
|
)
|
|
125
125
|
"""Comprehensive version information tuple.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# $Id: frontend.py
|
|
1
|
+
# $Id: frontend.py 9540 2024-02-17 10:36:59Z milde $
|
|
2
2
|
# Author: David Goodger <goodger@python.org>
|
|
3
3
|
# Copyright: This module has been placed in the public domain.
|
|
4
4
|
|
|
@@ -27,10 +27,10 @@ Exports the following classes:
|
|
|
27
27
|
Also exports the following functions:
|
|
28
28
|
|
|
29
29
|
Interface function:
|
|
30
|
-
|
|
30
|
+
`get_default_settings()`. New in 0.19.
|
|
31
31
|
|
|
32
32
|
Option callbacks:
|
|
33
|
-
|
|
33
|
+
`store_multiple()`, `read_config_file()`. Deprecated.
|
|
34
34
|
|
|
35
35
|
Setting validators:
|
|
36
36
|
`validate_encoding()`, `validate_encoding_error_handler()`,
|
|
@@ -59,6 +59,7 @@ import optparse
|
|
|
59
59
|
from optparse import SUPPRESS_HELP
|
|
60
60
|
import os
|
|
61
61
|
import os.path
|
|
62
|
+
from pathlib import Path
|
|
62
63
|
import sys
|
|
63
64
|
import warnings
|
|
64
65
|
|
|
@@ -90,8 +91,13 @@ def read_config_file(option, opt, value, parser):
|
|
|
90
91
|
parser.values.update(new_settings, parser)
|
|
91
92
|
|
|
92
93
|
|
|
93
|
-
def validate_encoding(setting, value, option_parser,
|
|
94
|
+
def validate_encoding(setting, value=None, option_parser=None,
|
|
94
95
|
config_parser=None, config_section=None):
|
|
96
|
+
# All arguments except `value` are ignored
|
|
97
|
+
# (kept for compatibility with "optparse" module).
|
|
98
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
99
|
+
if value is None:
|
|
100
|
+
value = setting
|
|
95
101
|
if value == '':
|
|
96
102
|
return None # allow overwriting a config file value
|
|
97
103
|
try:
|
|
@@ -102,8 +108,13 @@ def validate_encoding(setting, value, option_parser,
|
|
|
102
108
|
return value
|
|
103
109
|
|
|
104
110
|
|
|
105
|
-
def validate_encoding_error_handler(setting, value, option_parser,
|
|
111
|
+
def validate_encoding_error_handler(setting, value=None, option_parser=None,
|
|
106
112
|
config_parser=None, config_section=None):
|
|
113
|
+
# All arguments except `value` are ignored
|
|
114
|
+
# (kept for compatibility with "optparse" module).
|
|
115
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
116
|
+
if value is None:
|
|
117
|
+
value = setting
|
|
107
118
|
try:
|
|
108
119
|
codecs.lookup_error(value)
|
|
109
120
|
except LookupError:
|
|
@@ -119,13 +130,11 @@ def validate_encoding_and_error_handler(
|
|
|
119
130
|
setting, value, option_parser, config_parser=None, config_section=None):
|
|
120
131
|
"""
|
|
121
132
|
Side-effect: if an error handler is included in the value, it is inserted
|
|
122
|
-
into the appropriate place as if it
|
|
133
|
+
into the appropriate place as if it were a separate setting/option.
|
|
123
134
|
"""
|
|
124
135
|
if ':' in value:
|
|
125
136
|
encoding, handler = value.split(':')
|
|
126
|
-
validate_encoding_error_handler(
|
|
127
|
-
setting + '_error_handler', handler, option_parser,
|
|
128
|
-
config_parser, config_section)
|
|
137
|
+
validate_encoding_error_handler(handler)
|
|
129
138
|
if config_parser:
|
|
130
139
|
config_parser.set(config_section, setting + '_error_handler',
|
|
131
140
|
handler)
|
|
@@ -133,61 +142,87 @@ def validate_encoding_and_error_handler(
|
|
|
133
142
|
setattr(option_parser.values, setting + '_error_handler', handler)
|
|
134
143
|
else:
|
|
135
144
|
encoding = value
|
|
136
|
-
validate_encoding(
|
|
137
|
-
config_parser, config_section)
|
|
138
|
-
return encoding
|
|
145
|
+
return validate_encoding(encoding)
|
|
139
146
|
|
|
140
147
|
|
|
141
|
-
def validate_boolean(setting, value, option_parser,
|
|
148
|
+
def validate_boolean(setting, value=None, option_parser=None,
|
|
142
149
|
config_parser=None, config_section=None):
|
|
143
150
|
"""Check/normalize boolean settings:
|
|
144
151
|
True: '1', 'on', 'yes', 'true'
|
|
145
152
|
False: '0', 'off', 'no','false', ''
|
|
153
|
+
|
|
154
|
+
All arguments except `value` are ignored
|
|
155
|
+
(kept for compatibility with "optparse" module).
|
|
156
|
+
If there is only one positional argument, it is interpreted as `value`.
|
|
146
157
|
"""
|
|
158
|
+
if value is None:
|
|
159
|
+
value = setting
|
|
147
160
|
if isinstance(value, bool):
|
|
148
161
|
return value
|
|
149
162
|
try:
|
|
150
|
-
return
|
|
163
|
+
return OptionParser.booleans[value.strip().lower()]
|
|
151
164
|
except KeyError:
|
|
152
165
|
raise LookupError('unknown boolean value: "%s"' % value)
|
|
153
166
|
|
|
154
167
|
|
|
155
|
-
def validate_ternary(setting, value, option_parser,
|
|
168
|
+
def validate_ternary(setting, value=None, option_parser=None,
|
|
156
169
|
config_parser=None, config_section=None):
|
|
157
170
|
"""Check/normalize three-value settings:
|
|
158
171
|
True: '1', 'on', 'yes', 'true'
|
|
159
172
|
False: '0', 'off', 'no','false', ''
|
|
160
173
|
any other value: returned as-is.
|
|
174
|
+
|
|
175
|
+
All arguments except `value` are ignored
|
|
176
|
+
(kept for compatibility with "optparse" module).
|
|
177
|
+
If there is only one positional argument, it is interpreted as `value`.
|
|
161
178
|
"""
|
|
179
|
+
if value is None:
|
|
180
|
+
value = setting
|
|
162
181
|
if isinstance(value, bool) or value is None:
|
|
163
182
|
return value
|
|
164
183
|
try:
|
|
165
|
-
return
|
|
184
|
+
return OptionParser.booleans[value.strip().lower()]
|
|
166
185
|
except KeyError:
|
|
167
186
|
return value
|
|
168
187
|
|
|
169
188
|
|
|
170
|
-
def validate_nonnegative_int(setting, value, option_parser,
|
|
189
|
+
def validate_nonnegative_int(setting, value=None, option_parser=None,
|
|
171
190
|
config_parser=None, config_section=None):
|
|
191
|
+
# All arguments except `value` are ignored
|
|
192
|
+
# (kept for compatibility with "optparse" module).
|
|
193
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
194
|
+
if value is None:
|
|
195
|
+
value = setting
|
|
172
196
|
value = int(value)
|
|
173
197
|
if value < 0:
|
|
174
198
|
raise ValueError('negative value; must be positive or zero')
|
|
175
199
|
return value
|
|
176
200
|
|
|
177
201
|
|
|
178
|
-
def validate_threshold(setting, value, option_parser,
|
|
202
|
+
def validate_threshold(setting, value=None, option_parser=None,
|
|
179
203
|
config_parser=None, config_section=None):
|
|
204
|
+
# All arguments except `value` are ignored
|
|
205
|
+
# (kept for compatibility with "optparse" module).
|
|
206
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
207
|
+
if value is None:
|
|
208
|
+
value = setting
|
|
180
209
|
try:
|
|
181
210
|
return int(value)
|
|
182
211
|
except ValueError:
|
|
183
212
|
try:
|
|
184
|
-
return
|
|
213
|
+
return OptionParser.thresholds[value.lower()]
|
|
185
214
|
except (KeyError, AttributeError):
|
|
186
215
|
raise LookupError('unknown threshold: %r.' % value)
|
|
187
216
|
|
|
188
217
|
|
|
189
218
|
def validate_colon_separated_string_list(
|
|
190
|
-
|
|
219
|
+
setting, value=None, option_parser=None,
|
|
220
|
+
config_parser=None, config_section=None):
|
|
221
|
+
# All arguments except `value` are ignored
|
|
222
|
+
# (kept for compatibility with "optparse" module).
|
|
223
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
224
|
+
if value is None:
|
|
225
|
+
value = setting
|
|
191
226
|
if not isinstance(value, list):
|
|
192
227
|
value = value.split(':')
|
|
193
228
|
else:
|
|
@@ -196,10 +231,16 @@ def validate_colon_separated_string_list(
|
|
|
196
231
|
return value
|
|
197
232
|
|
|
198
233
|
|
|
199
|
-
def validate_comma_separated_list(setting, value, option_parser,
|
|
234
|
+
def validate_comma_separated_list(setting, value=None, option_parser=None,
|
|
200
235
|
config_parser=None, config_section=None):
|
|
201
236
|
"""Check/normalize list arguments (split at "," and strip whitespace).
|
|
237
|
+
|
|
238
|
+
All arguments except `value` are ignored
|
|
239
|
+
(kept for compatibility with "optparse" module).
|
|
240
|
+
If there is only one positional argument, it is interpreted as `value`.
|
|
202
241
|
"""
|
|
242
|
+
if value is None:
|
|
243
|
+
value = setting
|
|
203
244
|
# `value` may be ``bytes``, ``str``, or a ``list`` (when given as
|
|
204
245
|
# command line option and "action" is "append").
|
|
205
246
|
if not isinstance(value, list):
|
|
@@ -212,8 +253,49 @@ def validate_comma_separated_list(setting, value, option_parser,
|
|
|
212
253
|
return value
|
|
213
254
|
|
|
214
255
|
|
|
215
|
-
def
|
|
216
|
-
|
|
256
|
+
def validate_math_output(setting, value=None, option_parser=None,
|
|
257
|
+
config_parser=None, config_section=None):
|
|
258
|
+
"""Check "math-output" setting, return list with "format" and "options".
|
|
259
|
+
|
|
260
|
+
See also https://docutils.sourceforge.io/docs/user/config.html#math-output
|
|
261
|
+
|
|
262
|
+
Argument list for compatibility with "optparse" module.
|
|
263
|
+
All arguments except `value` are ignored.
|
|
264
|
+
If there is only one positional argument, it is interpreted as `value`.
|
|
265
|
+
"""
|
|
266
|
+
if value is None:
|
|
267
|
+
value = setting
|
|
268
|
+
|
|
269
|
+
formats = ('html', 'latex', 'mathml', 'mathjax')
|
|
270
|
+
tex2mathml_converters = ('', 'latexml', 'ttm', 'blahtexml', 'pandoc')
|
|
271
|
+
|
|
272
|
+
if not value:
|
|
273
|
+
return []
|
|
274
|
+
values = value.split(maxsplit=1)
|
|
275
|
+
format = values[0].lower()
|
|
276
|
+
try:
|
|
277
|
+
options = values[1]
|
|
278
|
+
except IndexError:
|
|
279
|
+
options = ''
|
|
280
|
+
if format not in formats:
|
|
281
|
+
raise LookupError(f'Unknown math output format: "{value}",\n'
|
|
282
|
+
f' choose from {formats}.')
|
|
283
|
+
if format == 'mathml':
|
|
284
|
+
converter = options.lower()
|
|
285
|
+
if converter not in tex2mathml_converters:
|
|
286
|
+
raise LookupError(f'MathML converter "{options}" not supported,\n'
|
|
287
|
+
f' choose from {tex2mathml_converters}.')
|
|
288
|
+
options = converter
|
|
289
|
+
return [format, options]
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def validate_url_trailing_slash(setting, value=None, option_parser=None,
|
|
293
|
+
config_parser=None, config_section=None):
|
|
294
|
+
# All arguments except `value` are ignored
|
|
295
|
+
# (kept for compatibility with "optparse" module).
|
|
296
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
297
|
+
if value is None:
|
|
298
|
+
value = setting
|
|
217
299
|
if not value:
|
|
218
300
|
return './'
|
|
219
301
|
elif value.endswith('/'):
|
|
@@ -222,8 +304,13 @@ def validate_url_trailing_slash(
|
|
|
222
304
|
return value + '/'
|
|
223
305
|
|
|
224
306
|
|
|
225
|
-
def validate_dependency_file(setting, value, option_parser,
|
|
307
|
+
def validate_dependency_file(setting, value=None, option_parser=None,
|
|
226
308
|
config_parser=None, config_section=None):
|
|
309
|
+
# All arguments except `value` are ignored
|
|
310
|
+
# (kept for compatibility with "optparse" module).
|
|
311
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
312
|
+
if value is None:
|
|
313
|
+
value = setting
|
|
227
314
|
try:
|
|
228
315
|
return utils.DependencyList(value)
|
|
229
316
|
except OSError:
|
|
@@ -231,11 +318,15 @@ def validate_dependency_file(setting, value, option_parser,
|
|
|
231
318
|
return utils.DependencyList(None)
|
|
232
319
|
|
|
233
320
|
|
|
234
|
-
def validate_strip_class(setting, value, option_parser,
|
|
321
|
+
def validate_strip_class(setting, value=None, option_parser=None,
|
|
235
322
|
config_parser=None, config_section=None):
|
|
323
|
+
# All arguments except `value` are ignored
|
|
324
|
+
# (kept for compatibility with "optparse" module).
|
|
325
|
+
# If there is only one positional argument, it is interpreted as `value`.
|
|
326
|
+
if value is None:
|
|
327
|
+
value = setting
|
|
236
328
|
# value is a comma separated string list:
|
|
237
|
-
value = validate_comma_separated_list(
|
|
238
|
-
config_parser, config_section)
|
|
329
|
+
value = validate_comma_separated_list(value)
|
|
239
330
|
# validate list elements:
|
|
240
331
|
for cls in value:
|
|
241
332
|
normalized = docutils.nodes.make_id(cls)
|
|
@@ -245,15 +336,20 @@ def validate_strip_class(setting, value, option_parser,
|
|
|
245
336
|
return value
|
|
246
337
|
|
|
247
338
|
|
|
248
|
-
def validate_smartquotes_locales(setting, value, option_parser,
|
|
339
|
+
def validate_smartquotes_locales(setting, value=None, option_parser=None,
|
|
249
340
|
config_parser=None, config_section=None):
|
|
250
341
|
"""Check/normalize a comma separated list of smart quote definitions.
|
|
251
342
|
|
|
252
|
-
Return a list of (language-tag, quotes) string tuples.
|
|
343
|
+
Return a list of (language-tag, quotes) string tuples.
|
|
253
344
|
|
|
345
|
+
All arguments except `value` are ignored
|
|
346
|
+
(kept for compatibility with "optparse" module).
|
|
347
|
+
If there is only one positional argument, it is interpreted as `value`.
|
|
348
|
+
"""
|
|
349
|
+
if value is None:
|
|
350
|
+
value = setting
|
|
254
351
|
# value is a comma separated string list:
|
|
255
|
-
value = validate_comma_separated_list(
|
|
256
|
-
config_parser, config_section)
|
|
352
|
+
value = validate_comma_separated_list(value)
|
|
257
353
|
# validate list elements
|
|
258
354
|
lc_quotes = []
|
|
259
355
|
for item in value:
|
|
@@ -289,19 +385,23 @@ def make_paths_absolute(pathdict, keys, base_path=None):
|
|
|
289
385
|
`OptionParser.relative_path_settings`.
|
|
290
386
|
"""
|
|
291
387
|
if base_path is None:
|
|
292
|
-
base_path =
|
|
388
|
+
base_path = Path.cwd()
|
|
389
|
+
else:
|
|
390
|
+
base_path = Path(base_path)
|
|
293
391
|
for key in keys:
|
|
294
392
|
if key in pathdict:
|
|
295
393
|
value = pathdict[key]
|
|
296
394
|
if isinstance(value, list):
|
|
297
|
-
value = [
|
|
298
|
-
for path in value]
|
|
395
|
+
value = [str((base_path/path).resolve()) for path in value]
|
|
299
396
|
elif value:
|
|
300
|
-
value =
|
|
397
|
+
value = str((base_path/value).resolve())
|
|
301
398
|
pathdict[key] = value
|
|
302
399
|
|
|
303
400
|
|
|
304
401
|
def make_one_path_absolute(base_path, path):
|
|
402
|
+
# deprecated, will be removed
|
|
403
|
+
warnings.warn('frontend.make_one_path_absolute() will be removed '
|
|
404
|
+
'in Docutils 0.23.', DeprecationWarning, stacklevel=2)
|
|
305
405
|
return os.path.abspath(os.path.join(base_path, path))
|
|
306
406
|
|
|
307
407
|
|
|
@@ -481,6 +581,10 @@ class OptionParser(optparse.OptionParser, docutils.SettingsSpec):
|
|
|
481
581
|
('Do not include a datestamp of any kind.',
|
|
482
582
|
['--no-datestamp'], {'action': 'store_const', 'const': None,
|
|
483
583
|
'dest': 'datestamp'}),
|
|
584
|
+
('Base directory for absolute paths when reading '
|
|
585
|
+
'from the local filesystem. Default "/".',
|
|
586
|
+
['--root-prefix'],
|
|
587
|
+
{'default': '/', 'metavar': '<path>'}),
|
|
484
588
|
('Include a "View document source" link.',
|
|
485
589
|
['--source-link', '-s'], {'action': 'store_true',
|
|
486
590
|
'validator': validate_boolean}),
|
|
@@ -502,7 +606,7 @@ class OptionParser(optparse.OptionParser, docutils.SettingsSpec):
|
|
|
502
606
|
{'dest': 'toc_backlinks', 'action': 'store_false'}),
|
|
503
607
|
('Link from footnotes/citations to references. (default)',
|
|
504
608
|
['--footnote-backlinks'],
|
|
505
|
-
{'action': 'store_true', 'default':
|
|
609
|
+
{'action': 'store_true', 'default': True,
|
|
506
610
|
'validator': validate_boolean}),
|
|
507
611
|
('Disable backlinks from footnotes and citations.',
|
|
508
612
|
['--no-footnote-backlinks'],
|
|
@@ -510,7 +614,7 @@ class OptionParser(optparse.OptionParser, docutils.SettingsSpec):
|
|
|
510
614
|
('Enable section numbering by Docutils. (default)',
|
|
511
615
|
['--section-numbering'],
|
|
512
616
|
{'action': 'store_true', 'dest': 'sectnum_xform',
|
|
513
|
-
'default':
|
|
617
|
+
'default': True, 'validator': validate_boolean}),
|
|
514
618
|
('Disable section numbering by Docutils.',
|
|
515
619
|
['--no-section-numbering'],
|
|
516
620
|
{'action': 'store_false', 'dest': 'sectnum_xform'}),
|
|
@@ -783,7 +887,10 @@ class OptionParser(optparse.OptionParser, docutils.SettingsSpec):
|
|
|
783
887
|
return source, destination
|
|
784
888
|
|
|
785
889
|
def set_defaults_from_dict(self, defaults):
|
|
786
|
-
#
|
|
890
|
+
# deprecated, will be removed
|
|
891
|
+
warnings.warn('OptionParser.set_defaults_from_dict() will be removed '
|
|
892
|
+
'in Docutils 0.22 or with the switch to ArgumentParser.',
|
|
893
|
+
DeprecationWarning, stacklevel=2)
|
|
787
894
|
self.defaults.update(defaults)
|
|
788
895
|
|
|
789
896
|
def get_default_values(self):
|
|
@@ -835,7 +942,7 @@ class ConfigParser(configparser.RawConfigParser):
|
|
|
835
942
|
old_warning = (
|
|
836
943
|
'The "[option]" section is deprecated.\n'
|
|
837
944
|
'Support for old-format configuration files will be removed in '
|
|
838
|
-
'Docutils
|
|
945
|
+
'Docutils 2.0. Please revise your configuration files. '
|
|
839
946
|
'See <https://docutils.sourceforge.io/docs/user/config.html>, '
|
|
840
947
|
'section "Old-Format Configuration Files".')
|
|
841
948
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# $Id: io.py
|
|
1
|
+
# $Id: io.py 9427 2023-07-07 06:50:09Z milde $
|
|
2
2
|
# Author: David Goodger <goodger@python.org>
|
|
3
3
|
# Copyright: This module has been placed in the public domain.
|
|
4
4
|
|
|
@@ -32,14 +32,6 @@ try:
|
|
|
32
32
|
_locale_encoding = (locale.getlocale()[1]
|
|
33
33
|
or locale.getdefaultlocale()[1])
|
|
34
34
|
_locale_encoding = _locale_encoding.lower()
|
|
35
|
-
except ValueError as error: # OS X may set UTF-8 without language code
|
|
36
|
-
# See https://bugs.python.org/issue18378 fixed in 3.8
|
|
37
|
-
# and https://sourceforge.net/p/docutils/bugs/298/.
|
|
38
|
-
# Drop the special case after requiring Python >= 3.8
|
|
39
|
-
if "unknown locale: UTF-8" in error.args:
|
|
40
|
-
_locale_encoding = "utf-8"
|
|
41
|
-
else:
|
|
42
|
-
_locale_encoding = None
|
|
43
35
|
except: # noqa any other problems determining the locale -> use None
|
|
44
36
|
_locale_encoding = None
|
|
45
37
|
try:
|
|
@@ -125,24 +117,15 @@ class Input(TransformSpec):
|
|
|
125
117
|
Return Unicode `str` instances unchanged (nothing to decode).
|
|
126
118
|
|
|
127
119
|
If `self.encoding` is None, determine encoding from data
|
|
128
|
-
or try UTF-8
|
|
129
|
-
The client application should call ``locale.setlocale`` at the
|
|
120
|
+
or try UTF-8 and the locale's preferred encoding.
|
|
121
|
+
The client application should call ``locale.setlocale()`` at the
|
|
130
122
|
beginning of processing::
|
|
131
123
|
|
|
132
124
|
locale.setlocale(locale.LC_ALL, '')
|
|
133
125
|
|
|
134
126
|
Raise UnicodeError if unsuccessful.
|
|
135
127
|
|
|
136
|
-
Provisional:
|
|
137
|
-
- Raise UnicodeError (instead of falling back to the locale
|
|
138
|
-
encoding) if decoding the source with the default encoding (UTF-8)
|
|
139
|
-
fails and Python is started in `UTF-8 mode`.
|
|
140
|
-
|
|
141
|
-
Raise UnicodeError (instead of falling back to "latin1") if both,
|
|
142
|
-
default and locale encoding, fail.
|
|
143
|
-
|
|
144
|
-
- Only remove BOM (U+FEFF ZWNBSP at start of data),
|
|
145
|
-
no other ZWNBSPs.
|
|
128
|
+
Provisional: encoding detection will be removed in Docutils 1.0.
|
|
146
129
|
"""
|
|
147
130
|
if self.encoding and self.encoding.lower() == 'unicode':
|
|
148
131
|
assert isinstance(data, str), ('input encoding is "unicode" '
|
|
@@ -157,29 +140,22 @@ class Input(TransformSpec):
|
|
|
157
140
|
else:
|
|
158
141
|
data_encoding = self.determine_encoding_from_data(data)
|
|
159
142
|
if data_encoding:
|
|
160
|
-
#
|
|
161
|
-
# we believe it.
|
|
143
|
+
# `data` declares its encoding with "magic comment" or BOM,
|
|
162
144
|
encoding_candidates = [data_encoding]
|
|
163
145
|
else:
|
|
164
|
-
# Apply heuristics
|
|
165
|
-
#
|
|
146
|
+
# Apply heuristics if the encoding is not specified.
|
|
147
|
+
# Start with UTF-8, because that only matches
|
|
166
148
|
# data that *IS* UTF-8:
|
|
167
149
|
encoding_candidates = ['utf-8']
|
|
168
|
-
#
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
encoding_candidates.append(_locale_encoding)
|
|
173
|
-
# TODO: don't fall back to 'latin-1' (API change).
|
|
174
|
-
encoding_candidates.append('latin-1')
|
|
150
|
+
# If UTF-8 fails, fall back to the locale's preferred encoding:
|
|
151
|
+
fallback = locale.getpreferredencoding(do_setlocale=False)
|
|
152
|
+
if fallback and fallback.lower() != 'utf-8':
|
|
153
|
+
encoding_candidates.append(fallback)
|
|
175
154
|
for enc in encoding_candidates:
|
|
176
155
|
try:
|
|
177
156
|
decoded = str(data, enc, self.error_handler)
|
|
178
157
|
self.successful_encoding = enc
|
|
179
|
-
|
|
180
|
-
# TODO: only remove BOM (ZWNBSP at start of data)
|
|
181
|
-
# and only if 'self.encoding' is None. (API change)
|
|
182
|
-
return decoded.replace('\ufeff', '')
|
|
158
|
+
return decoded
|
|
183
159
|
except (UnicodeError, LookupError) as err:
|
|
184
160
|
# keep exception instance for use outside of the "for" loop.
|
|
185
161
|
error = err
|
|
@@ -191,9 +167,12 @@ class Input(TransformSpec):
|
|
|
191
167
|
coding_slug = re.compile(br"coding[:=]\s*([-\w.]+)")
|
|
192
168
|
"""Encoding declaration pattern."""
|
|
193
169
|
|
|
194
|
-
byte_order_marks = ((codecs.
|
|
195
|
-
(codecs.
|
|
196
|
-
(codecs.
|
|
170
|
+
byte_order_marks = ((codecs.BOM_UTF32_BE, 'utf-32'),
|
|
171
|
+
(codecs.BOM_UTF32_LE, 'utf-32'),
|
|
172
|
+
(codecs.BOM_UTF8, 'utf-8-sig'),
|
|
173
|
+
(codecs.BOM_UTF16_BE, 'utf-16'),
|
|
174
|
+
(codecs.BOM_UTF16_LE, 'utf-16'),
|
|
175
|
+
)
|
|
197
176
|
"""Sequence of (start_bytes, encoding) tuples for encoding detection.
|
|
198
177
|
The first bytes of input data are checked against the start_bytes strings.
|
|
199
178
|
A match indicates the given encoding."""
|
|
@@ -384,7 +363,7 @@ class FileInput(Input):
|
|
|
384
363
|
:Parameters:
|
|
385
364
|
- `source`: either a file-like object (which is read directly), or
|
|
386
365
|
`None` (which implies `sys.stdin` if no `source_path` given).
|
|
387
|
-
- `source_path`: a path to a file, which is opened
|
|
366
|
+
- `source_path`: a path to a file, which is opened for reading.
|
|
388
367
|
- `encoding`: the expected text encoding of the input file.
|
|
389
368
|
- `error_handler`: the encoding error handler to use.
|
|
390
369
|
- `autoclose`: close automatically after read (except when
|
|
@@ -400,7 +379,7 @@ class FileInput(Input):
|
|
|
400
379
|
if source_path:
|
|
401
380
|
try:
|
|
402
381
|
self.source = open(source_path, mode,
|
|
403
|
-
encoding=self.encoding
|
|
382
|
+
encoding=self.encoding,
|
|
404
383
|
errors=self.error_handler)
|
|
405
384
|
except OSError as error:
|
|
406
385
|
raise InputError(error.errno, error.strerror, source_path)
|
|
@@ -419,32 +398,26 @@ class FileInput(Input):
|
|
|
419
398
|
|
|
420
399
|
def read(self):
|
|
421
400
|
"""
|
|
422
|
-
Read and decode a single file
|
|
401
|
+
Read and decode a single file, return as `str`.
|
|
423
402
|
"""
|
|
424
403
|
try:
|
|
425
|
-
if self.
|
|
426
|
-
# read as binary data
|
|
404
|
+
if not self.encoding and hasattr(self.source, 'buffer'):
|
|
405
|
+
# read as binary data
|
|
427
406
|
data = self.source.buffer.read()
|
|
407
|
+
# decode with heuristics
|
|
408
|
+
data = self.decode(data)
|
|
409
|
+
# normalize newlines
|
|
410
|
+
data = '\n'.join(data.splitlines()+[''])
|
|
428
411
|
else:
|
|
429
412
|
data = self.source.read()
|
|
430
|
-
except (UnicodeError, LookupError):
|
|
431
|
-
if not self.encoding and self.source_path:
|
|
432
|
-
# re-read in binary mode and decode with heuristics
|
|
433
|
-
b_source = open(self.source_path, 'rb')
|
|
434
|
-
data = b_source.read()
|
|
435
|
-
b_source.close()
|
|
436
|
-
else:
|
|
437
|
-
raise
|
|
438
413
|
finally:
|
|
439
414
|
if self.autoclose:
|
|
440
415
|
self.close()
|
|
441
|
-
|
|
442
|
-
# normalise newlines
|
|
443
|
-
return '\n'.join(data.splitlines()+[''])
|
|
416
|
+
return data
|
|
444
417
|
|
|
445
418
|
def readlines(self):
|
|
446
419
|
"""
|
|
447
|
-
Return lines of a single file as list of
|
|
420
|
+
Return lines of a single file as list of strings.
|
|
448
421
|
"""
|
|
449
422
|
return self.read().splitlines(True)
|
|
450
423
|
|