Skip to content
  • Christoph Reiter's avatar
    Port to Py_TRASHCAN_BEGIN · 02bc8a51
    Christoph Reiter authored
    Py_TRASHCAN_SAFE_BEGIN and Py_TRASHCAN_SAFE_END are deprecated since Python 3.11
    and result in a deprecation warning when building against Python 3.11.
    
    This follows the suggested migration to Py_TRASHCAN_BEGIN and Py_TRASHCAN_END
    in https://docs.python.org/3/whatsnew/3.11.html
    
    Py_TRASHCAN_BEGIN only exists since Python 3.8, while we still support 3.7,
    so also use the suggested macro to support older Python versions.
    02bc8a51