Skip to content

[C++][Python] Act on existing deprecations #49153

Closed

Description

@pitrou

Describe the enhancement requested

As usual we have been deprecating some APIs or features in the last year or two. We should make a run over these and see whether some of those deprecated items can be truly removed.

Component(s)

C++, Python, Developer Tools

Activity

  1. pitrou commented on Feb 5, 2026

    @pitrou
    MemberAuthor

    @AlenkaF @thisisnic @rok I don't know if one of you would like to work on this.

  2. AliRana30 commented on Feb 5, 2026

    @AliRana30
    Contributor

    Hi @pitrou , Can't we contributors thoroughly look and work on the API deprecation issue or only maintainers are authorized to do so??

  3. pitrou commented on Feb 5, 2026

    @pitrou
    MemberAuthor

    Hi @AliRana30 , yes, of course, contributions from non-maintainers are always welcome! You can also tackle a subset of all deprecations, according to what you're comfortable with.

  4. AliRana30 commented on Feb 5, 2026

    @AliRana30
    Contributor

    Ok sure!! Then I will open a PR for what would be the best solution for these deprecations issue):

  5. AliRana30 commented on Feb 5, 2026

    @AliRana30
    Contributor

    Hi @pitrou,
    I've analyzed the C++ codebase and found 7 groups of deprecated APIs from v13.0.0 to v24.0.0.

    High Priority Removals (3+ years old):

    1. HasValidityBitmap() (v17.0.0) - 4 usages in IPC module
    2. decimal() factory (v18.0.0) - No usages found, can remove immediately
    3. GetRecordBatchReader() Status overloads (v21.0.0) - 3 overloads in parquet
    4. ServerAuthHandler::IsValid() old signature (v13.0.0) - Flight module

    Also found medium/lower priority items in v22-v24.

    Proposed Plan:

    I'll tackle this in separate PRs by version group (v13-v21, v22-v23, v24) for easier review.

    All follow the same pattern: Status Method(..., Type* out) → Result<Type> Method(...)

    Questions:

    • Should I start with v13-v21 (oldest), or focus on specific versions?
    • Any concerns about breaking changes for the oldest APIs?

    Ready to start if this approach works!

  6. pitrou commented on Feb 5, 2026

    @pitrou
    MemberAuthor

    @AliRana30 For the record, did you use AI to generate this? It can be ok to use AI as long as you understand our recommendations about this. Please make sure you've read them!

  7. AliRana30 commented on Feb 5, 2026

    @AliRana30
    Contributor

    Yes!! I have used Ai but I'm not using it blindly to enforce everything. I will read all the guidelines before commiting any changes and fixes .
    For your information , one of my PR got merged yesterday.
    #49105

  8. rok commented on Feb 5, 2026

    @rok
    Member

    Thanks for the discussing this @AliRana30. AI use is new to all of us and we're still learning how it'll work for Arrow. I suppose we'll learn from each other here. I'd kindly ask you use your judgement and try to filter as much AI output as you can so we don't need to.

  9. rok commented on Feb 5, 2026

    @rok
    Member

    @pitrou I'm happy to review (and have hopes LLMs can do a good enough job on this task). Perhaps it'd make sense to split this into Python and C++ part if it gets to be large.

  10. rok commented on Feb 5, 2026

    @rok
    Member

    @AliRana30 try to check which deprecation periods already passed and only remove those symbols.

  11. AliRana30 commented on Feb 5, 2026

    @AliRana30
    Contributor

    @pitrou @rok,

    Thanks for the guidance! Based on the discussion, I’ve reviewed the existing deprecations and would like to start conservatively, focusing on C++ only and on deprecations whose grace periods have clearly elapsed.

    Proposed Removal Order (C++ only)

    Phase 1 — Ready to Remove

    1. decimal() factory function

      • Deprecated in v18.0.0 (~6 years ago)
      • Declared in cpp/src/arrow/type_fwd.h
      • No usages found → safest starting point
    2. HasValidityBitmap() function

      • Deprecated in v17.0.0 (~7 years ago)
      • Defined in cpp/src/arrow/ipc/metadata_internal.h
      • 4 usages in the IPC module, all with straightforward replacements
    3. ServerAuthHandler::IsValid() old signature

      • Deprecated in v13.0.0 (11+ years ago)
      • Located in the Flight module
    4. GetRecordBatchReader() Status-returning overloads

      • Deprecated in v21.0.0 (~4 years ago)
      • Implemented in cpp/src/parquet/arrow/reader.cc
      • Can be migrated to the Result<T>-returning APIs

    Question

    Would you recommend also including v22–v24 deprecations, or keeping this initial cleanup limited to older ones?

    My Approach

    I’ll submit small, focused PRs, starting with the decimal() factory removal (zero usages), and proceed incrementally for easier review.

    Does this plan sound reasonable?

  12. rok commented on Feb 5, 2026

    @rok
    Member

    @AliRana30, while these symbols appear to be deprecated your message is not completely correct. I only checked point 3.

    1. ServerAuthHandler::IsValid() old signature

      • Deprecated in v13.0.0 (11+ years ago)
      • Located in the Flight module

    ServerAuthHandler::IsValid() was deprecated here on May 2nd 2023. This was part of 13.0.0 release on 23rd August 2023. So while you have found a deprecated symbol you posted potentially misleading (and in this case unnecessary) information that I assume was AI generated. This is what we would prefer to avoid by contributors manually verifying information and not implicitly asking maintainers to do so.
    Proposal to start with a c++ PR is ok, but please do read and understand what you are posting, to quote from here:

    When a PR appears to have been generated without much engagement from the submitter, reviewers with access to AI tools could more efficiently generate the code directly, and since the submitter is not likely to learn from the review process, their time is more productively spent researching and reporting on the issue.

  13. AliRana30 commented on Feb 6, 2026

    @AliRana30
    Contributor

    @rok You're right, I apologize. I was relying on AI and didn't verify the dates myself - that "11+ years" was totally wrong.

    I went back and actually checked this time. Found two deprecations where I can verify there's no usage:

    1. decimal() function - deprecated in v18.0. I searched the codebase and it's only defined in type_fwd.h and type.cc but nothing's actually calling it anymore.

    2. HasValidityBitmap() - deprecated in v17.0. Still being used in 4 places in the IPC code (writer.cc, reader.cc, and metadata_internal). Would just need to swap those for may_have_validity_bitmap().

    Can I start with just removing the decimal() function since it has zero usage? Want to make sure I actually understand what I'm doing before tackling anything more complex.

  14. rok commented on Feb 6, 2026

    @rok
    Member

    Hey @AliRana30. Thanks for accepting the feedback and engaging further.

    I've taken a quick look and proposed plan sound good. Feel free to open a PR for this and then we can iterate further.
    For an example of how deprecation on Arrow C++ looks like see #45680. We typically remove deprecated APIs at least a year after deprecation.

  15. AliRana30 commented on Feb 7, 2026

    @AliRana30
    Contributor

    @rok PR is up for the decimal() removal. Let me know if you need any changes.

  16. added a commit that references this issue on Oct 26, 2026
  17. added this to the 27.0.0 milestone on Oct 26, 2026
  18. pitrou commented on Oct 26, 2026

    @pitrou
    MemberAuthor

    Issue resolved by pull request 53543
    #53543

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions