Page MenuHome GnuPG

PythonUmbrella
ActivePublic

Recent Activity

Nov 2 2023

dkav added a comment to T6784: Python .egg format is deprecated.

For reference, here is a link to the gpgme homebrew formula:
https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/gpgme.rb

Nov 2 2023, 5:03 PM · MacOS, Python, gpgme, Bug Report
dkav added a comment to T6784: Python .egg format is deprecated.

Just to clarify, PIP wasn't used to install the .egg package. The package was built and installed via Homebrew. The error message occurs when using basic PIP commands such as pip list or pip freeze. PIP is picking up the gpgme egg from the shortcut included in the site-packages directory.

Nov 2 2023, 4:50 PM · MacOS, Python, gpgme, Bug Report
werner triaged T6784: Python .egg format is deprecated as Wishlist priority.

We don't use or suggest the use of PIP or other insecure software distribution systems.

Nov 2 2023, 8:24 AM · MacOS, Python, gpgme, Bug Report

May 23 2023

werner closed T6501: Check use of write in gpgme's Python bindings as Resolved.

Should be fixed now; see commit above.

May 23 2023, 4:45 PM · Python, Bug Report, gpgme
werner added a comment to T6501: Check use of write in gpgme's Python bindings.

FWIW: WriteFile and write are more different than in using a HANDLE vs. a libc file descriptor. Despite that a HANDLE might be a 64 bit pointer, it is guaranteed that the value fits into a 32 bit variable. But they still index different objects. The return code and error values are also different.

May 23 2023, 3:59 PM · Python, Bug Report, gpgme
werner added a comment to T6501: Check use of write in gpgme's Python bindings.

Much simpler: write is only used in the callbacks and over there gpgme_io_writen[n] shall be used anyway.

May 23 2023, 3:53 PM · Python, Bug Report, gpgme
Angel added a comment to T6501: Check use of write in gpgme's Python bindings.

it's not hard to fix that header to actually provide a sensible write(), avoiding the issue listed on the mailing list, where there was no return to check:

May 23 2023, 3:04 AM · Python, Bug Report, gpgme

May 22 2023

werner added a project to T6501: Check use of write in gpgme's Python bindings: Python.
May 22 2023, 10:38 AM · Python, Bug Report, gpgme

Apr 26 2023

gniibe changed the status of T6466: gpgme python example code contains insecure code pattern / chmod permission race condition from Open to Testing.

@ikloecker Thanks for your comment. I put a comment in the commit.

Apr 26 2023, 1:51 AM · Python, Documentation, gpgme

Apr 25 2023

ikloecker added a comment to T6466: gpgme python example code contains insecure code pattern / chmod permission race condition.

Note that this may not work for Python 2.7, but since those are just examples that doesn't matter that much.

Apr 25 2023, 10:41 AM · Python, Documentation, gpgme
gniibe added a comment to T6466: gpgme python example code contains insecure code pattern / chmod permission race condition.

So, here are fixes. I'll apply soonish.

Apr 25 2023, 7:44 AM · Python, Documentation, gpgme

Apr 24 2023

ikloecker added a comment to T6466: gpgme python example code contains insecure code pattern / chmod permission race condition.

Funny enough that Python seems not to allow to set the permission with open. Low priority because a proper umask must anyway be used on a multi-user system.

Apr 24 2023, 12:26 PM · Python, Documentation, gpgme
werner triaged T6466: gpgme python example code contains insecure code pattern / chmod permission race condition as Low priority.

Funny enough that Python seems not to allow to set the permission with open. Low priority because a proper umask must anyway be used on a multi-user system.

Apr 24 2023, 8:22 AM · Python, Documentation, gpgme

Apr 13 2023

gniibe closed T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config) as Resolved.

Fixed in 1.19.0.

Apr 13 2023, 3:10 AM · Python, gpgme

Mar 16 2023

werner accepted D546: build: Find correct version string for Python >= 3.10.

Will go into 1.19.0

Mar 16 2023, 3:13 PM · Python, Feature Request, gpgme

Mar 3 2023

werner added a comment to D546: build: Find correct version string for Python >= 3.10.

That's why I added some tags and also set me a reminder. We will try to get this into the next GPGME release we plan for this month.

Mar 3 2023, 4:02 PM · Python, Feature Request, gpgme
DanielNoord updated subscribers of D546: build: Find correct version string for Python >= 3.10.

@werner Seeing as you seem to be actively maintaining this project: is there any way to move this forward? This is breaking quite a few builds of development environments for my company and we are now applying similar patches ourselves but it would be nice to get this merged upstream.

Mar 3 2023, 10:36 AM · Python, Feature Request, gpgme
werner added projects to D546: build: Find correct version string for Python >= 3.10: gpgme, Feature Request, Python.
Mar 3 2023, 10:15 AM · Python, Feature Request, gpgme

Dec 8 2022

kloczek added a comment to T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config).

OK I can confirm that with ae9258fb and f1802682 commits I was ble to update my rpm packages to 1.18.0.

Dec 8 2022, 2:20 PM · Python, gpgme
gniibe merged T6306: 1.18.0: gpgme pythpn bindings fails because it tries to use gpg-error-config into T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config).
Dec 8 2022, 3:23 AM · Python, gpgme

Oct 26 2022

ametzler1 added a comment to T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config).

@gniibe - Thanks for the quick response. It now works for me.
cu Andreas

Oct 26 2022, 7:22 AM · Python, gpgme
gniibe added a comment to T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config).

@ametzler1 Thank you. That was because of my bad fix.
Fixed in rMf1802682c3c8: python: Fix configure generating setup.py.

Oct 26 2022, 4:44 AM · Python, gpgme

Oct 25 2022

ametzler1 added a comment to T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config).

the pushed fix breaks when libgpg-error does not require special CFLAGS, i.e. when @GPG_ERROR_CFLAGS@ expands to an empty string:

Oct 25 2022, 6:19 PM · Python, gpgme

Sep 22 2022

werner changed the status of T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config) from Open to Testing.
Sep 22 2022, 10:40 AM · Python, gpgme

Sep 15 2022

gniibe added a project to T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config): Restricted Project.

Pushed the fix.
Note that non-in-tree build never been reliable (using the result of the configure, in tree).
So, I basically don't consider the use case of non-in-tree build.

Sep 15 2022, 7:00 AM · Python, gpgme
gniibe added a comment to T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config).

Reviewing the build process, it's just better to use @...VAR...@ by configure (instead of invoke pkg-config again in setup.py).

Sep 15 2022, 6:44 AM · Python, gpgme
gniibe triaged T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config) as High priority.
Sep 15 2022, 5:01 AM · Python, gpgme

Aug 10 2022

werner closed T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python) as Resolved.
Aug 10 2022, 4:01 PM · Python, gpgme, Bug Report

Aug 9 2022

gniibe added a comment to T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python).

Indeed, you are right. The object created by with can be valid even after the context (when referenced by another object).

Aug 9 2022, 1:52 AM · Python, gpgme, Bug Report

Aug 8 2022

jap added a comment to T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python).

Not sure if that is the complete fix - if you do something like:

with gpg.Context(...) as context:
    ...
... cause an exception after the context has been closed ...

then context will still be a valid reference to the gpg.Context instance, and may cause segfaults when something tries to access things inside it (f.e. for serialisation).
I like your previous solution with the accessor checks, because that actually fixes the issue.
Stylistically, maybe __del__ should just be renamed to cleanup or free, and then make sure to call that function from both __exit__ and __del__.

Aug 8 2022, 1:14 PM · Python, gpgme, Bug Report
gniibe added a comment to T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python).

I think the fix should be something like this:

diff --git a/lang/python/src/core.py b/lang/python/src/core.py
index 81f961d9..95fd0cba 100644
--- a/lang/python/src/core.py
+++ b/lang/python/src/core.py
@@ -1189,8 +1189,9 @@ class Context(GpgmeWrapper):
     def __enter__(self):
         return self
Aug 8 2022, 10:54 AM · Python, gpgme, Bug Report
gniibe added a comment to T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python).

@jap Thank you.

Aug 8 2022, 10:04 AM · Python, gpgme, Bug Report
jap added a comment to T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python).

Can confirm, we've been running into this as well, but never filed a bug report. Our solution is to have this in our codebase:

Aug 8 2022, 9:02 AM · Python, gpgme, Bug Report

Aug 5 2022

gniibe moved T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python) from Backlog to Python stuff on the gpgme board.
Aug 5 2022, 8:10 AM · Python, gpgme, Bug Report
gniibe claimed T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python).

The SEGV was due to access to gpgme library after self.wrapped is set to None in the __del__ function.

Aug 5 2022, 8:04 AM · Python, gpgme, Bug Report

Jul 26 2022

werner triaged T6060: segfault (NULL-pointer) when inspecting gpg Context after exception (python) as Normal priority.
Jul 26 2022, 8:59 PM · Python, gpgme, Bug Report

May 27 2022

sergi added a watcher for Python: sergi.
May 27 2022, 10:10 PM
srgblnchtrn removed a watcher for Python: srgblnchtrn.
May 27 2022, 10:05 PM

Sep 21 2021

werner closed T5608: Encryption using python for international characters not working properly as Wontfix.

GnuPG 2.0 reached end-of-life nearly 4 years ago. See https://gnupg.org/download/index.html#end-of-life . Same for Gpg4win. They are not maintained and its use is very risky due to unfixed bugs. Please update to a recent version.

Sep 21 2021, 8:47 AM · gnupg (gpg20), Too Old, Python, Bug Report

Sep 20 2021

masteru341 added a comment to T5608: Encryption using python for international characters not working properly.
  1. >>gpg2 --version

gpg (GnuPG) 2.0.30 (Gpg4win 2.3.3)
libgcrypt 1.6.6

Sep 20 2021, 7:50 PM · gnupg (gpg20), Too Old, Python, Bug Report
werner added projects to T5608: Encryption using python for international characters not working properly: gnupg, Python.

Which gpg version?
Which Python library? (gnupg is pretty generic)
How does the Python library call gpg?
Are you aware that gpg uses utf8 and not Windows Unicode?

Sep 20 2021, 7:40 PM · gnupg (gpg20), Too Old, Python, Bug Report

Aug 13 2021

werner changed the edit policy for Python.
Aug 13 2021, 11:13 PM

Jun 25 2021

werner added a project to T5500: gpgme: Test t-idiomatic.py fails with Python 3.8: Python.
Jun 25 2021, 9:16 AM · Python, gpgme, Bug Report

Jun 24 2021

werner closed T5292: regression: no longer possible to get signatures from decrypt from unknown keys as Resolved.
Jun 24 2021, 7:43 PM · patch, Python, gpgme, Bug Report
werner moved T4276: Context.decrypt() throws an error if *any* signature is bad from Backlog to Python stuff on the gpgme board.
Jun 24 2021, 6:30 PM · gpgme, Python, Bug Report

Apr 15 2021

werner raised the priority of T5292: regression: no longer possible to get signatures from decrypt from unknown keys from Low to Normal.
Apr 15 2021, 9:16 AM · patch, Python, gpgme, Bug Report
werner triaged T5292: regression: no longer possible to get signatures from decrypt from unknown keys as Low priority.
Apr 15 2021, 9:16 AM · patch, Python, gpgme, Bug Report

Feb 13 2021

werner closed T5298: drop support for python2 for the python bindings for gpgme as Wontfix.

There is still useful software working only with 2.7. So it is not the time to drop this.

Feb 13 2021, 5:57 PM · gpgme, Python

Feb 12 2021

dkg created T5298: drop support for python2 for the python bindings for gpgme.
Feb 12 2021, 4:32 PM · gpgme, Python

Feb 9 2021

jap added a comment to T5292: regression: no longer possible to get signatures from decrypt from unknown keys.

Feb 9 2021, 1:11 PM · patch, Python, gpgme, Bug Report