bpo-1635741: - port overlapped to multi-phase by koubaa · Pull Request #22051 · python/cpython (original) (raw)

@corona10 I'm trying that now. So far it is not looking good - somehow the values are all wrong. For example when I switch to PyModule_AddObject, overlapped.__dict__["ERROR_IO_PENDING"] is 6160 instead of 997. I can't figure out why..

Edit - I figured it out. I was doing a decref on the object I passed into PyModule_AddObject, but it turns out this function steals the reference so I shouldn't do that.