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

Bump python version #343

Merged
merged 5 commits into from
Jul 18, 2023
Merged

Bump python version #343

merged 5 commits into from
Jul 18, 2023

Conversation

dklimpel
Copy link
Contributor

@dklimpel dklimpel commented Jul 15, 2023

Python 3.7 is EOL

Python 3.11 is also the Python version of Synapse in Dockerfile

Max Python version here: 3.10.
The upgrade to Python 3.11 seems to need more dependency updates.

      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Iast27/Include -I/home/runner/work/sygnal/sygnal/.tox/check_codestyle/include -I/opt/hostedtoolcache/Python/3.11.4/x64/include/python3.11 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-311/ast27/Custom/typed_ast.o
      In file included from ast27/Custom/typed_ast.c:3:
      ast27/Custom/../Include/compile.h:5:10: fatal error: code.h: No such file or directory
          5 | #include "code.h"
            |          ^~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1

Possible solutions / causes:

Related to:

@@ -90,8 +89,7 @@ dependencies = [
"sentry-sdk>=0.10.2",
"service_identity>=18.1.0",
"Twisted>=19.7",
'typing-extensions>=3.7.4;python_version<"3.8"',
"zope.interface>=4.6.0",
"zope.interface>=5.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dklimpel dklimpel marked this pull request as ready for review July 15, 2023 13:19
@dklimpel dklimpel requested a review from a team as a code owner July 15, 2023 13:19
Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@erikjohnston erikjohnston merged commit 3a6ee38 into matrix-org:main Jul 18, 2023
5 checks passed
@dklimpel dklimpel deleted the bump_python branch July 18, 2023 09:54
@bradtgmurray
Copy link
Contributor

I'm pretty sure this broke apns configurations, as we pinned back aioapns to an older version that didn't support Python 3.10 here: #293

│ Error during startup:                                                                                                                                                                                                                                                                                                                                                  │
│ Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                     │
│   File "/usr/local/lib/python3.10/site-packages/sygnal/sygnal.py", line 228, in start                                                                                                                                                                                                                                                                                  │
│     yield ensureDeferred(self.make_pushkins_then_start())                                                                                                                                                                                                                                                                                                              │
│   File "/usr/local/lib/python3.10/site-packages/twisted/internet/defer.py", line 1374, in ensureDeferred                                                                                                                                                                                                                                                               │
│     return Deferred.fromCoroutine(coro)                                                                                                                                                                                                                                                                                                                                │
│   File "/usr/local/lib/python3.10/site-packages/twisted/internet/defer.py", line 1349, in fromCoroutine                                                                                                                                                                                                                                                                │
│     return _cancellableInlineCallbacks(coro)                                                                                                                                                                                                                                                                                                                           │
│   File "/usr/local/lib/python3.10/site-packages/twisted/internet/defer.py", line 2157, in _cancellableInlineCallbacks                                                                                                                                                                                                                                                  │
│     _inlineCallbacks(None, gen, status, _copy_context())                                                                                                                                                                                                                                                                                                               │
│ --- <exception caught here> ---                                                                                                                                                                                                                                                                                                                                        │
│   File "/usr/local/lib/python3.10/site-packages/sygnal/sygnal.py", line 228, in start                                                                                                                                                                                                                                                                                  │
│     yield ensureDeferred(self.make_pushkins_then_start())                                                                                                                                                                                                                                                                                                              │
│   File "/usr/local/lib/python3.10/site-packages/twisted/internet/defer.py", line 1997, in _inlineCallbacks                                                                                                                                                                                                                                                             │
│     result = context.run(gen.send, result)                                                                                                                                                                                                                                                                                                                             │
│   File "/usr/local/lib/python3.10/site-packages/sygnal/sygnal.py", line 200, in make_pushkins_then_start                                                                                                                                                                                                                                                               │
│     self.pushkins[app_id] = await self._make_pushkin(app_id, app_cfg)                                                                                                                                                                                                                                                                                                  │
│   File "/usr/local/lib/python3.10/site-packages/sygnal/sygnal.py", line 195, in _make_pushkin                                                                                                                                                                                                                                                                          │
│     return await clarse.create(app_name, self, app_config)                                                                                                                                                                                                                                                                                                             │
│   File "/usr/local/lib/python3.10/site-packages/sygnal/notifications.py", line 189, in create                                                                                                                                                                                                                                                                          │
│     return cls(name, sygnal, config)                                                                                                                                                                                                                                                                                                                                   │
│   File "/usr/local/lib/python3.10/site-packages/sygnal/apnspushkin.py", line 191, in __init__                                                                                                                                                                                                                                                                          │
│     self.apns_client = APNs(                                                                                                                                                                                                                                                                                                                                           │
│ builtins.TypeError: APNs.__init__() got an unexpected keyword argument 'loop'                                                                                                                                                                                                                                                                                          │

Do we do something like this other PR in a different project using aioapns to fix it? https://github.com/zulip/zulip/pull/21066/files

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.

None yet

3 participants