Message ID | cover.1650551486.git.ehem+xen@m5p.com (mailing list archive) |
---|---|
Headers | show |
Series | Adjust odd Python bindings | expand |
On Thu, Apr 21, 2022 at 07:31:26AM -0700, Elliott Mitchell wrote: > I'm unsure how widely the Python bindings are used. Certainly they were > used for PyGRUB. Have any other projects used them so far? What I'm > doing is likely to be contributed to the Xen Project, and I suspect the > existence of other projects would be known... Yes, Python bindings are used outside of xen.git. I'm aware of few places in Qubes OS, but I expect there are other users too. So, I'm afraid breaking the current import method isn't really an option. What you could try, is to make both versions work at the same time, but TBH I'm not sure how to do that with C extension.
On Fri, Apr 22, 2022 at 03:17:23AM +0200, Marek Marczykowski-G??recki wrote: > On Thu, Apr 21, 2022 at 07:31:26AM -0700, Elliott Mitchell wrote: > > I'm unsure how widely the Python bindings are used. Certainly they were > > used for PyGRUB. Have any other projects used them so far? What I'm > > doing is likely to be contributed to the Xen Project, and I suspect the > > existence of other projects would be known... > > Yes, Python bindings are used outside of xen.git. I'm aware of few > places in Qubes OS, but I expect there are other users too. So, I'm > afraid breaking the current import method isn't really an option. What > you could try, is to make both versions work at the same time, but TBH > I'm not sure how to do that with C extension. Simplest would have been to address this in 2004, when the Python bindings had insignificant usage. Another handy time when things could have been broken was the Python 2->3 transition. Yet now both of those points have passed. I suspect this could be done by adding some Python code to an __init__.py file. Simply redirect attempts to load the old path to the new path. Other thing I noted is the Python documentation indicates the first argument to Extension() was wrong.