mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-04-23 22:27:17 -04:00
Added an announcement about upcoming deprecation of Python 3.8 in Bazarr v1.6
This commit is contained in:
parent
759da8a111
commit
85d75a72b8
1 changed files with 11 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
# coding=utf-8
|
||||
|
||||
import os
|
||||
import sys
|
||||
import hashlib
|
||||
import requests
|
||||
import logging
|
||||
|
@ -17,7 +18,11 @@ from app.config import settings
|
|||
from app.get_args import args
|
||||
from sonarr.info import get_sonarr_info
|
||||
from radarr.info import get_radarr_info
|
||||
from app.check_update import deprecated_python_version
|
||||
|
||||
|
||||
def upcoming_deprecated_python_version():
|
||||
# return True if Python version is deprecated
|
||||
return sys.version_info.major == 2 or (sys.version_info.major == 3 and sys.version_info.minor < 9)
|
||||
|
||||
|
||||
# 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():
|
|||
'timestamp': 1679606309,
|
||||
})
|
||||
|
||||
# deprecated Python versions
|
||||
if deprecated_python_version():
|
||||
# upcoming deprecated Python versions
|
||||
if upcoming_deprecated_python_version():
|
||||
announcements.append({
|
||||
'text': 'Starting with Bazarr 1.4, support for Python 3.7 will get dropped. Upgrade your current version of'
|
||||
'text': 'Starting with Bazarr 1.6, support for Python 3.8 will get dropped. Upgrade your current version of'
|
||||
' Python ASAP to get further updates.',
|
||||
'link': 'https://wiki.bazarr.media/Troubleshooting/Windows_installer_reinstall/',
|
||||
'dismissible': False,
|
||||
'timestamp': 1691162383,
|
||||
'timestamp': 1744469706,
|
||||
})
|
||||
|
||||
for announcement in announcements:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue