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

Update Poetry lock #377

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Update Poetry lock #377

merged 3 commits into from
Mar 28, 2023

Conversation

apyrgio
Copy link
Contributor

@apyrgio apyrgio commented Mar 27, 2023

Bump the Poetry lock file, to fix an issue with Poetry 1.4.1 and the Python wheels for Black 22. Also, fix some newly detected lint errors in the meantime.

Fixes #376

Run `poetry lock` and allow updating the existing dependencies. This
fixes a CI regression that was introduced by Poetry 1.4.1, which added
stricter Python wheels validation

Fixes #376
Due to a bump in our Python dependencies, we now install Black 23
instead of 22, which detects some of our files as badly formatted.
Due to a bump in our Python dependencies, we now install Mypy 1.1.1
instead of 0.982. This change triggered the following errors:

* Incompatible default for argument <a> (default has type
  None, argument has type <t>):

  Mypy further explains here that PEP 484 prohibits implicit Optional,
  so we need to make these types explicit Optional.

* Unused "type: ignore" comment, use narrower [method-assign] instead of
  [assignment]:

  Mypy has specialized some of its lints, meaning that we should switch
  to the newer variants.

Also, it detected several other small inconsistencies. We fix all of
these errors in this commit.
apyrgio added a commit that referenced this pull request Mar 27, 2023
Remove the association between MIME types and export filters, because
LibreOffice is able to auto-detect them on its own. Instead, ask
LibreOffice to simply convert the document to a .pdf.

This association was cumbersome for yet another reason; there are MIME
types that may be associated with more than one file type. That's why
it's better to let LibreOffice decide the proper filter for the
conversion.

Our current understanding is that this change won't widen our attack
surface for the following reasons:

* The output filters for PDF documents are pretty specific, and we don't
  affect the input filters somehow.
* The default behavior of LibreOffice on Alpine Linux is to disable
  macros.
* We preemptively run LibreOffice in safe mode, to remove hardware
  acceleration and make sure that macros are not invoked as well.

Closes #377
@apyrgio apyrgio changed the base branch from main to release-0.4.1 March 28, 2023 11:29
@apyrgio apyrgio merged commit 8b84682 into release-0.4.1 Mar 28, 2023
@deeplow deeplow deleted the 376-poetry-lock branch May 11, 2023 13:54
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

Successfully merging this pull request may close these issues.

Poetry 1.4.1 fails with _WheelFileValidationError
2 participants