Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: allow for import of keyring.util.properties but with a Deprecation warning if used #595

Closed
wants to merge 2 commits into from

Conversation

yarikoptic
Copy link

@yarikoptic yarikoptic commented Sep 2, 2022

edit: no longer pertinent -- "shim" is complete and it seems that keyrings.alt tests run/pass (whatever is not skipped locally)

Unfortunately it is not a complete solution to #593 since there was likely
also a breakage in API of those properties since it would lead to e.g.

(git)lena:~/proj/misc/keyrings.alt[main]git
$> python -c 'import keyrings.alt.file'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/yoh/proj/misc/keyrings.alt/keyrings/alt/file.py", line 67, in <module>
	class EncryptedKeyring(Encrypted, Keyring):
  File "/home/yoh/proj/misc/keyrings.alt/keyrings/alt/file.py", line 73, in EncryptedKeyring
	@properties.ClassProperty
  File "/home/yoh/proj/misc/keyring/keyring/util/__init__.py", line 12, in __getattr__
	return getattr(_properties, a)
AttributeError: module 'keyring._properties_compat' has no attribute 'ClassProperty'. Did you mean: 'classproperty'?

so might need more compat shimming (allowing edits by maintainers for this PR, so push in if decide to take/improve it)

Closes #593

…n warning if used

Unfortunately it is not a complete solution to jaraco#593 since there was likely
also a breakage in API of those properties since it would lead to e.g.

	(git)lena:~/proj/misc/keyrings.alt[main]git
	$> python -c 'import keyrings.alt.file'
	Traceback (most recent call last):
	  File "<string>", line 1, in <module>
	  File "/home/yoh/proj/misc/keyrings.alt/keyrings/alt/file.py", line 67, in <module>
		class EncryptedKeyring(Encrypted, Keyring):
	  File "/home/yoh/proj/misc/keyrings.alt/keyrings/alt/file.py", line 73, in EncryptedKeyring
		@properties.ClassProperty
	  File "/home/yoh/proj/misc/keyring/keyring/util/__init__.py", line 12, in __getattr__
		return getattr(_properties, a)
	AttributeError: module 'keyring._properties_compat' has no attribute 'ClassProperty'. Did you mean: 'classproperty'?
Seems to make shim complete -- import keyrings.alt.file succeeds
@jaraco
Copy link
Owner

jaraco commented Sep 4, 2022

I've taken a different approach in 83b6dd680bbc8a, just in case properties is expected to be an import target (from keyring.util.properties import ...).

@jaraco jaraco closed this Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keyrings.google-artifactregistry-auth failing with keyring 23.9.0 due to missing keyring.util.properties
2 participants