aboutsummaryrefslogtreecommitdiffstats
path: root/lang (follow)
Commit message (Collapse)AuthorAgeFilesLines
* python: Fix reading data from existing files.Justus Winter2016-05-272-16/+51
| | | | | | | | | | | | | * lang/python/pyme/core.py (Data.__init__): Add 'copy' kwargument, and pass it to functions supporting it. PEP8 fix. (Data.new_from_fd): PEP8 fix. (Data.new_from_file): Give a more helpful error message if copy is False. PEP8 fix. (Data.new_from_fd): Hand the file descriptor to 'gpgme_data_new_from_fd', not a stream. Fix docstring. * lang/python/tests/t-data.py: Add tests for this. Signed-off-by: Justus Winter <[email protected]>
* python: Improve and test Context.wait.Justus Winter2016-05-243-13/+50
| | | | | | | | | | * lang/python/pyme/core.py (Context.wait): Improve docstring. As the context passed to 'gpgme_wait' is never NULL, it is pointless to look at the returned context. Always raise exceptions. * lang/python/tests/Makefile.am (pytests): Add new test. * lang/python/tests/t-wait.py: New file. Signed-off-by: Justus Winter <[email protected]>
* python: Make all GnuPG errors available.Justus Winter2016-05-243-5/+12
| | | | | | | | * lang/python/Makefile.am (errors.i): Generate file. * lang/python/gpgme.i: Include generated file. * lang/python/pyme/errors.py: Pull in all errors and error sources. Signed-off-by: Justus Winter <[email protected]>
* python: Move the base wrapper class.Justus Winter2016-05-242-79/+77
| | | | | | | * python/lang/pyme/util.py (GpgmeWrapper): Move... * python/lang/pyme/core.py: ... here. Signed-off-by: Justus Winter <[email protected]>
* python: Support status callbacks.Justus Winter2016-05-244-0/+134
| | | | | | | | | | | | | * lang/python/helpers.c (pyStatusCb): New function. (pygpgme_set_status_cb): Likewise. * lang/python/helpers.h (pygpgme_set_status_cb): New prototype. * lang/python/pyme/core.py (Context.__init__): Initialize 'last_statuscb'. (Context._free_statuscb): New function. (Context.set_status_cb): Likewise. * lang/python/tests/t-callbacks.py: Test status callbacks. Signed-off-by: Justus Winter <[email protected]>
* python: Improve docstring.Justus Winter2016-05-241-4/+9
| | | | | | | * lang/python/pyme/core.py (Context.set_progress_cb): Improve docstring. Signed-off-by: Justus Winter <[email protected]>
* Qt: Fix test build with clangAndre Heinecke2016-05-241-1/+1
| | | | | | | * lang/qt/tests/Makefile.am (LDADD): Explicitly add -lstdc++ -- g++ does not need that but clang does need it explicitly
* python: Improve support for edit callbacks.Justus Winter2016-05-245-7/+114
| | | | | | | | | | * lang/python/helpers.c (pyEditCb): Stash exceptions. * lang/python/pyme/core.py (Context.op_edit): Hand in 'self'. * lang/python/tests/Makefile.am (py_tests): Add new test. * lang/python/tests/t-callbacks.py: Test edit callbacks. * lang/python/tests/t-edit.py: New file. Signed-off-by: Justus Winter <[email protected]>
* python: Fix hook.Justus Winter2016-05-232-2/+3
| | | | | | | * lang/python/helpers.c (pyProgressCb): Fix getting hook data. * lang/python/tests/t-callbacks.py: Show that this works. Signed-off-by: Justus Winter <[email protected]>
* python: Move edit callback function.Justus Winter2016-05-233-45/+48
| | | | | | | | * lang/python/gpgme.i (pyEditCb): Move... * lang/python/helpers.c: ... here. * lang/python/helpers.h (pyEditCb): New prototype. Signed-off-by: Justus Winter <[email protected]>
* python: Port more tests.Justus Winter2016-05-235-2/+188
| | | | | | | | | | | | * lang/python/tests/Makefile.am (TESTS_ENVIRONMENT): Set LD_LIBRARY_PATH. (pytests): Add new tests. * lang/python/tests/t-callbacks.py: Trim imports. * lang/python/tests/t-encrypt-sign.py: New file. * lang/python/tests/t-export.py: Likewise. * lang/python/tests/t-signers.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: Translate list of strings.Justus Winter2016-05-231-0/+34
| | | | | | * lang/python/gpgme.i: Add typemap translating list of strings. Signed-off-by: Justus Winter <[email protected]>
* Qt: Add test for changeownertrustAndre Heinecke2016-05-202-3/+109
| | | | | | | | | * lang/qt/tests/t-ownertrust.cpp: New test. * lang/qt/tests/Makefile.am: Add test. -- This test would have catched the issue created by not handling GPGME_STATUS_KEY_CONSIDERED.
* Cpp: Ignore STATUS_KEY_CONSIDERED when editingAndre Heinecke2016-05-201-0/+1
| | | | | * lang/cpp/src/editinteractor.cpp (EditInteractor::needsNoResponse): Handle GPGME_STATUS_KEY_CONSIDERED.
* python: Improve progress callbacks.Justus Winter2016-05-193-6/+54
| | | | | | | | | * lang/python/helpers.c (pyProgressCb): Stash python errors, convert 'what' to Unicode object. * lang/python/pyme/core.py (Context.set_progress_cb): Hand in 'self'. * lang/python/tests/t-callbacks.py: Test progress callbacks. Signed-off-by: Justus Winter <[email protected]>
* python: Robust exception handling in callbacks.Justus Winter2016-05-196-13/+187
| | | | | | | | | | | | | | | | | | * lang/python/helpers.c (pygpgme_stash_callback_exception): New function. (pygpgme_raise_callback_exception): Likewise. (pyPassphraseCb): Stash python errors. * lang/python/helpers.h (pygpgme_raise_callback_exception): New prototype. * lang/python/pyme/core.py ({Context,Data}.__init__): Move common initialization to superclass. (Context.set_progress_cb): Hand in 'self'. * lang/python/pyme/util.py (GpgmeWrapper.__init__): New function. (GpgmeWrapper.__getattr__): Raise stashed exceptions. * lang/python/tests/Makefile.am (py_tests): Add new test. * lang/python/tests/t-callbacks.py: New file. Signed-off-by: Justus Winter <[email protected]>
* Qt: Check for graphviz and set HAVE_DOT correctlyAndre Heinecke2016-05-191-1/+1
| | | | | * configure.ac: Check for graphviz and define HAVE_DOT. * lang/qt/doc/Doxyfile.in (HAVE_DOT): Use variable.
* python: Add more tests.Justus Winter2016-05-196-8/+157
| | | | | | | | | | | * lang/python/tests/Makefile.am (py_tests): Add new tests. * lang/python/tests/support.py (print_data): New function. * lang/python/tests/t-decrypt.py: Use new function. * lang/python/tests/t-encrypt.py: Likewise. * lang/python/tests/t-sign.py: New file. * lang/python/tests/t-encrypt-sym.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
* python: More type conversion fixes.Justus Winter2016-05-191-2/+24
| | | | | | | | * lang/python/helpers.c (pyPassphraseCb): Cope with 'uid_hint' being NULL, convert it to an Unicode object, and cope with the callback returning both Unicode and bytes objects. Signed-off-by: Justus Winter <[email protected]>
* python: Fix import.Justus Winter2016-05-191-1/+4
| | | | | | | * lang/python/helpers.c (pygpgme_exception_init): Make module import relative. Signed-off-by: Justus Winter <[email protected]>
* Qt: Fix compilation of unit testsAndre Heinecke2016-05-191-1/+1
| | | | | | | | * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Add -DBUILDING_QGPGME. -- Without building QGpgME the headers of gpgme++ are not included corretly and taken from an already installed gpgme++.
* python: Various fixes.Justus Winter2016-05-181-1/+1
| | | | | | | * configure.ac: Fix SWIG detection, bump required Python version. * lang/python/Makefile.am: Portability fix. Signed-off-by: Justus Winter <[email protected]>
* Qt / Cpp: Port auto_ptr to unique_ptrAndre Heinecke2016-05-178-54/+48
| | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp, lang/cpp/src/context.h, lang/cpp/src/context_p.h (Context::createForEngine), (Context::edit, Context::startEditing), (Context::takeLastEditInteractor, Context::cardEdit), (Context::startCardEditing, Context::takeLastCardEditInteractor), (Context::assuanTransact, Context::startAssuanTransaction), (Context::takeLastAssuanTransaction): Port to unique_ptr. * lang/qt/src/qgpgmeadduseridjob.cpp, lang/qt/src/qgpgmechangeexpiryjob.cpp, lang/qt/src/qgpgmechangeownertrustjob.cpp, lang/qt/src/qgpgmechangepasswdjob.cpp, lang/qt/src/qgpgmesignkeyjob.cpp: Update accordingly. -- This is another API break but as we already broke API with GpgME++ and QGpgME from KDE Frameworks this is a good time to do this to avoid using a deprected C++ class in the API.
* python: Delete duplicated license texts/Werner Koch2016-05-172-848/+0
| | | | --
* Merge branch 'justus/pyme3'Justus Winter2016-05-1754-2/+6138
|\
| * python: Clean up examples.Justus Winter2016-05-1710-43/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/examples/delkey.py: Clean up example. * lang/python/examples/encrypt-to-all.py: Likewise. * lang/python/examples/genkey.py: Likewise. * lang/python/examples/inter-edit.py: Likewise. * lang/python/examples/sign.py: Likewise. * lang/python/examples/signverify.py: Likewise. * lang/python/examples/simple.py: Likewise. * lang/python/examples/t-edit.py: Likewise. * lang/python/examples/verifydetails.py: Likewise. * lang/python/pyme/__init__.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Import GPGMEError.Justus Winter2016-05-171-1/+1
| | | | | | | | | | | | | | | | * pyme/core.py: Import GPGMEError. Fixes c5d118b2. Signed-off-by: Justus Winter <[email protected]>
| * python: Port more tests.Justus Winter2016-05-174-1/+166
| | | | | | | | | | | | | | | | | | * lang/python/Makefile.am: Add bits from the c test suite. * lang/python/support.py: New file. * lang/python/t-decrypt.py: Likewise. * lang/python/t-encrypt.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Share generated methods between objects.justus/pyme3Justus Winter2016-05-122-10/+18
| | | | | | | | | | | | | | | | * lang/python/pyme/util.py (GpgmeWrapper.__getattr__): Monkey-patch the class. * lang/python/tests/t-wrapper.py: Demonstrate the sharing. Signed-off-by: Justus Winter <[email protected]>
| * python: Raise exceptions on write errors.Justus Winter2016-05-122-1/+8
| | | | | | | | | | | | | | * lang/python/pyme/core.py (Data.write): Handle errors. * lang/python/pyme/errors.py (GPGMEError.fromSyserror): New function. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix writing to data buffers.Justus Winter2016-05-124-3/+71
| | | | | | | | | | | | | | | | | | * lang/python/gpgme.i: Add typemap for buffers. * lang/python/pyme/core.py (Data.write): Fix function. * lang/python/tests/Makefile.am: Add new test. * lang/python/tests/t-data.py: New file. Signed-off-by: Justus Winter <[email protected]>
| * python: Add a test suite.Justus Winter2016-05-123-0/+46
| | | | | | | | | | | | | | | | | | * configure.ac: Add new Makefile. * lang/python/Makefile.am: Add subdirectory. * lang/python/tests/Makefile.am: New file. * lang/python/tests/t-wrapper.py: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Cache generated wrapper functions.Justus Winter2016-05-121-3/+6
| | | | | | | | | | | | | | * lang/python/util.py (GpgmeWrap.__getattr__): Cache generated wrapper functions. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix function invocation.Justus Winter2016-05-121-1/+1
| | | | | | | | | | | | | | * lang/python/pyme/core.py (Data.new_from_fd): Fix function invocation. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix name of exception, make slot methods explicit.Justus Winter2016-05-121-1/+18
| | | | | | | | | | | | | | | | | | * lang/python/pyme/util.py (GpgmeWrapper._getctype): Fix exception, add docstring. (GpgmeWrapper._getnameprepend): New function. (GpgmeWrapper._errorcheck): Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: Handle interpreter shutdown.Justus Winter2016-05-121-8/+22
| | | | | | | | | | | | | | | | | | * lang/python/pyme/core.py: Avoid races at interpreter shutdown. This silences the most annoying occurrences, however this problem also affects the SWIG generated code, which might indicate that the real problem is somewhere else. If so, this change can be easily reverted. Signed-off-by: Justus Winter <[email protected]>
| * python: Make test case more robust.Justus Winter2016-05-121-0/+4
| | | | | | | | | | | | * lang/python/examples/t-edit.py: Check if key is found. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix type translation.Justus Winter2016-05-123-27/+41
| | | | | | | | | | | | | | | | | | | | | | | | * lang/python/gpgme.i: Adjust to Python3's string type being 'Unicode', not 'bytes'. Fix type checking. * lang/python/core.py (Data.write): Add docstring mentioning the expected type of parameter 'buffer'. (Data.read): Adjust read loop. Also, use a saner chunk size, and join all chunks at the end instead of adding them. * lang/python/examples/simple.py: Adjust example. Signed-off-by: Justus Winter <[email protected]>
| * python: Fix simple example.Justus Winter2016-05-111-1/+2
| | | | | | | | | | | | | | * lang/python/examples/simple.py: Flush stdout, encode name as UTF-8 before passing it to GPGME. Signed-off-by: Justus Winter <[email protected]>
| * python: Integrate into the build system.Justus Winter2016-05-112-30/+65
| | | | | | | | | | | | | | | | | | | | * configure.ac: Make Python bindings configurable, add new Makefile. * lang/python/Makefile.am: New file. * lang/python/setup.py: Integrate into the build system. * m4/ax_pkg_swig.m4: New file from the autoconf archive. * m4/m4_ax_swig_python.m4: Likewise. Signed-off-by: Justus Winter <[email protected]>
| * python: PEP8 fixes.Justus Winter2016-05-104-33/+38
| | | | | | | | | | | | Cherry picked from 0267c151. Signed-off-by: Justus Winter <[email protected]>
| * python: Delete trailing whitespace.Justus Winter2016-05-1014-78/+74
| | | | | | | | | | -- Signed-off-by: Justus Winter <[email protected]>
| * python: Drop Debian packaging.Justus Winter2016-05-107-261/+0
| | | | | | | | | | -- Signed-off-by: Justus Winter <[email protected]>
| * python: Rename bindings.Justus Winter2016-05-1054-1/+1
| | | | | | | | | | -- Signed-off-by: Justus Winter <[email protected]>
| * More GTK2 removalpyme3Ben McGinnes2015-08-022-7003/+0
| | | | | | | | | | * Missed a couple of files, these 2 go for the same reason as the previous 3.
| * Removed GUI examplesBen McGinnes2015-08-023-2065/+0
| | | | | | | | | | | | | | * GUI examples written with pygtk, which has not been ported to Python 3 and won't be as it is for GTK2 and GNOME is moving to GTK3. * New GUI examples may be required in future using any of several GUI frameworks (e.g. wxPython, PyQt, PySide, PyGObject, etc.).
| * Python 3 port of PyMEBen McGinnes2015-05-162-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * Port of PyME 0.9.0 for Python 2 to Python 3 along with most of the example scripts. * Intended to be developed in parallel with the original Python 2 version until such time as a rewrite of GPGME leads to developing an IO API in Python 3 from scratch. * Python 3 PyME and API maintainer has entered, stage left with current GPG key ID 0x321E4E2373590E5D, primary fingerprint is "DB47 24E6 FA42 86C9 2B4E 55C4 321E 4E23 7359 0E5D" and signing subkey fingerprint is "B7F0 FE75 9387 430D D0C5 8BDB 7FF2 D371 35C7 553C" for future reference with git commit signatures.
| * Explaining why not all scripts workBen McGinnes2015-05-161-0/+7
| | | | | | | | | | | | | | | | * Some of them cannot be properly tested on OS X, especially with GTK in the mix (it works on OS X, but is unlikely to be as easily accessible as Cocoa or Qt). * Most major functions are showcased and do work, albeit sometimes with false positives of error messages, at least on OS X.
| * Byte encodingBen McGinnes2015-05-164-10/+10
| | | | | | | | | | | | * More string updates. * verifydetails.py still fails, but as Bernhard is still contactable, it might be worth him checking on it instead.
| * No change, note added to explain why.Ben McGinnes2015-05-161-0/+4
| |