-
Notifications
You must be signed in to change notification settings - Fork 385
Clarify Python dependency constraints #18856
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
Clarify Python dependency constraints #18856
Conversation
docs/deprecation_policy.md
Outdated
For Python dependencies, we often specify loose version constraints (ex. `>=X.Y.Z`) to | ||
be forwards compatible with any new versions. Upper bounds (`<A.B.C`) are only added | ||
when necessary to prevent known incompatibilities. | ||
|
||
When selecting a minimum version, we prioritize alignment with major Linux | ||
distributions. A version is typically considered acceptable once it is available in both | ||
the latest [Debian Stable](https://packages.debian.org/stable/) and [Ubuntu | ||
LTS](https://launchpad.net/ubuntu) repositories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote something. Feel free to correct it however.
docs/deprecation_policy.md
Outdated
When selecting a minimum version, we prioritize alignment with major Linux | ||
distributions. A version is typically considered acceptable once it is available in both | ||
the latest [Debian Stable](https://packages.debian.org/stable/) and [Ubuntu | ||
LTS](https://launchpad.net/ubuntu) repositories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richvdh chimed in with some counter-points on reasons why we may want to relax this
[Having said all that, Synapse is no longer included in Debian stable, mostly because nobody had time to backport Synapse's critical fixes. I haven't looked at the situation in Fedora or other distros recently, but maybe it's time to reconsider the policy of being tolerant of old versions of dependencies.]
Removing this from the review queue and instead added to the to-discuss board, as I feel it's something we should discuss as a team. I personally don't have the full context on packaging here to approve/deny. We may also want to pitch the question to packagers in some form? |
docs/deprecation_policy.md
Outdated
extra scrutiny or consideration at this point. | ||
|
||
We aggressively update Rust dependencies. Since these are statically linked and managed | ||
entirely by `cargo` during build, they pose no ongoing maintenance burden on others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't entirely true, Fedora for example packages each dependency individually when they can, and so they do for Synapse right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the extra background @sandhose!
Reading on https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/, it seems like they prefer not to vendor dependencies but it's possible when necessary.
From the weekly backend team meeting:
- We experience real pain around having to be careful with our Python dependencies and we'd like to avoid also having that pain for Rust.
- Given Rust is compiled, and generally package managers distribute compiled artifacts, its way more niche to require packaging Rust deps than Python deps.
- And regardless, we are aggressive with our Rust dependency updates
I've updated the langauge to be "can pose no ongoing maintenance burden" and a note about Fedora packaging Rust libraries as the outlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This follows what I, as a Synapse developer, expect. Thanks for writing it up so it's clear to others, and so that we don't deviate from the pattern unwittingly.
👍 The current iteration basically documents status-quo. Thanks for the review @anoadragon453 🐯 There is a potential future for relaxing things even further (see #18856 (comment)) |
Clarify Python dependency constraints
Spawning from #18852 (comment) as I don't actually know the the exact rule of thumb. It's unclear to me what we care about exactly. Our deprecation policy mentions Debian oldstable support at-least for the version of SQLite. But then we only refer to Debian stable for the Twisted dependency:
synapse/pyproject.toml
Lines 179 to 186 in 40edb10
Dev notes
Arch:
Fedora:
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.