isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

Fixing Windows issues #206

Open instantname opened 6 years ago

instantname commented 6 years ago

Here are a few fixes that make python-gnupg work on Windows.

The main change is about paths: the strategy in this PR is to escape the paths as late as possible in the code.

According to my tests, this solves #199 and #204 on Python 2 & 3.

Below is a summary of the tests results. On Windows, since the GPG class could not be instantiated before, the tests are necessarily better... On Debian, some tests are already failing on the master branch and many even make the process hang (example with "test_gnupg.py crypt" in note [11] of attached file). When removing the ones that make the tests hang, I saw no notable difference between the tests on the master branch and this pull request.

Tests summary (see attached log for the numbered notes):

Python 2.7.13, GnuPG 1.4.22, this pull request (ea96545369d63bdc6a9799cbcb7015edd45be4eb):

Python 3.6, GnuPG 1.4.22, this pull request (ea96545369d63bdc6a9799cbcb7015edd45be4eb):

Debian Jessie, Python 2.7, master (705d7f45847570102919ad50740bce0c372d1e71):

Debian Jessie, Python 2.7, this pull request (ea96545369d63bdc6a9799cbcb7015edd45be4eb), excluding the tests that hanged above:

pr1_log.txt

isislovecruft commented 6 years ago

Hi @instantname! Thanks for the patches, and my apologies for taking so long to get to this.