Diff
Modified: trunk/Tools/ChangeLog (271696 => 271697)
--- trunk/Tools/ChangeLog 2021-01-21 17:46:10 UTC (rev 271696)
+++ trunk/Tools/ChangeLog 2021-01-21 17:54:53 UTC (rev 271697)
@@ -1,3 +1,16 @@
+2021-01-21 Jonathan Bedard <jbed...@apple.com>
+
+ [webkitscmpy] Handle machines that cannot import keyring
+ https://bugs.webkit.org/show_bug.cgi?id=220800
+ <rdar://problem/73454666>
+
+ Reviewed by Aakash Jain.
+
+ * Scripts/libraries/webkitscmpy/setup.py: Bump version.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
+ (GitHub.credentials): Make keyring optional.
+
2021-01-21 Sam Weinig <wei...@apple.com>
Rework color clamping logic to be more consistent and clear
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (271696 => 271697)
--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2021-01-21 17:46:10 UTC (rev 271696)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2021-01-21 17:54:53 UTC (rev 271697)
@@ -30,7 +30,7 @@
setup(
name='webkitscmpy',
- version='0.9.3',
+ version='0.9.4',
description='Library designed to interact with git and svn repositories.',
long_description=readme(),
classifiers=[
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (271696 => 271697)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2021-01-21 17:46:10 UTC (rev 271696)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2021-01-21 17:54:53 UTC (rev 271697)
@@ -46,7 +46,7 @@
"Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
)
-version = Version(0, 9, 3)
+version = Version(0, 9, 4)
AutoInstall.register(Package('entrypoints', Version(0, 3, 0)))
AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py (271696 => 271697)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py 2021-01-21 17:46:10 UTC (rev 271696)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py 2021-01-21 17:54:53 UTC (rev 271697)
@@ -30,6 +30,7 @@
from datetime import datetime
from requests.auth import HTTPBasicAuth
+from subprocess import CalledProcessError
from webkitcorepy import OutputCapture, decorators
from webkitscmpy import Commit, Contributor
from webkitscmpy.remote.scm import Scm
@@ -71,13 +72,17 @@
return username, access_token
with OutputCapture():
- import keyring
+ try:
+ import keyring
+ except (CalledProcessError, ImportError):
+ keyring = None
username_prompted = False
password_prompted = False
if not username:
try:
- username = keyring.get_password(self.api_url, 'username')
+ if keyring:
+ username = keyring.get_password(self.api_url, 'username')
except RuntimeError:
pass
@@ -92,7 +97,8 @@
if not access_token and required:
try:
- access_token = keyring.get_password(self.api_url, username)
+ if keyring:
+ access_token = keyring.get_password(self.api_url, username)
except RuntimeError:
pass
@@ -105,7 +111,7 @@
if username and access_token:
self._cached_credentials = (username, access_token)
- if username_prompted or password_prompted:
+ if keyring and (username_prompted or password_prompted):
sys.stderr.write('Store username and access token in system keyring for {}? (Y/N): '.format(self.api_url))
response = (input if sys.version_info > (3, 0) else raw_input)()
if response.lower() in ['y', 'yes', 'ok']: