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

Migrate dependency management to poetry #1671

Merged
merged 2 commits into from Dec 11, 2023
Merged

Migrate dependency management to poetry #1671

merged 2 commits into from Dec 11, 2023

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Nov 13, 2023

Description

Switch dependency management to use poetry, which is much nicer than pip-tools. This is largely based off of
freedomofpress/securedrop-proxy#122 and applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the two versions we specifically need are listed in pyproject.toml and vary on the Python versions shipped with bullseye and bookworm.

Test Plan

Checklist

  • These changes should not need testing in Qubes
  • No update to the AppArmor profile is required for these changes
  • No database schema changes are needed

@legoktm
Copy link
Member Author

legoktm commented Nov 13, 2023

Going to switch this back to draft mode because it's blocked on freedomofpress/securedrop-builder#474.

Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.

We also don't actually need the pathlib2 dependency any more because
our Python version is high enough, so it's dropped now that poetry
is smart enough to detect it!
@legoktm
Copy link
Member Author

legoktm commented Dec 6, 2023

One dependency cleared and another appears...now depends on #1674.

@legoktm legoktm marked this pull request as ready for review December 6, 2023 20:46
@zenmonkeykstop zenmonkeykstop self-assigned this Dec 7, 2023
@zenmonkeykstop
Copy link
Contributor

  • CI and makefile targets look good
  • The package builds, is ~2x larger than current prod one, diffoscoping shows it has both pip3.11 and pip 3.9 in the venv which a) weird and b) probably starts to explain the size difference
  • gonna install in a dev setup and see how it looks.

zenmonkeykstop
zenmonkeykstop previously approved these changes Dec 11, 2023
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

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

Visual review looks good, client package builds and is installable. LGTM!

@legoktm legoktm dismissed zenmonkeykstop’s stale review December 11, 2023 20:12

The merge-base changed after approval.

zenmonkeykstop
zenmonkeykstop previously approved these changes Dec 11, 2023
@legoktm legoktm dismissed zenmonkeykstop’s stale review December 11, 2023 20:18

The merge-base changed after approval.

zenmonkeykstop
zenmonkeykstop previously approved these changes Dec 11, 2023
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

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

One more time LGTM!

@legoktm legoktm dismissed zenmonkeykstop’s stale review December 11, 2023 20:37

The merge-base changed after approval.

Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

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

3rd time's the charm!

@zenmonkeykstop zenmonkeykstop merged commit fa18de2 into main Dec 11, 2023
16 checks passed
@zenmonkeykstop zenmonkeykstop deleted the only-poetry branch December 11, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants