bryanyang0528 / ksql-python

A python wrapper for the KSQL REST API.
MIT License
158 stars 67 forks source link

ksql has undeclared build-time dependencies #117

Open neersighted opened 1 year ago

neersighted commented 1 year ago

A Poetry user ran into undeclared build-time dependencies in ksql -- namely, pip is imported in setup.py but there is no declaration of this dependency:

https://github.com/bryanyang0528/ksql-python/blob/6161b481b9c872a0693f30cede5b46ae23fd2336/setup.py#L10-L13

If you want to reliably import pip during a build, you need to declare the dependency somewhere. The modern way to do this (as described at that link) is to list everything in build-system.requires of your pyproject.toml; however, you can also use the deprecated setup_requires argument to setup() if you prefer.

neersighted commented 1 year ago

Wow, I totally got my wires crossed an opened an issue on the wrong repository. There is an issue to report here, let me rework it to have the right contents :laughing:

lorenh commented 9 months ago

I am hitting this "ModuleNotFoundError: No module named 'pip'" problem trying to install ksql, is there a workaround?

lorenh commented 9 months ago

I am hitting this "ModuleNotFoundError: No module named 'pip'" problem trying to install ksql, is there a workaround?

I was able to work around it by running get-pip.py referenced in one of the answers in this SO article: https://stackoverflow.com/questions/21826859/setting-up-a-virtualenv-no-module-named-pip

But it feels wrong (and unsafe) to do this.

sheinbergon commented 1 month ago

Hello @neersighted @lorenh

I've forked the code, modernized it (replaced hyper with HTTPX, bumped all dependencies, updated to Python 3.9 as the minimal version, and fixed all the tests to behave with latest KSQL DB versions (0.29.0). Could you check if it's still present in my version?

https://github.com/sheinbergon/ksql-python-ng

I'll be making a PYPI release soon enough. In the meanwhile, you can test it by running

pipx install git+https://github.com/sheinbergon/ksql-python-ng.git --include-deps

or

pip install git+https://github.com/sheinbergon/ksql-python-ng.git