Page MenuHome GnuPG

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

Description

Hello!

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')
True

leading to strange errors like this:

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

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

Revisions and Commits

Event Timeline

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

werner triaged this task as High priority.
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!