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

Remove imports from pip/requests's vendored packages #13171

Merged
merged 8 commits into from
Oct 29, 2023

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented Oct 3, 2023

Description

Stop relying on vendored packages provided by pip and requests and instead depend on the dependency itself.

Removes the following fallback imports:

  • pip._vendor.requests
  • requests.packages.chardet (added charset-normalizer as dependency)
  • pip._vendor.requests.packages.chardet (added charset-normalizer as dependency)

Note
Opted to depend on charset-normalizer instead of chardet since the former is also the preferred library used by requests.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@kenodegard kenodegard self-assigned this Oct 3, 2023
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Oct 3, 2023
@kenodegard kenodegard changed the title Remove imports from pip's vendored packages Remove imports from pip/requests's vendored packages Oct 3, 2023
@kenodegard kenodegard marked this pull request as ready for review October 3, 2023 22:40
@kenodegard kenodegard requested a review from a team as a code owner October 3, 2023 22:40
beeankha
beeankha previously approved these changes Oct 3, 2023
@kenodegard kenodegard requested a review from jezdez October 4, 2023 00:03
conda/cli/main_info.py Outdated Show resolved Hide resolved
beeankha
beeankha previously approved these changes Oct 4, 2023
Requests already depends on charset-normalizer so this is a "cheaper" new dependency.
recipe/meta.yaml Outdated Show resolved Hide resolved
beeankha
beeankha previously approved these changes Oct 16, 2023
jezdez
jezdez previously approved these changes Oct 16, 2023
Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

charset-normalizer is a pretty old version on defaults: https://anaconda.org/main/charset-normalizer

But a recent one on conda-forge: https://anaconda.org/conda-forge/charset-normalizer

Might be useful to review https://github.com/Ousret/charset_normalizer/blob/master/CHANGELOG.md if there are any features or fixes needed.

Otherwise LGTM

@kenodegard kenodegard dismissed stale reviews from jezdez and beeankha via aaccd49 October 17, 2023 18:16
@kenodegard kenodegard enabled auto-merge (squash) October 17, 2023 18:17
@kenodegard kenodegard merged commit 7e47528 into conda:main Oct 29, 2023
72 checks passed
@kenodegard kenodegard mentioned this pull request Dec 1, 2023
44 tasks
@kenodegard kenodegard deleted the remove-pip-requests-fallback branch December 1, 2023 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants