From 7540c9b3ef736f2169fa559a50bd11ca311f6b6d Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Mon, 29 Dec 2025 03:53:59 -0500 Subject: [PATCH] twisted.python.constants is moving to constantly, try both (#5339) --- platformio/remote/projectsync.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platformio/remote/projectsync.py b/platformio/remote/projectsync.py index 1715145f..cdb61a28 100644 --- a/platformio/remote/projectsync.py +++ b/platformio/remote/projectsync.py @@ -17,7 +17,11 @@ import tarfile from binascii import crc32 from os.path import getmtime, getsize, isdir, isfile, join -from twisted.python import constants # pylint: disable=import-error +try: + from twisted.python import constants # pylint: disable=import-error +except ImportError: + # https://docs.twisted.org/en/twisted-16.5.0/core/howto/constants.html + import constantly as constants # pylint: disable=import-error from platformio.compat import hashlib_encode_data