vespa-engine / pyvespa

Python API for https://vespa.ai, the open big data serving engine
https://pyvespa.readthedocs.io/
Apache License 2.0
96 stars 30 forks source link

Bump requests from 2.26.0 to 2.32.2 #820

Closed oded282 closed 3 months ago

oded282 commented 3 months ago

I encountered an issue when using PyVespa v0.42.0 installed with Poetry. Attempting to import Vespa using the following code: from vespa.application import Vespa

results in the following error: ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions'

Upon investigation, I found that the JSONDecodeError class was added to requests.exceptions starting from version 2.27.0. However, your pyproject.toml file specifies requests v2.26.0, which is why this error occurs.

I suggest updating the requests dependency to v2.32.0 to resolve this issue. The same error is present in PyVespa v0.43.0 and potentially in other versions as well.

Thank you for addressing this.

oded282 commented 3 months ago

Do you accept pull requests from external developers? Would you prefer I submit a PR next time, or should I wait for your fix?

baldersheim commented 3 months ago

External contributions are very welcome. Will be fixed faster then.

thomasht86 commented 3 months ago

Thank you for reporting this quickly. The requests-dependency is actually unpinned in pyproject.toml (dependencies). The pinned one is for [build] only.
Also want to update our CI-pipeline, which are run with [dev] so that we have locked version of main dependencies, to catch similar issues earlier in the future.

thomasht86 commented 3 months ago

Fixed in version 0.44.0