diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-03-10 00:33:35 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-03-10 00:33:35 (GMT) |
commit | c38f89146d801c4c4834b8b010f06fb9de2cc859 (patch) | |
tree | bd4b0d33277283bd34c54f7ac0646c82e1b78e66 /Doc | |
parent | 98a6738dca4027800291ddeb1f314bc3fec391de (diff) | |
download | cpython-c38f89146d801c4c4834b8b010f06fb9de2cc859.zip cpython-c38f89146d801c4c4834b8b010f06fb9de2cc859.tar.gz cpython-c38f89146d801c4c4834b8b010f06fb9de2cc859.tar.bz2 |
whatsnew: 'U' mode deprecation (#15204).
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/whatsnew/3.4.rst | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index d26cee6..4a65b89 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -1948,6 +1948,11 @@ Deprecations in the Python API * The :mod:`sysconfig` key ``SO`` is deprecated, it has been replaced by ``EXT_SUFFIX``. +* The ``U`` mode accepted by various ``open`` functions is deprecated. + In Python3 it does not do anything useful, and should be replaced by + appropriate uses of :class:`io.TextIOWrapper` (if needed) and its *newline* + argument. + Deprecations in the C API ------------------------- @@ -2242,7 +2247,14 @@ Changes in the Python API * Since the *digestmod* argument to the :func:`hmac.new` function will in the future have no default, all calls to :func:`hmac.new` should be changed to - explicitly specify a *digestmod*. (:issue:`17276`). + explicitly specify a *digestmod* (:issue:`17276`). + +* Any calls to ``open`` functions that specify ``U`` should be modified. + ``U`` is ineffective in Python3 and will eventually raise an error if used. + Depending on the function, the equivalent of its old Python2 behavior can be + achieved using either a *newline* argument, or if necessary by wrapping the + stream in :mod:`~io.TextIOWrapper` to use its *newline* argument + (:issue:`15204`). Changes in the C API |