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

Missing cgi module in Python 3.13 #17735

Closed
arkamar opened this issue Sep 20, 2024 · 1 comment
Closed

Missing cgi module in Python 3.13 #17735

arkamar opened this issue Sep 20, 2024 · 1 comment

Comments

@arkamar
Copy link
Contributor

arkamar commented Sep 20, 2024

Description

It seems all synapse dependencies now support Python 3.13 (at least in Gentoo), therefore I tried to run synapse tests in Py3.13 environment. Tests fail because the cgi module was removed from Py3.13. See the error log below.

Steps to reproduce

  • prepare Py3.13 env
  • run tests

Homeserver

homeserver

Synapse Version

1.115.0

Installation Method

Other (please mention below)

Database

sqlite

Workers

Single process

Platform

Gentoo amd64 in docker container.

Configuration

No response

Relevant log output

[ERROR]
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/twisted/trial/runner.py", line 711, in loadByName
    return self.suiteFactory([self.findByName(name, recurse=recurse)])
  File "/usr/lib/python3.13/site-packages/twisted/trial/runner.py", line 474, in findByName
    obj = reflect.namedModule(searchName)
  File "/usr/lib/python3.13/site-packages/twisted/python/reflect.py", line 156, in namedModule
    topLevel = __import__(name)
  File "/var/tmp/portage/net-im/synapse-1.115.0-r1/work/synapse-1.115.0/tests/util/test_wheel_timer.py", line 24, in <module>
    from .. import unittest
  File "/var/tmp/portage/net-im/synapse-1.115.0-r1/work/synapse-1.115.0/tests/unittest.py", line 80, in <module>
    from synapse.server import HomeServer
  File "/var/tmp/portage/net-im/synapse-1.115.0-r1/work/synapse-1.115.0-python3_13/install/usr/lib/python3.13/site-packages/synapse/server.py", line 55, in <module>
    from synapse.federation.federation_client import FederationClient
  File "/var/tmp/portage/net-im/synapse-1.115.0-r1/work/synapse-1.115.0-python3_13/install/usr/lib/python3.13/site-packages/synapse/federation/federation_client.py", line 72, in <module>
    from synapse.federation.transport.client import SendJoinResponse
  File "/var/tmp/portage/net-im/synapse-1.115.0-r1/work/synapse-1.115.0-python3_13/install/usr/lib/python3.13/site-packages/synapse/federation/transport/client.py", line 55, in <module>
    from synapse.http.matrixfederationclient import ByteParser, LegacyJsonSendParser
  File "/var/tmp/portage/net-im/synapse-1.115.0-r1/work/synapse-1.115.0-python3_13/install/usr/lib/python3.13/site-packages/synapse/http/matrixfederationclient.py", line 22, in <module>
    import cgi
builtins.ModuleNotFoundError: No module named 'cgi'

tests.util.test_wheel_timer
-------------------------------------------------------------------------------
Ran 370 tests in 3.045s

FAILED (errors=280, successes=90)

Anything else that would be useful to know?

The remaining errors look very similar, therefore I attached just one.

@arkamar
Copy link
Contributor Author

arkamar commented Oct 1, 2024

Fixed in #17741

@arkamar arkamar closed this as completed Oct 1, 2024
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

No branches or pull requests

1 participant