Page MenuHomePhabricator

Update to Python 3.11
Closed, ResolvedPublic

Description

Update things from Python 3.7 to Python 3.11 in both testing and the Toolforge deployment.

Details

TitleReferenceAuthorSource BranchDest Branch
Bump ib3 dependency to version 0.3.0toolforge-repos/jouncebot!4bd808work/bd808/py311main
k8s: Change runtime container to python311toolforge-repos/jouncebot!3bd808work/bd808/py311main
dev: update for 3.11 runtimetoolforge-repos/jouncebot!2bd808work/bd808/py311main
Customize query in GitLab

Event Timeline

bd808 changed the task status from Open to In Progress.Aug 29 2023, 10:55 PM
bd808 claimed this task.
bd808 triaged this task as Medium priority.

Mentioned in SAL (#wikimedia-cloud) [2023-08-29T23:58:02Z] <wm-bot> <bd808> Rolled back to 80a9d1a. IRC library failed to connect to libera.chat under Python 3.11. (T345198)

Failure to connect under py311:

Running jouncebot...
2023-08-29T23:53:23Z JounceBot    INFO    : Attempting to connect to server     
2023-08-29T23:53:23Z py.warnings  WARNING : /data/project/jouncebot/jouncebot/venv-k8s-py311/lib/python3.11/site-packages/irc/connection.py:55: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket()
  sock = self.wrapper(socket.socket(self.family, socket.SOCK_STREAM))

2023-08-29T23:53:23Z py.warnings  WARNING : /usr/lib/python3.11/ssl.py:1438: Dep
recationWarning: ssl.PROTOCOL_TLS is deprecated
  context = SSLContext(ssl_version)

2023-08-29T23:54:02Z ib3.mixins   WARNING : type: error, source: None, target: Closing Link: nat.cloudgw.eqiad1.wikimediacloud.org (Connection timed out), arguments: [], tags: []

Under py37 things look more like:

Running jouncebot...
2023-08-29T23:56:50Z JounceBot    INFO    : Attempting to connect to server
2023-08-29T23:56:55Z JounceBot    INFO    : Connected to server
2023-08-29T23:56:55Z JounceBot    INFO    : Getting information about the wiki and starting event handler
2023-08-29T23:56:55Z JounceBot    DEBUG   : Collecting new deployment information from the server
2023-08-29T23:56:56Z JounceBot    DEBUG   : Got 78 items
2023-08-29T23:56:56Z JounceBot    DEBUG   : Setting deploy timer to 21788 for deploycal-item-20230830T0600: (2023-08-30 06:00:00+00:00 -> 2023-08-30 07:00:00+00:00) MediaWiki infrastucture (UTC early);  for
2023-08-29T23:56:56Z ib3.auth     INFO    : Connected to server mercury.libera.chat
2023-08-29T23:56:56Z ib3.mixins   INFO    : Joining #wikimedia-operations
2023-08-29T23:57:01Z JounceBot    INFO    : Successfully joined channel #wikimedia-operations

I probably need to test ib3 under py311 next.