Teks sumber — English
Terjemahan — Bahasa Indonesia
:deco:`abc.abstractproperty` has been deprecated, use :deco:`property` with :deco:`abc.abstractmethod` instead.
:deco:`abc.abstractclassmethod` has been deprecated, use :deco:`classmethod` with :deco:`abc.abstractmethod` instead.
:deco:`abc.abstractstaticmethod` has been deprecated, use :deco:`staticmethod` with :deco:`abc.abstractmethod` instead.
The ``unicode_internal`` codec has been deprecated.
:class:`~contextlib.ExitStack` now provides a solid foundation for programmatic manipulation of context managers and similar cleanup functionality. Unlike the previous ``contextlib.nested`` API (which was deprecated and removed), the new API is designed to work correctly regardless of whether context managers acquire their resources in their ``__init__`` method (for example, file objects) or in their ``__enter__`` method (for example, synchronisation objects from the :mod:`threading` module).
The ``watchexp`` parameter in the :meth:`~decimal.Decimal.quantize` method is deprecated.
:class:`html.parser.HTMLParser` is now able to parse broken markup without raising errors, therefore the *strict* argument of the constructor and the :exc:`!HTMLParseError` exception are now deprecated. The ability to parse broken markup is the result of a number of bug fixes that are also available on the latest bug fix releases of Python 2.7/3.2. (Contributed by Ezio Melotti in :issue:`15114`, and :issue:`14538`, :issue:`13993`, :issue:`13960`, :issue:`13358`, :issue:`1745761`, :issue:`755670`, :issue:`13357`, :issue:`12629`, :issue:`1200313`, :issue:`670664`, :issue:`13273`, :issue:`12888`, :issue:`7311`.)
The Tk GUI and the :func:`!serve` function have been removed from the :mod:`pydoc` module: ``pydoc -g`` and :func:`!serve` have been deprecated in Python 3.2.
The :mod:`xml.etree.ElementTree` module now imports its C accelerator by default; there is no longer a need to explicitly import :mod:`!xml.etree.cElementTree` (this module stays for backwards compatibility, but is now deprecated). In addition, the ``iter`` family of methods of :class:`~xml.etree.ElementTree.Element` has been optimized (rewritten in C). The module's documentation has also been greatly improved with added examples and a more detailed reference.
Deprecated
Usang
OSF support, which was deprecated in 3.2, has been completely removed.
Deprecated Python modules, functions and methods
Passing a non-empty string to ``object.__format__()`` is deprecated, and will produce a :exc:`TypeError` in Python 3.4 (:issue:`9856`).
The ``unicode_internal`` codec has been deprecated because of the :pep:`393`, use UTF-8, UTF-16 (``utf-16-le`` or ``utf-16-be``), or UTF-32 (``utf-32-le`` or ``utf-32-be``)
:issue:`13374`: The Windows bytes API has been deprecated in the :mod:`os` module. Use Unicode filenames, instead of bytes filenames, to not depend on the ANSI code page anymore and to support any filename.
:issue:`13988`: The :mod:`!xml.etree.cElementTree` module is deprecated. The accelerator is used automatically whenever available.
The :func:`!os.stat_float_times` function is deprecated.
:meth:`importlib.abc.SourceLoader.path_mtime` is now deprecated in favour of :meth:`importlib.abc.SourceLoader.path_stats` as bytecode files now store both the modification time and size of the source file the bytecode file was compiled from.
Deprecated functions and types of the C API
The :c:type:`Py_UNICODE` has been deprecated by :pep:`393` and will be removed in Python 4. All functions using this type are deprecated:
Deprecated features
The :mod:`array` module's ``'u'`` format code is now deprecated and will be removed in Python 4 together with the rest of the (:c:type:`Py_UNICODE`) API.
:mod:`pkgutil` has been converted to use :mod:`importlib` internally. This eliminates many edge cases where the old behaviour of the :pep:`302` import emulation failed to match the behaviour of the real import system. The import emulation itself is still present, but is now deprecated. The :func:`pkgutil.iter_importers` and :func:`pkgutil.walk_packages` functions special case the standard import hooks so they are still supported even though they do not provide the non-standard ``iter_modules()`` method.
The ``strict`` argument to :class:`email.parser.Parser`, deprecated since Python 2.4, has finally been removed.
The deprecated method ``unittest.TestCase.assertSameElements`` has been removed.
The deprecated variable ``time.accept2dyear`` has been removed.
The deprecated ``Context._clamp`` attribute has been removed from the :mod:`decimal` module. It was previously replaced by the public attribute :attr:`~decimal.Context.clamp`. (See :issue:`8540`.)
Due to :ref:`PEP 393 <pep-393>`, the :c:type:`Py_UNICODE` type and all functions using this type are deprecated (but will stay available for at least five years). If you were using low-level Unicode APIs to construct and access unicode objects and you want to benefit of the memory footprint reduction provided by :pep:`393`, you have to convert your code to the new :doc:`Unicode API <../c-api/unicode>`.