Pelokalan
Python ID
id en
Masuk
Proyek
whatsnew__3-9.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
In Python 3.10, the old parser will be deleted and so will all functionality that depends on it (primarily the :mod:`!parser` module, which has long been deprecated). In Python 3.9 *only*, you can switch back to the LL(1) parser using a command line switch (``-X oldparser``) or an environment variable (``PYTHONOLDPARSER=1``).
Deprecated
Usang
The distutils ``bdist_msi`` command is now deprecated, use ``bdist_wheel`` (wheel packages) instead. (Contributed by Hugo van Kemenade in :issue:`39586`.)
Currently :func:`math.factorial` accepts :class:`float` instances with non-negative integer values (like ``5.0``). It raises a :exc:`ValueError` for non-integral and negative floats. It is now deprecated. In future Python versions it will raise a :exc:`TypeError` for all floats. (Contributed by Serhiy Storchaka in :issue:`37315`.)
The :mod:`!parser` and :mod:`!symbol` modules are deprecated and will be removed in future versions of Python. For the majority of use cases, users can leverage the Abstract Syntax Tree (AST) generation and compilation stage, using the :mod:`ast` module.
The Public C API functions :c:func:`!PyParser_SimpleParseStringFlags`, :c:func:`!PyParser_SimpleParseStringFlagsFilename`, :c:func:`!PyParser_SimpleParseFileFlags` and :c:func:`!PyNode_Compile` are deprecated and will be removed in Python 3.10 together with the old parser.
Using :data:`NotImplemented` in a boolean context has been deprecated, as it is almost exclusively the result of incorrect rich comparator implementations. It will be made a :exc:`TypeError` in a future version of Python. (Contributed by Josh Rosenberg in :issue:`35712`.)
Opening the :class:`~gzip.GzipFile` file for writing without specifying the *mode* argument is deprecated. In future Python versions it will always be opened for reading by default. Specify the *mode* argument for opening it for writing and silencing a warning. (Contributed by Serhiy Storchaka in :issue:`28286`.)
Deprecated the ``split()`` method of :class:`!_tkinter.TkappType` in favour of the ``splitlist()`` method which has more consistent and predictable behavior. (Contributed by Serhiy Storchaka in :issue:`38371`.)
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 and Kyle Stanley in :issue:`34790`.)
binhex4 and hexbin4 standards are now deprecated. The :mod:`!binhex` module and the following :mod:`binascii` functions are now deprecated:
:mod:`ast` classes ``slice``, ``Index`` and ``ExtSlice`` are considered deprecated and will be removed in future Python versions. ``value`` itself should be used instead of ``Index(value)``. ``Tuple(slices, Load())`` should be used instead of ``ExtSlice(slices)``. (Contributed by Serhiy Storchaka in :issue:`34822`.)
:mod:`ast` classes ``Suite``, ``Param``, ``AugLoad`` and ``AugStore`` are considered deprecated and will be removed in future Python versions. They were not generated by the parser and not accepted by the code generator in Python 3. (Contributed by Batuhan Taskaya in :issue:`39639` and :issue:`39969` and Serhiy Storchaka in :issue:`39988`.)
The :c:func:`!PyEval_InitThreads` and :c:func:`!PyEval_ThreadsInitialized` functions are now deprecated and will be removed in Python 3.11. Calling :c:func:`!PyEval_InitThreads` now does nothing. The :term:`GIL` is initialized by :c:func:`Py_Initialize` since Python 3.7. (Contributed by Victor Stinner in :issue:`39877`.)
Passing ``None`` as the first argument to the :func:`shlex.split` function has been deprecated. (Contributed by Zackery Spytz in :issue:`33262`.)
:func:`!smtpd.MailmanProxy` is now deprecated as it is unusable without an external module, ``mailman``. (Contributed by Samuel Colvin in :issue:`35800`.)
The *random* parameter of :func:`random.shuffle` has been deprecated. (Contributed by Raymond Hettinger in :issue:`40465`)
:class:`!nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been removed. These methods are deprecated since Python 3.3. Generally, these extensions are not supported or not enabled by NNTP server administrators. For ``xgtitle()``, please use :meth:`!nntplib.NNTP.descriptions` or :meth:`!nntplib.NNTP.description` instead. (Contributed by Donghee Na in :issue:`39366`.)
:class:`array.array`: ``tostring()`` and ``fromstring()`` methods have been removed. They were aliases to ``tobytes()`` and ``frombytes()``, deprecated since Python 3.2. (Contributed by Victor Stinner in :issue:`38916`.)
The undocumented ``sys.callstats()`` function has been removed. Since Python 3.7, it was deprecated and always returned :const:`None`. It required a special build option ``CALL_PROFILE`` which was already removed in Python 3.7. (Contributed by Victor Stinner in :issue:`37414`.)
The ``sys.getcheckinterval()`` and ``sys.setcheckinterval()`` functions have been removed. They were deprecated since Python 3.2. Use :func:`sys.getswitchinterval` and :func:`sys.setswitchinterval` instead. (Contributed by Victor Stinner in :issue:`37392`.)
``_dummy_thread`` and ``dummy_threading`` modules have been removed. These modules were deprecated since Python 3.7 which requires threading support. (Contributed by Victor Stinner in :issue:`37312`.)
``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` alias to ``sunau.open()``, and ``wave.openfp()`` alias to :func:`wave.open` have been removed. They were deprecated since Python 3.7. (Contributed by Victor Stinner in :issue:`37320`.)
The :meth:`!isAlive` method of :class:`threading.Thread` has been removed. It was deprecated since Python 3.8. Use :meth:`~threading.Thread.is_alive` instead. (Contributed by Donghee Na in :issue:`37804`.)
Methods ``getchildren()`` and ``getiterator()`` of classes :class:`~xml.etree.ElementTree.ElementTree` and :class:`~xml.etree.ElementTree.Element` in the :mod:`~xml.etree.ElementTree` module have been removed. They were deprecated in Python 3.2. Use ``iter(x)`` or ``list(x)`` instead of ``x.getchildren()`` and ``x.iter()`` or ``list(x.iter())`` instead of ``x.getiterator()``. (Contributed by Serhiy Storchaka in :issue:`36543`.)
The old :mod:`plistlib` API has been removed, it was deprecated since Python 3.4. Use the :func:`~plistlib.load`, :func:`~plistlib.loads`, :func:`~plistlib.dump`, and :func:`~plistlib.dumps` functions. Additionally, the *use_builtin_types* parameter was removed, standard :class:`bytes` objects are always used instead. (Contributed by Jon Janzen in :issue:`36409`.)
``base64.encodestring()`` and ``base64.decodestring()``, aliases deprecated since Python 3.1, have been removed: use :func:`base64.encodebytes` and :func:`base64.decodebytes` instead. (Contributed by Victor Stinner in :issue:`39351`.)
``fractions.gcd()`` function has been removed, it was deprecated since Python 3.5 (:issue:`22486`): use :func:`math.gcd` instead. (Contributed by Victor Stinner in :issue:`39350`.)
The *encoding* parameter of :func:`json.loads` has been removed. As of Python 3.1, it was deprecated and ignored; using it has emitted a :exc:`DeprecationWarning` since Python 3.8. (Contributed by Inada Naoki in :issue:`39377`)
The ``_field_types`` attribute of the :class:`typing.NamedTuple` class has been removed. It was deprecated since Python 3.8. Use the ``__annotations__`` attribute instead. (Contributed by Serhiy Storchaka in :issue:`40182`.)
The :meth:`!symtable.SymbolTable.has_exec` method has been removed. It was deprecated since 2006, and only returning ``False`` when it's called. (Contributed by Batuhan Taskaya in :issue:`40208`)
The :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks` have been removed. They were deprecated since Python 3.7 and you can use :func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead. (Contributed by Rémi Lapeyre in :issue:`40967`)
The ``unescape()`` method in the :class:`html.parser.HTMLParser` class has been removed (it was deprecated since Python 3.4). :func:`html.unescape` should be used for converting character references to the corresponding unicode characters.
The functions ``PyEval_CallObject``, ``PyEval_CallFunction``, ``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are deprecated. Use :c:func:`PyObject_Call` and its variants instead. (See more details in :issue:`29548`.)
The ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``, :c:func:`!PyUnicode_FromUnicode`, :c:func:`!PyUnicode_AsUnicode`, ``_PyUnicode_AsUnicode``, and :c:func:`!PyUnicode_AsUnicodeAndSize` are marked as deprecated in C. They have been deprecated by :pep:`393` since Python 3.3. (Contributed by Inada Naoki in :issue:`36346`.)
Removed ``Py_UNICODE_MATCH``. It has been deprecated by :pep:`393`, and broken since Python 3.3. The :c:func:`PyUnicode_Tailmatch` function can be used instead. (Contributed by Inada Naoki in :issue:`36346`.)