ksql-python icon indicating copy to clipboard operation
ksql-python copied to clipboard

ksql has undeclared build-time dependencies

Open neersighted opened this issue 3 years ago • 4 comments

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 avatar Oct 24 '22 23:10 neersighted

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:

neersighted avatar Oct 24 '22 23:10 neersighted

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

lorenh avatar Nov 22 '23 15:11 lorenh

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.

lorenh avatar Nov 22 '23 16:11 lorenh

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

sheinbergon avatar Jul 25 '24 12:07 sheinbergon