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

kedro micropkg package might leak other packages #2766

Closed
astrojuanlu opened this issue Jul 5, 2023 · 1 comment
Closed

kedro micropkg package might leak other packages #2766

astrojuanlu opened this issue Jul 5, 2023 · 1 comment

Comments

@astrojuanlu
Copy link
Member

Description

Under some circumstances, kedro micropkg package might leak other packages. This happens because of how we're using the package finding functionality of setuptools:

setup(
name="{name}",
version="{version}",
description="Micro-package `{name}`",
packages=find_packages(),

If there's any other directory with an __init__.py, it will be considered a Python package and included.

Context

I also did a manual test to create micropkg and install it

kedro micropkg pipelines.nok
pip install dist/nok-0.1.tar.gz

This works fine but when I try to uninstall it I notice it is also in test folder which I didn't expect.

(kedro_core) pattern main % pip uninstall nok
Found existing installation: nok 0.1
Uninstalling nok-0.1:
Would remove:
/Users/Nok_Lam_Chan/miniconda3/envs/kedro_core/lib/python3.8/site-packages/nok-0.1.dist-info/*
/Users/Nok_Lam_Chan/miniconda3/envs/kedro_core/lib/python3.8/site-packages/nok/*
/Users/Nok_Lam_Chan/miniconda3/envs/kedro_core/lib/python3.8/site-packages/tests/* <- what is this?

Originally posted by @noklam in #2761 (review)

Steps to Reproduce

(TBC @noklam)

Expected Result

Only the pipeline package is installed.

Actual Result

Extraneous package is leaked.

Your Environment

  • Kedro version used (pip show kedro or kedro -V):
  • Python version used (python -V):
  • Operating system and version:
@astrojuanlu
Copy link
Member Author

We decided in #3750 to deprecate kedro micropkg so we will not do this.

@astrojuanlu astrojuanlu closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
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

1 participant