Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksql has undeclared build-time dependencies #117

Open
neersighted opened this issue Oct 24, 2022 · 4 comments
Open

ksql has undeclared build-time dependencies #117

neersighted opened this issue Oct 24, 2022 · 4 comments

Comments

@neersighted
Copy link

neersighted commented Oct 24, 2022

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:

ksql-python/setup.py

Lines 10 to 13 in 6161b48

if LooseVersion(pip.__version__) >= "10.0.0":
from pip._internal.req import parse_requirements
else:
from pip.req import parse_requirements

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
Copy link
Author

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 😆

@neersighted neersighted changed the title ksql provides a spurious poetry console script ksql has undeclared build-time dependencies Oct 24, 2022
@lorenh
Copy link

lorenh commented Nov 22, 2023

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

@lorenh
Copy link

lorenh commented Nov 22, 2023

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
Copy link

sheinbergon commented Jul 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants