matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

released matrix-synapse-testutils is outdated #16630

Closed gnunicorn closed 11 months ago

gnunicorn commented 11 months ago

Description

Trying to build a new synapse module using the cookiecutter template. Adding tests using the released matrix-synapse-testutils (big thanks for doing that!) but run into the pydantic v2 error ( #16331 ) which is meant to work in the latest matrix-synapse release already (using the compat layer) but as I am pulling in matrix-synapse-testutils it fails. The latest release of that package is 1.80.0 from April leading to pulling in matrix-synapse 1.80 which doesn't have the fix either :( .

Would highly appreciate if a new release of the testutils could be cut by the maintainers!

Steps to reproduce

dependencies = [ "matrix-synapse >= 1.95.1", ]

[project.optional-dependencies] dev = [ "matrix_synapse_testutils", ]

- See it fail: ```

ERROR: Cannot install matrix-synapse[test]==1.65.0 and synapse-super-invites[dev]==0.1.dev1+g215546d.d20231114 because these package versions have conflicting dependencies.

The conflict is caused by:
    synapse-super-invites[dev] 0.1.dev1+g215546d.d20231114 depends on matrix-synapse>=1.95.1
    matrix-synapse[test] 1.65.0 depends on matrix-synapse 1.65.0 (from https://files.pythonhosted.org/packages/7b/d4/a2e1dc91492aca455fb7507d069b6f75de6cea15c2534d2e2c3c3bb6b23b/matrix_synapse-1.65.0-py3-none-any.whl (from https://pypi.org/simple/matrix-synapse/) (requires-python:>=3.7.1,<4.0.0))

Homeserver

n/a

Synapse Version

n/a

Installation Method

pip (from PyPI)

Database

n/a

Workers

Single process

Platform

Arch Linux

Configuration

No response

Relevant log output

n/a

Anything else that would be useful to know?

No response

gnunicorn commented 11 months ago

Workaround until then: adding "pydantic >=1.7.4, <2" as a dev dependency on the local project:

[project.optional-dependencies]
dev = [
  # ...
  "matrix_synapse_testutils",
  "pydantic >=1.7.4, <2", ## FIXME: https://github.com/matrix-org/synapse/issues/16630
  # ...
]
clokep commented 11 months ago

This package is not released by us: https://pypi.org/project/matrix-synapse-testutils/

See https://github.com/julianhille/matrix-synapse-testutils

gnunicorn commented 11 months ago

I see. Didn't realize. Thanks for the heads up, @clokep !