Skip to content

Status of Python 3.13 support #1721

Closed
Closed

Description

@lbillinghamwrk

Hello Folks,

Can you please help me understand the support status for the latest python?

It looks like we depend on cgi; apparently via webob and then via webtest which is used in production to validate incoming webhooks
However, cgi is no longer included in python 3.13.

While do have a test-suite running on 3.13 already python-package.yml; I'm not sure that we exercise the full webserving/webob path there.

The [latest PR checks run] (https://github.com/errbotio/errbot/actions/runs/14037314539/job/39298415722#step:5:256) does still show warnings about cgi

 /home/runner/work/errbot/errbot/.tox/py/lib/python3.12/site-packages/webob/compat.py:5: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    from cgi import parse_header

Are we confident that CI exercises the cgi-ish code paths? Can we run fully on python 3.13

Activity

  1. lbillinghamwrk commented on Apr 23, 2025

    @lbillinghamwrk
    ContributorAuthor

    If the webserver doesn't work, the fix may be to depend on legacy-cgi; python_version >= '3.13'

  2. nzlosh commented on Apr 23, 2025

    @nzlosh
    Contributor

    Good spotting!

    I've not seen anyone mention they're actively working on 3.13 support. legacy-cgi suggests new projects use ASGI or WSGI. PEP-0594 states the cgi module is poorly designed and hard to maintain. The CGI architecture is also criticised as inefficient.

    It seems to me that the best long term solution for the errbot project would be to migrate away from CGI to ASGI/WSGI, but this requires someone with the skills and time to volunteer and carry out the task to completion.

  3. lbillinghamwrk commented on Apr 25, 2025

    @lbillinghamwrk
    ContributorAuthor

    Thank you. Do you think it could be worth adding legacy-cgi to our dependencies as a stopgap?

    I can do that, or change things to flag max version is 3.12.

    I wouldn't be capable of doing the refactor/migration in the foreseeable future.

  4. nzlosh commented on Apr 25, 2025

    @nzlosh
    Contributor

    If legacy-cgi get 3.13 support, it seems like a reasonable stopgap until we hit a hard blocker.

  5. sijis commented on May 23, 2025

    @sijis
    Contributor

    @lbillinghamwrk if you create a PR to add that dependency for 3.12, I'll merge that in.

    Long term, as @nzlosh suggested, a switch to ASGI/WSGI may be the best approach.

  6. lbillinghamwrk commented on May 27, 2025

    @lbillinghamwrk
    ContributorAuthor

    Thanks @sijis. I have opened #1729 to address this.
    I've tested that pip install . works on python 3.9 and 3.13.

  7. sijis commented on May 1, 2026

    @sijis
    Contributor

    merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions