GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Keep deprecated functions in Python 3.13: remove this deprecation · Issue #105373 · python/cpython

Keep deprecated functions in Python 3.13: remove this deprecation #105373

New issue
Copy link
New issue
Copy link
Closed
Closed
Keep deprecated functions in Python 3.13: remove this deprecation#105373
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on Jun 6, 2023
Issue body actions

There are multiple Python functions marked as "deprecated", usually only in the documentation, or sometimes in comments, whereas the feature is there for a long time and there is no need to remove them, or the rationale changed.

For example, the array.array('u') format was deprecated since it used the Py_UNICODE C type (which is deprecated), but the code was updated to use the wchar_t C type which is fine and not depreated.

Another example is passing NULL as value to PyObject_SetAttr(obj, name, value) to delete an object attribute is deprecated... but this feature exists since the birth of Python. I don't think that it's really useful to deprecate this behavior: it's fine to keep it. The PyObject_DelAttr() function is just implemented as a macro passing NULL:

#define  PyObject_DelAttr(O, A) PyObject_SetAttr((O), (A), NULL)

Linked PRs

  • gh-105373: Remove the PyObject_SetAttr(NULL) deprecation #105374
  • gh-105373: Remove PyArg_Parse() deprecation #105394
  • gh-105373: Fix decimal documentation formatting #105395
  • gh-105373: Doc lists pending C API removals #106537
  • gh-105373: Remove C API global config vars in Python 3.14 #106538
  • gh-105373: Doc lists pending removals #106540
  • gh-105373: Elaborate Pending Removal in What's New in Python 3.13 #106675
Reacted by Raymond Hettinger and Maurice

Activity

Next
  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 6, 2023
  2. hugovk commented on Jun 6, 2023

    @hugovk
    hugovk
    on Jun 6, 2023
    Member
    More actions

    See also #80480 which links to a merged PR to add array.array('w') and with an open PR to deprecate array.array('u'), cc @methane.

    Reacted by Victor Stinner
  3. vstinner
    added 3 commits that reference this issue on Jun 6, 2023

    pythongh-105373: PyObject_SetAttr() to delete an attr is no longer de…

    60283fc

    pythongh-105373: PyObject_SetAttr(NULL) is no longer deprecated

    1a5b905

    pythongh-105373: PyObject_SetAttr(NULL) is no longer deprecated

    90d8ff3
  4. vstinner commented on Jun 6, 2023

    @vstinner
    vstinner
    on Jun 6, 2023
    MemberAuthor
    More actions

    I wanted to propose the keep the deprecated logging.Logger.warn() method (remove its deprecation)... but instead I proposed to remove it :-) see issue #105376.

  5. vstinner
    added 4 commits that reference this issue on Jun 6, 2023

    pythongh-105373: Remove PyArg_Parse() deprecation

    a4e9a4d

    pythongh-105373: Fix decimal documentation formatting

    d31f3d1

    gh-105373: Fix decimal documentation formatting (#105395)

    dfe9fc1

    pythongh-105373: Remove PyArg_Parse() deprecation

    2c83e81
  6. arhadthedev commented on Jun 11, 2023

    @arhadthedev
    arhadthedev
    on Jun 11, 2023
    Member
    More actions

    For example, the array.array('u') format was deprecated since it used the Py_UNICODE C type (which is deprecated), but the code was updated to use the wchar_t C type which is fine and not depreated.

    • gh-80480: Emit DeprecationWarning for array's 'u' type code #95760 was merged few hours ago. Is the cited point relevant then?
  7. methane commented on Jun 12, 2023

    @methane
    methane
    on Jun 12, 2023
    Member
    More actions

    See #80480 (comment)

    There are few situations where platform- or compiler-dependent wchar_t arrays are useful.
    Many users use array('u') as a mutable Unicode buffer, and array('w') is recommended for that use.

    Reacted by Oleg Iarygin
  8. vstinner
    added a commit that references this issue on Jun 13, 2023

    gh-105373: Remove PyArg_Parse() deprecation (#105394)

    d0f1afd
  9. vstinner
    added 2 commits that reference this issue on Jul 7, 2023

    pythongh-105373: Doc lists pending C API removals

    1726cf1

    gh-105373: Doc lists pending C API removals (#106537)

    1b29381
  10. 5 remaining items

  11. vstinner
    added 5 commits that reference this issue on Jul 8, 2023

    pythongh-105373: Doc lists pending removals

    a9316b0

    gh-105373: Doc lists pending removals (#106540)

    1e12c8c

    pythongh-105373: Deprecate PyObject_SelAttr(v, name, NULL)

    eb55735

    pythongh-105373: Deprecate PyObject_SelAttr(v, name, NULL)

    0a8543f

    pythongh-105373: Deprecate PyObject_SetAttr(v, name, NULL)

    5bc756f
  12. vstinner commented on Jul 10, 2023

    @vstinner
    vstinner
    on Jul 10, 2023
    MemberAuthor
    More actions

    Another example is passing NULL as value to PyObject_SetAttr(obj, name, value) to delete an object attribute is deprecated... but this feature exists since the birth of Python. I don't think that it's really useful to deprecate this behavior: it's fine to keep it. (...)

    I created issue #106572: "Deprecate PyObject_SetAttr(obj, name, NULL): PyObject_DelAttr(obj, name) must be used instead".

  13. vstinner
    added 2 commits that reference this issue on Jul 12, 2023

    pythongh-105373: Eloborate Pending Removal in What's New in Python 3.13

    b4054bb

    pythongh-105373: Elaborate Pending Removal in What's New in Python 3.13

    ecfb4fe
  14. vstinner commented on Jul 12, 2023

    @vstinner
    vstinner
    on Jul 12, 2023
    MemberAuthor
    More actions

    Well, I did the cleanup that I wanted to do about pending incompatible changes. I just proposed a new PR #106675 to elaborate the "Pending Removal" documentation.

    I propose to open new issues if we want to adjust other pending incompatible changes: unschedule them, schedule them, or schedule them earlier.

  15. vstinner
    added a commit that references this issue on Jul 12, 2023

    gh-105373: Elaborate Pending Removal in What's New in Python 3.13 (#1…

    42bc485
  16. vstinner
    closed this as completedon Jul 19, 2023
  17. j4hangir commented on Aug 23, 2025

    @j4hangir
    j4hangir
    on Aug 23, 2025
    More actions

    Would be nice to have .warn() kept.

  18. vstinner commented on Sep 1, 2025

    @vstinner
    vstinner
    on Sep 1, 2025
    MemberAuthor
    More actions

    Would be nice to have .warn() kept.

    The removal of logging.Logger.warn() is not planned.

  19. j4hangir commented on Sep 1, 2025

    @j4hangir
    j4hangir
    on Sep 1, 2025
    More actions

    Would be nice to have .warn() kept.

    The removal of logging.Logger.warn() is not planned.

    I assumed since it's deprecated it'll be eventually removed, in that case I'd agree that the deprecation is also not needed on it.

  20. vstinner commented on Sep 1, 2025

    @vstinner
    vstinner
    on Sep 1, 2025
    MemberAuthor
    More actions

    Since this issue is closed, I suggest you opening a new issue if you have a strong opinion on warn() deprecation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.