element-hq / element-hq/synapse

Synapse PyPI/pip installs are broken when installing both saml2 and oidc features

Open
#19,751 5 comments 0 reactions 0 assignees View on GitHub
A-Packaging S-Major T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

### Description

Synapse installation with PyPI started breaking after April 18th. Installations of Synapse v1.151.0 on April 18th and before worked fine. Installations of Synapse v1.151.0 starting April 19th will start breaking and throw errors. Synapse v1.152.0 did not fix this issue.

This is likely caused by a dependency.

### Steps to reproduce

- Install Synapse from Pypi with Python 3.14
- Observe the error

### Homeserver

metropolis.nexus

### Synapse Version

v1.151.0 after April 18th and v1.152.0

### Installation Method

pip (from PyPI)

### Database

PostgreSQL 18

### Workers

Multiple workers

### Platform

Pypi install inside of Alpine container

### Configuration

N/A

### Relevant log output

```shell
Starting synapse with args -m synapse.app.homeserver --config-path=/data/homeserver.yaml --config-path=/data/configs
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/local/lib/python3.14/site-packages/synapse/app/homeserver.py", line 27, in
from twisted.internet.tcp import Port
File "/usr/local/lib/python3.14/site-packages/twisted/internet/tcp.py", line 40, in
from twisted.internet._newtls import (
...<3 lines>...
)
File "/usr/local/lib/python3.14/site-packages/twisted/internet/_newtls.py", line 18, in
from twisted.protocols.tls import TLSMemoryBIOFactory
File "/usr/local/lib/python3.14/site-packages/twisted/protocols/tls.py", line 45, in
from OpenSSL.SSL import Connection, Error, SysCallError, WantReadError, ZeroReturnError
File "/usr/local/lib/python3.14/site-packages/OpenSSL/__init__.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/local/lib/python3.14/site-packages/OpenSSL/crypto.py", line 1570, in
class X509StoreFlags(object):
...<19 lines>...
CHECK_SS_SIGNATURE = _lib.X509_V_FLAG_CHECK_SS_SIGNATURE
File "/usr/local/lib/python3.14/site-packages/OpenSSL/crypto.py", line 1589, in X509StoreFlags
NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'. Did you mean: 'X509_V_FLAG_EXPLICIT_POLICY'?
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the PyPI installation with Python 3.14 and both saml2 and oidc features, then inspect the dependency versions involved in the OpenSSL error. Start from synapse/app/homeserver.py and the Twisted/OpenSSL import chain shown in the traceback; done means the affected installation starts without the reported X509_V_FLAG_NOTIFY_POLICY failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.