You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Synapse doesn't detect URL preview dependencies if built with poetry-core 1.3.0, raising runtime errors #14079
Synapse 1.69.0rc1 does not provide the feature 'url_preview'
even though the requisite dependencies are installed. The problem is that python-poetry/poetry-core#476 now enforces https://peps.python.org/pep-0685/#specification. Wheels built by poetry-core include metadata describing an extra url-preview with a - but NOT url_preview with an _. This means the dependency-checking code in Synapse here
#14080 should avoid the problem by pinning the build-system requirements. Leaving this issue open though in case we do want to use newer versions of poetry-core in the future.
changed the title [-]Synapse doesn't detect URL preview dependencies if built with poetry-core 1.3.0[/-][+]Synapse doesn't detect URL preview dependencies if built with poetry-core 1.3.0, raising runtime errors[/+]on Oct 6, 2022
Isn't the fundamental problem here the whole notion of dependecy checking used by this project?
The checking is long-standing (circa 2015). My understanding is that it was originally intended to protect people who pip installed once, then git pulled a new version with stricter version requirements but didn't pip install again to process them.
Distributors who are specifically managing Synapse's dependencies are welcome to patch out the this mechanism.
For example, develop/pyproject.toml#L177-L185 causes hard failures when setuptools_rust is not available at runtime even though it only exists as a hack around build-system problems.
I definitely share your distaste for Python packaging noted in #13926. The ever-changing official view on how to build and distribute Python software, ill-formed build ecosystem and tendency to laugh off distribution package problems with a "just use pip" response have been increasingly large obstacles to sensible handling of Python in Void Linux.
We've already patched out the setuptools-rust dependency but generally try to avoid carrying downstream patches unless they fix problems uniquely related to our build infrastructure.
This should be fixed in poetry-core, have you tried 1.3.2? There is already a change regarding the normaloized directory name: python-poetry/poetry-core#495
Why is poetry-core pinned to >=1.0.0,<=1.3.1 in pyproject.toml? Version 1.3.2 was released almost two weeks ago.
This is a defensive choice---we've been bitten twice now by problems introduced by unbounded poetry-core requirements: here, and indirectly in #13849. Quoting #14085 (comment):
Discussed among the team. We'll constrain to <= 1.3.1 and will raise that upper bound to 1.3.2/1.4.0/another version if a) someone wants to use that version, and b) we can check that it's safe.
Activity
DMRobertson commentedon Oct 6, 2022
#14080 should avoid the problem by pinning the build-system requirements. Leaving this issue open though in case we do want to use newer versions of poetry-core in the future.
[-]Synapse doesn't detect URL preview dependencies if built with poetry-core 1.3.0[/-][+]Synapse doesn't detect URL preview dependencies if built with poetry-core 1.3.0, raising runtime errors[/+]8 remaining items
ahesford commentedon Oct 6, 2022
Isn't the fundamental problem here the whole notion of dependecy checking used by this project?
For example, https://github.com/matrix-org/synapse/blob/develop/pyproject.toml#L177-L185 causes hard failures when
setuptools_rustis not available at runtime even though it only exists as a hack around build-system problems.Merge tag 'v1.69.0rc2' into develop
DMRobertson commentedon Oct 7, 2022
The checking is long-standing (circa 2015). My understanding is that it was originally intended to protect people who
pip installed once, thengit pulled a new version with stricter version requirements but didn'tpip installagain to process them.Distributors who are specifically managing Synapse's dependencies are welcome to patch out the this mechanism.
See #13926 and #13952.
ahesford commentedon Oct 7, 2022
I definitely share your distaste for Python packaging noted in #13926. The ever-changing official view on how to build and distribute Python software, ill-formed build ecosystem and tendency to laugh off distribution package problems with a "just use pip" response have been increasingly large obstacles to sensible handling of Python in Void Linux.
We've already patched out the setuptools-rust dependency but generally try to avoid carrying downstream patches unless they fix problems uniquely related to our build infrastructure.
ShadowJonathan commentedon Oct 9, 2022
This caused a startup error for me after building 1.67 AND 1.68 from source.
darix commentedon Oct 14, 2022
Any plans to long term support newer poetry-core versions?
DMRobertson commentedon Oct 14, 2022
There are some thoughts on this in #14085 (comment).
bnavigator commentedon Oct 15, 2022
This should be fixed in poetry-core, have you tried 1.3.2? There is already a change regarding the normaloized directory name: python-poetry/poetry-core#495Edit: I was wrong. The core metadata specification mandates a hyphen.
DMRobertson commentedon Oct 17, 2022
Closing as #14085 has been merged into develop via the 1.69 release.
voegelas commentedon Oct 18, 2022
Why is poetry-core pinned to >=1.0.0,<=1.3.1 in
pyproject.toml? Version 1.3.2 was released almost two weeks ago.And what about "cache_memory"? I don't use that feature, but there's a check for "cache_memory" in
synapse/config/cache.py.DMRobertson commentedon Oct 18, 2022
This is a defensive choice---we've been bitten twice now by problems introduced by unbounded poetry-core requirements: here, and indirectly in #13849. Quoting #14085 (comment):
This happened in #14217.
DMRobertson commentedon Oct 18, 2022
Thanks, I missed this and will fixup. Edit: #14221.
Merge tag 'v1.69.0' into merge-1.69.0