Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Drop the markdown runtime dependency (#19716)

Lukasz Ostrowskifee5e80f132b
diff --git a/pyproject.toml b/pyproject.toml
index db7638a2ff..82f40aafca 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -39,7 +39,6 @@ dependencies = [
"graphql-core>=2.3.2,<3",
"graphql-relay>=2.0.1,<3",
"lxml>=6.1.1,<7",
- "markdown>=3.10.2,<4",
"measurement>=3.2.2,<4",
"micawber>=0.6.2,<0.7",
"oauthlib~=3.1",
diff --git a/saleor/product/migrations/0045_md_to_html.py b/saleor/product/migrations/0045_md_to_html.py
index b120ea6439..6fb80fbf0c 100644
--- a/saleor/product/migrations/0045_md_to_html.py
+++ b/saleor/product/migrations/0045_md_to_html.py
@@ -1,17 +1,18 @@
# Generated by Django 1.11.9 on 2018-01-15 11:16
from django.db import migrations
-from markdown import markdown
-def md_to_html(apps, schema_editor):
- Product = apps.get_model("product", "Product")
- for product in Product.objects.all():
- product.description = markdown(product.description)
- product.save()
+class Migration(migrations.Migration):
+ """No-op kept only to preserve the migration graph.
+ This migration used to render every product's Markdown description to HTML
+ (a per-row Python loop over the whole table). Descriptions have since been
+ converted to editorjs JSON, so replaying it on a fresh database is pointless
+ and on an existing one it already ran. Emptying it drops the `markdown`
+ runtime dependency.
+ """
-class Migration(migrations.Migration):
dependencies = [("product", "0044_auto_20180108_0814")]
- operations = [migrations.RunPython(md_to_html, migrations.RunPython.noop)]
+ operations = []
diff --git a/uv.lock b/uv.lock
index 48021652b4..4cf9fa2505 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1312,15 +1312,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/90/a9/7a54b6834088d9ae528a7b780584ba6a39a9457b0ac330479f20ffbc9449/lxml-6.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:6540377fbd53fe1b629172288c464fb18db11ce1fa7dc15891da10aa9dcc3e7f", size = 3659610, upload-time = "2026-05-19T19:22:50.843Z" },
]
-[[package]]
-name = "markdown"
-version = "3.10.2"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/2b/f4/69fa6ed85ae003c2378ffa8f6d2e3234662abd02c10d216c0ba96081a238/markdown-3.10.2.tar.gz", hash = "sha256:994d51325d25ad8aa7ce4ebaec003febcce822c3f8c911e3b17c52f7f589f950", size = 368805, upload-time = "2026-02-09T14:57:26.942Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/de/1f/77fa3081e4f66ca3576c896ae5d31c3002ac6607f9747d2e3aa49227e464/markdown-3.10.2-py3-none-any.whl", hash = "sha256:e91464b71ae3ee7afd3017d9f358ef0baf158fd9a298db92f1d4761133824c36", size = 108180, upload-time = "2026-02-09T14:57:25.787Z" },
-]
-
[[package]]
name = "markdown-it-py"
version = "4.0.0"
@@ -2497,7 +2488,6 @@ dependencies = [
{ name = "idna" },
{ name = "kombu", extra = ["sqs"] },
{ name = "lxml" },
- { name = "markdown" },
{ name = "measurement" },
{ name = "micawber" },
{ name = "nh3" },
@@ -2604,7 +2594,6 @@ requires-dist = [
{ name = "idna", specifier = ">=3.18" },
{ name = "kombu", extras = ["sqs"], specifier = ">=4.6.11,<6.0.0" },
{ name = "lxml", specifier = ">=6.1.1,<7" },
- { name = "markdown", specifier = ">=3.10.2,<4" },
{ name = "measurement", specifier = ">=3.2.2,<4" },
{ name = "micawber", specifier = ">=0.6.2,<0.7" },
{ name = "nh3", specifier = ">=0.2.20" },