Page MenuHome GnuPG

Merging pyme as language binding in gpgme master
Closed, ResolvedPublic

Description

While working on putting Gpgme++ into Gpgme I've noticed that the Pyme branches
are still not merged. Which is probably a bit sad as afaik there is not much
missing so maybe 90% done but now they are lying around in the repo unmerged.

Werner, Ben, do you know what's missing before it can be merged? And if so which
branch should be used, pyme3 or pyme or something else?

Event Timeline

werner added a subscriber: justus.

Justus, can you take care of this?

I have integrated the Python bindings into our build system. See branch
'justus/pyme3'.

Open issues:

  • (API) Change the name of the Python module. Currently it is named 'pyme',

shouldn't we use 'gpgme' instead?

  • (API) One has to hand 'bytes' objects to pyme where 'char *' is expected. We

should make SWIG magically encode strings as utf-8 instead.

  • Documentation. Needs to be build, likely updated, and installed. Ben was

thinking about using another tool for this. Needs investigation.

  • No test suite.
  • 'lang/python/examples/simple.py' segfaults.

Hi :)

Quoting Ben McGinnes (2016-05-11 19:54:21)

On Wed, May 11, 2016 at 12:44:00PM +0000, Justus Winter via BTS wrote:

Justus Winter <justus@g10code.com> added the comment:

I have integrated the Python bindings into our build system. See branch
'justus/pyme3'.

Open issues:

  • (API) Change the name of the Python module. Currently it is named 'pyme',

shouldn't we use 'gpgme' instead?

No, simply because other (abandoned) attempts at writing wrappers for
GPGME already exist in the Python ecosystem. If we rename a module to
match the name of an existing one this will break things somewhere.
It also makes us no different from poor Isis Lovecruft who selected
the name gnupg for her fork of python-gnupg, but the original was
always imported as just gnupg so when she increased the version number
of her fork she broke a *lot* of things in other people's code.

That's also why the entirely new thing I've called GPyGME, not just to
play word games with Pygmy, but also because the name is not used by
any existing Python module.

There doesn't seem to be a 'gpgme' package on pypi, so I don't see why
that should be an issue really. There is otoh 'pygpgme' which is
awefully close to 'GPyGME'.

Oh, I figure on replacing SWIG with CFFI for a number of reasons,
including ease of use, adoption by other major Python projects
(including PyPy),

Agreed.

  • (API) One has to hand 'bytes' objects to pyme where 'char *' is

expected. We should make SWIG magically encode strings as utf-8
instead.

That's probably a good idea.

The type conversion wasn't updated for Python3, this also caused the
segfaults.

  • No test suite.
  • 'lang/python/examples/simple.py' segfaults.

The examples and tests were not finished in the porting and some of
them had to be removed entirely as GTK2 is not supported in Python 3.

Did you actually try any of the examples?

Cheers,
Justus

justus removed a project: In Progress.