In the course of trying to address https://dev.gnupg.org/T4271, i
discovered that gpg.Context.decrypt() has a bit of superfluous code.
This changeset is intended to simplify the code without making any
functional changes.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* The make.bat file incorrectly triggers the trailing whitespace check
in the git repo (it doesn't actually have any trailing whitespace,
but triggers the error on every line).
* Will need to add a script to handle future org-mode conversions of
the index page anyway, so will get that script to deal with this
problem too by generating the make.bat file if the platform is
detected as Windows.
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Added framework from sphinx-quickstart to lang/python/doc/rst/ so
that Python developers already using Sphinx can use the generated
reST files with existing documentation systems.
* Note that when generating source files from Org-mode, the index page
will require manual intervention to match the Sphinx requirements.
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Expanded the section on issues with Windows installations, with
greater detail of which versions of Visual Studio are needed
depending on which version of CPython is to be used.
* Included a recommendation which is a bit harsh without being totally
prickish.
* Updated all files to not link to author's key or related data in
order to make them all consistent with the changes in commit
649b196881.
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Added long description to setup.py.in.
* Added maintenance mode details with clarification for what type of
things would be a bug as far as MM is concerned and what wouldn't
be.
** Includes a not too subtle hint directed towards the donations page.
* Miscellaneous tightening of documentation.
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Added instructions for checking key certifications or key
signatures (depending on preferred terminology).
* Added pendulum module to recommended installations, but not to
requirements.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Added documentation for the new methods added to gpgme.version.
* Removed the Flask based advanced use case from the what-is-new
section as that type of code will not be added here.
* lang/python/version.py.in: added gpg.version.versionintlist
* If gpg.version.versionintlist[2] ever returns -1 then there's a
serious problem with the build and it should be lodged as a bug if
it's repeatable. Seeing this should never happen, but checking for
it is better than not doing so.
* Fixed bug T4242 and tested that dropping "Import" in favour of
"import_type" does indeed work just fine.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* 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.
* Continued restructuring as part of moving beyond mere;y the HOWTO
file.
* Generated the alternative source files for reST and Texinfo.
* Fixed some errors and updated links after moving the what's new
section to two new files (yes, two).
* Fixed a minor error in how the reST version of the HOWTO is
generated.
* Updated the help() in __init__.py with a little more detail as to
why not to use the lower level functions.
* lang/python/tests/t-callbacks.py: Updated test logic to try
generating a key which expires in 2099 and if that fails then
fallback to an expiration in 2037 in an attempt to catch the 32-bit
systems.
* lang/python/gpgme.i: ignore HAVE_CXX11 in SWIG interface
--
If there are two distinct builds (a) and (b) of gpgme which both build
python bindings, and build (a) also happens to build the C++ bindings,
then the generated gpg/gpgme.py file from build (a) will not be usable
with the .so generated in build (b), despite them being exactly the
same, and having nothing to do with C++.
In particular, it will fail with:
-----------
File "…/gpg/__init__.py", line 99, in <module>
from . import core
File "…/gpg/core.py", line 10, in <module>
from . import gpgme
File "…/gpg/gpgme.py", line 152, in <module>
HAVE_CXX11 = _gpgme.HAVE_CXX11
AttributeError: module 'gpg._gpgme' has no attribute 'HAVE_CXX11'
-----------
By asking SWIG to ignore this definition, we stabilize the generated
.py and the .so, ensuring that they are more cleanly interoperable.
* conf/: New dir.
* configure.ac (AC_CONFIG_HEADER): Move header to conf dir.
* doc/Makefile.am (mkdefsinc): Adjust rule.
* lang/python/Makefile.am (copystamp): Ditto.
--
C++ uses those stupid files without a suffix and thus the new standard
header <version> as included by newer other libc++ versions may
conflict with the VERSION file in out top directory. This change
should solve the problem.
GnuPG-bug-id: 4168
Signed-off-by: Werner Koch <wk@gnupg.org>
* lang/python/doc/meta/TODO.org: Added the two major documentation
build system tasks to the TODO list.
* Added an index page in preparation for sorting out the second of
those TODO lists (Docutils is a lot easier to handle than Texinfo).
* Meanwhile, have confirmed that it all builds just fine under
GNU/Linux, OS X and FreeBSD while retaining the documentation, so
that's a nice improvement from 1.11.1.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* doc/Makefile.am: Removed a bit I forgot about.
* Renamed lang/python/docs to lang/python/doc bvecause apparently
automake cares about that too.
* Decided to be extra explicit in the manifest because if I don't then
all sorts of things get deleted ... like lang/python
* Tested on an external linux system just in case my osx workstation
introduces too much weirdness.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* lang/python/Makefile.am: Attempting to remove the docs/meta
directory did a lot worse than I thought it was doing, so better to
just be sure the documentation is available than destroy the entire
bindings directory.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* lang/python/Makefile.am: Now that gpg2 has been renamed back to gpg
and gpg1 is semi-deprecated, we should check what the actual gpg
binary is with gpgconf and use that rather than make assumptions per
system.
* Also, it means less worry if gpg3 is ever a thing. (Trust me, I
remember the Python 1 to 2 transition as well as the current 2 to 3
transition). ;)
Signed-off-by: Ben McGinnes <ben@adversary.org>
* More updates to the docs themselves and the versions to be available
with the next release.
* .texi and .rst copies of the HOWTO and the short history of (this
part) of the project.
* Restructured the docs directory to account for the GNU preferred
source doc format (.texi) and the Python preferred source doc
format (.rst) and the real source doc format (.org).
* Both the perceived source formats will need to be generated from the
.org files and included at this stage. Unfortunately there is not
yet a native org-to-rst transformation method in the org-mode
software in Emacs nor is there a a direct means of going from reST
to Org-mode from Docutils. There's only third party packages like
Pandoc and, while very good, there is no guarantee of consistency;
so we can't entirely automate this bit (yet).
* doc/Makefile.am: removed the python howto from this file, restoring
it to just the main project and the newer .js files.
* deleted: doc/gpgme-python-howto.texi
* renamed the Short_History.org file to short-history.org to keep the
naming conventions similar.
* All the Python files can (and should) live together.
* Changed the order of python versions the configure/make process
checks for, placing Python 3.7 ahead of 3.6.
* Updated the HOWTO documentation to reflect this change.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Tightened up the docs a little bit, updated the "what's new"
section, dropped the "-draft" version in preparation for GPGME
1.12.0's release.
* Exported another .texi version (and updated the draft copies to this
commit (which ought to be 1.11.1-beta313).
Signed-off-by: Ben McGinnes <ben@adversary.org>
* lang/python/src/core.py: First restoring the exception to the being
just that.
* The means to manipulate the error output is temporarily in commented
out code, but ought to be added to a proper test later.
* In the mean time the original test, with a very slight change, works
again.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* lang/python/src/core.py: Fixed methods of detecting whether verify
is a boolean variable or a list.
* Added methods of catching the missing keys exceptions.
* Still retained PEP8 compliance (which might have been where one or
two problems crept in).
* Though this is essentially the correct behaviour, it still does not
quite fit the otiginal test; so that will also require some adjustment.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* lang/python/examples/howto/local-sign-group.py: added the bit where
specifying the signing key is actually used for signing rather than
just pruning the list of keys to certify.
Signed-off-by: Ben McGinnes <ben@adversary.org>
* lang/python/examples/howto/local-sign-group.py: locally sign every
key in a group line except one's own keys. Intended to address the
sort of thing one might see on lists like PGPNET or other closed
groups amongst activists, journalists, etc. where everyone encrypts
to all recipients, but may not sign everyone's keys publicly..
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Fixed the final assertion to look for what will actually be reported
in that case instead of something else (i.e. it looks for an
IMPORT_ERROR status code).
* Sometimes you really do need or want punctuation in a heading, but
ideally without something else generating whitespace and other
annoyances to go with it.
* Trying a real decimal point instead.
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Woumd up the "what's new" section.
* Added an example for sending a key to the keyservers via hkp4py.
* Updated the export key code to use a more complete check for the
$GNUPGHOME location.
* Expanded on the installation and reinstallation troubleshooting
section.
Tested-by: Ben McGinnes <ben@adversary.org>
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Added a What's New section to summarise changes since the last
release. There have been quite a few and some attention does need
to be drawn to some of them.
* Confirming certain issues with some platform builds, especially
BSD/OSX vs. Linux issues which will need to update the installation
troubleshooting guides.