diff options
author | Ben McGinnes <[email protected]> | 2018-11-19 10:19:42 +0000 |
---|---|---|
committer | Ben McGinnes <[email protected]> | 2018-11-19 10:19:42 +0000 |
commit | f773ad392da57e6be4ade93c44baa5d2057c40b6 (patch) | |
tree | 7fe9afc246b675fc78837b69fee25f174c7bf55d /lang/python/src | |
parent | core: Protect the trace macros for fun and profit. (diff) | |
download | gpgme-f773ad392da57e6be4ade93c44baa5d2057c40b6.tar.gz gpgme-f773ad392da57e6be4ade93c44baa5d2057c40b6.zip |
python: import constant
* lang/python/src/constants/__init__.py: dropped use of Import
capitalisation and renamed lang/python/src/constants/import.py to
lang/python/src/constants/import_type.py to address bug T4242.
* lang/python/doc/src/gpgme-python-howto: minor docs updates.
Diffstat (limited to 'lang/python/src')
-rw-r--r-- | lang/python/src/constants/__init__.py | 18 | ||||
-rw-r--r-- | lang/python/src/constants/import_type.py (renamed from lang/python/src/constants/import.py) | 0 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lang/python/src/constants/__init__.py b/lang/python/src/constants/__init__.py index 1f79f84a..4e5ced24 100644 --- a/lang/python/src/constants/__init__.py +++ b/lang/python/src/constants/__init__.py @@ -27,19 +27,21 @@ util.process_constants('GPGME_', globals()) # For convenience, we import the modules here. from . import data, keylist, sig, tofu # The subdirs. # The remaining modules can no longer fit on one line. -from . import create, event, keysign, md, pk, protocol, sigsum, status -from . import validity +from . import create, event, import_type, keysign, md, pk, protocol, sigsum +from . import status, validity del absolute_import, print_function, unicode_literals, util -# A complication arises because 'import' is a reserved keyword. -# Import it as 'Import' instead. -globals()['Import'] = getattr( - __import__('', globals(), locals(), [str('import')], 1), "import") +# This was a bad idea (though I get why it was done): +# +# # A complication arises because 'import' is a reserved keyword. +# # Import it as 'Import' instead. +# globals()['Import'] = getattr( +# __import__('', globals(), locals(), [str('import')], 1), "import") __all__ = [ - 'data', 'event', 'import', 'keysign', 'keylist', 'md', 'pk', 'protocol', - 'sig', 'sigsum', 'status', 'tofu', 'validity', 'create' + 'data', 'event', 'import_type', 'keysign', 'keylist', 'md', 'pk', + 'protocol', 'sig', 'sigsum', 'status', 'tofu', 'validity', 'create' ] # GPGME 1.7 replaced gpgme_op_edit with gpgme_op_interact. We diff --git a/lang/python/src/constants/import.py b/lang/python/src/constants/import_type.py index e477eb25..e477eb25 100644 --- a/lang/python/src/constants/import.py +++ b/lang/python/src/constants/import_type.py |