Improper construction for gpg.constants.import in GPGME python bindings
Closed, ResolvedPublic



In gpg.constants, there is a subclass/attribute named "import". However, this is a forbidden keyword per python (because of the "import" statement):

>>> import keyword
>>> keyword.iskeyword('import')

leading to strange errors like this:

>>> import gpg
>>> gpg.constants.import.NEW
  File "<stdin>", line 1
SyntaxError: invalid syntax

perhaps change gpg.constants.import to gpg.constants.import_type?

brents created this task.Nov 5 2018, 7:24 PM
brents added a comment.Nov 5 2018, 8:38 PM

or, more accurately so it matches the C api, perhaps gpg.constants.import_status

werner triaged this task as High priority.Nov 6 2018, 9:19 AM
werner assigned this task to BenM.
werner raised the priority of this task from High to Unbreak Now!.Nov 17 2018, 10:54 AM
werner added a subscriber: werner.

Form my understanding this needs to be fixed urgently.

oh! i suppose i underestimated the severity of it. apologies!

BenM closed this task as Resolved.Nov 19 2018, 11:44 AM

This should be fixed in commit fd34415bdd57332424bd5a98d279e2331678a2fb