ANN: A new version (0.5.3) of python-gnupg has been released.

2024-09-20 Thread Vinay Sajip via Python-list
What Changed?=
This is an enhancement and bug-fix release, and all users are encouraged to 
upgrade.

Brief summary:

   
   - * Fix #117: Add WKD (Web Key Directory) support for auto-locating keys. 
Thanks to Myzel394 for the patch.

* Fix #237: Ensure local variable is initialized even when an exception occurs. 
  
   -
* Fix #239: Remove logging of decryption result.

This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

Recent changes to PyPI don't show the GPG signature with the download links.
An alternative download source where the signatures are available is at [4].
The source code repository is at [1].
Documentation is available at [5].

As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via this group).

Enjoy!

Cheers

Vinay Sajip

[1] https://github.com/vsajip/python-gnupg
[2] https://pypi.org/project/python-gnupg/0.5.3
[3] https://github.com/vsajip/python-gnupg/issues
[4] https://github.com/vsajip/python-gnupg/releases/
[5] python-gnupg - A Python wrapper for GnuPG








-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.5.2) of python-gnupg has been released.

2023-12-13 Thread Vinay Sajip via Python-list
What Changed?=
This is an enhancement and bug-fix release, and all users are encouraged to 
upgrade.

Brief summary:

* Fix #228: Clarify documentation for encryption/decryption.

* Make I/O buffer size configurable via buffer_size attribute on a GPG instance.

This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

Recent changes to PyPI don't show the GPG signature with the download links.
An alternative download source where the signatures are available is at [4].
The source code repository is at [1].
Documentation is available at [5].

As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via this group).

Enjoy!

Cheers

Vinay Sajip

[1] https://github.com/vsajip/python-gnupg
[2] https://pypi.org/project/python-gnupg/0.5.2
[3] https://github.com/vsajip/python-gnupg/issues
[4] https://github.com/vsajip/python-gnupg/releases/
[5] https://docs.red-dove.com/python-gnupg/



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ANN: A new version (0.5.1) of python-gnupg has been released.

2023-07-22 Thread Dan Sommers via Python-list
On 2023-07-22 at 11:04:35 +,
Vinay Sajip via Python-list  wrote:

> What Changed?
> =

What changed, indeed.

Maybe I'm old, and curmudgeonly, but it would be nice if the body of
these annoucement emails (not just this one) contained the name of the
program and a one-line summary of what the program does, preferably
right at the top.

(Admittedly, in this case, once I found the name of the program in the
subject and the footnotes, I was able to figure out what it does.  Not
all software is named that usefully.)
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.5.1) of python-gnupg has been released.

2023-07-22 Thread Vinay Sajip via Python-list
What Changed?
=
This is an enhancement and bug-fix release, and all users are encouraged to 
upgrade.

Brief summary:

 * Added TRUST_EXPIRED to trust_keys.

* Fix #206: Remove deprecated --always-trust in favour of --trust-model always

* Fix #208: Add status_detail attribute to result objects which is populated 
when
  the status is 'invalid recipient' (encryption/decryption) or 'invalid signer'
  (signing). This attribute will be set when the result object's status 
attribute is
  set to 'invalid recipient' and will contain more information about the 
failure in the
  form of reason:ident where reason is a text description of the reason, and
  ident identifies the recipient key.

* Add scan_keys_mem() function to scan keys in a string.

* Fix #214: Handle multiple signatures when one of them is invalid or 
unverified.

* A problems attribute was added which holds problems reported by gpg
  during verification. This is a list of dictionaries, one for each reported
  problem. Each dictionary will have status and keyid keys indicating
  the problem and the corresponding key; other information in the dictionaries
  will be error specific.

* Fix #217: Use machine-readable interface to query the gpg version.

* Added the ability to export keys to a file.
This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

Recent changes to PyPI don't show the GPG signature with the download links.
An alternative download source where the signatures are available is at [4].
The source code repository is at [1].
Documentation is available at [5].
As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via this group).

Enjoy!

Cheers

Vinay Sajip

[1] https://github.com/vsajip/python-gnupg
[2] https://pypi.org/project/python-gnupg/0.5.1
[3] https://github.com/vsajip/python-gnupg/issues
[4] https://github.com/vsajip/python-gnupg/releases/
[5] https://docs.red-dove.com/python-gnupg/
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.5.0) of python-gnupg has been released.

2022-08-23 Thread Vinay Sajip via Python-list
What Changed?
=
This is an enhancement and bug-fix release, and all users are encouraged to
upgrade.

Brief summary:

* Fixed #181: Added the ability to pass file paths to encrypt_file, 
decrypt_file,
  sign_file, verify_file, get_recipients_file and added import_keys_file.

* Fixed #183: Handle FAILURE and UNEXPECTED conditions correctly. Thanks to 
sebbASF for
  the patch.

* Fixed #185: Handle VALIDSIG arguments more robustly.

* Fixed #188: Remove handling of DECRYPTION_FAILED from Verify code, as not 
required
  there. Thanks to sebbASF for the patch.

* Fixed #190: Handle KEY_CREATED more robustly.

* Fixed #191: Handle NODATA messages during verification.

* Fixed #196: Don't log chunk data by default, as it could contain sensitive
  information (during decryption, for example).

* Added the ability to pass an environment to the gpg executable. Thanks to 
Edvard
  Rejthar for the patch.

This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

Recent changes to PyPI don't show the GPG signature with the download links.
The source code repository is at [1].
An alternative download source where the signatures are available is at [4].
Documentation is available at [5].

As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via this group).

Enjoy!

Cheers

Vinay Sajip

[1] https://github.com/vsajip/python-gnupg
[2] https://pypi.org/project/python-gnupg/0.5.0
[3] https://github.com/vsajip/python-gnupg/issues
[4] https://github.com/vsajip/python-gnupg/releases/
[5] https://docs.red-dove.com/python-gnupg/
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.4.9) of python-gnupg has been released.

2022-05-20 Thread Vinay Sajip via Python-list
What Changed?
=
This is an enhancement and bug-fix release, and all users are encouraged to
upgrade.

Brief summary:

* Fixed #161: Added a status attribute to the returned object from gen_key() 
which
  is set to 'ok' if a key was successfully created, or 'key not created' if that
  was reported by gpg, or None in any other case.

* Fixed #164: Provided the ability to add subkeys. Thanks to Daniel Kilimnik 
for the
  feature request and patch.

* Fixed #166: Added keygrip values to the information collected when keys are 
listed.
  Thanks to Daniel Kilimnik for the feature request and patch.

* Fixed #173: Added extra_args to send_keys(), recv_keys() and search_keys() to 
allow
  passing options relating to key servers.

This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

Recent changes to PyPI don't show the GPG signature with the download links.
The source code repository is at [1].
An alternative download source where the signatures are available is at [4].
Documentation is available at [5].

As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via this group).

Enjoy!

Cheers

Vinay Sajip

[1] https://github.com/vsajip/python-gnupg
[2] https://pypi.org/project/python-gnupg/0.4.9
[3] https://github.com/vsajip/python-gnupg/issues
[4] https://github.com/vsajip/python-gnupg/releases/
[5] https://docs.red-dove.com/python-gnupg/
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.4.5) of python-gnupg has been released.

2019-08-12 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released.
What Changed?=
This is an enhancement and bug-fix release, and all users are encouraged 
toupgrade.
Brief summary:
* Fixed #107: Improved documentation.
* Fixed #112: Raised a ValueError if a gnupghome is specified which is not an  
existing directory.
* Fixed #113: Corrected stale link in the documentation.
* Fixed #116: Updated documentation to clarify when spurious key-expired/  
signature-expired messages might be seen.
* Fixed #119: Added --yes to avoid pinentry when deleting secret keys with  
GnuPG >= 2.1.
* A warning is logged if gpg returns a non-zero return code.
* Added ``extra_args`` to ``import_keys``.
* Added support for CI using AppVeyor.
This release [2] has been signed with my code signing key:
Vinay Sajip (CODE SIGNING KEY) Fingerprint: CA74 
9061 914E AC13 8E66 EADB 9147 B477 339A 9B86
Recent changes to PyPI don't show the GPG signature with the download links.An 
alternative download source where the signatures are available is the 
project'sown downloads page [5].
What Does It Do?The gnupg module allows Python programs to make 
use of thefunctionality provided by the Gnu Privacy Guard (abbreviated GPG 
orGnuPG). Using this module, Python programs can encrypt and decryptdata, 
digitally sign documents and verify digital signatures, manage(generate, list 
and delete) encryption keys, using proven Public KeyInfrastructure (PKI) 
encryption technology based on OpenPGP.
This module is expected to be used with Python versions >= 2.4, as itmakes use 
of the subprocess module which appeared in that version ofPython. This module 
is a newer version derived from earlier work byAndrew Kuchling, Richard Jones 
and Steve Traugott.
A test suite using unittest is included with the source distribution.
Simple usage:
>>> import gnupg>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')>>> 
>>> gpg.list_keys()
[{...'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2','keyid': 
'197D5DAC68F1AAB2','length': '1024','type': 'pub','uids': ['', 'Gary Gross (A 
test user) ']},{...'fingerprint': 
'37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A','keyid': 
'0C5FEFA7A921FC4A','length': '1024',...'uids': ['', 'Danny Davis (A test user) 
']}]>>> encrypted = gpg.encrypt("Hello, world!", 
['0C5FEFA7A921FC4A'])>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 
(GNU/Linux)\n\nhQIOA/6NHMDTXUwcEAf.-END PGP MESSAGE-\n'>>> decrypted = 
gpg.decrypt(str(encrypted), passphrase='secret')>>> str(decrypted)
'Hello, world!'>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')>>> 
verified = gpg.verify(str(signed))>>> print "Verified" if verified else "Not 
verified"
'Verified'
As always, your feedback is most welcome (especially bug reports [3],patches 
and suggestions for improvement, or any other points via themailing 
list/discussion group [4]).
Enjoy!
Cheers
Vinay SajipRed Dove Consultants Ltd.
[1] https://bitbucket.org/vinay.sajip/python-gnupg[2] 
https://pypi.org/project/python-gnupg/0.4.5[3] 
https://bitbucket.org/vinay.sajip/python-gnupg/issues[4] 
https://groups.google.com/forum/#!forum/python-gnupg[5] 
https://bitbucket.org/vinay.sajip/python-gnupg/downloads/--
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.4.4) of python-gnupg has been released. It contains a security-related change - please update to this version

2019-01-24 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released.
What Changed?=This is an enhancement and security-fix release, and 
all users are stronglyencouraged to upgrade.
Brief summary:
* Fixed #108: Changed how any return value from the on_data callable is  
processed. In earlier versions, the return value was ignored. In this version,  
if the return value is False, the data received from gpg is not  buffered. 
Otherwise (if the value is None or True, for example), the  data is buffered as 
normal. This functionality can be used to do your own  buffering, or to prevent 
buffering altogether.
  The on_data callable is also called once with an empty byte-string to  signal 
the end of data from gpg.
* Fixed #97: Added an additional attribute check_fingerprint_collisions to  GPG 
instances, which defaults to False. It seems that gpg is happy  to have 
duplicate keys and fingerprints in a keyring, so we can't be too  strict. A 
user can set this attribute of an instance to True to trigger a  check for 
collisions.
* Fixed #111: With GnuPG 2.2.7 or later, provide the fingerprint of a signing  
key for a failed signature verification, if available.
* Fixed #21: For verification where multiple signatures are involved, a  
mapping of signature_ids to fingerprint, keyid, username, creation date,  
creation timestamp and expiry timestamp is provided.
* Added a check to disallow certain control characters ('\r', '\n', NUL) in  
passphrases. This fix mitigates against CVE-2019-6690.
This release [2] has been signed with my code signing key:
Vinay Sajip (CODE SIGNING KEY) Fingerprint: CA74 
9061 914E AC13 8E66 EADB 9147 B477 339A 9B86
Recent changes to PyPI don't show the GPG signature with the download links.An 
alternative download source where the signatures are available is the 
project'sown downloads page [5].
What Does It Do?The gnupg module allows Python programs to make 
use of thefunctionality provided by the Gnu Privacy Guard (abbreviated GPG 
orGnuPG). Using this module, Python programs can encrypt and decryptdata, 
digitally sign documents and verify digital signatures, manage(generate, list 
and delete) encryption keys, using proven Public KeyInfrastructure (PKI) 
encryption technology based on OpenPGP.
This module is expected to be used with Python versions >= 2.4, as itmakes use 
of the subprocess module which appeared in that version ofPython. This module 
is a newer version derived from earlier work byAndrew Kuchling, Richard Jones 
and Steve Traugott.
A test suite using unittest is included with the source distribution.
Simple usage:
>>> import gnupg>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')>>> 
>>> gpg.list_keys()
[{...'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2','keyid': 
'197D5DAC68F1AAB2','length': '1024','type': 'pub','uids': ['', 'Gary Gross (A 
test user) ']},{...'fingerprint': 
'37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A','keyid': 
'0C5FEFA7A921FC4A','length': '1024',...'uids': ['', 'Danny Davis (A test user) 
']}]>>> encrypted = gpg.encrypt("Hello, world!", 
['0C5FEFA7A921FC4A'])>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 
(GNU/Linux)\n\nhQIOA/6NHMDTXUwcEAf.-END PGP MESSAGE-\n'>>> decrypted = 
gpg.decrypt(str(encrypted), passphrase='secret')>>> str(decrypted)
'Hello, world!'>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')>>> 
verified = gpg.verify(str(signed))>>> print "Verified" if verified else "Not 
verified"
'Verified'
As always, your feedback is most welcome (especially bug reports [3],patches 
and suggestions for improvement, or any other points via themailing 
list/discussion group [4]).
Enjoy!
Cheers
Vinay SajipRed Dove Consultants Ltd.
[1] https://bitbucket.org/vinay.sajip/python-gnupg[2] 
https://pypi.python.org/pypi/python-gnupg/0.4.4[3] 
https://bitbucket.org/vinay.sajip/python-gnupg/issues[4] 
https://groups.google.com/forum/#!forum/python-gnupg[5] 
https://bitbucket.org/vinay.sajip/python-gnupg/downloads/
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.4.3) of python-gnupg has been released. It contains a security-related change - please update to this version

2018-06-13 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released.
What Changed?=This is a security-fix release, and all users are 
strongly encouraged to upgrade.This fix mitigates against CVE-2018-12020. See 
the discoverer's blog post [6] formore information.
Brief summary:

* Added --no-verbose to the gpg command line, in case verbose is specified in  
gpg.conf - we don't need verbose output.
This release [2] has been signed with my code signing key:
Vinay Sajip (CODE SIGNING KEY) Fingerprint: CA74 
9061 914E AC13 8E66 EADB 9147 B477 339A 9B86
Recent changes to PyPI don't show the GPG signature with the download links.An 
alternative download source where the signatures are available is the 
project'sown downloads page [5].
What Does It Do?The gnupg module allows Python programs to make 
use of thefunctionality provided by the Gnu Privacy Guard (abbreviated GPG 
orGnuPG). Using this module, Python programs can encrypt and decryptdata, 
digitally sign documents and verify digital signatures, manage(generate, list 
and delete) encryption keys, using proven Public KeyInfrastructure (PKI) 
encryption technology based on OpenPGP.
This module is expected to be used with Python versions >= 2.4, as itmakes use 
of the subprocess module which appeared in that version ofPython. This module 
is a newer version derived from earlier work byAndrew Kuchling, Richard Jones 
and Steve Traugott.
A test suite using unittest is included with the source distribution.
Simple usage:
>>> import gnupg>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')>>> 
>>> gpg.list_keys()
[{...'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2','keyid': 
'197D5DAC68F1AAB2','length': '1024','type': 'pub','uids': ['', 'Gary Gross (A 
test user) ']},{...'fingerprint': 
'37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A','keyid': 
'0C5FEFA7A921FC4A','length': '1024',...'uids': ['', 'Danny Davis (A test user) 
']}]>>> encrypted = gpg.encrypt("Hello, world!", 
['0C5FEFA7A921FC4A'])>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 
(GNU/Linux)\n\nhQIOA/6NHMDTXUwcEAf.-END PGP MESSAGE-\n'>>> decrypted = 
gpg.decrypt(str(encrypted), passphrase='secret')>>> str(decrypted)
'Hello, world!'>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')>>> 
verified = gpg.verify(str(signed))>>> print "Verified" if verified else "Not 
verified"
'Verified'
As always, your feedback is most welcome (especially bug reports [3],patches 
and suggestions for improvement, or any other points via themailing 
list/discussion group [4]).
Enjoy!
Cheers
Vinay SajipRed Dove Consultants Ltd.
[1] https://bitbucket.org/vinay.sajip/python-gnupg[2] 
https://pypi.python.org/pypi/python-gnupg/0.4.3[3] 
https://bitbucket.org/vinay.sajip/python-gnupg/issues[4] 
https://groups.google.com/forum/#!forum/python-gnupg[5] 
https://bitbucket.org/vinay.sajip/python-gnupg/downloads/[6] 
https://neopg.io/blog/gpg-signature-spoof/
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.4.2) of python-gnupg has been released.

2018-03-28 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released. 
What Changed? = This is an enhancement and bug-fix release, and all 
users are encouraged to upgrade. See the project website [1] for more 
information. 
Brief summary: 
* Subkey information is now collected and returned in a subkey_info  dictionary 
keyed by the subkey's ID.
* GPG2 version is now correctly detected on OS X.
* Added expect_passphrase keyword argument for use on GnuPG >= 2.1 when  
passing passphrase to gpg via pinentry.
* Provided a trust_keys method to allow setting the trust level  for keys. 
Thanks to William Foster for a suggested implementation.
* Made the exception message when the gpg executable is not found contain the  
path of the executable that was tried. Thanks to Kostis Anagnostopoulos for  
the suggestion.
* Made the error message less categorical in the case of a failure with an  
unspecified reason, adding some information from gpg error codes when  
available.
This release [2] has been signed with my code signing key: 
Vinay Sajip (CODE SIGNING KEY)  Fingerprint: CA74 9061 
914E AC13 8E66 EADB 9147 B477 339A 9B86 
What Does It Do?  The gnupg module allows Python programs to 
make use of the functionality provided by the Gnu Privacy Guard (abbreviated 
GPG or GnuPG). Using this module, Python programs can encrypt and decrypt data, 
digitally sign documents and verify digital signatures, manage (generate, list 
and delete) encryption keys, using proven Public Key Infrastructure (PKI) 
encryption technology based on OpenPGP. 
This module is expected to be used with Python versions >= 2.4, as it makes use 
of the subprocess module which appeared in that version of Python. This module 
is a newer version derived from earlier work by Andrew Kuchling, Richard Jones 
and Steve Traugott. 
A test suite using unittest is included with the source distribution. 
Simple usage: 
>>> import gnupg >>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory') 
>>> >>> gpg.list_keys() 
[{ ... 'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2', 'keyid': 
'197D5DAC68F1AAB2', 'length': '1024', 'type': 'pub', 'uids': ['', 'Gary Gross 
(A test user) ']}, { ... 'fingerprint': 
'37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A', 'keyid': '0C5FEFA7A921FC4A', 
'length': '1024', ... 'uids': ['', 'Danny Davis (A test user) ']}] >>> encrypted = gpg.encrypt("Hello, world!", 
['0C5FEFA7A921FC4A']) >>> str(encrypted) 
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n 
\nhQIOA/6NHMDTXUwcEAf . -END PGP MESSAGE-\n' >>> decrypted = 
gpg.decrypt(str(encrypted), passphrase='secret') >>> str(decrypted) 
'Hello, world!' >>> signed = gpg.sign("Goodbye, world!", passphrase='secret') 
>>> verified = gpg.verify(str(signed)) >>> print "Verified" if verified else 
"Not verified" 
'Verified' 
As always, your feedback is most welcome (especially bug reports [3], patches 
and suggestions for improvement, or any other points via the mailing 
list/discussion group [4]). 
Please refer to the documentation [5] for more information. 
Enjoy! 
Cheers 
Vinay Sajip Red Dove Consultants Ltd. 
[1] https://bitbucket.org/vinay.sajip/python-gnupg [2] 
https://pypi.python.org/pypi/python-gnupg/0.4.2 [3] 
https://bitbucket.org/vinay.sajip/python-gnupg/issues [4] 
https://groups.google.com/forum/#!forum/python-gnupg [5] 
https://gnupg.readthedocs.io/en/latest/ 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: when the new version of XPN py2 newsreader src-tarball hits alt.binaries, the world will hold it's breath

2018-01-03 Thread a
py2 now, gotta fix that one
-- 
https://mail.python.org/mailman/listinfo/python-list


when the new version of XPN py2 newsreader src-tarball hits alt.binaries, the world will hold it's breath

2018-01-03 Thread XPN

when the new version of XPN py2 newsreader src-tarball hits
alt.binaries,  the world will hold it's breath.


major usability overhaul is ongoing.

release will be in style in usenet binary newsgroup.

full autoconfigure, no bs asked.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Speed Race between old and new version 'working with files'

2017-10-27 Thread Steve D'Aprano
On Sat, 28 Oct 2017 09:11 am, japy.ap...@gmail.com wrote:

> import time
> 
> avg = float(0)

That should be written as 

avg = 0.0

or better still not written at all, as it is pointless.


> # copy with WITH function and execute time
> for i in range(500):
> start = time.clock()

time.clock() is an old, platform-dependent, low-resolution timer. It has been
deprecated in recent versions of Python. It is better to use:

from timeit import default_timer as clock

and use that, as the timeit module has already chosen the best timer available
on your platform.

In fact, you probably should be using timeit rather than re-inventing the
wheel, unless you have a good reason.

> with open('q://my_projects/cricket.mp3', 'rb') as old,
> open('q://my_projects/new_cricket.mp3', 'wb') as new:
> for j in old:
> new.write(j)

Reading a *binary file* line-by-line seems rather dubious to me. I wouldn't do
it that way, but for now we'll just keep it.

The simplest way to do this time comparison would be: 


oldfile = 'q://my_projects/cricket.mp3'
newfile = 'q://my_projects/new_cricket.mp3'

from timeit import Timer

def test_with():
with open(oldfile, 'rb') as old, \
open(newfile, 'wb') as new:
for line in old:
new.write(line)

def test_without():
old = open(oldfile, 'rb')
new = open(newfile, 'wb')
for line in old:
new.write(line)
old.close()
new.close()

setup = "from __main__ import test_with, test_without"

t1 = Timer("test_with()", setup)
t2 = Timer("test_without()", setup)

print('Time using with statement:')
print(min(t1.repeat(number=100, repeat=5)))
print('Time not using with statement:')
print(min(t2.repeat(number=100, repeat=5)))


On my computer, that gives a value of about 5.3 seconds and 5.2 seconds
respectively. That figure should be interpreted as:

- the best value of five trials (the 'repeat=5' argument);

- each trial calls the test_with/test_without function 100 times
  (the 'number=100' argument)

so on my computer, each call to the test function takes around 5/100 seconds,
or 50ms. So there's no significant speed difference between the two: using
the with statement is a tiny bit slower (less than 2% on my computer).

[...]
> avg += (stop - start) / 500

Better to skip the pointless initialision of avg and just write:

avg = (stop - start)/500

> avg += (stop - start) / 500
> print('Execute time with OLD version : ', avg)

That *adds* the time of the second test to the original timing, so your last
line should be:

print('Execute time with NEW version plus time with OLD version : ', avg)

to be accurate. But I don't think that's what you intended.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

-- 
https://mail.python.org/mailman/listinfo/python-list


Speed Race between old and new version 'working with files'

2017-10-27 Thread japy . april
import time

avg = float(0)

# copy with WITH function and execute time
for i in range(500):
start = time.clock()
with open('q://my_projects/cricket.mp3', 'rb') as old, 
open('q://my_projects/new_cricket.mp3', 'wb') as new:
for j in old:
new.write(j)
stop = time.clock()

avg += (stop - start) / 500
print('Execute time with WITH version : ', avg)

# copy with OLD version OPEN FILE function and execute time
for i in range(500):
start = time.clock()
old = open('q://my_projects/cricket.mp3', 'rb')
new = open('q://my_projects/old_cricket.mp3', 'wb')
for j in old:
new.write(j)
old.close()
new.close()
stop = time.clock()

avg += (stop - start) / 500
print('Execute time with OLD version : ', avg)
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.4.1) of python-gnupg has been released.

2017-07-10 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released.

What Changed?
=
This is an enhancement and bug-fix release, and all users are encouraged to 
upgrade.
See the project website [1] for more information.

Brief summary:

* Updated message handling logic to no longer raise exceptions when a message 
isn't
  recognised. Thanks to Daniel Kahn Gillmor for the patch.
* Always use always use --fixed-list-mode, --batch and --with-colons. Thanks to 
Daniel
  Kahn Gillmor for the patch.
* Improved scan_keys() handling on GnuPG >= 2.1. Thanks to Daniel Kahn Gillmor 
for the
  patch.
* Improved test behaviour with GnuPG >= 2.1. Failures when deleting test 
directory trees
  are now ignored. Thanks to Daniel Kahn Gillmor for the patch.
* Added close_file keyword argument to verify_file to allow the file closing to 
be made
  optional. Current behaviour is maintained - close_file=False can be passed to 
skip
  closing the file being verified.
* Added the extra_args keyword parameter to allow custom arguments to be passed 
to the
  gpg executable.
* Instances of the GPG class now have an additional on_data attribute, which 
defaults to
  None. It can be set to a callable which will be called with a single argument 
- a binary
  chunk of data received from the gpg executable. The callable can do whatever 
it likes
  with the chunks passed to it - e.g. write them to a separate stream. The 
callable should
  not raise any exceptions (unless it wants the current operation to fail).

This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()

[{
...
'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
'keyid': '197D5DAC68F1AAB2',
'length': '1024',
'type': 'pub',
'uids': ['', 'Gary Gross (A test user) ']},
{
...
'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
'keyid': '0C5FEFA7A921FC4A',
'length': '1024',
...
'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)

'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
.
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)

'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"

'Verified'

As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via the
mailing list/discussion group [4]).

Please refer to the documentation [5] for more information.

Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.

[1] https://bitbucket.org/vinay.sajip/python-gnupg
[2] https://pypi.python.org/pypi/python-gnupg/0.4.1
[3] https://bitbucket.org/vinay.sajip/python-gnupg/issues
[4] https://groups.google.com/forum/#!forum/python-gnupg
[5] https://gnupg.readthedocs.io/en/latest/ 
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.4.0) of python-gnupg has been released.

2017-01-29 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released.

What Changed?
=
This is an enhancement and bug-fix release, and all users are encouraged to 
upgrade.
See the project website [1] for more information.

Brief summary:


* Added support for ``KEY_CONSIDERED`` in more places - encryption /
  decryption, signing, key generation and key import.

* Partial fix for #32 (GPG 2.1 compatibility). Unfortunately, better
  support cannot be provided at this point, unless there are certain
  changes (relating to pinentry popups) in how GPG 2.1 works.

* Fixed #60: An IndexError was being thrown by ``scan_keys()``.

* Ensured that utf-8 encoding is used when the ``--with-column`` mode is
  used. Thanks to Yann Leboulanger for the patch.

* ``list_keys()`` now uses ``--fixed-list-mode``. Thanks to Werner Koch
  for the pointer.

This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()

[{
...
'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
'keyid': '197D5DAC68F1AAB2',
'length': '1024',
'type': 'pub',
'uids': ['', 'Gary Gross (A test user) ']},
{
...
'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
'keyid': '0C5FEFA7A921FC4A',
'length': '1024',
...
'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)

'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
.
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)

'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"

'Verified'

As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via the
mailing list/discussion group [4]).

Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.

[1] https://bitbucket.org/vinay.sajip/python-gnupg
[2] https://pypi.python.org/pypi/python-gnupg/0.4.0
[3] https://bitbucket.org/vinay.sajip/python-gnupg/issues
[4] https://groups.google.com/forum/#!forum/python-gnupg
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: docs on pythonhosted.org not updating with new version?

2016-08-16 Thread Irmen de Jong
On 16-8-2016 0:11, Irmen de Jong wrote:
> Hi,
> as I've always done for a new release I've uploaded new versions of my 
> package's
> documentation files, but they are not showing up on Pythonhosted.org - the 
> previous
> version is still there.
> 
> Is there something wrong with the update mechanism?
> 
> I've been using "python3 setup.py build_sphinx upload_docs" to build and 
> upload the docs
> and it comes back with a 200 Ok response from the pypi server. The same 
> commands used to
> work fine on previous occasions...


Btw, manually uploading a zip file with the documentation via the web form on my
project's Pypi page *did* work as advertised and updated the documentation. So 
it seems
to me as if the setuptools upload_docs task is no longer working?

I tried to extract more information from setuptools but adding the -v option 
didn't
result in more diagnostic info. So I have no idea what is happening with it 
behind the
curtains yet.


Irmen

-- 
https://mail.python.org/mailman/listinfo/python-list


docs on pythonhosted.org not updating with new version?

2016-08-15 Thread Irmen de Jong
Hi,
as I've always done for a new release I've uploaded new versions of my package's
documentation files, but they are not showing up on Pythonhosted.org - the 
previous
version is still there.

Is there something wrong with the update mechanism?

I've been using "python3 setup.py build_sphinx upload_docs" to build and upload 
the docs
and it comes back with a 200 Ok response from the pypi server. The same 
commands used to
work fine on previous occasions...


Irmen
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.8) of python-gnupg has been released.

2015-09-26 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been

released. 

What Changed? 
= 
This is an enhancement and bug-fix release, and all users are encouraged to 
upgrade.
See the project website [1] for more information.

Brief summary: 


* Fixed #22: handled PROGRESS messages during verification and signing. 

* Fixed #26: handled PINENTRY_LAUNCHED messages during verification, 
  decryption and key generation. 

* Fixed #28: Allowed a default Name-Email to be computed even when neither of 
  LOGNAME and USERNAME are in the environment. 

* Fixed #29: Included test files missing from the tarball in previous versions. 

* Fixed #39: On Python 3.x, passing a text instead of a binary stream caused
  file decryption to hang due to a UnicodeDecodeError. This has now been
  correctly handled: The decryption fails with a "no data" status. 

* Fixed #41: Handled Unicode filenames correctly by encoding them on 2.x using
  the file system encoding.

* Fixed #43: handled PINENTRY_LAUNCHED messages during key export. Thanks to
  Ian Denhardt for looking into this. 

* Hide the console window which appears on Windows when gpg is spawned.
  Thanks to Kévin Bernard-Allies for the patch. 

* Subkey fingerprints are now captured. 

* The returned value from the list_keys method now has a new attribute,
  key_map, which is a dictionary mapping key and subkey fingerprints to
  the corresponding key's dictionary. With this change, you don't need to
  iterate over the (potentially large) returned list to search for a key with
  a given fingerprint - the key_map dict will take you straight to the key
  info, whether the fingerprint you have is for a key or a subkey. Thanks to
  Nick Daly for the initial suggestion. 

This release [2] has been signed with my code signing key: 

Vinay Sajip (CODE SIGNING KEY)  
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86 


However, due to some error the signature for the source distribution (.tar.gz)
didn't get uploaded. To rectify this, I have pasted it into the PyPI page for
the release [2].
What Does It Do? 
 
The gnupg module allows Python programs to make use of the 
functionality provided by the Gnu Privacy Guard (abbreviated GPG or 
GnuPG). Using this module, Python programs can encrypt and decrypt 
data, digitally sign documents and verify digital signatures, manage 
(generate, list and delete) encryption keys, using proven Public Key 
Infrastructure (PKI) encryption technology based on OpenPGP. 

This module is expected to be used with Python versions >= 2.4, as it 
makes use of the subprocess module which appeared in that version of 
Python. This module is a newer version derived from earlier work by 
Andrew Kuchling, Richard Jones and Steve Traugott. 

A test suite using unittest is included with the source distribution. 

Simple usage: 

>>> import gnupg 
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory') 
>>> gpg.list_keys() 

[{ 
... 
'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2', 
'keyid': '197D5DAC68F1AAB2', 
'length': '1024', 
'type': 'pub', 
'uids': ['', 'Gary Gross (A test user) ']}, 
{ 
... 
'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A', 
'keyid': '0C5FEFA7A921FC4A', 
'length': '1024', 
... 
'uids': ['', 'Danny Davis (A test user) ']}] 
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A']) 
>>> str(encrypted) 

'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n 
\nhQIOA/6NHMDTXUwcEAf 
. 
-END PGP MESSAGE-\n' 
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret') 
>>> str(decrypted) 

'Hello, world!' 
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret') 
>>> verified = gpg.verify(str(signed)) 
>>> print "Verified" if verified else "Not verified" 

'Verified' 

As always, your feedback is most welcome (especially bug reports [3], 
patches and suggestions for improvement, or any other points via the 
mailing list/discussion group [4]). 

Enjoy! 

Cheers 

Vinay Sajip 
Red Dove Consultants Ltd. 

[1] https://bitbucket.org/vinay.sajip/python-gnupg 
[2] https://pypi.python.org/pypi/python-gnupg/0.3.8 
[3] https://bitbucket.org/vinay.sajip/python-gnupg/issues 
[4] https://groups.google.com/forum/#!forum/python-gnupg
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.7) of python-gnupg has been released.

2014-12-07 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is an enhancement and bug-fix release, but the bug-fixes
include some security improvements, so all users are encouraged
to upgrade. See the project website [1] for more information.

Brief summary:

* Added an 'output' keyword parameter to the 'sign' and
  'sign_file' methods, to allow writing the signature to a file.
 
* Allowed specifying 'True' for the 'sign' keyword parameter,
  which allows use of the default key for signing and avoids
  having to specify a key id when it's desired to use the default.
 
* Used a uniform approach with subprocess on Windows and POSIX:
  shell=True is not used on either.
 
* When signing/verifying, the status is updated to reflect any
  expired or revoked keys or signatures.

* Handled 'NOTATION_NAME' and 'NOTATION_DATA' during verification.

* Fixed #1, #16, #18, #20: Quoting approach changed, since now
  shell=False.
 
* Fixed #14: Handled 'NEED_PASSPHRASE_PIN' message.

* Fixed #8: Added a scan_keys method to allow scanning of keys
  without the need to import into a keyring.

* Fixed #5: Added '0x' prefix when searching for keys.

* Fixed #4: Handled 'PROGRESS' message during encryption.

* Fixed #3: Changed default encoding to Latin-1.
 
* Fixed #2: Raised ValueError if no recipients were specified
  for an asymmetric encryption request.

* Handled 'UNEXPECTED' message during verification.
 
* Replaced old range(len(X)) idiom with enumerate().
 
* Refactored ``ListKeys`` / ``SearchKeys`` classes to maximise
  use of common functions.
 
* Fixed GC94: Added ``export-minimal`` and ``armor`` options
  when exporting keys. This addition was inadvertently left out
  of 0.3.6.

This release [2] has been signed with my code signing key:

Vinay Sajip (CODE SIGNING KEY) 
Fingerprint: CA74 9061 914E AC13 8E66 EADB 9147 B477 339A 9B86


What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

As always, your feedback is most welcome (especially bug reports [3],
patches and suggestions for improvement, or any other points via the
mailing list/discussion group [4]).

Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.

[1] https://bitbucket.org/vinay.sajip/python-gnupg
[2] https://pypi.python.org/pypi/python-gnupg/0.3.7
[3] https://bitbucket.org/vinay.sajip/python-gnupg/issues
[4] https://groups.google.com/forum/#!forum/python-gnupg


-- 
https://mail.python.org/mailman/listinfo/python-list


[ann] pypi2u - Get notified on new version of packages

2014-04-17 Thread Miki Tebeka
Greetings,

http://pypi2u.appspot.com/ is a simple service that notifies you on new 
versions of packages you're interested in.

You can view the code, fill bugs and suggest ideas at 
https://bitbucket.org/tebeka/pypi2u

Hope you find it useful,
--
Miki
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ANN: A new version (0.3.6) of python-gnupg has been released.

2014-02-06 Thread Piet van Oostrum
Vinay Sajip  writes:

> A new version of the Python module which wraps GnuPG has been
> released.
>
There seem to be 2 gnupg modules for Python. The other one has version number 
1.2.5. Very confusing!
-- 
Piet van Oostrum 
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ANN: A new version (0.3.6) of python-gnupg has been released.

2014-02-06 Thread Asaf Las
On Thursday, February 6, 2014 10:53:59 PM UTC+2, Vinay Sajip wrote:
> A new version of the Python module which wraps GnuPG has been
> released.
> Cheers
> 
> Vinay Sajip
> 
> Red Dove Consultants Ltd.

Hi

Good job!
 
One question - is this package runs executable when particular function 
must be invoked in GnuPG? library calls?

Regards

Asaf
-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.6) of python-gnupg has been released.

2014-02-06 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is an enhancement and bug-fix release, but the bug-fixes
include some security improvements, so all users are encouraged
to upgrade. See the project website ( http://code.google.com/p/python-gnupg/ )
for more information. Summary:

Enabled fast random tests on gpg as well as gpg2.
Avoided deleting temporary file to preserve its permissions.
Avoided writing passphrase to log.
Added export-minimal and armor options when exporting keys.
Added verify_data() method to allow verification of signatures in memory.
Regularised end-of-line characters in ths source code.
Rectified problems with earlier fix for shell injection.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 3.1, 2.7 and Jython 2.5.1) and Ubuntu (CPython 2.4, 2.5, 2.6,
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the
tests.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.

-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.5) of python-gnupg has been released.

2013-08-30 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:

Added improved shell quoting to guard against shell injection attacks.
Added search_keys() and send_keys() methods to interact with keyservers.
A symmetric cipher algorithm can now be specified when encrypting.
UTF-8 encoding is used as a fall back when no other encoding can be determined.
The key length now defaults to 2048 bits.
A default Name-Comment field is no longer provided during key generation.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.4) of the Python module which wraps GnuPG has been released.

2013-06-05 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project website ( 
http://code.google.com/p/python-gnupg/ ) for more information. Summary:

An encoding bug which caused an exception when getting the GPG version has been 
fixed.
Recipients can be passed in a set or frozenset as well as in a list or tuple.
The keyring argument now accepts a list of public keyring filenames as well as 
a single filename.
A secret_keyring argument has been added which accepts either a single filename 
or a list of filenames for secret keyrings.

The current version passes all tests on Windows (CPython 2.4, 2.5, 2.6, 2.7, 
3.1 and Jython 2.5.1), Mac OS X (Python 2.5) and Ubuntu (CPython 2.4, 2.5, 2.6, 
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the tests.

What Does It Do?

The gnupg module allows Python programs to make use of the functionality 
provided by the Gnu Privacy Guard (abbreviated GPG or GnuPG). Using this 
module, Python programs can encrypt and decrypt data, digitally sign documents 
and verify digital signatures, manage (generate, list and delete) encryption 
keys, using proven Public Key Infrastructure (PKI) encryption technology based 
on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it makes use 
of the subprocess module which appeared in that version of Python. This module 
is a newer version derived from earlier work by Andrew Kuchling, Richard Jones 
and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 
(GNU/Linux)\n\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ - as always, 
your feedback is most welcome (especially bug reports, patches and suggestions 
for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New version

2013-04-09 Thread Rodrick Brown
Was it so hard to state in the email subject what the new version is
or describe in the body a small summary on what you've released? I
swear the users on this list post the most useless emails.

Sent from my iPhone

On Apr 9, 2013, at 7:12 AM, Jake D  wrote:

> There's a new version of im.py out on GitHub:
> https://github.com/jhunter-d/im.py/blob/master/im.py
> --
> http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list


New version

2013-04-09 Thread Jake D
There's a new version of im.py out on GitHub:
https://github.com/jhunter-d/im.py/blob/master/im.py
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.3) of the Python module which wraps GnuPG has been released.

2013-03-11 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:

Improved support for status messages from GnuPG.
Fixed list_keys to handle control characters.
Enabled fast random for tests.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 3.1, 2.7 and Jython 2.5.1) and Ubuntu (CPython 2.4, 2.5, 2.6,
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the
tests.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.2) of the Python module which wraps GnuPG has been released.

2013-01-17 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:

Improved support for status messages from GnuPG.
Fixed key generation to skip empty values.
Fixed list_keys to handle escaped characters.
Removed doctests which required interactive entry of passwords.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 3.1, 2.7 and Jython 2.5.1) and Ubuntu (CPython 2.4, 2.5, 2.6,
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the
tests. Tests also pass under CPython 2.5 and CPython 2.6 on OS X.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


New version of PyGreSQL 4.1.1 - bug fixes

2013-01-08 Thread D'Arcy J.M. Cain
-
Release of PyGreSQL version 4.1.1
-

A few problems showed up with the 4.1 release so we are releasing a
quick bugfix version.

It is available at: http://pygresql.org/files/PyGreSQL-4.1.1.tgz.

If you are running NetBSD, look in the packages directory under
databases. There is also a package in the FreeBSD ports collection.

Please refer to `changelog.txt `_
for things that have changed in this version.

Please refer to `readme.txt `_
for general information.

This version has been built and unit tested on:
 - NetBSD
 - FreeBSD
 - openSUSE 12.2
 - Windows 7 with both MinGW and Visual Studio
 - PostgreSQL 8.4, 9.0 and 9.2 32 and 64bit
 - Python 2.5, 2.6 and 2.7 32 and 64bit

| D'Arcy J.M. Cain
| da...@pygresql.org


-- 
D'Arcy J.M. Cain
PyGreSQL Development Group
http://www.PyGreSQL.org IM:da...@vex.net
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.3.1) of the Python module which wraps GnuPG has been released.

2012-09-01 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:

Better support for status messages from GnuPG.
Support for additional arguments to be passed to GnuPG.
Bugs in tests which used Latin-1 encoded data have been fixed by
specifying that encoding.
On verification (including after decryption), the signer trust level
is returned in integer and text formats.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 2.7, 3.1 and Jython 2.5.1), Mac OS X (Python 2.5) and Ubuntu
(CPython 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11
has been used for the tests.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.2.9) of the Python module which wraps GnuPG has been released.

2012-03-30 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor bug-fix release. See the project website (
http://code.google.com/p/python-gnupg/ ) for more information.
Summary:

Better support for status messages from GnuPG.
A random data file used in testing is no longer shipped with the
source distribution, but created by the test suite if needed.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 3.1, 2.7 and Jython 2.5.1) and Ubuntu (CPython 2.4, 2.5, 2.6,
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the
tests.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.2.8) of the Python module which wraps GnuPG has been released.

2011-09-02 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:

Better support for status messages from GnuPG.
The fixing of some Unicode encoding problems.
Quoted some command-line arguments to gpg for increased safety.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 3.1, 2.7 and Jython 2.5.1) and Ubuntu (CPython 2.4, 2.5, 2.6,
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the
tests.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.2.7) of the Python module which wraps GnuPG has been released.

2011-04-10 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:

Better support for status messages from GnuPG.
The ability to use symmetrix encryption.
The ability to receive keys from keyservers.
The ability to use specific keyring files instead of the default
keyring files.
Internally, the code to handle Unicode and bytes has been tidied up.

The current version passes all tests on Windows (CPython 2.4, 2.5,
2.6, 3.1, 2.7 and Jython 2.5.1) and Ubuntu (CPython 2.4, 2.5, 2.6,
2.7, 3.0, 3.1, 3.2). On Windows, GnuPG 1.4.11 has been used for the
tests.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.2.5) of the Python module which wraps GnuPG has been released.

2010-10-14 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement and bug-fix release. See the project
website ( http://code.google.com/p/python-gnupg/ ) for more
information. Summary:

Detached signatures can now be created and verified.
There's slightly better support for RSA and IDEA.
Some bugs whih surfaced when encrypting non-ASCII data have been
fixed.

The current version passes all tests on Windows (Python 2.4, 2.5, 2.6,
3.1, Jython 2.5.1) and Ubuntu (Python 2.4, 2.5, 2.6, 2.7, 3.0, 3.1,
3.2, Jython 2.5.1).

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version (0.2.4) of the Python module which wraps GnuPG has been released.

2010-03-01 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Changed?
=
This is a minor enhancement release. See the project website (
http://code.google.com/p/python-gnupg/ ) for more information.

The current version passes all tests on Windows (Python 2.4, 2.5, 2.6,
3.1, Jython 2.5.1) and Ubuntu (Python 2.4, 2.5, 2.6, 3.0, Jython
2.5.1).

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


new version TimingAnalyzer

2009-08-13 Thread timinganalyzer
Hi All,

   1.Added a new User Delay and Constraint Editor panel. You can add,
delete, or update User Delays or Constraints.
   2 .These User Delays and User Constraints are saved at the top of
the .tim file.
   3.Changing a User Delay or User Constraint updates every one of the
same type in the diagram.
   4.Files created with previous versions are converted to this new
format when saved.
   5.Added Python Interpreter, Jython 2.5. Now you can write scripts
in Python.
   6.Execute Python scripts using the same script dialog for the
beanshell scripts or from Jython command line window.
   7.Included start_app.py script in the install directory that will
start the TimingAnalyzer from a Jython command line window.
   8.Updated spice_pwl.bsh. This beanshell script generates spice
piece wise linear test vectors for DigitalBus.
   9.Included dff.py. This Python script shows how to generate a
timing diagram for a D Flip Flop.

Anyone interested in helping convert the Java scripts (in the scripts
dir) to Python should let me know.
Dan Fabrizio

www.timing-diagrams.com
-- 
http://mail.python.org/mailman/listinfo/python-list


new version of SSL module on PyPI

2009-07-27 Thread Bill Janssen
I've uploaded ssl-1.15.tgz, the backport of the 2.6/3.x SSL module to
Python 2.3-2.5.  It provides an option for not using SSLv2, and also
fixes a bug with write retries.

Bill
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: A new version of the Python module which wraps GnuPG has been released.

2009-07-05 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been
released.

What Does It Do?

The gnupg module allows Python programs to make use of the
functionality provided by the Gnu Privacy Guard (abbreviated GPG or
GnuPG). Using this module, Python programs can encrypt and decrypt
data, digitally sign documents and verify digital signatures, manage
(generate, list and delete) encryption keys, using proven Public Key
Infrastructure (PKI) encryption technology based on OpenPGP.

This module is expected to be used with Python versions >= 2.4, as it
makes use of the subprocess module which appeared in that version of
Python. Development and testing has been carried out on Windows and
Ubuntu. This module is a newer version derived from earlier work by
Andrew Kuchling, Richard Jones and Steve Traugott.

A test suite using unittest is included with the source distribution.

Simple usage:

>>> import gnupg
>>> gpg = gnupg.GPG(gnupghome='/path/to/keyring/directory')
>>> gpg.list_keys()
[{
  ...
  'fingerprint': 'F819EE7705497D73E3CCEE65197D5DAC68F1AAB2',
  'keyid': '197D5DAC68F1AAB2',
  'length': '1024',
  'type': 'pub',
  'uids': ['', 'Gary Gross (A test user) ']},
 {
  ...
  'fingerprint': '37F24DD4B918CC264D4F31D60C5FEFA7A921FC4A',
  'keyid': '0C5FEFA7A921FC4A',
  'length': '1024',
  ...
  'uids': ['', 'Danny Davis (A test user) ']}]
>>> encrypted = gpg.encrypt("Hello, world!", ['0C5FEFA7A921FC4A'])
>>> str(encrypted)
'-BEGIN PGP MESSAGE-\nVersion: GnuPG v1.4.9 (GNU/Linux)\n
\nhQIOA/6NHMDTXUwcEAf
...
-END PGP MESSAGE-\n'
>>> decrypted = gpg.decrypt(str(encrypted), passphrase='secret')
>>> str(decrypted)
'Hello, world!'
>>> signed = gpg.sign("Goodbye, world!", passphrase='secret')
>>> verified = verified = gpg.verify(str(signed))
>>> print "Verified" if verified else "Not verified"
'Verified'

For more information, visit http://code.google.com/p/python-gnupg/ -
as always, your feedback is most welcome (especially bug reports,
patches and suggestions for improvement). Enjoy!

Cheers

Vinay Sajip
Red Dove Consultants Ltd.
-- 
http://mail.python.org/mailman/listinfo/python-list


Testing the new version of Psyco

2009-04-08 Thread Baz Walter

hello

i recently tried out this new version of psyco...

http://www.voidspace.org.uk/python/weblog/arch_d7_2009_03_14.shtml#e1063

...because of the new support for generators. the above link says "To 
use and test generators, create preferences.py, following the 
instructions in setup.py" - except there's nothing obvious in setup.py 
that refers to generators.


anyway, i created a preferences.py file (with PSYCO_DEBUG = 1) and ran 
psycobench against python-2.5/psyco-1.6 and python-2.6/psyco-2.0 with 
the following results (output has been cropped slightly):


# start output

[benchmark]$ python2.5 psycobench.py -m time_generators time_anyall
Running new timings with original psyco

send call loop 1000 plain: 3.30  psyco: 3.29  ratio: 1.00
send and loop 1000  plain: 3.28  psyco: 3.27  ratio: 1.00
send just many timesplain: 1.28  psyco: 0.56  ratio: 2.29 *
iterate just many times plain: 0.67  psyco: 0.57  ratio: 1.19 *
call next just many times   plain: 0.85  psyco: 0.63  ratio: 1.35 *
all_bool_genexp plain: 2.03  psyco: 2.31  ratio: 0.88
all_bool_listcomp   plain: 2.94  psyco: 1.01  ratio: 2.91
all_genexp  plain: 1.71  psyco: 1.97  ratio: 0.87
all_listcompplain: 2.70  psyco: 0.73  ratio: 3.71
all_loopplain: 1.09  psyco: 0.08  ratio: 13.15
any_bool_genexp plain: 2.03  psyco: 2.45  ratio: 0.83
any_bool_listcomp   plain: 2.89  psyco: 0.97  ratio: 2.99
any_genexp  plain: 1.74  psyco: 1.84  ratio: 0.95
any_listcompplain: 2.65  psyco: 0.72  ratio: 3.69
any_loopplain: 1.08  psyco: 0.08  ratio: 13.10

[benchmark]$ python2.6 psycobench.py -m time_generators time_anyall
Running new timings with python2.6/site-packages/psyco/_psyco.so

send call loop 1000 plain: 2.85  psyco: 0.04  ratio: 67.90
send and loop 1000  plain: 2.85  psyco: 0.04  ratio: 65.00
send just many timesplain: 1.17  psyco: 0.87  ratio: 1.35
iterate just many times plain: 0.64  psyco: 0.86  ratio: 0.74
call next just many times   plain: 0.77  psyco: 0.87  ratio: 0.89
all_bool_genexp plain: 1.87  psyco: 1.98  ratio: 0.95
all_bool_listcomp   plain: 2.54  psyco: 0.66  ratio: 3.84
all_genexp  plain: 1.69  psyco: 1.77  ratio: 0.95
all_listcompplain: 2.38  psyco: 0.52  ratio: 4.55
all_loopplain: 1.07  psyco: 0.08  ratio: 14.24
any_bool_genexp plain: 1.87  psyco: 1.99  ratio: 0.94
any_bool_listcomp   plain: 2.57  psyco: 0.68  ratio: 3.76
any_genexp  plain: 1.74  psyco: 1.82  ratio: 0.95
any_listcompplain: 2.47  psyco: 0.53  ratio: 4.66
any_loopplain: 1.07  psyco: 0.07  ratio: 14.65

# end output

with the obvious exception of the the first two tests for psyco v2, the 
results (for generators) seem a little underwhelming. in fact, psyco v1 
does significantly better on three of the tests (marked with an 
asterisk) and for the others there's not much difference.


this makes me wonder whether i enabled generators properly in psyco v2 
when i compiled it. has anybody else tried out this new version of psyco 
and got better overall results for generators? also, those first two 
results for v2 look really odd - what could explain the huge difference 
relative to the other generator tests for v2?


(p.s. i re-ran the tests and got very similar results)

--
Baz Walter

--
http://mail.python.org/mailman/listinfo/python-list


Download new version of phyton language | http://freenewsoftware.blogspot.com/2007/12/python.html

2007-12-14 Thread yuni . wijayanti
follow this link
http://freenewsoftware.blogspot.com/2007/12/python.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-10-03 Thread John Nagle
John Nagle wrote:
> Heikki Toivonen wrote:

>That's progress, but the build still doesn't work:
...
> during a C compile, we get
> 
> SWIG/_m2crypto_wrap.c:2529:18: error: _lib.h: No such file or directory
> 
> and the build goes downhill from there, with many compile errors in the
> GCC phase.  The gcc call
> 
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
> -fPIC -I/usr/local/include/python2.5 -c SWIG/_m2crypto_wrap.c -o 
> build/temp.linux-i686-2.5/SWIG/_m2crypto_wrap.o -DTHREADING
> 
> is in the directory below SWIG, and doesn't include SWIG, so it's clear
> why gcc couldn't find the file.


Any sign of a fix yet?

John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-09-25 Thread John Nagle
Heikki Toivonen wrote:
> John Nagle wrote:
> 
>>But notice that the -D entry didn't appear on the SWIG command line.
>>Neither did the "-includeall".  The "swig_opts" values around line
>>129 aren't actually being used.  I think that's left over from the code
>>intended
>>to allow builds with Python 2.3 and earlier.  The "self.swig_opts" up at
>>line 53 of "setup.py" seems to be controlling.  The patch was to
>>the obsolete code.
> 
> 
> Aha! Good find. I reopened
> https://bugzilla.osafoundation.org/show_bug.cgi?id=9404 and attached a
> patch that should address this for real this time. At least -includeall
> appears in my Ubuntu Dapper Drake environment. Could you give it a go
> and let me know how it works?

That's progress, but the build still doesn't work:

$ python setup.py build
running build
running build_py
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/local/include/python2.5 -I/usr/include -includeall 
-D__i386__ -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
/usr/include/openssl/opensslconf.h:13: Error: Unable to find 
'opensslconf-i386.h'
error: command 'swig' failed with exit status 1

Now that SWIG is being invoked with "-includeall", it has to have
all the include paths defined.  (Without "includeall", includes
are deferred until the C compile stage.) Note that the SWIG command line
specifies "/usr/include", but not "/usr/include/openssl".
Within M2Crypto's SWIG files, there's

_ec.i:%include 

which brings in "opensslconf.h" from /usr/include/openssl.
But that file has

#if defined(__i386__)
#include "opensslconf-i386.h"
#elif defined(__ia64__)
...

Since "opensslconf-i386.h" lives in /usr/include/openssl,
and that directory isn't mentioned on the SWIG command line,
the #include of "opensslconf-i386.h" fails.

And, no, adding

self.swig_opts.append('-DOPENSSL_NO_EC')
# Uncomment if you can't build with EC disabled

does not help.

As a test, I tried adding "-I/usr/include/openssl" to the SWIG command
line.  Building then gets further, but during a C compile, we get

SWIG/_m2crypto_wrap.c:2529:18: error: _lib.h: No such file or directory

and the build goes downhill from there, with many compile errors in the
GCC phase.  The gcc call

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
-fPIC -I/usr/local/include/python2.5 -c SWIG/_m2crypto_wrap.c -o 
build/temp.linux-i686-2.5/SWIG/_m2crypto_wrap.o -DTHREADING

is in the directory below SWIG, and doesn't include SWIG, so it's clear
why gcc couldn't find the file.

So those fixes were not enough.  Include file management in the M2Crypto build
clearly needs some work.

John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-09-24 Thread Heikki Toivonen
John Nagle wrote:
> But notice that the -D entry didn't appear on the SWIG command line.
> Neither did the "-includeall".  The "swig_opts" values around line
> 129 aren't actually being used.  I think that's left over from the code
> intended
> to allow builds with Python 2.3 and earlier.  The "self.swig_opts" up at
> line 53 of "setup.py" seems to be controlling.  The patch was to
> the obsolete code.

Aha! Good find. I reopened
https://bugzilla.osafoundation.org/show_bug.cgi?id=9404 and attached a
patch that should address this for real this time. At least -includeall
appears in my Ubuntu Dapper Drake environment. Could you give it a go
and let me know how it works?

-- 
  Heikki Toivonen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: M2Crypto 0.18 - new version, same old build bugs - more details

2007-09-24 Thread John Nagle
Heikki Toivonen wrote:
> John Nagle wrote:
> 
>>Back in March, I posted this:
>>
>>
>>>Hit that with OpenSSL.  Red Hat took elliptical curve cryptography
>>>out of Fedora 6 for patent reasons.  With that missing, M2Crypto won't
>>>build.  It ought to; the implementor of M2Crypto thought of that, because
>>>it's an optional feature.  But M2Crypto uses SWIG.  SWIG doesn't normally
>>>process nested include files.  OpenSSL had changed their configuration
>>>approach to use nested include files.  So SWIG didn't see the #define
>>>that
>>>said to turn off elliptical curve crypto support.  This resulted in
>>>compile errors in the 24,000 lines of code that come out of SWIG. 
>>
>>   That was for M2Crypto 0.17.
>>
>>   It's still broken in M2Crypto 0.18.
> 
> 
> This was reported as
> https://bugzilla.osafoundation.org/show_bug.cgi?id=9404 and fixed, at
> least according to the person who reported the bug. I'd be curious to
> know why the fix does not work for you...
> 
> As an alternative, does it work if you add line 130 to setup.py:
> 
> '-DOPENSSL_NO_EC', # Uncomment if you have
> trouble compiling without EC support

OK, here's the build failing:

python setup.py build
running build
running build_py
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/local/include/python2.5 -I/usr/include -o 
SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
/usr/include/openssl/opensslconf.h:27: Error: CPP #error ""This openssl-devel 
package does not work your architecture?"". Use the -cpperraswarn option to 
continue swig processing.
error: command 'swig' failed with exit status 1

OK, let's check the requirements, from
http://chandlerproject.org/bin/view/Projects/MeTooCrypto
M2Crypto 0.18:
 * Python 2.3 or newer
  o m2urllib2 requires Python 2.4 or newer
 * OpenSSL 0.9.7 or newer
   o Some optional new features will require OpenSSL 0.9.8 or newer
 * SWIG 1.3.24 or newer

python --version
  Python 2.5 [OK here, 2.5 >= 2.4]

swig -version
  SWIG Version 1.3.31  [OK here; 1.3.31 >= 1.3.24]
  Compiled with i386-redhat-linux-g++ [i386-redhat-linux-gnu]

openssl
OpenSSL> version
OpenSSL 0.9.8a 11 Oct 2005  [OK here; 0.9.8a => 0.9.7.]

Tried the suggested patch to "setup.py":
diff setup.py.orig setup.py
130c130
<   #'-D__i386__', # Uncomment for early 
OpenSSL 
0.9.7 versions
---
 >   '-D__i386__', # Uncomment for early 
 > OpenSSL 
0.9.7 versions

No change in error message.  That gets us

-bash-3.1$ python setup.py build
running build
running build_py
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/local/include/python2.5 -I/usr/include -o 
SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
/usr/include/openssl/opensslconf.h:27: Error: CPP #error ""This openssl-devel 
package does not work your architecture?"". Use the -cpperraswarn option to 
continue swig processing.
error: command 'swig' failed with exit status 1

But notice that the -D entry didn't appear on the SWIG command line.
Neither did the "-includeall".  The "swig_opts" values around line
129 aren't actually being used.  I think that's left over from the code intended
to allow builds with Python 2.3 and earlier.  The "self.swig_opts" up at
line 53 of "setup.py" seems to be controlling.  The patch was to
the obsolete code.

This is on Fedora Core 5, x86, 32 bit.

John Nagle

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-21 Thread Heikki Toivonen
John Nagle wrote:
> Back in March, I posted this:
> 
>> Hit that with OpenSSL.  Red Hat took elliptical curve cryptography
>> out of Fedora 6 for patent reasons.  With that missing, M2Crypto won't
>> build.  It ought to; the implementor of M2Crypto thought of that, because
>> it's an optional feature.  But M2Crypto uses SWIG.  SWIG doesn't normally
>> process nested include files.  OpenSSL had changed their configuration
>> approach to use nested include files.  So SWIG didn't see the #define
>> that
>> said to turn off elliptical curve crypto support.  This resulted in
>> compile errors in the 24,000 lines of code that come out of SWIG. 
> 
>That was for M2Crypto 0.17.
> 
>It's still broken in M2Crypto 0.18.

This was reported as
https://bugzilla.osafoundation.org/show_bug.cgi?id=9404 and fixed, at
least according to the person who reported the bug. I'd be curious to
know why the fix does not work for you...

As an alternative, does it work if you add line 130 to setup.py:

'-DOPENSSL_NO_EC', # Uncomment if you have
trouble compiling without EC support

-- 
  Heikki Toivonen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread John Nagle
Paul Boddie wrote:
> On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote:
> 
>>That was for M2Crypto 0.17.
>>
>>It's still broken in M2Crypto 0.18.
>>
>>And there's no RPM or Windows binary.
>>
>>Nobody actually uses this stuff, do they?
> 
> 
> I can find Ubuntu packages for 0.16 and 0.17:
> 
> http://packages.ubuntu.com/feisty/libs/python-m2crypto
> http://packages.ubuntu.com/gutsy/libs/python-m2crypto
> 
> So, clearly some people are managing to build the library, even if it
> isn't the absolute latest version. You might want to take a look at
> the source packages and the patches the distribution people apply,
> although it doesn't look like they are actually doing much patching.
> The source packages suggest that they use SWIG 1.3.24 to build
> M2Crypto - is that what you're using?
> 
> Paul

I have builds of 0.17 of M2Crypto for both Linux and Windows. I want
the new bug fixes. The 0.17 version mishandles SSL certs that specify
more than one domain name, and that's supposedly fixed in 0.18.  But
there are enough changes that just copying over the relevant file
(Checker.py) isn't sufficient.

John Nagle


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread Paul Boddie
On 20 Sep, 22:12, John Nagle <[EMAIL PROTECTED]> wrote:
>
> That was for M2Crypto 0.17.
>
> It's still broken in M2Crypto 0.18.
>
> And there's no RPM or Windows binary.
>
> Nobody actually uses this stuff, do they?

I can find Ubuntu packages for 0.16 and 0.17:

http://packages.ubuntu.com/feisty/libs/python-m2crypto
http://packages.ubuntu.com/gutsy/libs/python-m2crypto

So, clearly some people are managing to build the library, even if it
isn't the absolute latest version. You might want to take a look at
the source packages and the patches the distribution people apply,
although it doesn't look like they are actually doing much patching.
The source packages suggest that they use SWIG 1.3.24 to build
M2Crypto - is that what you're using?

Paul

-- 
http://mail.python.org/mailman/listinfo/python-list


M2Crypto 0.18 - new version, same old build bugs.

2007-09-20 Thread John Nagle
Back in March, I posted this:

> Hit that with OpenSSL.  Red Hat took elliptical curve cryptography
> out of Fedora 6 for patent reasons.  With that missing, M2Crypto won't
> build.  It ought to; the implementor of M2Crypto thought of that, because
> it's an optional feature.  But M2Crypto uses SWIG.  SWIG doesn't normally
> process nested include files.  OpenSSL had changed their configuration
> approach to use nested include files.  So SWIG didn't see the #define that
> said to turn off elliptical curve crypto support.  This resulted in
> compile errors in the 24,000 lines of code that come out of SWIG. 

That was for M2Crypto 0.17.

It's still broken in M2Crypto 0.18.

And there's no RPM or Windows binary.

Nobody actually uses this stuff, do they?

John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: (newbie) new version install (winXP) ?

2007-01-22 Thread Gabriel Genellina

At Monday 22/1/2007 15:58, you wrote:


Can I install only the higher version of a certain package ?
Is that done by simply copying them ?


You should read the install instructions given in the package, but 
usually it's as easy as:

- extract the .zip into a temporary directory
- open a command line window, go to that directory, and run:
- python setup.py install


Should I make a backup (of what) ?


Perhaps...


--
Gabriel Genellina
Softlab SRL 







__ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 

-- 
http://mail.python.org/mailman/listinfo/python-list

(newbie) new version install (winXP) ?

2007-01-22 Thread Stef Mientki
I've been started with Python on winXP,
by installing the "Enthought" edition (about half a year old).
This works like a charm.
As a regular windows user,
I'm not used to install partial packages.
Now I find interesting application,
that require higher versions of certain packages.

Can I install only the higher version of a certain package ?
Is that done by simply copying them ?
Should I make a backup (of what) ?

thanks,
Stef Mientki
-- 
http://mail.python.org/mailman/listinfo/python-list


Python for Maemo -- new version released

2007-01-16 Thread Osvaldo Santana
We from INdT (Nokia Institute of Technology -- Brazil) have the pleasure
to announce the new version of Python for Maemo, for Maemo SDK 2.1
("Scirocco") and SDK 3.0 ("Bora"). Highlights of this version:

* Support for Nokia N800[1] device/software (SDK 3.0)
* Language updated to Python 2.5
* Updated bindings
* Added bindings to new Hildon widgets
* Improved OSSO bindings
* Project home has moved to Garage.maemo.org.

The new project page is http://pymaemo.garage.maemo.org. There you can
find directions about repositories, installation on SDK/device etc. The
release notes for this version can be found at
http://pymaemo.garage.maemo.org/pymaemo25_releasenotes.html.

We encourage everybody to try the software and report bugs/improvement
requests.

Thanks,
Osvaldo Santana Neto

[1] http://europe.nokia.com/phones/n800


-- 
Osvaldo Santana Neto (aCiDBaSe)
http://www.pythonologia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


GNUmed - new version released

2006-12-21 Thread Sebastian Hilbert
Hello,

Today we are releasing a new GNUmed version. GNUmed is a package to manage 
medical offices. Version is up to 0.2.3 Version features and bug fixes are 
explained in our Wiki 

http://wiki.gnumed.de/bin/view/Gnumed/ReleaseStatus 
http://wiki.gnumed.de/bin/view/Gnumed/RoadMap 

Packages available as usual for GNU/Linux and MS Windows als well as Debian 
packages 
 MacOSX packages didn't make it yet due to unexplained problems with the Mac 
port. In general it looks like the code is getting much more stable and 
easier to fix and extent. 

Bug reports are appreciated.
-- 
Sebastian Hilbert 
Leipzig / Germany
[www.gnumed.de]  -> PGP welcome, HTML ->/dev/null
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Where can I get the new version of python-mode for emacs?

2005-07-04 Thread Skip Montanaro

Marcio> I have version 4.70 installed in my debian system (installed
Marcio> with apt-get, so I don't know where the sources are from). After
Marcio> reading the thread_ at sourceforge, I did a google search for
Marcio> "python emacs" and found the `Emacs goodies`_ page at python.org

Marcio> .. _`Emacs goodies`: http://www.python.org/emacs/

Marcio> where I was redirected to the `python-mode`_ page at
Marcio> SourceForge. There I could only find version 1.0alpha (4.6) (the
Marcio> one said too old in the thread_)

I haven't done a release in a long while.  Guess it's about time to do that
again.  In the meantime, you can download the currently most recent version
of python-mode.el from here:


http://cvs.sourceforge.net/viewcvs.py/*checkout*/python-mode/python-mode/python-mode.el?rev=4.75

You can browse all the files in the CVS repository here:

http://cvs.sourceforge.net/viewcvs.py/python-mode/python-mode/

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list


Where can I get the new version of python-mode for emacs?

2005-07-04 Thread Marcio Rosa da Silva
Hi all,

My first try on using RST to write an email. so I can (will) make 
mistakes :-)

I am experiencing the problem shown in this thread_ of the 
`python-mode`_ discussion list hosted at SourceForge.

.. _thread: 
https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1215039&group_id=86916
.. _`python-mode`: http://sourceforge.net/projects/python-mode/

I have version 4.70 installed in my debian system (installed with 
apt-get, so I don't know where the sources are from). After reading the 
thread_ at sourceforge, I did a google search for "python emacs" and 
found the `Emacs goodies`_ page at python.org

.. _`Emacs goodies`: http://www.python.org/emacs/

where I was redirected to the `python-mode`_ page at SourceForge. There 
I could only find version 1.0alpha (4.6) (the one said too old in the 
thread_)

I also tried the `Barry Warsaw's Elisp packages`_ as suggested at `Emacs 
goodies`_ page "for some more up-to-date versions of these files", but 
the link doesn't work.

.. _`Barry Warsaw's Elisp packages`: http://barry.warsaw.us/elisp/

So, *where can I find a newer version of emacs' python-mode*?

Thanks,

Marcio
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN] new version of rur-ple (0.8.5)

2005-05-10 Thread Marco Aschwanden
On Tue, 10 May 2005 00:49:40 -0300, André Roberge  
<[EMAIL PROTECTED]> wrote:

> Learning to program computer should be fun, for adults and children
> alike. RUR-PLE is an environment designed to help you learn computer
> programming using the language Python. To use RUR-PLE, you need
> wxPython. You can learn more about RUR-PLE or you can go to the download
> page.

Surrender to Python - Resistance is futile! This is a fine piece of  
introduction!
Thanks for your efforts,
Marco

-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] new version of rur-ple (0.8.5)

2005-05-09 Thread André Roberge
Version 0.8.5 of rur-ple has been released.
The web site has completely changed; it includes over 35 pages.
http://rur-ple.sourceforge.net/

--
Learning to program computer should be fun, for adults and children 
alike. RUR-PLE is an environment designed to help you learn computer 
programming using the language Python. To use RUR-PLE, you need 
wxPython. You can learn more about RUR-PLE or you can go to the download 
page.

===
Apprendre à programmer devrait être amusant,
que l'on soit un adulte ou un enfant.

RUR-PLE est un environnement conçu pour vous aider à apprendre la 
programmation informatique avec le langage Python. Pour utiliser 
RUR-PLE, vous aurez besoin de wxPython. Vous pouvez en apprendre 
davantage au sujet de RUR-PLE ou vous pouvez aller à la page de 
téléchargement.

-- 
http://mail.python.org/mailman/listinfo/python-list


Smooth upgrade to New Version

2005-04-21 Thread kent sin
Python is now enter 2.4 era. It is greate, and I want to upgrade too.

However, everytime upgrading to a new version is a great pain. For
every version, we start to re-install what have been in our past
python.

Re-install all packages sometimes require searching for a new version
of binary which in windows were not easy, the same also true for osx.

Are there any plan for smoother version upgrade for upcoming 2.5 or
later? May be with the freely available ms compiler, this problem can
be solved?


-- 
Sin Hang Kin.
--
http://mail.python.org/mailman/listinfo/python-list


Informixdb: New maintainer, new version

2005-04-12 Thread Carsten Haese
Hi Everybody:

Since the current maintainer of the informixdb module appears to have
gone missing, I have decided to take over the project. The new home of
the informixdb module is http://sourceforge.net/projects/informixdb .

Version 1.4 features the following improvements:

* Build uses distutils instead of deprecated Makefile.pre.in mechanism.
* Connect method takes optional username and password parameters for
connecting to a remote database.
* Cursor attribute .sqlerrd exposes Informix's sqlca.sqlerrd resulting
from the cursor's most recent .execute() call.

If you have any questions or comments, please let me know.

Best regards,

-- 
  Carsten Haese - Software Engineer   |Phone:  (419) 861-3331
Unique Systems, Inc.  |  FAX:  (419) 861-3340
 1446 Reynolds Rd, Suite 313  |
 Maumee, OH  43537|  mailto:[EMAIL PROTECTED]

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing new version, erasing previous versions of Python

2004-12-22 Thread Maurice LING
Hi David,
I'm using Python on Mac OSX and although my case is not precisely your 
scenario but it is pretty common to have more than 1 pythons installed 
in Mac OSX 10.3, if Fink is used.

If I understand the above correctly, 1) "make install" and "make altinstall" use
the same process, the only difference being the man page update, and the hard
link, and 2) that previous versions of python are not deleted.  Therefore I
should be able to install 2.4 without deleting 2.2.2.  If I wish to delete
2.3.4, I have to rm -r the appropriate directories.  Any caveats? 
On the assumption that you are using *nix-based system, there shouldn't 
be any problems. But you might want to look at /usr/local/bin/py* files 
and symlinks to get an idea of what you are dealing with.

On MS Windows system, I do not know if there is any registry entries etc 
to be taken care of.

 Is there any
crosstalk between 2.2.2 and 2.4 modules?  Thank you.
Every python seems to maintain its own set of libraries and 3rd party 
packages.

In my case, I've removed Apple-installed python 2.3 by rm -rf the 
appropriate directories and re-symlinked the links in /usr/lib. Fink had 
installed python2.2 and python2.3 in my system and they co-exist 
happily. Each python has its own libraries to use, in my case, in 
/sw/lib/python2.2 and /sw/lib/python2.3

Of course, depending on which python you use to install 3rd party 
libraries, it will go into that python's site-package directory. If any 
causes trouble, I'll guess it will be this.

Hope this helps.
Maurice
--
http://mail.python.org/mailman/listinfo/python-list


Installing new version, erasing previous versions of Python

2004-12-21 Thread David Smith
I currently have Python 2.2 and 2.3.4 installed.  I want to install Python 2.4,
and erase 2.3.4, but retain 2.2, for I need it for my connectivity program.

According to the the documentation:

If you have a previous installation of Python that you don't want to replace
yet, use

make altinstall

the same set of files as "make install" except it doesn't create the hard link
to "python" named "python" and it doesn't install the manual page at
all."

And prior to this, it says:

All subdirectories created will have Python's version number in their
name, e.g. the library modules are installed in
"/usr/local/lib/python/" by default, where  is the
. release number (e.g. "2.1").  The Python binary is
installed as "python" and a hard link named "python" is
created.  The only file not installed with a version number in its
name is the manual page, installed as "/usr/local/man/man1/python.1"
by default.


If I understand the above correctly, 1) "make install" and "make altinstall" use
the same process, the only difference being the man page update, and the hard
link, and 2) that previous versions of python are not deleted.  Therefore I
should be able to install 2.4 without deleting 2.2.2.  If I wish to delete
2.3.4, I have to rm -r the appropriate directories.  Any caveats?  Is there any
crosstalk between 2.2.2 and 2.4 modules?  Thank you.
-- 
David Smith
1845 Purdue Ave #3
Los Angeles Calif 90025-5592
(310) 478-8050
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing new version, erasing previous versions of Python

2004-12-21 Thread Fredrik Lundh
David Smith wrote:

> If I understand the above correctly, 1) "make install" and "make altinstall" 
> use
> the same process, the only difference being the man page update, and the hard
> link

correct.

> 2) that previous versions of python are not deleted.  Therefore I should be 
> able
> to install 2.4 without deleting 2.2.2.

correct.

> If I wish to delete 2.3.4, I have to rm -r the appropriate directories.  Any 
> caveats?
> Is there any crosstalk between 2.2.2 and 2.4 modules?

nope (unless you've moved things around, or tinkered with the python paths)

 



-- 
http://mail.python.org/mailman/listinfo/python-list