blob: 76b595c7ded6e5ac94d30b8eaf8690a6d0be80d6 [file] [log] [blame] [edit]
From 7a649de6561ec181208a9c4fa712aed614a224d4 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd@kuhls.net>
Date: Mon, 8 Dec 2025 18:03:03 +0100
Subject: [PATCH] Fix build with python 3.14
ast.Str was deprecated in python 3.12 and removed in 3.14. It inherited
from ast.Constant, `Str.s` was equivalent to `Constant.value`, so we can
use the latter on both old and newer python versions.
Patch was inspired by
https://hg-edge.mozilla.org/mozilla-central/rev/dbf9702ed87e
Upstream: https://github.com/aio-libs/aiohttp-sse/commit/9eec5f5b0355bb3853d0e4f2af6486c9a5887e38
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 6843260..fa41025 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ class VersionFinder(ast.NodeVisitor):
def visit_Assign(self, node):
if not self.version:
if node.targets[0].id == "__version__":
- self.version = node.value.s
+ self.version = node.value.value
def read_version():
--
2.47.3