Pelokalan
Python ID
id en
Masuk
Proyek
whatsnew__3-8.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
Added :meth:`!pathlib.Path.link_to` which creates a hard link pointing to a path. (Contributed by Joannah Nanjekye in :issue:`26978`) Note that ``link_to`` was deprecated in 3.10 and removed in 3.12 in favor of a ``hardlink_to`` method added in 3.10 which matches the semantics of the existing ``symlink_to`` method.
Deprecated
Usang
The distutils ``bdist_wininst`` command is now deprecated, use ``bdist_wheel`` (wheel packages) instead. (Contributed by Victor Stinner in :issue:`37481`.)
Deprecated methods ``getchildren()`` and ``getiterator()`` in the :mod:`~xml.etree.ElementTree` module now emit a :exc:`DeprecationWarning` instead of :exc:`PendingDeprecationWarning`. They will be removed in Python 3.9. (Contributed by Serhiy Storchaka in :issue:`29209`.)
Passing an object that is not an instance of :class:`concurrent.futures.ThreadPoolExecutor` to :meth:`loop.set_default_executor() <asyncio.loop.set_default_executor>` is deprecated and will be prohibited in Python 3.9. (Contributed by Elvis Pranskevichus in :issue:`34075`.)
The :meth:`~object.__getitem__` methods of :class:`xml.dom.pulldom.DOMEventStream`, :class:`wsgiref.util.FileWrapper` and :class:`fileinput.FileInput` have been deprecated.
The :class:`typing.NamedTuple` class has deprecated the ``_field_types`` attribute in favor of the ``__annotations__`` attribute which has the same information. (Contributed by Raymond Hettinger in :issue:`36320`.)
:mod:`ast` classes ``Num``, ``Str``, ``Bytes``, ``NameConstant`` and ``Ellipsis`` are considered deprecated and will be removed in future Python versions. :class:`~ast.Constant` should be used instead. (Contributed by Serhiy Storchaka in :issue:`32892`.)
:class:`ast.NodeVisitor` methods ``visit_Num()``, ``visit_Str()``, ``visit_Bytes()``, ``visit_NameConstant()`` and ``visit_Ellipsis()`` are deprecated now and will not be called in future Python versions. Add the :meth:`~ast.NodeVisitor.visit_Constant` method to handle all constant nodes. (Contributed by Serhiy Storchaka in :issue:`36917`.)
The :deco:`!asyncio.coroutine` :term:`decorator` is deprecated and will be removed in version 3.10. Instead of ``@asyncio.coroutine``, use :keyword:`async def` instead. (Contributed by Andrew Svetlov in :issue:`36921`.)
In :mod:`asyncio`, the explicit passing of a *loop* argument has been deprecated and will be removed in version 3.10 for the following: :func:`asyncio.sleep`, :func:`asyncio.gather`, :func:`asyncio.shield`, :func:`asyncio.wait_for`, :func:`asyncio.wait`, :func:`asyncio.as_completed`, :class:`asyncio.Task`, :class:`asyncio.Lock`, :class:`asyncio.Event`, :class:`asyncio.Condition`, :class:`asyncio.Semaphore`, :class:`asyncio.BoundedSemaphore`, :class:`asyncio.Queue`, :func:`asyncio.create_subprocess_exec`, and :func:`asyncio.create_subprocess_shell`.
The explicit passing of coroutine objects to :func:`asyncio.wait` has been deprecated and will be removed in version 3.11. (Contributed by Yury Selivanov in :issue:`34790`.)
The following functions and methods are deprecated in the :mod:`gettext` module: :func:`!lgettext`, :func:`!ldgettext`, :func:`!lngettext` and :func:`!ldngettext`. They return encoded bytes, and it's possible that you will get unexpected Unicode-related exceptions if there are encoding problems with the translated strings. It's much better to use alternatives which return Unicode strings in Python 3. These functions have been broken for a long time.
Function :func:`!bind_textdomain_codeset`, methods :meth:`!NullTranslations.output_charset` and :meth:`!NullTranslations.set_output_charset`, and the *codeset* parameter of functions :func:`~gettext.translation` and :func:`~gettext.install` are also deprecated, since they are only used for the ``l*gettext()`` functions. (Contributed by Serhiy Storchaka in :issue:`33710`.)
The :meth:`!isAlive` method of :class:`threading.Thread` has been deprecated. (Contributed by Donghee Na in :issue:`35283`.)
Deprecated passing the following arguments as keyword arguments:
Starting with Python 3.3, importing ABCs from :mod:`collections` was deprecated, and importing should be done from :mod:`collections.abc`. Being able to import from collections was marked for removal in 3.8, but has been delayed to 3.9. (See :gh:`81134`.)
The :mod:`!macpath` module, deprecated in Python 3.7, has been removed. (Contributed by Victor Stinner in :issue:`35471`.)
The function :func:`!platform.popen` has been removed, after having been deprecated since Python 3.3: use :func:`os.popen` instead. (Contributed by Victor Stinner in :issue:`35345`.)
The function :func:`!time.clock` has been removed, after having been deprecated since Python 3.3: use :func:`time.perf_counter` or :func:`time.process_time` instead, depending on your requirements, to have well-defined behavior. (Contributed by Matthias Bussonnier in :issue:`36895`.)
``parse_qs``, ``parse_qsl``, and ``escape`` are removed from the :mod:`!cgi` module. They are deprecated in Python 3.2 or older. They should be imported from the ``urllib.parse`` and ``html`` modules instead.
``filemode`` function is removed from the :mod:`tarfile` module. It is not documented and deprecated since Python 3.3.
The :class:`~xml.etree.ElementTree.XMLParser` constructor no longer accepts the *html* argument. It never had an effect and was deprecated in Python 3.4. All other parameters are now :ref:`keyword-only <keyword-only_parameter>`. (Contributed by Serhiy Storchaka in :issue:`29209`.)
The ``bufsize`` keyword argument of :func:`fileinput.input` and :func:`fileinput.FileInput` which was ignored and deprecated since Python 3.6 has been removed. :issue:`36952` (Contributed by Matthias Bussonnier.)
The functions :func:`!sys.set_coroutine_wrapper` and :func:`!sys.get_coroutine_wrapper` deprecated in Python 3.7 have been removed; :issue:`36933` (Contributed by Matthias Bussonnier.)
The :func:`os.getcwdb` function now uses the UTF-8 encoding on Windows, rather than the ANSI code page: see :pep:`529` for the rationale. The function is no longer deprecated on Windows. (Contributed by Victor Stinner in :issue:`37412`.)
The :meth:`~tkinter.ttk.Treeview.selection` method of the :class:`tkinter.ttk.Treeview` class no longer takes arguments. Using it with arguments for changing the selection was deprecated in Python 3.6. Use specialized methods like :meth:`~tkinter.ttk.Treeview.selection_set` for changing the selection. (Contributed by Serhiy Storchaka in :issue:`31508`.)
The :c:macro:`Py_DEPRECATED()` macro has been implemented for MSVC. The macro now must be placed before the symbol name.
Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);