Hello community, here is the log from the commit of package python-keyring for openSUSE:Factory checked in at 2020-06-05 19:59:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-keyring (Old) and /work/SRC/openSUSE:Factory/.python-keyring.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-keyring" Fri Jun 5 19:59:43 2020 rev:37 rq:810904 version:21.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-keyring/python-keyring.changes 2020-04-19 21:49:44.264113024 +0200 +++ /work/SRC/openSUSE:Factory/.python-keyring.new.3606/python-keyring.changes 2020-06-05 19:59:45.831845216 +0200 @@ -1,0 +2,19 @@ +Tue Jun 2 16:32:46 UTC 2020 - Dirk Mueller <[email protected]> + +- update to 21.2.1: + * #426: Restored lenience on startup when entry point + metadata is missing. + * #423: Avoid RecursionError when initializing backends + when a limit is supplied. + +------------------------------------------------------------------- +Thu May 28 07:16:57 UTC 2020 - Tomáš Chvátal <[email protected]> + +- Fix the requirements to match reality of setup.cfg + +------------------------------------------------------------------- +Mon May 25 06:50:30 UTC 2020 - Petr Gajdos <[email protected]> + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- Old: ---- keyring-21.2.0.tar.gz New: ---- keyring-21.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-keyring.spec ++++++ --- /var/tmp/diff_new_pack.LOXmUD/_old 2020-06-05 19:59:46.751848399 +0200 +++ /var/tmp/diff_new_pack.LOXmUD/_new 2020-06-05 19:59:46.755848412 +0200 @@ -19,16 +19,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-keyring -Version: 21.2.0 +Version: 21.2.1 Release: 0 Summary: System keyring service access from Python License: Python-2.0 AND MIT -Group: Development/Languages/Python URL: https://github.com/jaraco/keyring Source: https://files.pythonhosted.org/packages/source/k/keyring/keyring-%{version}.tar.gz BuildRequires: %{python_module SecretStorage >= 3} BuildRequires: %{python_module entrypoints} -BuildRequires: %{python_module mock} +BuildRequires: %{python_module importlib-metadata} BuildRequires: %{python_module pytest >= 3.5} BuildRequires: %{python_module setuptools >= 17.1} BuildRequires: %{python_module setuptools_scm >= 1.15.0} @@ -37,8 +36,11 @@ BuildRequires: python-rpm-macros Requires: python-SecretStorage >= 3 Requires: python-entrypoints +Requires: python-importlib-metadata Requires: python-jeepney >= 0.4.2 Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -57,15 +59,22 @@ %install %python_install +%python_clone -a %{buildroot}%{_bindir}/keyring %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest +%post +%python_install_alternative keyring + +%postun +%python_uninstall_alternative keyring + %files %{python_files} %doc README.rst CHANGES.rst %license LICENSE -%python3_only %{_bindir}/keyring +%python_alternative %{_bindir}/keyring %{python_sitelib}/keyring-%{version}-py*.egg-info %{python_sitelib}/keyring/ ++++++ keyring-21.2.0.tar.gz -> keyring-21.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/CHANGES.rst new/keyring-21.2.1/CHANGES.rst --- old/keyring-21.2.0/CHANGES.rst 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/CHANGES.rst 2020-05-01 15:02:37.000000000 +0200 @@ -1,3 +1,11 @@ +v21.2.1 +------- + +* #426: Restored lenience on startup when entry point + metadata is missing. +* #423: Avoid RecursionError when initializing backends + when a limit is supplied. + v21.2.0 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/PKG-INFO new/keyring-21.2.1/PKG-INFO --- old/keyring-21.2.0/PKG-INFO 2020-03-15 03:09:06.413656000 +0100 +++ new/keyring-21.2.1/PKG-INFO 2020-05-01 15:02:53.006646400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: keyring -Version: 21.2.0 +Version: 21.2.1 Summary: Store and access your passwords safely. Home-page: https://github.com/jaraco/keyring Author: Kang Zhang @@ -229,6 +229,36 @@ print("password", keyring.get_password("demo-service", "tarek")) + Disabling Keyring + ================= + + In many cases, uninstalling keyring will never be necessary. + Especially on Windows and macOS, the behavior of keyring is + usually degenerate, meaning it will return empty values to + the caller, allowing the caller to fall back to some other + behavior. + + In some cases, the default behavior of keyring is undesirable and + it would be preferable to disable the keyring behavior altogether. + There are several mechanisms to disable keyring: + + - Uninstall keyring. Most applications are tolerant to keyring + not being installed. Uninstalling keyring should cause those + applications to fall back to the behavior without keyring. + This approach affects that Python environment where keyring + would otherwise have been installed. + + - Configure the Null keyring in the environment. Set + ``PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring`` + in the environment, and the ``Null`` (degenerate) backend + will be used. This approach affects all uses of Keyring where + that variable is set. + + - Permanently configure the Null keyring for the user by running + ``keyring --disable`` or ``python -m keyring --disable``. + This approach affects all uses of keyring for that user. + + Altering Keyring Behavior ========================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/README.rst new/keyring-21.2.1/README.rst --- old/keyring-21.2.0/README.rst 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/README.rst 2020-05-01 15:02:37.000000000 +0200 @@ -219,6 +219,36 @@ print("password", keyring.get_password("demo-service", "tarek")) +Disabling Keyring +================= + +In many cases, uninstalling keyring will never be necessary. +Especially on Windows and macOS, the behavior of keyring is +usually degenerate, meaning it will return empty values to +the caller, allowing the caller to fall back to some other +behavior. + +In some cases, the default behavior of keyring is undesirable and +it would be preferable to disable the keyring behavior altogether. +There are several mechanisms to disable keyring: + +- Uninstall keyring. Most applications are tolerant to keyring + not being installed. Uninstalling keyring should cause those + applications to fall back to the behavior without keyring. + This approach affects that Python environment where keyring + would otherwise have been installed. + +- Configure the Null keyring in the environment. Set + ``PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring`` + in the environment, and the ``Null`` (degenerate) backend + will be used. This approach affects all uses of Keyring where + that variable is set. + +- Permanently configure the Null keyring for the user by running + ``keyring --disable`` or ``python -m keyring --disable``. + This approach affects all uses of keyring for that user. + + Altering Keyring Behavior ========================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/azure-pipelines.yml new/keyring-21.2.1/azure-pipelines.yml --- old/keyring-21.2.0/azure-pipelines.yml 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/azure-pipelines.yml 2020-05-01 15:02:37.000000000 +0200 @@ -11,10 +11,12 @@ - '*' pool: - vmimage: 'Ubuntu-18.04' + vmImage: $(pool_vm_image) variables: - group: Azure secrets +- name: pool_vm_image + value: Ubuntu-18.04 stages: - stage: Test @@ -23,10 +25,17 @@ - job: 'Test' strategy: matrix: - Python36: + Bionic Python 3.6: python.version: '3.6' - Python38: + Bionic Python 3.8: python.version: '3.8' + Windows: + python.version: '3.8' + pool_vm_image: vs2017-win2016 + MacOS: + python.version: '3.8' + pool_vm_image: macos-10.15 + maxParallel: 4 steps: @@ -41,6 +50,9 @@ - script: | tox -- --junit-xml=test-results.xml displayName: 'run tests' + env: + AGENT_OS: $(Agent.OS) + TOX_TESTENV_PASSENV: AGENT_OS - task: PublishTestResults@2 inputs: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/keyring/backend.py new/keyring-21.2.1/keyring/backend.py --- old/keyring-21.2.0/keyring/backend.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/keyring/backend.py 2020-05-01 15:02:37.000000000 +0200 @@ -196,7 +196,7 @@ `initialize_func` is optional, but will be invoked if callable. """ - entry_points = metadata.entry_points()['keyring.backends'] + entry_points = metadata.entry_points().get('keyring.backends', []) for ep in entry_points: try: log.debug('Loading %s', ep.name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/keyring/backends/chainer.py new/keyring-21.2.1/keyring/backends/chainer.py --- old/keyring-21.2.0/keyring/backends/chainer.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/keyring/backends/chainer.py 2020-05-01 15:02:37.000000000 +0200 @@ -34,11 +34,16 @@ """ Discover all keyrings for chaining. """ - allowed = ( - keyring - for keyring in filter(backend._limit, backend.get_all_keyring()) - if not isinstance(keyring, ChainerBackend) and keyring.priority > 0 - ) + + def allow(keyring): + limit = backend._limit or bool + return ( + not isinstance(keyring, ChainerBackend) + and limit(keyring) + and keyring.priority > 0 + ) + + allowed = filter(allow, backend.get_all_keyring()) return sorted(allowed, key=backend.by_priority, reverse=True) def get_password(self, service, username): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/keyring.egg-info/PKG-INFO new/keyring-21.2.1/keyring.egg-info/PKG-INFO --- old/keyring-21.2.0/keyring.egg-info/PKG-INFO 2020-03-15 03:09:04.000000000 +0100 +++ new/keyring-21.2.1/keyring.egg-info/PKG-INFO 2020-05-01 15:02:52.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: keyring -Version: 21.2.0 +Version: 21.2.1 Summary: Store and access your passwords safely. Home-page: https://github.com/jaraco/keyring Author: Kang Zhang @@ -229,6 +229,36 @@ print("password", keyring.get_password("demo-service", "tarek")) + Disabling Keyring + ================= + + In many cases, uninstalling keyring will never be necessary. + Especially on Windows and macOS, the behavior of keyring is + usually degenerate, meaning it will return empty values to + the caller, allowing the caller to fall back to some other + behavior. + + In some cases, the default behavior of keyring is undesirable and + it would be preferable to disable the keyring behavior altogether. + There are several mechanisms to disable keyring: + + - Uninstall keyring. Most applications are tolerant to keyring + not being installed. Uninstalling keyring should cause those + applications to fall back to the behavior without keyring. + This approach affects that Python environment where keyring + would otherwise have been installed. + + - Configure the Null keyring in the environment. Set + ``PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring`` + in the environment, and the ``Null`` (degenerate) backend + will be used. This approach affects all uses of Keyring where + that variable is set. + + - Permanently configure the Null keyring for the user by running + ``keyring --disable`` or ``python -m keyring --disable``. + This approach affects all uses of keyring for that user. + + Altering Keyring Behavior ========================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/keyring.egg-info/SOURCES.txt new/keyring-21.2.1/keyring.egg-info/SOURCES.txt --- old/keyring-21.2.0/keyring.egg-info/SOURCES.txt 2020-03-15 03:09:06.000000000 +0100 +++ new/keyring-21.2.1/keyring.egg-info/SOURCES.txt 2020-05-01 15:02:52.000000000 +0200 @@ -55,6 +55,7 @@ keyring/util/__init__.py keyring/util/platform_.py keyring/util/properties.py +tests/test_core.py tests/test_errors.py tests/test_multiprocess.py tests/test_packaging.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/keyring.egg-info/requires.txt new/keyring-21.2.1/keyring.egg-info/requires.txt --- old/keyring-21.2.0/keyring.egg-info/requires.txt 2020-03-15 03:09:04.000000000 +0100 +++ new/keyring-21.2.1/keyring.egg-info/requires.txt 2020-05-01 15:02:52.000000000 +0200 @@ -18,5 +18,5 @@ pytest!=3.7.3,>=3.5 pytest-checkdocs>=1.2.3 pytest-flake8 -pytest-black-multipy +pytest-black>=0.3.7 pytest-cov diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/pytest.ini new/keyring-21.2.1/pytest.ini --- old/keyring-21.2.0/pytest.ini 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/pytest.ini 2020-05-01 15:02:37.000000000 +0200 @@ -3,3 +3,5 @@ addopts=--doctest-modules --flake8 --black --cov doctest_optionflags=ALLOW_UNICODE ELLIPSIS filterwarnings= + # https://github.com/pytest-dev/pytest/issues/6928 + ignore:direct construction of .*Item has been deprecated:DeprecationWarning diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/setup.cfg new/keyring-21.2.1/setup.cfg --- old/keyring-21.2.0/setup.cfg 2020-03-15 03:09:06.413656000 +0100 +++ new/keyring-21.2.1/setup.cfg 2020-05-01 15:02:53.006646400 +0200 @@ -33,7 +33,7 @@ pytest >= 3.5, !=3.7.3 pytest-checkdocs >= 1.2.3 pytest-flake8 - pytest-black-multipy + pytest-black >= 0.3.7 pytest-cov docs = sphinx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tests/backends/test_OS_X.py new/keyring-21.2.1/tests/backends/test_OS_X.py --- old/keyring-21.2.0/tests/backends/test_OS_X.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/tests/backends/test_OS_X.py 2020-05-01 15:02:37.000000000 +0200 @@ -11,6 +11,6 @@ @pytest.mark.skipif(not is_osx_keychain_supported(), reason="Needs macOS") -class OSXKeychainTestCase(BackendBasicTests): +class TestOSXKeychain(BackendBasicTests): def init_keyring(self): return OS_X.Keyring() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tests/backends/test_SecretService.py new/keyring-21.2.1/tests/backends/test_SecretService.py --- old/keyring-21.2.0/tests/backends/test_SecretService.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/tests/backends/test_SecretService.py 2020-05-01 15:02:37.000000000 +0200 @@ -9,7 +9,7 @@ not SecretService.Keyring.viable, reason="SecretStorage package is needed for SecretServiceKeyring", ) -class SecretServiceKeyringTestCase(BackendBasicTests): +class TestSecretServiceKeyring(BackendBasicTests): __test__ = True def init_keyring(self): @@ -22,10 +22,10 @@ return keyring -class SecretServiceKeyringUnitTests: +class TestUnits: def test_supported_no_secretstorage(self): """ SecretService Keyring is not viable if secretstorage can't be imported. """ with NoNoneDictMutator(SecretService.__dict__, secretstorage=None): - self.assertFalse(SecretService.Keyring.viable) + assert not SecretService.Keyring.viable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tests/backends/test_Windows.py new/keyring-21.2.1/tests/backends/test_Windows.py --- old/keyring-21.2.0/tests/backends/test_Windows.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/tests/backends/test_Windows.py 2020-05-01 15:02:37.000000000 +0200 @@ -9,7 +9,7 @@ @pytest.mark.skipif( not keyring.backends.Windows.WinVaultKeyring.viable, reason="Needs Windows" ) -class WinVaultKeyringTestCase(BackendBasicTests): +class TestWinVaultKeyring(BackendBasicTests): def tearDown(self): # clean up any credentials created for cred in self.credentials_created: @@ -21,6 +21,9 @@ def init_keyring(self): return keyring.backends.Windows.WinVaultKeyring() + def test_long_password_nice_error(self): + self.keyring.set_password('system', 'user', 'x' * 512 * 2) + @pytest.mark.skipif('sys.platform != "win32"') def test_winvault_always_viable(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tests/backends/test_kwallet.py new/keyring-21.2.1/tests/backends/test_kwallet.py --- old/keyring-21.2.0/tests/backends/test_kwallet.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/tests/backends/test_kwallet.py 2020-05-01 15:02:37.000000000 +0200 @@ -5,7 +5,7 @@ @pytest.mark.skipif(not kwallet.DBusKeyring.viable, reason="KWallet5 unavailable") -class DBusKWalletTestCase(BackendBasicTests): +class TestDBusKWallet(BackendBasicTests): # Remove '@' from service name as this is not supported in service names # '@' will cause troubles during migration of kwallet entries @@ -80,6 +80,6 @@ @pytest.mark.skipif( not kwallet.DBusKeyringKWallet4.viable, reason="KWallet4 unavailable" ) -class DBusKWallet4TestCase(DBusKWalletTestCase): +class TestDBusKWallet4(TestDBusKWallet): def init_keyring(self): return kwallet.DBusKeyringKWallet4() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tests/test_core.py new/keyring-21.2.1/tests/test_core.py --- old/keyring-21.2.0/tests/test_core.py 1970-01-01 01:00:00.000000000 +0100 +++ new/keyring-21.2.1/tests/test_core.py 2020-05-01 15:02:37.000000000 +0200 @@ -0,0 +1,9 @@ +import keyring.core + + +def test_init_recommended(monkeypatch): + """ + Test filtering of backends to recommended ones (#117, #423). + """ + monkeypatch.setattr(keyring.core, 'set_keyring', lambda kr: None) + keyring.core.init_backend(keyring.core.recommended) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tests/test_multiprocess.py new/keyring-21.2.1/tests/test_multiprocess.py --- old/keyring-21.2.0/tests/test_multiprocess.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/tests/test_multiprocess.py 2020-05-01 15:02:37.000000000 +0200 @@ -1,3 +1,4 @@ +import os import sys import platform import multiprocessing @@ -11,9 +12,16 @@ keyring.get_password('test_app', 'test_user') -pytestmark = pytest.mark.xfail( - platform.system() == 'Linux', reason="#410: keyring discovery fails intermittently" -) +pytestmark = [ + pytest.mark.xfail( + platform.system() == 'Linux', + reason="#410: keyring discovery fails intermittently", + ), + pytest.mark.xfail( + os.environ.get('AGENT_OS', '') == 'Windows_NT', + reason="#436: Multiprocessing fails on Azure Windows", + ), +] def test_multiprocess_get(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tests/test_packaging.py new/keyring-21.2.1/tests/test_packaging.py --- old/keyring-21.2.0/tests/test_packaging.py 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/tests/test_packaging.py 2020-05-01 15:02:37.000000000 +0200 @@ -1,4 +1,9 @@ -import pkg_resources +try: + from importlib import metadata +except ImportError: + import importlib_metadata as metadata + +from keyring import backend def test_entry_point(): @@ -6,6 +11,13 @@ Keyring provides exactly one 'keyring' console script that's a callable. """ - eps = pkg_resources.iter_entry_points('console_scripts') - (ep,) = (ep for ep in eps if ep.name == 'keyring') - assert callable(ep.resolve()) + scripts = dict(metadata.entry_points()['console_scripts']) + assert callable(scripts['keyring'].load()) + + +def test_missing_metadata(monkeypatch): + """ + _load_plugins should pass when keyring metadata is missing. + """ + monkeypatch.setattr(metadata, 'entry_points', dict) + backend._load_plugins() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-21.2.0/tox.ini new/keyring-21.2.1/tox.ini --- old/keyring-21.2.0/tox.ini 2020-03-15 03:08:41.000000000 +0100 +++ new/keyring-21.2.1/tox.ini 2020-05-01 15:02:37.000000000 +0200 @@ -3,15 +3,10 @@ minversion = 3.2 # https://github.com/jaraco/skeleton/issues/6 tox_pip_extensions_ext_venv_update = true -# Ensure that a late version of pip is used even on tox-venv. -requires = - tox-pip-version>=0.0.6 - tox-venv [testenv] deps = -pip_version = pip commands = pytest {posargs} usedevelop = True
