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

requests is an optional dependency but there's no try/except guard #88

Open
2 tasks done
jaimergp opened this issue Jul 1, 2024 · 3 comments
Open
2 tasks done

Comments

@jaimergp
Copy link
Contributor

jaimergp commented Jul 1, 2024

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

If a user tries to use the remote features from conda_package_streaming.url with a regular conda create -n cps conda-package-streaming, they will run into an ImportError for requests because the dependency was removed from the recipe.

I would ask to either:

  • Reconsider the optional requests dependency. I don't think it's thaaat big?
  • Create a new output conda-package-streaming-core + conda-package-streaming without and with requests, respectively.
  • Add a try / except ImportError clause similar to how zstandard is handled.

Conda Info

N/A

Conda Config

N/A

Conda list

N/A

Additional Context

Seen in conda/conda-package-handling#254

@dholth
Copy link
Contributor

dholth commented Jul 26, 2024

I would be inclined to go in the other direction; requests does have a real dependency tree and it is unfortunate that we should require it for basic packing/unpacking of .conda packages.

If we had a try/except for conda_package_streaming.url, what would it do? The url module can't work at all without requests?

@dholth dholth closed this as completed Jul 26, 2024
@dholth dholth reopened this Jul 26, 2024
@jezdez
Copy link
Member

jezdez commented Oct 7, 2024

I wonder, given the relation between conda-package-handling and conda-package-streaming, if a merging of conda-package-streaming into conda-package-handling would be preferable.

@dholth
Copy link
Contributor

dholth commented Oct 7, 2024

I see conda-package-streaming as providing a "new", composable API and conda-package-handling existing only for backwards compatibility and the cph CLI. -streaming also replaces libarchive from pre-2.0 conda-package-handling. I would not merge the projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗️ In Progress
Development

No branches or pull requests

3 participants