Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PyMapping_HasKeyString does not work on None Accidentally, it used to return false result on silent errors. Since Python 3.13, this is what happens instead: >>> import pylibmc >>> m = pylibmc.Client(["10.0.0.1"], binary=True) Exception ignored in PyMapping_HasKeyString(); consider using PyMapping_HasKeyStringWithError(), PyMapping_GetOptionalItemString() or PyMapping_GetItemString(): Traceback (most recent call last): File "/usr/lib64/python3.13/site-packages/pylibmc/client.py", line 142, in __init__ super().__init__(servers=translate_server_specs(servers), TypeError: 'NoneType' object is not subscriptable ... Exception ignored in PyMapping_HasKeyString(); consider using PyMapping_HasKeyStringWithError(), PyMapping_GetOptionalItemString() or PyMapping_GetItemString(): Traceback (most recent call last): File "/usr/lib64/python3.13/site-packages/pylibmc/client.py", line 142, in __init__ super().__init__(servers=translate_server_specs(servers), TypeError: 'NoneType' object is not subscriptable When this is run via pytest, it leads to: pytest.PytestUnraisableExceptionWarning: Exception ignored in PyMapping_HasKeyString(); consider using PyMapping_HasKeyStringWithError(), PyMapping_GetOptionalItemString() or PyMapping_GetItemString(): None Fixes pallets-eco/cachelib#400
- Loading branch information