Skip to content

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Aug 22, 2025

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

# Twisted 18.9 introduces some logger improvements that the structured
# logger utilises
# Twisted 19.7.0 moves test helpers to a new module and deprecates the old location.
# Twisted 21.2.0 introduces contextvar support.
# We could likely bump this to 22.1 without making distro packagers'
# lives hard (as of 2025-07, distro support is Ubuntu LTS: 22.1, Debian stable: 22.4,
# RHEL 9: 22.10)
Twisted = {extras = ["tls"], version = ">=21.2.0"}

Dev notes

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

Comment on lines 29 to 36
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.
Copy link
Contributor Author

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.

@MadLittleMods MadLittleMods marked this pull request as ready for review August 22, 2025 00:52
@MadLittleMods MadLittleMods requested a review from a team as a code owner August 22, 2025 00:52
@github-actions github-actions bot deployed to PR Documentation Preview August 22, 2025 00:52 Active
Comment on lines 33 to 36
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.
Copy link
Contributor Author

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.]

-- @richvdh, #18852 (comment)

@anoadragon453
Copy link
Member

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?

@anoadragon453 anoadragon453 removed the request for review from a team August 27, 2025 06:33
@github-actions github-actions bot deployed to PR Documentation Preview September 5, 2025 20:11 Active

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.
Copy link
Member

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.

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.

3 participants