Skip to content

No mention of Py_FindMethod getattr/setattr for Python extensions #24

@ericzolf

Description

@ericzolf

Your book, especially http://python3porting.com/cextensions.html, has already been very helpful to start porting rdiff-backup to Python3, but I'm stuck on the disappearance of Py_FindMethod as used in rdiff_backup/_librsyncmodule.c. According to my research:

  1. the Python documentation isn't too explicit about what this function was used for (no examples)
  2. the subtle difference between tp_getattr/tp_settatr and tp_getattro/tp_setattro could be clearer (beside the fact that the first ones are outdated).
  3. there are two cases: you can use the PyObject_GenericG/SetAttr or not, but the criteria for this decision are unclear to me.
  4. If you can use the Generic functions, you don't need Py_FindMethod so that's easy, but there are no explanations if you can't (which seems to be my specific case) on how to get rid of the method without breaking your code.

So quite a lot of missing explanations, I think, which you could possibly highlight in an update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions