aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/pyme (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-05-12python: Share generated methods between objects.justus/pyme3Justus Winter1-10/+16
* 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]>
2016-05-12python: Raise exceptions on write errors.Justus Winter2-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]>
2016-05-12python: Fix writing to data buffers.Justus Winter1-2/+4
* 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]>
2016-05-12python: Cache generated wrapper functions.Justus Winter1-3/+6
* lang/python/util.py (GpgmeWrap.__getattr__): Cache generated wrapper functions. Signed-off-by: Justus Winter <[email protected]>
2016-05-12python: Fix function invocation.Justus Winter1-1/+1
* lang/python/pyme/core.py (Data.new_from_fd): Fix function invocation. Signed-off-by: Justus Winter <[email protected]>
2016-05-12python: Fix name of exception, make slot methods explicit.Justus Winter1-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]>
2016-05-12python: Handle interpreter shutdown.Justus Winter1-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]>
2016-05-12python: Fix type translation.Justus Winter1-5/+6
* 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]>
2016-05-10python: Delete trailing whitespace.Justus Winter4-18/+18
-- Signed-off-by: Justus Winter <[email protected]>
2016-05-10python: Rename bindings.Justus Winter21-0/+1047
-- Signed-off-by: Justus Winter <[email protected]>