Closed interifter closed 3 years ago
Thanks for reporting this. It looks like this is only a problem in sspi_channel_bindings which uses "s#" with PyArg_ParseTupleAndKeywords. # formats don't seem to be used anywhere else. This shouldn't be too hard to fix, I hope.
You'r right. I was able to reproduce the issue with a bare install of a local copy. All I did was add the definition above the python import in kerberos_sspi.h and the warning disappears in my project.
#define SECURITY_WIN32 1 /* Required for SSPI */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
Also, out of curiosity, do you plan on supporting pip wheel
? I used easy_install in my test project to install the generated egg, but easy_install is deprecated.
Created a Pull Request - hope it is okay.
We already provide wheels for WinKerberos:
https://pypi.org/project/winkerberos/#files
And the docs say to use pip to install it:
This was actually found while using requests-kerberos, but it depends on winkerberos in Windows environments.
Full warning message:
I am not 100% familiar with the python c-api, so can only make some recommendations at a high level.
First, the documentation says:
Per documentation, this at least means you may need to add this above here: https://github.com/mongodb-labs/winkerberos/blob/master/src/kerberos_sspi.h#L19
Looking at a similar issue in tox, I could guess where other changes could be made: https://github.com/python-pillow/Pillow/pull/3749/files
Running with
python 3.8.1 Windows 10 RS5 Similar issue found in other libraries python-pillow/Pillow#3750 https://github.com/zopefoundation/ZODB/issues/261