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

Add text_errors option to build_outputs.licenses #602

Merged
merged 4 commits into from
Jan 10, 2023

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Jan 10, 2023

Description

Continued work from #595

Some bundled license texts can be malformed, which leads to decoding errors. (see examples on Windows here). This allows users to specify how to handle that through the open() errors argument directly. Normally, you'd set this to replace.

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?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jan 10, 2023
@jaimergp jaimergp marked this pull request as ready for review January 10, 2023 15:46
@jaimergp jaimergp requested a review from a team as a code owner January 10, 2023 15:46
If false, only the path will be included.
- `text_errors` (optional str, default=`None`): How to handle decoding errors when reading the

Choose a reason for hiding this comment

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

For a second I thought perhaps 'replace' would be a better default, but in the end it's probably safest to not mess with people's included licenses, and make them change a var to do it themselves, so +1 on None as the default as it is now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I thought about it too. Worst case people can use the path attribute and check / collect the licenses themselves.

@larsoner larsoner merged commit 64c8743 into conda:main Jan 10, 2023
@larsoner
Copy link

Thanks @jaimergp

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Jan 11, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants