15 |
15 |
16 from PyQt6.QtCore import QUrl, pyqtSlot |
16 from PyQt6.QtCore import QUrl, pyqtSlot |
17 from PyQt6.QtNetwork import QNetworkReply, QNetworkRequest |
17 from PyQt6.QtNetwork import QNetworkReply, QNetworkRequest |
18 from PyQt6.QtWidgets import QDialog, QMenu |
18 from PyQt6.QtWidgets import QDialog, QMenu |
19 |
19 |
20 from eric7 import Globals, Preferences |
20 from eric7 import EricUtilities, Preferences |
21 from eric7.EricGui.EricOverrideCursor import EricOverrideCursor |
21 from eric7.EricGui.EricOverrideCursor import EricOverrideCursor |
22 from eric7.EricWidgets import EricMessageBox |
22 from eric7.EricWidgets import EricMessageBox |
23 from eric7.EricWidgets.EricApplication import ericApp |
23 from eric7.EricWidgets.EricApplication import ericApp |
24 |
24 |
25 from ..EthernetDialogs import WiznetUtilities |
25 from ..EthernetDialogs import WiznetUtilities |
288 latestUrl = reply.url().toString() |
288 latestUrl = reply.url().toString() |
289 tag = latestUrl.rsplit("/", 1)[-1] |
289 tag = latestUrl.rsplit("/", 1)[-1] |
290 while tag and not tag[0].isdecimal(): |
290 while tag and not tag[0].isdecimal(): |
291 # get rid of leading non-decimal characters |
291 # get rid of leading non-decimal characters |
292 tag = tag[1:] |
292 tag = tag[1:] |
293 latestVersion = Globals.versionToTuple(tag) |
293 latestVersion = EricUtilities.versionToTuple(tag) |
294 |
294 |
295 if self._deviceData["mpy_version"] == "unknown": |
295 if self._deviceData["mpy_version"] == "unknown": |
296 currentVersionStr = self.tr("unknown") |
296 currentVersionStr = self.tr("unknown") |
297 currentVersion = (0, 0, 0) |
297 currentVersion = (0, 0, 0) |
298 else: |
298 else: |
299 currentVersionStr = ( |
299 currentVersionStr = ( |
300 self._deviceData["mpy_variant_version"] |
300 self._deviceData["mpy_variant_version"] |
301 if bool(self._deviceData["mpy_variant_version"]) |
301 if bool(self._deviceData["mpy_variant_version"]) |
302 else self._deviceData["mpy_version"] |
302 else self._deviceData["mpy_version"] |
303 ) |
303 ) |
304 currentVersion = Globals.versionToTuple(currentVersionStr) |
304 currentVersion = EricUtilities.versionToTuple(currentVersionStr) |
305 |
305 |
306 msg = self.tr( |
306 msg = self.tr( |
307 "<h4>MicroPython Version Information</h4>" |
307 "<h4>MicroPython Version Information</h4>" |
308 "<table>" |
308 "<table>" |
309 "<tr><td>Installed:</td><td>{0}</td></tr>" |
309 "<tr><td>Installed:</td><td>{0}</td></tr>" |