mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-06 18:33:13 +03:00
Removed keyring dependency
This remove all dependencies on the keyring lib, updates the requirements.txt to reflect that, and ensures that setup.py does not attempt to package it. Any use of the "old" keyring code will now return None and warn about its deprecation.
This commit is contained in:
parent
68fb18310d
commit
cf6eec3289
19
config.py
19
config.py
@ -1,5 +1,6 @@
|
|||||||
import numbers
|
import numbers
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
from os import getenv, makedirs, mkdir, pardir
|
from os import getenv, makedirs, mkdir, pardir
|
||||||
from os.path import expanduser, dirname, exists, isdir, join, normpath
|
from os.path import expanduser, dirname, exists, isdir, join, normpath
|
||||||
from sys import platform
|
from sys import platform
|
||||||
@ -367,25 +368,13 @@ class Config(object):
|
|||||||
# Common
|
# Common
|
||||||
|
|
||||||
def get_password(self, account):
|
def get_password(self, account):
|
||||||
try:
|
warnings.warn("password subsystem is no longer supported", DeprecationWarning)
|
||||||
import keyring
|
|
||||||
return keyring.get_password(self.identifier, account)
|
|
||||||
except ImportError:
|
|
||||||
return None
|
|
||||||
|
|
||||||
def set_password(self, account, password):
|
def set_password(self, account, password):
|
||||||
try:
|
warnings.warn("password subsystem is no longer supported", DeprecationWarning)
|
||||||
import keyring
|
|
||||||
keyring.set_password(self.identifier, account, password)
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def delete_password(self, account):
|
def delete_password(self, account):
|
||||||
try:
|
warnings.warn("password subsystem is no longer supported", DeprecationWarning)
|
||||||
import keyring
|
|
||||||
keyring.delete_password(self.identifier, account)
|
|
||||||
except:
|
|
||||||
pass # don't care - silently fail
|
|
||||||
|
|
||||||
# singleton
|
# singleton
|
||||||
config = Config()
|
config = Config()
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
certifi==2019.9.11
|
certifi==2019.9.11
|
||||||
keyring==19.2.0
|
|
||||||
pathtools>=0.1.2
|
|
||||||
requests>=2.11.1
|
requests>=2.11.1
|
||||||
watchdog>=0.8.3
|
watchdog>=0.8.3
|
||||||
|
semantic-version>=2.8.5
|
||||||
|
2
setup.py
2
setup.py
@ -73,7 +73,6 @@ if sys.platform=='darwin':
|
|||||||
'optimize': 2,
|
'optimize': 2,
|
||||||
'packages': [
|
'packages': [
|
||||||
'requests',
|
'requests',
|
||||||
'keyring.backends',
|
|
||||||
'sqlite3', # Included for plugins
|
'sqlite3', # Included for plugins
|
||||||
],
|
],
|
||||||
'includes': [
|
'includes': [
|
||||||
@ -119,7 +118,6 @@ elif sys.platform=='win32':
|
|||||||
'optimize': 2,
|
'optimize': 2,
|
||||||
'packages': [
|
'packages': [
|
||||||
'requests',
|
'requests',
|
||||||
'keyring.backends',
|
|
||||||
'sqlite3', # Included for plugins
|
'sqlite3', # Included for plugins
|
||||||
],
|
],
|
||||||
'includes': [
|
'includes': [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user