|
From: <mi...@us...> - 2015-03-15 17:16:32
|
Revision: 7837
http://sourceforge.net/p/docutils/code/7837
Author: milde
Date: 2015-03-15 17:16:30 +0000 (Sun, 15 Mar 2015)
Log Message:
-----------
Remove deprecated features (long announced in RELEASE NOTES).
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/RELEASE-NOTES.txt
trunk/docutils/docutils/io.py
trunk/docutils/docutils/writers/latex2e/__init__.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2015-03-15 17:13:56 UTC (rev 7836)
+++ trunk/docutils/HISTORY.txt 2015-03-15 17:16:30 UTC (rev 7837)
@@ -16,6 +16,10 @@
Changes Since 0.12
==================
+* docutils/io.py
+
+ - removed the `handle_io_errors` option from io.FileInput/Output.
+
* docutils/nodes.py
- Fix [ 253 ] Attribute key without value not allowed in XML.
@@ -59,6 +63,9 @@
- use absolute path for ``default_template_path``.
+ - removed deprecated options ``--use-latex-footnotes`` and
+ ``--figure-footnotes``.
+
* docutils/writers/odf_odt/__init__.py
- remove decode.encode of filename stored in zip.
Modified: trunk/docutils/RELEASE-NOTES.txt
===================================================================
--- trunk/docutils/RELEASE-NOTES.txt 2015-03-15 17:13:56 UTC (rev 7836)
+++ trunk/docutils/RELEASE-NOTES.txt 2015-03-15 17:16:30 UTC (rev 7837)
@@ -20,13 +20,6 @@
Future changes
==============
-* remove the `handle_io_errors` option from io.FileInput/Output.
-
-* remove deprecated options from the latex2e writer:
-
- --use-latex-footnotes Alias for --docutils-footnotes (deprecated)
- --figure-footnotes Use figure floats for footnote text (deprecated)
-
* »Prune« the doctree (no change to the reST input syntax):
- "doctest" element -> literal block with "pycon" (python-console)
Modified: trunk/docutils/docutils/io.py
===================================================================
--- trunk/docutils/docutils/io.py 2015-03-15 17:13:56 UTC (rev 7836)
+++ trunk/docutils/docutils/io.py 2015-03-15 17:16:30 UTC (rev 7837)
@@ -204,7 +204,7 @@
"""
def __init__(self, source=None, source_path=None,
encoding=None, error_handler='strict',
- autoclose=True, handle_io_errors=None, mode='rU'):
+ autoclose=True, mode='rU'):
"""
:Parameters:
- `source`: either a file-like object (which is read directly), or
@@ -214,7 +214,6 @@
- `error_handler`: the encoding error handler to use.
- `autoclose`: close automatically after read (except when
`sys.stdin` is the source).
- - `handle_io_errors`: ignored, deprecated, will be removed.
- `mode`: how the file is to be opened (see standard function
`open`). The default 'rU' provides universal newline support
for text files.
@@ -303,7 +302,7 @@
def __init__(self, destination=None, destination_path=None,
encoding=None, error_handler='strict', autoclose=True,
- handle_io_errors=None, mode=None):
+ mode=None):
"""
:Parameters:
- `destination`: either a file-like object (which is written
@@ -315,7 +314,6 @@
- `error_handler`: the encoding error handler to use.
- `autoclose`: close automatically after write (except when
`sys.stdout` or `sys.stderr` is the destination).
- - `handle_io_errors`: ignored, deprecated, will be removed.
- `mode`: how the file is to be opened (see standard function
`open`). The default is 'w', providing universal newline
support for text files.
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2015-03-15 17:13:56 UTC (rev 7836)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2015-03-15 17:16:30 UTC (rev 7837)
@@ -54,14 +54,6 @@
['--docutils-footnotes'],
{'default': True, 'action': 'store_true',
'validator': frontend.validate_boolean}),
- ('Alias for --docutils-footnotes (deprecated)',
- ['--use-latex-footnotes'],
- {'action': 'store_true',
- 'validator': frontend.validate_boolean}),
- ('Use figure floats for footnote text (deprecated)',
- ['--figure-footnotes'],
- {'action': 'store_true',
- 'validator': frontend.validate_boolean}),
('Format for footnote references: one of "superscript" or '
'"brackets". Default is "superscript".',
['--footnote-references'],
@@ -546,17 +538,6 @@
\endgroup%
}"""
-PreambleCmds.footnote_floats = r"""% settings for footnotes as floats:
-\setlength{\floatsep}{0.5em}
-\setlength{\textfloatsep}{\fill}
-\addtolength{\textfloatsep}{3em}
-\renewcommand{\textfraction}{0.5}
-\renewcommand{\topfraction}{0.5}
-\renewcommand{\bottomfraction}{0.5}
-\setcounter{totalnumber}{50}
-\setcounter{topnumber}{50}
-\setcounter{bottomnumber}{50}"""
-
PreambleCmds.graphicx_auto = r"""% Check output format
\ifx\pdftexversion\undefined
\usepackage{graphicx}
@@ -1204,16 +1185,6 @@
self.settings.graphicx_option)
# footnotes:
self.docutils_footnotes = settings.docutils_footnotes
- if settings.use_latex_footnotes:
- self.docutils_footnotes = True
- self.warn('`use_latex_footnotes` is deprecated. '
- 'The setting has been renamed to `docutils_footnotes` '
- 'and the alias will be removed in a future version.')
- self.figure_footnotes = settings.figure_footnotes
- if self.figure_footnotes:
- self.docutils_footnotes = True
- self.warn('The "figure footnotes" workaround/setting is strongly '
- 'deprecated and will be removed in a future version.')
# Output collection stacks
# ~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2165,13 +2136,7 @@
backref = node['backrefs'][0]
except IndexError:
backref = node['ids'][0] # no backref, use self-ref instead
- if self.settings.figure_footnotes:
- self.requirements['~fnt_floats'] = PreambleCmds.footnote_floats
- self.out.append('\\begin{figure}[b]')
- self.append_hypertargets(node)
- if node.get('id') == node.get('name'): # explicite label
- self.out += self.ids_to_labels(node)
- elif self.docutils_footnotes:
+ if self.docutils_footnotes:
self.fallbacks['footnotes'] = PreambleCmds.footnotes
num,text = node.astext().split(None,1)
if self.settings.footnote_references == 'brackets':
@@ -2185,10 +2150,7 @@
## else: # TODO: "real" LaTeX \footnote{}s
def depart_footnote(self, node):
- if self.figure_footnotes:
- self.out.append('\\end{figure}\n')
- else:
- self.out.append('}\n')
+ self.out.append('}\n')
def visit_footnote_reference(self, node):
href = ''
@@ -2223,12 +2185,7 @@
# footnote/citation label
def label_delim(self, node, bracket, superscript):
if isinstance(node.parent, nodes.footnote):
- if not self.figure_footnotes:
- raise nodes.SkipNode
- if self.settings.footnote_references == 'brackets':
- self.out.append(bracket)
- else:
- self.out.append(superscript)
+ raise nodes.SkipNode
else:
assert isinstance(node.parent, nodes.citation)
if not self._use_latex_citations:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|