Skip to content

Commit 85d75a7

Browse files
committed
Added an announcement about upcoming deprecation of Python 3.8 in Bazarr v1.6
1 parent 759da8a commit 85d75a7

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

bazarr/app/announcements.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# coding=utf-8
22

33
import os
4+
import sys
45
import hashlib
56
import requests
67
import logging
@@ -17,7 +18,11 @@
1718
from app.get_args import args
1819
from sonarr.info import get_sonarr_info
1920
from radarr.info import get_radarr_info
20-
from app.check_update import deprecated_python_version
21+
22+
23+
def upcoming_deprecated_python_version():
24+
# return True if Python version is deprecated
25+
return sys.version_info.major == 2 or (sys.version_info.major == 3 and sys.version_info.minor < 9)
2126

2227

2328
# Announcements as receive by browser must be in the form of a list of dicts converted to JSON
@@ -108,13 +113,14 @@ def get_local_announcements():
108113
'timestamp': 1679606309,
109114
})
110115

111-
# deprecated Python versions
112-
if deprecated_python_version():
116+
# upcoming deprecated Python versions
117+
if upcoming_deprecated_python_version():
113118
announcements.append({
114-
'text': 'Starting with Bazarr 1.4, support for Python 3.7 will get dropped. Upgrade your current version of'
119+
'text': 'Starting with Bazarr 1.6, support for Python 3.8 will get dropped. Upgrade your current version of'
115120
' Python ASAP to get further updates.',
121+
'link': 'https://wiki.bazarr.media/Troubleshooting/Windows_installer_reinstall/',
116122
'dismissible': False,
117-
'timestamp': 1691162383,
123+
'timestamp': 1744469706,
118124
})
119125

120126
for announcement in announcements:

0 commit comments

Comments
 (0)