<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/docutils.git/docutils/io.py, branch docutils-0.19</title>
<subtitle>svn.code.sf.net: p/docutils/code
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/'/>
<entry>
<title>Document planned changes to input encoding handling.</title>
<updated>2022-07-04T21:06:49+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-07-04T21:06:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=d1980081db129030b48077124b5f7276e8a850e9'/>
<id>d1980081db129030b48077124b5f7276e8a850e9</id>
<content type='text'>
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9100 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9100 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix handling of UTF-16 encoded source without trailing newline.</title>
<updated>2022-07-04T21:06:38+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-07-04T21:06:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=350808ec2c71144c51d0b2219edd9d889d3d2cf7'/>
<id>350808ec2c71144c51d0b2219edd9d889d3d2cf7</id>
<content type='text'>
Decoding a UTF-16 encoded source with BOM after auto-detection of the
encoding failed.
The newline normalization in `docutils.FileInput.read()`
produced invalid UTF-16 because it added one byte
(binary ASCII newline).

Postponing the newline normalization after the decoding step solves
this problem.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9099 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Decoding a UTF-16 encoded source with BOM after auto-detection of the
encoding failed.
The newline normalization in `docutils.FileInput.read()`
produced invalid UTF-16 because it added one byte
(binary ASCII newline).

Postponing the newline normalization after the decoding step solves
this problem.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9099 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't use on Pythons default encoding if "input_encoding" setting is None.</title>
<updated>2022-07-04T21:06:30+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-07-04T21:06:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=5d9022ac0e6215adb53f462e9ef89998106f22fb'/>
<id>5d9022ac0e6215adb53f462e9ef89998106f22fb</id>
<content type='text'>
If the "input_encoding" setting is None, the encoding of an
input source should be auto-detected with a heuristic.

Under Python 3, auto-detection was only used if reading a file
with Python's default encoding failed.

Resulting problems:

* EncodingWarning (PEP 597) in Python &gt;= 3.10.

* Optional BOM not dropped from utf-8 encoded files.

* If the usrers locale sets an 8-bit encoding,
  files in other 8-bit encodings, UTF-8, and UTF-16 show
  character mix-up (mojibake) (self-declared encoding ignored as
  reading in 8-bit encoding does not lead to errors).

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9098 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the "input_encoding" setting is None, the encoding of an
input source should be auto-detected with a heuristic.

Under Python 3, auto-detection was only used if reading a file
with Python's default encoding failed.

Resulting problems:

* EncodingWarning (PEP 597) in Python &gt;= 3.10.

* Optional BOM not dropped from utf-8 encoded files.

* If the usrers locale sets an 8-bit encoding,
  files in other 8-bit encodings, UTF-8, and UTF-16 show
  character mix-up (mojibake) (self-declared encoding ignored as
  reading in 8-bit encoding does not lead to errors).

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9098 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor code cleanup in `docutils.io`.</title>
<updated>2022-06-22T09:54:13+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-06-22T09:54:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=a037929c1fde2ebe150a12ddb15911a8e82fbca8'/>
<id>a037929c1fde2ebe150a12ddb15911a8e82fbca8</id>
<content type='text'>
Fix/expand a docstring.
Disambiguate local variable name "encodings".
Use f-string instead of %-replacements.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9093 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix/expand a docstring.
Disambiguate local variable name "encodings".
Use f-string instead of %-replacements.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9093 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `io.locale_encoding` to mark it as internal.</title>
<updated>2022-06-17T11:31:40+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-06-17T11:31:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=07131b161d36c3c0a01ef27d64dd88d613dc8dc3'/>
<id>07131b161d36c3c0a01ef27d64dd88d613dc8dc3</id>
<content type='text'>
The attribute was moved to "io" after the last release.
Backwards compatibility is ensured via `locale_encoding`
in the (deprecated) "utils.error_reporting" module.

Fix HISTORY entries.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9078 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The attribute was moved to "io" after the last release.
Backwards compatibility is ensured via `locale_encoding`
in the (deprecated) "utils.error_reporting" module.

Fix HISTORY entries.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9078 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix [r9074]: ensure backwards-compatible value for `io.locale_encoding`.</title>
<updated>2022-06-17T11:31:09+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-06-17T11:31:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=e7493aaff762379b0e83d743ab662a9842bc2165'/>
<id>e7493aaff762379b0e83d743ab662a9842bc2165</id>
<content type='text'>
`locale.getpreferredencoding()` returns 'utf-8' if Python is
started with the ``-X UTF-8`` option.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9075 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`locale.getpreferredencoding()` returns 'utf-8' if Python is
started with the ``-X UTF-8`` option.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9075 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure locale_encoding is lower case.</title>
<updated>2022-06-15T15:28:35+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-06-15T15:28:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=3e4016cf8c89b2a46e40a9aad8e781afafa06c45'/>
<id>3e4016cf8c89b2a46e40a9aad8e781afafa06c45</id>
<content type='text'>
Use `locale.getpreferredencoding(False)` since we dropped support
for older Python versions with side-effects.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9074 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `locale.getpreferredencoding(False)` since we dropped support
for older Python versions with side-effects.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9074 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Postpone deprecations to Docutils 2.0</title>
<updated>2022-05-30T21:09:09+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-05-30T21:09:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=b30e3ef5acc92de1eab6c6c10e8fdcfed82d8bef'/>
<id>b30e3ef5acc92de1eab6c6c10e8fdcfed82d8bef</id>
<content type='text'>
Starting in 1.0, we want to move to "semantic versioning":
no incompatible API changes in "minor" releases.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9062 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Starting in 1.0, we want to move to "semantic versioning":
no incompatible API changes in "minor" releases.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9062 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>core.Publisher.publish(): Prompt when waiting for input from a terminal.</title>
<updated>2022-03-11T12:09:16+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-03-11T12:09:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=e792aa98d868891ca36e4f9501ec4a9345d56ea5'/>
<id>e792aa98d868891ca36e4f9501ec4a9345d56ea5</id>
<content type='text'>
When front-end tools are used without arguments,
Docutils reads from stdin.

Currently, when a user calls a front-end without arguments,
there is no response until the user presses Ctrl-D (Ctrl-Z on Windows)
or aborts with Ctrl-C.

This commit changes the behaviour to tell the user what the front-end
expects and where to get more help.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9043 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When front-end tools are used without arguments,
Docutils reads from stdin.

Currently, when a user calls a front-end without arguments,
there is no response until the user presses Ctrl-D (Ctrl-Z on Windows)
or aborts with Ctrl-C.

This commit changes the behaviour to tell the user what the front-end
expects and where to get more help.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9043 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused local variables</title>
<updated>2022-03-05T23:31:46+00:00</updated>
<author>
<name>milde</name>
<email>milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04</email>
</author>
<published>2022-03-05T23:31:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/docutils.git/commit/?id=0a5d3c15d4d32783bd4dd6e0e87c2121b0a2f7fb'/>
<id>0a5d3c15d4d32783bd4dd6e0e87c2121b0a2f7fb</id>
<content type='text'>
flake rule F841: local variable 'foo' is assigned to but never used

In test_odt.py, a no-op class definition is removed completely.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9038 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
flake rule F841: local variable 'foo' is assigned to but never used

In test_odt.py, a no-op class definition is removed completely.

git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9038 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
</pre>
</div>
</content>
</entry>
</feed>
