Fix regression in query_pypi contract