aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python (follow)
Commit message (Collapse)AuthorAgeFilesLines
* python,doc: Fix typos in documentation and source code commentsIngo Klöcker2023-10-134-6/+6
| | | | | | | | -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* python,examples: Add missing word "License"Marius P2023-10-1335-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/examples/howto/add-userid.py, lang/python/examples/howto/clear-sign-file.py, lang/python/examples/howto/create-key.py, lang/python/examples/howto/decrypt-file.py, lang/python/examples/howto/detach-sign-file.py, lang/python/examples/howto/encrypt-file.py, lang/python/examples/howto/encrypt-sign-file.py, lang/python/examples/howto/encrypt-to-group-gullible.py, lang/python/examples/howto/encrypt-to-group-trustno1.py, lang/python/examples/howto/encrypt-to-group.py, lang/python/examples/howto/export-key.py, lang/python/examples/howto/export-minimised-key.py, lang/python/examples/howto/export-secret-key.py, lang/python/examples/howto/export-secret-keys.py, lang/python/examples/howto/groups.py, lang/python/examples/howto/import-key.py, lang/python/examples/howto/import-keybasekey.py, lang/python/examples/howto/import-keys-hkp.py, lang/python/examples/howto/import-keys.py, lang/python/examples/howto/import-mailvelope-keys.py, lang/python/examples/howto/keycount.py, lang/python/examples/howto/local-sign-group.py, lang/python/examples/howto/mutt-groups.py, lang/python/examples/howto/pmkey-import-alt.py, lang/python/examples/howto/pmkey-import-hkp-alt.py, lang/python/examples/howto/pmkey-import-hkp.py, lang/python/examples/howto/pmkey-import.py, lang/python/examples/howto/revoke-userid.py, lang/python/examples/howto/send-key-to-keyserver.py, lang/python/examples/howto/sign-file.py, lang/python/examples/howto/sign-key.py, lang/python/examples/howto/symcrypt-file.py, lang/python/examples/howto/temp-homedir-config.py, lang/python/examples/howto/verify-signatures.py, lang/python/examples/howto/verify-signed-file.py: Add "License" after "Lesser General Public" -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* cpp,python: Respect --disable-gpg-test for testsBiswapriyo Nath2023-05-301-1/+7
| | | | | | | | | | | lang/cpp/Makefile.am (SUBDIRS): Depend tests in RUN_GPG_TESTS. lang/python/Makefile.am (SUBDIRS): Ditto. -- This is similar to the core and qt switch to disable the tests. Signed-off-by: Biswapriyo Nath <[email protected]> ChangeLog entries added by wk.
* python: Fix wrong use of write.Werner Koch2023-05-232-10/+5
| | | | | | | | | | | | | * lang/python/helpers.c (pyPassphraseCb): Use gpgme_io_writen. (_gpg_interact_cb): Ditto. * lang/python/helpers.h (write) [W32]: Remove bad write macro. -- GnuPG-bug-id: T6501 Using write(2) without checking for EINTR is a not a good idea. Futher gpgme_io_writen is the correct way to send data from a callback. This also fixed the wrong use of a simple macro for Windows.
* doc: Fix Python example code.NIIBE Yutaka2023-04-254-15/+24
| | | | | | | | | | | | | | | | * lang/python/doc/src/gpgme-python-howto.org: Fix chmod race. * lang/python/examples/howto/export-secret-key.py: Likewise. * lang/python/examples/howto/export-secret-keys.py: Likewise. * lang/python/examples/howto/temp-homedir-config.py: Likewise. -- It's not for Python 2.7. GnuPG-bug-id: 6466 Reported-by: Hanno Böck Co-authored-by: Ingo Klöcker Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Stop daemons after setting up test environmentIngo Klöcker2023-02-091-0/+1
| | | | | | | | | | * lang/python/tests/Makefile.am, lang/qt/tests/Makefile.am, tests/gpg/Makefile.am, tests/json/Makefile.am (pubring-stamp): Call `gpgconf --kill all` after importing test keys. -- This ensures that no gpg-agents or other daemons are running after "make".
* doc:python: Replace gpgme-config to pkg-config.NIIBE Yutaka2022-12-141-2/+2
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Fix configure generating setup.py.NIIBE Yutaka2022-10-261-11/+16
| | | | | | | | | | | | * lang/python/setup.py.in: Handle the case, when substitutions may be empty. -- Reported-by: Andreas Metzler Fixes-commit: ae9258fbf3b9d434495ef11fc184a91fe7c4ca57 GnuPG-bug-id: 6204 Signed-off-by: NIIBE Yutaka <[email protected]>
* build:python: Don't use gpg-error-config/gpgme-config.NIIBE Yutaka2022-09-151-29/+5
| | | | | | | | | | * lang/python/setup.py.in: Use @prefix@, @GPGME_CONFIG_LIBS@, @GPGME_CONFIG_CFLAGS@, and @GPG_ERROR_CFLAGS@ of configure. -- GnuPG-bug-id: 6204 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Don't call __del__ from __exit__ method.NIIBE Yutaka2022-08-092-2/+5
| | | | | | | | | | | * lang/python/src/core.py (Context, Data): Don't call __del__ from __exit__ method, as the object may be still in use. * lang/python/tests/t-idiomatic.py: Fix the test. -- GnuPG-bug-id: 6060 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Don't access gpgme with wrapped=None.NIIBE Yutaka2022-08-051-0/+12
| | | | | | | | | | * lang/python/src/core.py (GpgmeWrapper, Context): Check self.wrapped is valid. -- GnuPG-bug-id: 6060 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Reset passphrase callback correctly.Jasper Spaans2022-08-051-8/+4
| | | | | | | | | | * lang/python/src/core.py (Context(GpgmeWrapper)): Reset passphrase callback correctly, for encrypt, decrypt, create_key, and create_subkey methods. -- Signed-off-by: Jasper Spaans <[email protected]>
* python: Allow returning signatures made by unknown keys in `decrypt`Jasper Spaans2021-06-241-3/+9
| | | | | | | | | | -- This functionality got dropped somewhere after 1.12, as part of the cleanup of the `Context.decrypt` call signature. Reintroduce it again, now using an explicit keyword argument `filter_signatures` (which defaults to hiding signatures by unknown keys). GnuPG-bug-id: 5292
* python: Fix key_export*.NIIBE Yutaka2020-12-031-3/+3
| | | | | | | | | | | * lang/python/src/core.py (key_export): Just raise an error. (key_export_minimal, key_export_secret): Ditto. -- GnuPG-bug-id: 5149 Fixes-commit: 7faef33d13fa8efce152ca7aa6e9d39030c1cf08 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Fix a test for newer GnuPG (>= 2.3).NIIBE Yutaka2020-11-121-1/+2
| | | | | | | | | | | * lang/python/tests/t-quick-subkey-creation.py: Specify RSA. -- Using GnuPG 2.3, a key with default (ed25519/cv25519) cannot have some combination of capabilities (e.g., "encr auth"). Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Handle the when case __doc__ is None.NIIBE Yutaka2020-10-271-1/+6
| | | | | | | | | * lang/python/src/core.py (GpgmeWrapper): Check if None. -- GnuPG-bug-id: 5075 Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Deprecate the non-working trustlist functions.Werner Koch2020-07-152-47/+0
| | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in: Clarify that the trustlist function should not be used. * src/engine.c (_gpgme_engine_op_trustlist): Always return an error. * src/engine-backend.h (struct engine_ops): Remove trustlist member. * src/engine-gpg.c (gpg_trustlist): Remove. (struct engine_ops): Remove that member. Also in all other engines. * tests/gpg/t-trustlist.c: Remove. * lang/python/tests/t-trustlist.py: Remove. -- This never worked in reality because the required feature has been removed from GnuPG version 1.3.2 soon after introduction of this feature in gpgme - 17 years ago. It was anyway marked as experimental. We keep the API and ABI, though. GnuPG-bug-id: 4834 Signed-off-by: Werner Koch <[email protected]>
* python: Workaround for a regression in GnuPG 2.2.21Werner Koch2020-07-142-2/+16
| | | | | | | | | * lang/python/tests/support.py (is_gpg_version): New. * lang/python/tests/t-encrypt-sym.py: Add workaround. -- GnuPG-bug-id: 4991 Signed-off-by: Werner Koch <[email protected]>
* python: fix minor typo in howtoBernhard Reiter2020-03-031-1/+1
|
* python: Also detect python 3.9.Werner Koch2020-02-141-2/+2
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* python: Fix how to generate documentation.NIIBE Yutaka2019-11-061-46/+35
| | | | | | | | * lang/python/doc/Makefile.am: Explicitly write rules to generate rst and texinfo files. Fixes-commit: 36428d8cf153a33faac6a951752cdc76e23f9737 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: doc: Remove generated files, put rules in Makefile.NIIBE Yutaka2019-07-1213-8017/+39
| | | | | | | | | | | * lang/python/doc/Makefile.am (EXTRA_DIST): Remove files not distributed like files under meta. * Add rules to generate .rst and .texi files. * lang/python/doc/rst: Remove .rst files to be generated. * lang/python/doc/texinfo: Remove .texi files to be generated. GnuPG-bug-id: 4275 Signed-off-by: NIIBE Yutaka <[email protected]>
* python: doc: Add suffix for org files.NIIBE Yutaka2019-07-126-0/+0
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Fix regression in t-decrypt-verify test.Werner Koch2019-06-131-11/+11
| | | | | | | | * lang/python/tests/t-decrypt-verify.py: Comment recent changes. -- Fixes-commit: bd2d282e572b5d02669238c9e087259b85638477 GnuPG-bug-id: 4276
* python: Set a default-key into gpg.conf for the tests.Werner Koch2019-06-131-2/+1
| | | | | | | | | | | | | | | | | | | | * lang/python/tests/Makefile.am (gpg.conf): Set a default key. -- It seems we need to set a default key because at least t-sign.py does not specify the key to use and we do not want to rely on the order of keys in the keyring. Also Fixes-commit: f3ca2c9ce9fd4a03e293065f10b92589a7e642d6 gpg 2.0 is end-of-life and we don't need these extra options anymore. In fact they for the use of some gpg version and don't use the version gpgconf knows about. This also aligns the python tests to what we use for the C test suite. Signed-off-by: Werner Koch <[email protected]>
* python: Fix typo in DecryptionError exception.NIIBE Yutaka2019-06-041-3/+3
| | | | | | | | | | | | * lang/python/src/errors.py (DecryptionError): Rename from DeryptionError. (UnsupportedAlgorithm): Use DecryptionError. -- GnuPG-bug-id: 4478 Reported-by: Jan Girlich Signed-off-by: NIIBE Yutaka <[email protected]>
* python: Make EXTRA_DIST files explicitAndre Heinecke2019-05-064-5/+171
| | | | | | | | | | | | | | | * configure.ac: Configure new Makefiles. * lang/python/Makefile.am: Remove dirs from extra dist and use subdirs. * lang/python/examples/Makefile.am, lang/python/src/Makefile.am, lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files. -- This is similar to what lang/js does by explicitly listing the files. This ensures that we have clean distribution tarballs without accidentall additions that just lay in the directory. GnuPG-Bug-Id: T4481
* Python, doc: Minor style improvementAndre Heinecke2019-05-061-8/+9
| | | | | * lang/python/src/core.py (Context): Retab and shorten max line length.
* python: stop raising BadSignatures from decrypt(verify=True)dkg/fix-T4276Daniel Kahn Gillmor2019-05-032-13/+10
| | | | | | | | | | | | | | | | | * src/core.py (decrypt): filter out signatures with errors from the returned verify_result, but avoid raising BadSignatures * tests/t-decrypt-verify.py: ensure that only a single signature is returned when evaluating cipher-3.asc, since the other signature is unknown. -- This change preserves the invariant that decrypt() only ever returns valid signatures in the verify_result, but it avoids unnecessary errors in the face of the presence of an additional bad signature. GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* python/tests: try to decrypt and verify new test dataDaniel Kahn Gillmor2019-05-032-0/+21
| | | | | | | | | | | | | | | * lang/python/tests/t-decrypt.py: test decryption of cipher-3.asc and cipher-no-sig.asc * lang/python/tests/t-decrypt-verify.py: test decryption and verification of cipher-3.asc and cipher-no-sig.asc -- note that this introduces a failed test -- decrypt-verify.py misbehaves on cipher-3.asc by throwing a BadSignature even though GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* python: make it easier to run a limited number of testsDaniel Kahn Gillmor2019-05-031-1/+1
| | | | | | | | | | | | | | | | * lang/python/tests/Makefile.am: prefer py_tests from the environment if present. -- I'm trying to make it nicer/quicker to hack on the testsuite for python bindings. With this change, if you're improving the python bindings test suite, you can selectively run only a few specific tests like so: lang/python$ make check py_tests='t-decrypt.py t-decrypt-verify.py' Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Release GPGME 1.13.0gpgme-1.13.0Werner Koch2019-03-261-1/+1
| | | | | | | | | * configure.ac: Bump LT versions. For C to C33/A22/R0. For C++ to C15/A9/R0. For Qt to C10/A3/R3. Signed-off-by: Werner Koch <[email protected]>
* python: examplesBen McGinnes2019-02-101-0/+131
| | | | | | | | | | * A rather obvious variant of the existing key import examples, except directed at Mailvelope's keyserver. * Yeah, Werner, I know ... but it exists because I used it and there's no harm in sharing. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docsBen McGinnes2019-01-303-6/+6
| | | | | | | * Version bump in preparation for whenever GPGME 1.13.0 happens. * Ran the post_installer.py for docs preparation again. Signed-off-by: Ben McGinnes <[email protected]>
* python: post installer scriptBen McGinnes2019-01-271-0/+4
| | | | | | | * Removed auto-generated .texi files from doc/src/ so only the corrected versions are left. * Which means now it is complete, but with the initial work to expand it with info file generation later.
* python: post installer docs fix scriptBen McGinnes2019-01-2710-15/+53
| | | | | | | | | | | * Moved post_installer.py into the examples/howto/ directory. * Added instructions for its use to the Python Bindings HOWTO. * Ran it as intended from the lang/python/ directory in order to both prove it works and quickly and easily get the updated howto replicated. Also to fix all those .texi files. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: post installer doc fix scriptBen McGinnes2019-01-021-20/+9
| | | | | | | * Got rid of the bash bit in the comments. * Made the final printed instructions far more obvious. Signed-off-by: Ben McGinnes <[email protected]>
* python: examplesBen McGinnes2019-01-024-6/+3
| | | | | | | | | * Fixed inter-edit.py so it will actually work now. * made 3 others executable. * Fixed the semantics of assuan.py's instructions. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docs processingBen McGinnes2018-12-242-6/+175
| | | | | | | | | | | | | | | * Added some EPUB specific config options to the Sphinx config file which might help reduce some of Sphinx's more stupid default errors with EPUB validation. * Added lang/python/post_installer.py script for automating the generation of .texi and .rst "source" files from the real source files written in Org mode. Includes recreating the Sphinx Makefile which is excluded due to the m4 toolchain in parent directories, it also handles the rewriting of the reST index file properly and rewrites the .texi files so they don't impale themselves on Unicode. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: docsBen McGinnes2018-12-218-51/+193
| | | | | | | | | | | | | * Found a bug in org-mode's export to texinfo function which will require either manual modification of each file or a customs sed run over the generated files for all updates. * Manually updated the current files for now, but will need to add some post-install processing scripts for future use (I already have some of these for my specific setup, they just need to be made a little more generic and platform independent for here). Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: groups exampleBen McGinnes2018-12-212-10/+10
| | | | | | * Tightened code a little more. Signed-off-by: Ben McGinnes <[email protected]>
* python docs: house keepingBen McGinnes2018-12-171-14/+27
| | | | | | | * Dropped the ASCII copyright line, since even MS have conceded their battle against Unicode enough to load UTF-8. * Fixed the drafts section since there will be less need of multiple output format testing from next year.
* python: howto and examplesBen McGinnes2018-12-164-59/+61
| | | | | | | * Tightening up both the documentation and some of the example code. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: examples bugfixBen McGinnes2018-12-134-5/+29
| | | | | | | * Fixed a bug in the ProtonMail importers (pmkey-*.py) where multiple keys found for a username would always result in the last email address checked being returned in the printed output for all located keys.
* python: new example scriptBen McGinnes2018-12-121-0/+80
| | | | | | | | | | * Though Keybase really should not be encouraged due to disengenuosness and FUD emanating from that souce, this new script will obtain a key hosted on that site and import it when supplied with the keybase username. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: what's new summaryBen McGinnes2018-12-123-0/+29
| | | | * Added a little more detail to the what's new section.
* python: advanced howto exampleBen McGinnes2018-12-121-0/+1
| | | | * Added Cython requirement to this advanced use case.
* python: howto examples equirementsBen McGinnes2018-12-121-0/+2
| | | | | | * Added small requirements.txt file for additional modules not in the standard python library and not including the bindings themselves and not including Cython, which is for more advanced examples.
* python: hkp key importerBen McGinnes2018-12-101-19/+24
| | | | | | * Tweaked it slightly to avoid repetition of key searches when there is only one search pattern to check (i.e. usually a single key ID or fingerprint).
* python: HKP search and import updatesBen McGinnes2018-12-104-41/+203
| | | | | | | * Tweaked the code again so that it can also handle the cases where someone has included a hexadecimal string in their user ID. * Updated the HOWTO to match. * Exported to .rst and .texi.