Skip to content

Update Python version to 3.13#7636

Merged
yoshiokatsuneo merged 3 commits intogetredash:masterfrom
yoshiokatsuneo:feat/python-3.13
Feb 24, 2026
Merged

Update Python version to 3.13#7636
yoshiokatsuneo merged 3 commits intogetredash:masterfrom
yoshiokatsuneo:feat/python-3.13

Conversation

@yoshiokatsuneo
Copy link
Contributor

@yoshiokatsuneo yoshiokatsuneo commented Feb 21, 2026

What type of PR is this?

  • Feature

Description

Update python version to 3.13, and packages needed to upgrade for it.

Before the PR, Redash supports python version 3.8 to 3.10. But, python 3.8 and 3.9 is already end of life, and 3.10 will be end of life in this October.

On the top of the efforts to update python version below, for now, I simply try to just update python and packages that needs to update to make updating easier.
At first, I tried to update to 3.14, but it was not so easy.

#7600
#7510

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually

Manual Testing

  • make up (Starting Web service)
  • create and run query
    • SQLite data source
    • PostgreSQL data source
    • MySQL data source
    • MongoDB data source
    • BigQuery data source
  • Download as
    • CSV file
    • Excel file
  • Login
    • Email
    • Google login

@yoshiokatsuneo yoshiokatsuneo force-pushed the feat/python-3.13 branch 9 times, most recently from 9486268 to c62ee12 Compare February 21, 2026 18:44
@yoshiokatsuneo yoshiokatsuneo marked this pull request as ready for review February 21, 2026 19:24
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 5 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="pyproject.toml">

<violation number="1" location="pyproject.toml:90">
P2: `pyodbc` is declared twice — once in `[tool.poetry.dependencies]` and again in `[tool.poetry.group.all_ds.dependencies]`. This duplication requires keeping both entries in sync on every version bump (as happened here). The `all_ds` group entry should be removed since it's already declared in the main dependencies.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

xlsxwriter = "3.2.9"
tzlocal = "4.3.1"
pyodbc = "5.1.0"
pyodbc = "5.3.0"
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 21, 2026

Choose a reason for hiding this comment

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

P2: pyodbc is declared twice — once in [tool.poetry.dependencies] and again in [tool.poetry.group.all_ds.dependencies]. This duplication requires keeping both entries in sync on every version bump (as happened here). The all_ds group entry should be removed since it's already declared in the main dependencies.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pyproject.toml, line 90:

<comment>`pyodbc` is declared twice — once in `[tool.poetry.dependencies]` and again in `[tool.poetry.group.all_ds.dependencies]`. This duplication requires keeping both entries in sync on every version bump (as happened here). The `all_ds` group entry should be removed since it's already declared in the main dependencies.</comment>

<file context>
@@ -84,9 +85,9 @@ urllib3 = "1.26.19"
+xlsxwriter = "3.2.9"
 tzlocal = "4.3.1"
-pyodbc = "5.1.0"
+pyodbc = "5.3.0"
 debugpy = "^1.8.9"
 paramiko = "3.4.1"
</file context>
Fix with Cubic

Copy link
Collaborator

@eradman eradman left a comment

Choose a reason for hiding this comment

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

thank you for working on this @yoshiokatsuneo!

I'm seeing this warning from the manage command

$ docker compose exec server ./manage.py
/usr/local/lib/python3.13/site-packages/tdclient/user_api.py:18: SyntaxWarning: invalid escape sequence '\$'
  ``[!#\$%\-_=\+<>0-9a-zA-Z]``
[2026-02-23 13:43:09,143][PID:329][INFO][xmlschema] Include schema from 'file:///usr/local/lib/python3.13/site-packages/xmlschema/schemas/XSD_1.1/xsd11-extra.xsd'

@yoshiokatsuneo
Copy link
Contributor Author

yoshiokatsuneo commented Feb 23, 2026

I'm seeing this warning from the manage command

$ docker compose exec server ./manage.py
/usr/local/lib/python3.13/site-packages/tdclient/user_api.py:18: SyntaxWarning: invalid escape sequence '\$'
  ``[!#\$%\-_=\+<>0-9a-zA-Z]``
[2026-02-23 13:43:09,143][PID:329][INFO][xmlschema] Include schema from 'file:///usr/local/lib/python3.13/site-packages/xmlschema/schemas/XSD_1.1/xsd11-extra.xsd'

@eradman

Thank you for the review !
I just fixed the warning by updating the td-client package from 1.0.0 to 1.5.0 .
(I could not easily update to the latest td-client 1.7.0, as it causes other dependency issue.)

bd27493

Copy link
Collaborator

@eradman eradman left a comment

Choose a reason for hiding this comment

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

With Python 3.13 (and related modules) I had to raise memory limits in Kubernetes from 600 to 900M for the worker processes. I assume there is nothing we can do about this

Copy link
Collaborator

@eradman eradman left a comment

Choose a reason for hiding this comment

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

Tested with PostgreSQL and Clickhouse data sources. So far no warnings, or failed jobs.

@yoshiokatsuneo
Copy link
Contributor Author

@eradman Thank you for your review and testing !

@yoshiokatsuneo yoshiokatsuneo merged commit ee2afc1 into getredash:master Feb 24, 2026
11 checks passed
@wtfiwtz
Copy link

wtfiwtz commented Feb 25, 2026

Sorry I didn't get back to finish #7510
We did have one issue after deployment - orchestrated-io#18
If you'd like a PR for that, let me know.

woogakoki added a commit to wooga/redash that referenced this pull request Feb 25, 2026
* master: (69 commits)
  Update Python version to 3.13 (getredash#7636)
  Update plotly.js to 3.3.1, react-pivottable to 0.11.0 (getredash#7634)
  Add charset option to RDS MySQL datasource (getredash#7616)
  Aggregate y value for same x (getredash#7631)
  fix(mysql): Change default charset to utf8mb4 (getredash#7615)
  Update packages for compatibility with setuptools 82 (getredash#7622)
  Snapshot: 26.02.0-dev
  chore: support ipv6 for server in docker (getredash#7596)
  Add impersonation option in trino datasource (getredash#7605)
  Fix Elasticsearch connector configuration key mismatch (getredash#7607)
  duckdb: Show catalog (database) where applicable (e.g. Motherduck) (getredash#7599)
  Snapshot: 26.01.0-dev
  Feature/catch notsupported exception (getredash#7573)
  Multi-org: format base path, not including protocol (getredash#7260)
  fix(destinations): Handle unicode characters in webhook notifications (getredash#7586)
  Persist updated values and apply saved dashboard parameters (getredash#7570)
  Add ibm-db package to enable DB2 as datasource: (getredash#7581)
  Snapshot: 25.12.0-dev
  PostgreSQL: allow connection parameters to be specified (getredash#7579)
  Add lineShape option for Line and Area charts (getredash#7582)
  ...
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.

3 participants