1
0
Commit Graph

7 Commits

Author SHA1 Message Date
SomberNight
d429b58168 vendor a part of distutils, to be removed from stdlib in py3.12
distutils (a module in the python standard library that we use) got deprecated in python 3.10,
and is planned to be removed from the stdlib in python 3.12.
see 9d38120e33/Lib/distutils/__init__.py (L16)
We only use it in the Qt update_checker (for signed version notifications), to compare version numbers.
That is, we only use a very small part of it (only `distutils.version.StrictVersion`).

```
.../electrum/electrum/gui/qt/update_checker.py:7: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.version import StrictVersion
```

Migration advice in PEP-632 suggests ( https://peps.python.org/pep-0632/#migration-advice ):
> `distutils.version` — use the `packaging` package

Note that `packaging` is a 3rd party package, i.e. it would be a new dependency.
Also, it does not provide an identical replacement for `distutils.version.StrictVersion`.

Care needs to be taken when changing the semantics of version numbers...
E.g. `packaging.parse` and `packaging.Version` are less strict than what we currently use.
We have to be careful that old code recognises new electrum version numbers as both valid
and numerically greater than their version.

I think the easiest approach is for us to vendor this small part of distutils.
Re directory structure, this is based on `pip`:
bab5bfce50/src/pip/_vendor
(although the approach here is much more naive ofc)
2022-05-04 19:59:59 +02:00
SomberNight
0ee9442972 qt update notifications: add another key for redundancy 2021-04-08 14:39:36 +02:00
SomberNight
0f6cbfba8e qt update checker: do not keep main window ref so it can gc-ed
related: #4905
2020-05-01 06:39:55 +02:00
SomberNight
5d4f8f3164 qt update checker: subclass QDialog instead of QWidget
this way "minimise to taskbar" and "fullscreen" buttons are not shown
2020-03-09 22:01:51 +01:00
SomberNight
f545d2b716 qt update checker: use longer timeout
closes #5899
2020-02-04 18:34:24 +01:00
SomberNight
3385a94753 logging: basics 2019-05-02 15:19:03 +02:00
SomberNight
67d080b34a mv qt update checker to its own file 2019-02-04 20:27:03 +01:00