mirror of
https://github.com/onionshare/onionshare.git
synced 2025-03-15 02:16:32 -04:00
Replace distutils.version with packaging.version
This commit is contained in:
parent
818472e62c
commit
42e87d4f7b
@ -33,7 +33,7 @@ import tempfile
|
||||
import time
|
||||
import traceback
|
||||
|
||||
from distutils.version import LooseVersion as Version
|
||||
from packaging.version import Version
|
||||
|
||||
|
||||
class TorErrorAutomatic(Exception):
|
||||
@ -658,7 +658,8 @@ class Onion(object):
|
||||
# Does this version of Tor support next-gen ('v3') onions?
|
||||
# Note, this is the version of Tor where this bug was fixed:
|
||||
# https://trac.torproject.org/projects/tor/ticket/28619
|
||||
self.supports_v3_onions = self.tor_version >= Version("0.3.5.7")
|
||||
cleaned_tor_version = re.sub(r"\s*\(.*\)", "", self.tor_version)
|
||||
self.supports_v3_onions = Version(cleaned_tor_version) >= Version("0.3.5.7")
|
||||
|
||||
# Now that we are connected to Tor, if we are using built-in bridges,
|
||||
# update them with the latest copy available from the Tor API
|
||||
|
@ -22,7 +22,7 @@ from PySide6 import QtCore
|
||||
import datetime
|
||||
import re
|
||||
import socks
|
||||
from distutils.version import LooseVersion as Version
|
||||
from packaging.version import Version
|
||||
|
||||
from onionshare_cli.settings import Settings
|
||||
|
||||
@ -106,7 +106,8 @@ class UpdateChecker(QtCore.QObject):
|
||||
if force:
|
||||
path += "?force=1"
|
||||
|
||||
if Version(self.onion.tor_version) >= Version("0.3.2.9"):
|
||||
cleaned_tor_version = re.sub(r"\s*\(.*\)", "", self.onion.tor_version)
|
||||
if Version(cleaned_tor_version) >= Version("0.3.2.9"):
|
||||
onion_domain = (
|
||||
"lldan5gahapx5k7iafb3s4ikijc4ni7gx5iywdflkba5y2ezyg6sjgyd.onion"
|
||||
)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
from distutils.command.build import build
|
||||
from setuptools.command.build import build
|
||||
import sys
|
||||
import os
|
||||
import inspect
|
||||
|
Loading…
x
Reference in New Issue
Block a user