Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-21712

Add pure-pybind11 approach to deprecation

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: utils
    • Labels:
    • Templates:
    • Story Points:
      2
    • Team:
      Data Release Production

      Description

      Deprecating a C++ function wrapped with pybind11 currently requires a pure-Python file to be added so deprecate_pybind11 can be used on the wrapped function.  This is an unfortunate amount of boilerplate for something we want to keep lightweight, and it also ensures that a deprecation warning is still emitted when compiling the pybind11 module.

      It should be possible to have a pure-C++ way to invoke deprecate_pybind11 (i.e. by importing it using pybind11 APIs) while squashing compiler warnings.  The latter may require that this be a macro - we'll see - but that's a price worth paying to avoid spurious compiler warnings.

      Kian-Tat Lim, before I spend any time on this, did you try anything like this when putting together deprecate_pybind11?

        Attachments

          Activity

            People

            • Assignee:
              jbosch Jim Bosch
              Reporter:
              jbosch Jim Bosch
              Watchers:
              Jim Bosch, Kian-Tat Lim, Krzysztof Findeisen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel