[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-09-26 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

Thank you for the tweaks. I tested the patch and it is all working fine. 
Without failure count the PGO run is even more transparent to the user. 

I tested your final version of the patch on several Linux server and regular 
desktop distributions and software configurations and I saw that test_eintr 
does not block and the entire PGO build finishes in good conditions every time.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a9418ed0d0c by Victor Stinner in branch 'default':
Issue #25220: Move most regrtest.py code to libregrtest
https://hg.python.org/cpython/rev/4a9418ed0d0c

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



ANN: python-ldap 2.4.21

2015-09-26 Thread Michael Ströder
Find a new release of python-ldap:

  http://pypi.python.org/pypi/python-ldap/2.4.21

python-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for
that purpose. Additionally it contains modules for other LDAP-related
stuff (e.g. processing LDIF, LDAP URLs and LDAPv3 schema).

Project's web site:

  http://www.python-ldap.org/

Checksums:

$ md5sum python-ldap-2.4.21.tar.gz
1ce26617e066f412fd5ba95bfba4ba5a
$ sha1sum python-ldap-2.4.21.tar.gz
35ed5913d804f14e952bec414c569e140feb889d
$ sha256sum python-ldap-2.4.21.tar.gz
2a3ce606465d2d5fbd0a620516b6648ffd85c343d9305d49a2a1f7d338b8bbd4

Ciao, Michael.


Released 2.4.21 2015-09-25

Changes since 2.4.20:

Lib/
* LDAPObject.read_s() now returns None instead of raising
  ldap.NO_SUCH_OBJECT in case the search operation returned emtpy result.
* ldap.resiter.ResultProcessor.allresults() now takes new key-word
  argument add_ctrls which is internally passed to LDAPObject.result4()
  and lets the method also return response control along with the search
  results.
* Added ldap.controls.deref implementing support for dereference control

Tests/
* Unit tests for module ldif (thanks to Petr Viktorin)

--
Michael Ströder
E-Mail: mich...@stroeder.com
http://www.stroeder.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: 64 bit python 3.5

2015-09-26 Thread Mark Lawrence

On 25/09/2015 17:55, Bill Strum wrote:

Is there a 64 bit version of 3.5 and if so where can I get it.

Thanks.

--
Bill Strum



https://www.python.org/downloads/release/python-350/

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40667f456c6f by Victor Stinner in branch 'default':
Issue #25220: Create Lib/test/libregrtest/
https://hg.python.org/cpython/rev/40667f456c6f

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25238] Version added of context parameter for xmlrpc.client.ServerProxy incorrect

2015-09-26 Thread desbma

New submission from desbma:

Doc of 3.4 branch says the context parameter for xmlrpc.client.ServerProxy was 
added at version 3.4.3: 
https://docs.python.org/3.4/library/xmlrpc.client.html?highlight=xmlrpc.client#module-xmlrpc.client

Although doc of 3.5 branch says the context parameter for 
xmlrpc.client.ServerProxy was added at version 3.5: 
https://docs.python.org/3/library/xmlrpc.client.html?highlight=xmlrpc.client#module-xmlrpc.client

See issue22960 for original issue and patch.

--
components: Library (Lib)
messages: 251644
nosy: desbma
priority: normal
severity: normal
status: open
title: Version added of context parameter for xmlrpc.client.ServerProxy 
incorrect
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



mergeall 2.2, with os.scandir() speed optimization

2015-09-26 Thread Mark Lutz
There's a new version of the mergeall folder tree synchronization tool, which
uses Python 3.5's os.scandir(), if available, to radically speed up its trees
comparison phase.  In testing on Windows 7 and 10, the new call speeds mergeall
comparisons by a factor of 5 to 10, depending on devices.  This is due entirely
to the elimination of system calls that os.scandir() affords.

The savings is especially significant for large archives.  For a 78G target use
case of 50k files in 3k folders, comparison runtime fell from  40 to 7 seconds 
on a fast USB stick (6x); from 112 to 16 seconds on a slower stick (7x); and 
from 600 to 60 seconds on an ancient single-core machine (10x). 

Also note that the scandir() call is standard in the os module in 3.5, but can
also be had for older Python releases, including 2.7 and older 3.X, via a PyPI
package.  mergeall uses either form if present, and falls back on the original 
os.listdir() scheme as a last resort to continue supporting older Pythons 
(though a scandir() is now strongly recommended, for obvious reasons!).

All of which seems proof that language improvement and backward compatibility 
are not necessarily mutually exclusive.  The details:

2.2 changes:
http://learning-python.com/mergeall/docs/Usage-Overview.html#optimizations

Main README: 
http://learning-python.com/mergeall/Readme.html

Usage guide:
http://learning-python.com/mergeall/docs/Usage-Overview.html

GUI screenshot:
http://learning-python.com/mergeall/examples/Screenshots/main-quit-help.png

Download the package:
http://learning-python.com/downloads/mergeall.zip

Cheers,
--M. Lutz (http://www.rmi.net/~lutz | http://learning-python.com)
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


ANN: python-ldap 2.4.21

2015-09-26 Thread Michael Ströder
Find a new release of python-ldap:

  http://pypi.python.org/pypi/python-ldap/2.4.21

python-ldap provides an object-oriented API to access LDAP directory
servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for
that purpose. Additionally it contains modules for other LDAP-related
stuff (e.g. processing LDIF, LDAP URLs and LDAPv3 schema).

Project's web site:

  http://www.python-ldap.org/

Checksums:

$ md5sum python-ldap-2.4.21.tar.gz
1ce26617e066f412fd5ba95bfba4ba5a
$ sha1sum python-ldap-2.4.21.tar.gz
35ed5913d804f14e952bec414c569e140feb889d
$ sha256sum python-ldap-2.4.21.tar.gz
2a3ce606465d2d5fbd0a620516b6648ffd85c343d9305d49a2a1f7d338b8bbd4

Ciao, Michael.


Released 2.4.21 2015-09-25

Changes since 2.4.20:

Lib/
* LDAPObject.read_s() now returns None instead of raising
  ldap.NO_SUCH_OBJECT in case the search operation returned emtpy result.
* ldap.resiter.ResultProcessor.allresults() now takes new key-word
  argument add_ctrls which is internally passed to LDAPObject.result4()
  and lets the method also return response control along with the search
  results.
* Added ldap.controls.deref implementing support for dereference control

Tests/
* Unit tests for module ldif (thanks to Petr Viktorin)

--
Michael Ströder
E-Mail: mich...@stroeder.com
http://www.stroeder.com
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-26 Thread Steve Dower

Steve Dower added the comment:

Ah, I misread that part. Will have to look deeper, but I'm not actually sure 
that shortcuts are supposed to support the same operations (though if it shows 
up, I guess it should work).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: PY3.5 and nnumpy and scipy installation problem

2015-09-26 Thread Mark Lawrence

On 26/09/2015 04:43, Ek Esawi wrote:

Hi All—

I am a beginner in Python and new to this list, but I am an experienced
programming in a few other languages.

Last year I installed numpy and scipy for Python3.3 on my computer with
windows 7, 64 bit OS. Today I downloaded Python3.5, but I the
installation for numpy 1.9.2 or 1.9.3 nor scipy 0.16.0 did work on the
same computer. Basically the setup for both numpy and scipy did not
work. Any ideas are greatly appreciated.


You don't have Visual Studio 2015 installed and so couldn't compile the 
code from a .tar.gz file or similar?


Once again the cavalry comes charging over the hill.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

Gohkle for World Vice President, after the BDFL :)



Thanks in advance,

Sincerely, EKE



--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

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


Re: PY3.5 and nnumpy and scipy installation problem

2015-09-26 Thread Steven D'Aprano
Hi Ek, and welcome, 

My responses below your questions.


On Sat, 26 Sep 2015 01:43 pm, Ek Esawi wrote:

> Hi All—
> 
> I am a beginner in Python and new to this list, but I am an experienced
> programming in a few other languages.
> 
> Last year I installed numpy and scipy for Python3.3 on my computer with
> windows 7, 64 bit OS. Today I downloaded Python3.5, but I the installation
> for numpy 1.9.2 or 1.9.3 nor scipy 0.16.0 did work on the same computer.
> Basically the setup for both numpy and scipy did not work. Any ideas are
> greatly appreciated.

While we are very knowledgeable, what we don't know is what went wrong. Can
you describe what you mean by "did not work"?

Preferably, if an error message was printed, please COPY and PASTE (don't
retype, especially not from memory) the error message?

If some other error occurred (Windows crash, computer caught fire...) please
describe it.

It may help if you explain the exact commands you used to install. Did you
use a text-based installer from the command line, or a GUI?

The more information you can give, the better the chances we can help.


Regards,




-- 
Steven

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


[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> fixed
status: open -> closed
type:  -> behavior
versions: +Python 2.7, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Learning Modules, Arguments, Parameters (imma noob)

2015-09-26 Thread Larry Hudson via Python-list

You've already received a lot of answers and guidance, but here is on more 
point...

On 09/25/2015 12:03 PM, Cody Cox wrote:
[snip]

 this I am not sure about, I set Kilo=get_input(kilo), ...


Watch your capitalization!  Kilo is _NOT_ the same as kilo.  Case is significant in Python (as 
well as in many other programming languages).


Also, as has already been pointed out:  what you want here is kilo=get_input().  Along with the 
corresponding change to the get_input() definition.  This function does NOT need a passed parameter.


-=- Larry -=-

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


[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fc6d62db8d42 by Raymond Hettinger in branch '2.7':
Issue #25135: Avoid possible reentrancy issues in deque_clear.
https://hg.python.org/cpython/rev/fc6d62db8d42

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Django (Python Web Framework) Tutorial

2015-09-26 Thread Cai Gengyang
So I am using Mac OS X Yosemite Version 10.10.2, going through the django 
tutorial : https://docs.djangoproject.com/en/1.8/intro/tutorial01/ and learning 
to use it. Am currently on the 2nd chapter "Creating a Project" and got a 
question to ask :

This is the series of steps I took to reach this point :

A) I created a folder called "Weiqi" in my home directory. (named after the 
game I am best at!)

B) Then I typed the command $ cd Weiqi in the "Terminal"

CaiGengYangs-MacBook-Pro:~ CaiGengYang$ cd Weiqi --- input

and got this output :

CaiGengYangs-MacBook-Pro:Weiqi CaiGengYang$ --- output

C) Then I ran the following command in the Terminal : $ django-admin 
startproject mysite.
This created a mysite folder which appeared inside the original Weiqi folder in 
my home directory.
When I clicked on the mysite folder, there is a manage.py file and another 
mysite folder inside the original mysite folder.
When I click on the mysite folder, there are 4 files in it : __init__.py , 
settings.py , urls.py and wsgi.py.

D) The next chapter of the tutorial says this :
"Where should this code live?
If your background is in plain old PHP (with no use of modern frameworks), 
you're probably used to putting code under the Web server's document root (in a 
place such as /var/www). With Django, you don't do that. It's not a good idea 
to put any of this Python code within your Web server's document root, because 
it risks the possibility that people may be able to view your code over the 
Web. That's not good for security.
Put your code in some directory outside of the document root, such as 
/home/mycode."

Question : I am a little confused about the last paragraph : What exactly is a 
"directory outside of the document root, such as /home/mycode." and how do you 
"Put your code in this directory" ?

Thanks a lot !

Appreciate it

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


[issue24820] IDLE themes for light on dark

2015-09-26 Thread Anand Krishnakumar

Anand Krishnakumar added the comment:

Hi!
I'm a 14 year old who wants to start developing for Python. I absolutely adore 
this enhancement and I would love to contribute towards this.
So please let me know if I can help, and if yes, how?

--
nosy: +Anand Krishnakumar

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-09-26 Thread Brett Cannon

Brett Cannon added the comment:

It is 10.10, but apparently a reboot fixed it (software, am I right? =/ ).

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue747320] rfc2822 formatdate functionality duplication

2015-09-26 Thread Berker Peksag

Berker Peksag added the comment:

Here is an updated patch (including tests and documentation updates).

--
components:  -email
nosy: +berker.peksag
stage: needs patch -> patch review
type: performance -> enhancement
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file40587/issue747320.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-09-26 Thread Ned Deily

Ned Deily added the comment:

Brett, was this on OS X 10.10.x or a 10.11 pre-release?  test_eintr does not 
fail fail for me on either using the most recent Xcode 7.

--
title: test_einter.test_os_open hangs under Xcode 7 -> test_eintr.test_os_open 
hangs under Xcode 7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25233] AssertionError from asyncio Queue get

2015-09-26 Thread Guido van Rossum

Guido van Rossum added the comment:

I have a fix pending here: https://github.com/python/asyncio/pull/269

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19884] Importing readline produces erroneous output

2015-09-26 Thread Berker Peksag

Berker Peksag added the comment:

The version check doesn't work because 0ed1801bf4bd added #ifndef __APPLE__ to 
guard the code, so if you're using readline on OS X, that rl_variable_bind 
workaround won't work.

There are two alternatives:

1) convert ifndef to ifdef and add a check for the ``using_libedit_emulation`` 
variable.

#ifdef __APPLE__
if (using_libedit_emulation) {
...
...

looks like a common idiom in readline.c.


2) just skip the test if _READLINE_VERSION < 0x0603

--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25239] HTMLParser handle_starttag replaces entity references in attribute value even without semicolon

2015-09-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25241] ctypes: access violation reading

2015-09-26 Thread Dum Dum

New submission from Dum Dum:

On Windows 8.1 64-bit, using a fresh installation of Python 3.5.150.0 64-bit, 
`error_script.py` crashes, while Python 3.4.3150 and 2.7.10150 (both 64-bit) 
run the script properly.

Here is a traceback: https://bpaste.net/show/3ecfbf93b96e

--
files: error_script.py
messages: 251658
nosy: Dum.Dum
priority: normal
severity: normal
status: open
title: ctypes: access violation reading
type: crash
versions: Python 3.5
Added file: http://bugs.python.org/file40589/error_script.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



PY3.5 and nnumpy and scipy installation problem

2015-09-26 Thread Ek Esawi
Hi All—

I am a beginner in Python and new to this list, but I am an experienced
programming in a few other languages.


Last year I installed numpy and scipy for Python3.3 on my computer with
windows 7, 64 bit OS. Today I downloaded Python3.5, but I the installation
for numpy 1.9.2 or 1.9.3 nor scipy 0.16.0 did work on the same computer.
Basically the setup for both numpy and scipy did not work. Any ideas are
greatly appreciated.


Thanks in advance,


Sincerely, EKE
-- 
https://mail.python.org/mailman/listinfo/python-list


64 bit python 3.5

2015-09-26 Thread Bill Strum
Is there a 64 bit version of 3.5 and if so where can I get it.

Thanks.

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


[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 005590a4a005 by Raymond Hettinger in branch '3.5':
Issue #25135: Avoid possible reentrancy issues in deque_clear.
https://hg.python.org/cpython/rev/005590a4a005

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-26 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I started simply by *moving* code, without additionnal changes. I will 
watch for buildbots to ensure that no regression was added. The 
Lib/test/regrtest.py is kept to not break any existing tool. It looks like 
Lib/test/regrtest.py is very important in Python, much more than what I 
expected. It's used for PGO compilation, it's used by various scripts for 
different platforms, it's used in scripts to build Linux packages,etc.

I used "hg cp" to create new files to ensure that the history is not lost.

I will write new patches for the real refactoring work described in the first 
message. It will be much easier to review changes written after the code was 
moved. So we can discuss controversal changes like the creation of a class for 
libregrtest/main.py ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


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


[issue24820] IDLE themes for light on dark

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My only question right now is whether I should apply as is or with minor 
adjustments.  Thanks for the encouragements either way.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25240] Stack overflow in reprlib causes a core dump

2015-09-26 Thread Ceridwen

New submission from Ceridwen:

I have a linked list implementation made of nested tuples with a custom repr:

def __repr__(self):
return 'LinkedList(' + ', '.join(repr(v) for v in self) + ')'

(Iterating over a LinkedList returns just its contents.)

When using Raymond Hettinger's recipe for finding the size in memory of an 
object, 
https://code.activestate.com/recipes/577504-compute-memory-footprint-of-an-object-and-its-cont/?in=user-178123
 , when I set verbose=True and exceed the recursion limit with reprlib.repr, I 
get the following error:

Fatal Python error: Cannot recover from stack overflow.

Current thread 0x7fa24200d700 (most recent call first):
  File ".py", line 327 in __repr__
  File "/usr/lib/python3.4/reprlib.py", line 135 in repr_instance
  File "/usr/lib/python3.4/reprlib.py", line 64 in repr1
  File "/usr/lib/python3.4/reprlib.py", line 54 in repr
  File "recipe.py", line 46 in sizeof
  [many instances of the above line repeated]
  ...
Aborted (core dumped)

The line in the recipe it fails when recursing on is:

print(s, type(o), repr(o), file=stderr)

On 2.7 it fails with a RuntimeError as I'd expect.

--
components: Library (Lib)
messages: 251655
nosy: ceridwen
priority: normal
severity: normal
status: open
title: Stack overflow in reprlib causes a core dump
type: crash
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread paul . hermeneutic
After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip
using pip fails. Am I doing this incorrectly? Any suggestions?

C:\Python27-32\Scripts>pip install --upgrade pip
You are using pip version 7.0.1, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
  Using cached pip-7.1.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.0.1
Uninstalling pip-7.0.1:
  Successfully uninstalled pip-7.0.1
Exception:
Traceback (most recent call last):
  File "C:\Python27-32\lib\site-packages\pip\basecommand.py", line 223, in main
logger.debug('Exception information:', exc_info=True)
  File "C:\Python27-32\lib\site-packages\pip\commands\install.py",
line 297, in run
wb = WheelBuilder(
  File "C:\Python27-32\lib\site-packages\pip\req\req_set.py", line
633, in install
for requirement in to_install:
  File "C:\Python27-32\lib\site-packages\pip\req\req_install.py", line
734, in commit_uninstall

  File "C:\Python27-32\lib\site-packages\pip\req\req_uninstall.py",
line 153, in commit
self.save_dir = None
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 212, in call
raise attempt.get()
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
89, in rmtree
shutil.rmtree(dir, ignore_errors=ignore_errors,
  File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File "C:\Python27-32\lib\shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
  File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
101, in rmtree_errorhandler
# use the original function to repeat the operation
WindowsError: [Error 5] Access is denied:
'c:\\users\\pwatson\\appdata\\local\\temp\\pip-4nt07e-uninstall\\python27-32\\scripts\\pip.exe'
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread paul . hermeneutic
Joel, no need for elevated (Administrator) execution. I did need to
follow Zachary's suggestion and it worked well.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2015-09-26 Thread Joshua Bronson

New submission from Joshua Bronson:

ConfigParser.getboolean[1] has logic to convert strings like '0' and 'False' to 
False. This logic is generally useful in other contexts and need not be coupled 
to ConfigParser. Would you consider accepting a patch that factored this 
string-to-boolean logic out of ConfigParser into a standalone function, and 
changed ConfigParser.getboolean internally to call that?

Thanks for your consideration.

[1] 
https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.getboolean

--
messages: 251664
nosy: jab
priority: normal
severity: normal
status: open
title: decouple string-to-boolean logic from ConfigParser.getboolean and offer 
as separate function
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Opened #25244 to consider changing exact right-click behavior.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25241] ctypes: access violation reading

2015-09-26 Thread Dum Dum

Dum Dum added the comment:

I rewrote the code following your suggestions and it appears the error was 
indeed on my side. I somewhat expected that, but found it weird that it only 
seemed to occur on 3.5. Thank you!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf11034f0291 by Terry Jan Reedy in branch '2.7':
Issue #24988: Idle ScrolledList context menus (used in debugger)
https://hg.python.org/cpython/rev/bf11034f0291

New changeset 85a4c95ad02f by Terry Jan Reedy in branch '3.4':
Issue #24988: Idle ScrolledList context menus (used in debugger)
https://hg.python.org/cpython/rev/85a4c95ad02f

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25244] Idle: refine right-click behavior

2015-09-26 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Spinoff from #24988, where I noted "The standard on Windows is to bring up a 
context menu on right-button-release, not on r-b-press." and asked "What about 
linux and mac?"

The question is relevant for 'Go to File/Line'.  Look at text where pressed or 
where released?

Current code in multiple places is
if macosxSupport.isAquaTk():
listbox.bind("", self.popup_event)
listbox.bind("", self.popup_event)
else:
listbox.bind("", self.popup_event)

Also for paste: where insert?

Thunderbird and Notepad++ move the insertion cursor on rb-press, That is the 
paste position even if the mouse is moved before release. Notepad does not move 
the insert cursor. MS Word is confusing, erasing the cursor when the menu is 
displayed and moving it when the menu goes away.

Additional note: Testing with my middle button, a press and release act the 
same as left click to move the insertion cursor to the mouse cursor. Moving my 
mouse while holding the middle button down moves the text pane within the text 
window. The insertion cursor is not moved. This is pretty much redundant with 
using the scroll wheel or scroll bar.

--
assignee: terry.reedy
messages: 251669
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Idle: refine right-click behavior
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Joel Goldstick
On Sat, Sep 26, 2015 at 6:24 PM,  wrote:

> Joel, no need for elevated (Administrator) execution. I did need to
> follow Zachary's suggestion and it worked well.
>

Good result.  I'm not up on windows for many years


-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I am afraid you misunderstand how fromutc() method works.  Note that you rarely 
need to call it directly: use astimezone() method to convert between timezones.

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b5bc7e9dab77 by Terry Jan Reedy in branch '2.7':
Issue #24570: Idle: make calltip and completion boxes appear on Macs
https://hg.python.org/cpython/rev/b5bc7e9dab77

New changeset 6687630e201a by Terry Jan Reedy in branch '3.4':
Issue #24570: Idle: make calltip and completion boxes appear on Macs
https://hg.python.org/cpython/rev/6687630e201a

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Event Handling Error in Python 3.4.3

2015-09-26 Thread Supra1983 Tech
I have a python script for a game and the problem is that after running the 
game, the blocks start falling, but the game over message is not popping up at 
proper times. Here is my script:

import pygame
import time
import random

pygame.init()

display_width = 800
display_height = 600

black = (0,0,0)
white = (255,255,255)
red = (255,0,0)

car_width = 45.2


gameDisplay = pygame.display.set_mode((display_width,display_height))
pygame.display.set_caption('pyrace')
clock = pygame.time.Clock()

carImg = pygame.image.load('theracer 1car.png')

def things_saved(count):
  font = pygame.font.SysFont(None, 25)
  text = font.render("Saved: "+str(count), True, black)
  gameDisplay.blit(text,(0,0))

def things(thingx, thingy, thingw, thingh, color):
pygame.draw.rect(gameDisplay, color, [thingx, thingy, thingw, thingh])
  

def car(x,y):
gameDisplay.blit(carImg,(x,y))

def text_objects(text, font):
  textSurface = font.render(text, True, black)
  return textSurface, textSurface.get_rect()

def message_display(text):
largeText = pygame.font.Font('freesansbold.ttf', 115)
TextSurf, TextRect = text_objects(text, largeText)
TextRect.center = ((display_width/2), (display_height/2))
gameDisplay.blit(TextSurf, TextRect)

pygame.display.update()

time.sleep(2)

game_loop()

def crash():
  message_display('Game Over')

def game_loop():
  x = (display_width * 0.45)
  y = (display_height * 0.45)

  x_change = 0
 
  thing_startx = random.randrange(0, display_width)
  thing_starty = -300
  thing_speed = 7
  thing_width = 100
  thing_height = 100

  saved = 0

  gameExit = False

  while not gameExit:

for event in pygame.event.get():
  if event.type == pygame.QUIT:
pygame.quit()
quit()

  if event.type == pygame.KEYDOWN:
if event.key == pygame.K_LEFT:
  x_change = -5
elif event.key == pygame.K_RIGHT:
  x_change = 5

  if event.type == pygame.KEYUP:
if event.key == pygame.K_LEFT or event.key == pygame.K_RIGHT:
  x_change = 0
  
x += x_change

gameDisplay.fill(white)

#things(thingx, thingy, thingw, thingh, color)
things(thing_startx, thing_starty, thing_width, thing_height, black)
thing_starty += thing_speed
car(x,y)
things_saved(saved)

if x > display_width - car_width or x < 0:
  crash()

if thing_starty > display_height:
  thing_starty = 0 - thing_height
  thing_startx = random.randrange(0,display_width)
  saved += 1

if y < thing_starty+thing_height:  

  if x > thing_startx and x < thing_startx + thing_width or x+car_width 
  > thing_startx and x + car_width < thing_startx + thing_width:
print('cross')
crash()

pygame.display.update()
clock.tick(60)

game_loop()
pygame.quit()
quit()
  
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ConnectionError handling problem

2015-09-26 Thread Cameron Simpson

On 26Sep2015 09:46, Gonzalo V  wrote:

Hi Cameron.
i had the same problems and you have to tell to python what to do with the
connect problem.


Definitely. That's why we're encouraging him to handle specific exceptions.


try this:
...
except *urllib.error.HTTPError* as e:
   if e.getcode()==504:
   disp = "SIN RESPUESTA DEL SERVIDOR" #(No answer from the
server)
   nombre=''
   origen=''

   precioAhora=''
   print(e.getcode(),disp)
   pass


You're aware that the "pass" there does nothing? Perhaps you're considering 
"continue"?


Normally when I write a specific clause like that it looks a bit like this:

 try this:
   ...
 except *urllib.error.HTTPError* as e:
   if e.getcode()==504:
 warning("about 504 error...")
 nombre = ''
   else:
 raise

This arranges that for _other_ HTTPErrors which I do not correctly handle that 
the exception is reraised.



greeting from Chile. Sorry my english.


Don't apologise. Thank you for working in a second language to accomodate us. I 
apologise for my Spanish, which is nonexistent :-(


Cheers,
Cameron Simpson 


Saludos,
Gonzalo

2015-09-25 3:24 GMT-04:00 Cameron Simpson :


On 24Sep2015 22:46, shiva upreti  wrote:


On Friday, September 25, 2015 at 10:55:45 AM UTC+5:30, Cameron Simpson
wrote:


On 24Sep2015 20:57, shiva upreti  wrote:
>Thank you Cameron.
>I think the problem with my code is that it just hangs without raising
any >exceptions. And as mentioned by Laura above that when I press CTRL+C,
it >just catches that exception and prints ConnectionError which is
definitely >a lie in this case as you mentioned.




Ok. You original code says:

 try:
   r=requests.post(url, data=query_args)
 except:
   print "Connection error"

and presumably we think your code is hanging inside the requests.post
call? You should probably try to verify that, because if it is elsewhere
you need to figure out where (lots of print statements is a first start on
that).

I would open two terminals. Run your program until it hangs in one.

While it is hung, examine the network status. I'll presume you're on a
UNIX system of some kind, probably Linux? If not it may be harder (or just
require someone other than me).

If it is hung in the .post call, quite possibly it has an established
connecion to the target server - maybe that server is hanging.

The shell command:

 netstat -rn | fgrep 172.16.68.6 | fgrep 8090

will show every connection to your server hosting the URL "
http://172.16.68.6:8090/login.xml;. That will tell you if you have a
connection (if you are the only person doing the connecting from your
machine).

If you have the "lsof" program (possibly in /usr/sbin, so
"/usr/sbin/lsof") you can also examine the state of your hung Python
program. This:

 lsof -p 12345

will report on the open files and network connections of the process with
pid 12345. Adjust to suit: you can find your program's pid ("process id")
with the "ps" command, or by backgrounding your program an issuing the
"jobs" command, which should show the process id more directly.


Cheers,
Cameron Simpson 

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


[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2015-09-26 Thread Joshua Bronson

Joshua Bronson added the comment:

One way this could be offered is as a new static method on bool (something like 
bool.parse_str?), but I of course defer to the better judgment of the Python 
core developers. I'd be happy to take a crack at a patch adding it wherever you 
like, if you like.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> For stability it is better to use public name 'timezone.utc' instead of 
> '_utc'.

Can you elaborate on the "stability" consideration?

I would like to revisit this issue since we will have some changes made to 
datetime pickles in the context of PEP 495.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-26 Thread Nick Coghlan

Nick Coghlan added the comment:

Just noting a potential practical benefit of the "NEWS entry first" approach 
that David suggests: I believe it will help encourage the creation of a 
succinct answer to "Why are we making this change?" as part of the patch review 
process.

That's then useful both during the patch review itself (since there's a shared 
understanding between reviewers and implementors of the goal to be achieved), 
as well as when the change is released (since there's hopefully a user centric 
explanation of *why* something changed, rather than merely *what* changed)

However, the key trap I'd like us to avoid falling into is letting the fact a 
particular approach falls short of our ideal approach deter the introduction of 
interim improvements. We're going to need the checked in filesystem database 
anyway to backfill historical NEWS entries after switching to a generated NEWS 
file, so it seems harmless to me to switch to it early and then incrementally 
add to it until a tracker based solution is available.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.6 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-09-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Added equivalent completion window patch.  Would have preferred confirmation 
that Idle versions work, but 3.4.4rc1 is only a week away and I think having 
bug confirmed and fixed in tcl is enough to go with.

--
assignee:  -> terry.reedy
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Fixing Python install on the Mac after running 'CleanMyMac' (fwd)

2015-09-26 Thread Ned Deily
In article ,
 kacyjo...@lclark.edu wrote:
> I was having this same problem, entered those commands and got this as a 
> response:
> 
> MacBook-Pro:~ kacyjones$ /usr/bin/python2.7 -c 'import 
> numpy;print(numpy.__file__)' 
> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/num
> py/__init__.pyc
> MacBook-Pro:~ kacyjones$ 
> MacBook-Pro:~ kacyjones$ /usr/bin/python2.7 -c 'import 
> sys;print(sys.version)' 
> 2.7.10 (default, Jul 14 2015, 19:46:27) 
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
> 
> Any idea what that means for my system?

Since the original reply, Apple has updated the version of the OS X 
10.10.x system Python 2.7 to 2.7.10.  So that looks good.

-- 
 Ned Deily,
 n...@acm.org

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


[issue23496] Steps for Android Native Build of Python 3.4.2

2015-09-26 Thread Cyd Haselton

Cyd Haselton added the comment:

UPDATE: Before downloading/building Google gdb source I ran test_gdb.py, which 
failed completely.  Details of those tests are attached.

--
Added file: http://bugs.python.org/file40586/test_gdb.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-09-26 Thread Brett Cannon

Brett Cannon added the comment:

I fixed my test_eintr problem, but now 
https://hg.python.org/cpython/rev/4a9418ed0d0c landed in 3.6/default and broke 
the patch. Since missing getting this in before the aforementioned change was 
my fault, I'll personally handle making the patch apply cleanly in default.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25239] HTMLParser handle_starttag replaces entity references in attribute value even without semicolon

2015-09-26 Thread Sean Liu

New submission from Sean Liu:

In the document of HTMLParser.handle_starttag, it states "All entity references 
from html.entities are replaced in the attribute values." However it will 
replace the string if it matches ampersand followed by the entity name without 
the semicolon.

For example foo will produce "t=buy¤cy=usd" 
as the value of href attribute due to "curren" is the entity name for the 
currency sign.

--
components: Library (Lib)
files: parserentity.py
messages: 251654
nosy: Sean Liu
priority: normal
severity: normal
status: open
title: HTMLParser handle_starttag replaces entity references in attribute value 
even without semicolon
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file40588/parserentity.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25240] Stack overflow in reprlib causes a core dump

2015-09-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25239] HTMLParser handle_starttag replaces entity references in attribute value even without semicolon

2015-09-26 Thread Ezio Melotti

Ezio Melotti added the comment:

This seems indeed to be a bug.  The relevant bit seems to be at 
http://www.w3.org/TR/html5/syntax.html#consume-a-character-reference :

"""
If the character reference is being consumed as part of an attribute, and the 
last character matched is not a ";" (U+003B) character, and the next character 
is either a "=" (U+003D) character or an alphanumeric ASCII character, then, 
for historical reasons, all the characters that were matched after the U+0026 
AMPERSAND character (&) must be unconsumed, and nothing is returned. However, 
if this next character is in fact a "=" (U+003D) character, then this is a 
parse error, because some legacy user agents will misinterpret the markup in 
those cases.
"""

Off the top of my head, this paragraph is not implemented in HTMLParser (and it 
should).
Also note that foo is not valid HTML and 
the & should have been escaped with .

--
assignee:  -> ezio.melotti
stage:  -> test needed
versions: +Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25241] ctypes: access violation reading

2015-09-26 Thread eryksun

eryksun added the comment:

The default function pointer restype is c_int, and the default integer argument 
conversion is also c_int. However, the handle returned by FindFirstVolume is a 
pointer to a private structure that it uses for the volume enumeration, so you 
must set restype to a pointer type. Similarly, if restype is a simple type that 
gets converted to a Python integer (e.g. wintypes.HANDLE), then you must either 
set FindNextVolumeW.argtypes or manually wrap the handle value (e.g. vhandle = 
wintypes.HANDLE(vhandle)). The default c_int conversions will only work if the 
address happens to fit in a 32-bit int. 

Don't forget to call FindVolumeClose if the process is expected to continue. 
Otherwise you're leaking memory.

Also, if you're defining function pointer prototypes for a library, please do 
not use ctypes.cdll or ctypes.windll. The loaders are global to ctypes and by 
design cache the loaded library, which by design caches function pointers. 
Projects such as pyreadline and colorama have demonstrated the problems that 
this creates due to inconsistent prototype definitions, especially for commonly 
used Win32 APIs.

Here is one way to rewrite your code to have it work more reliably:

import ctypes
from ctypes import wintypes

kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)

kernel32.FindFirstVolumeW.restype = wintypes.HANDLE
kernel32.FindNextVolumeW.argtypes = (wintypes.HANDLE,
 wintypes.LPWSTR,
 wintypes.DWORD)
kernel32.FindVolumeClose.argtypes = (wintypes.HANDLE,)

INVALID_HANDLE_VALUE = wintypes.HANDLE(-1).value
ERROR_NO_MORE_FILES = 18

def list_volumes():
vname = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
vhandle = kernel32.FindFirstVolumeW(vname, len(vname))
if vhandle == INVALID_HANDLE_VALUE:
raise ctypes.WinError(ctypes.get_last_error())
volumes = []
try:
while True:
volumes.append(vname.value)
if not kernel32.FindNextVolumeW(vhandle, vname, len(vname)):
last_error = ctypes.get_last_error()
if last_error == ERROR_NO_MORE_FILES:
break
else:
raise ctypes.WinError(last_error)
finally:
if not kernel32.FindVolumeClose(vhandle):
raise ctypes.WinError(ctypes.get_last_error())
return volumes

if __name__ == '__main__':
for volume in list_volumes():
print(volume)

--
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-26 Thread R. David Murray

R. David Murray added the comment:

I've only scanned the first couple of test failures in your attachment, but 
they don't seem to have anything to do with spawn or /tmp.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Python program on induction heating

2015-09-26 Thread Roïya souissi
Hello,
I have realized last year a mini project on induction heating and its 
application onto thermoelectricity. To back up my theoretical work, I created a 
python program ( I used mainly dictionnaries, PIL library and tkinter library). 
I have created a personal blog (https://souissiroiya.wordpress.com/) in a bid 
to publish my future works and projects and his the url to the python program 
in case you want to check it out (https://souissiroiya.wordpress.com/2015 ... 
en-python/).
Best regards,
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25241] ctypes: access violation reading

2015-09-26 Thread eryksun

eryksun added the comment:

Here's a rewrite with a cleaner while loop, at least to me:

def list_volumes():
vname = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
vhandle = kernel32.FindFirstVolumeW(vname, len(vname))
if vhandle == INVALID_HANDLE_VALUE:
raise ctypes.WinError(ctypes.get_last_error())
volumes = [vname.value]
try:
while kernel32.FindNextVolumeW(vhandle, vname, len(vname)):
volumes.append(vname.value)
last_error = ctypes.get_last_error()
if last_error != ERROR_NO_MORE_FILES:
raise ctypes.WinError(last_error)
finally:
if not kernel32.FindVolumeClose(vhandle):
raise ctypes.WinError(ctypes.get_last_error())
return volumes

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Joel Goldstick
sudo pip ... etc

On Sat, Sep 26, 2015 at 2:13 PM,  wrote:

> After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip
> using pip fails. Am I doing this incorrectly? Any suggestions?
>
> C:\Python27-32\Scripts>pip install --upgrade pip
> You are using pip version 7.0.1, however version 7.1.2 is available.
> You should consider upgrading via the 'pip install --upgrade pip' command.
> Collecting pip
>   Using cached pip-7.1.2-py2.py3-none-any.whl
> Installing collected packages: pip
>   Found existing installation: pip 7.0.1
> Uninstalling pip-7.0.1:
>   Successfully uninstalled pip-7.0.1
> Exception:
> Traceback (most recent call last):
>   File "C:\Python27-32\lib\site-packages\pip\basecommand.py", line 223, in
> main
> logger.debug('Exception information:', exc_info=True)
>   File "C:\Python27-32\lib\site-packages\pip\commands\install.py",
> line 297, in run
> wb = WheelBuilder(
>   File "C:\Python27-32\lib\site-packages\pip\req\req_set.py", line
> 633, in install
> for requirement in to_install:
>   File "C:\Python27-32\lib\site-packages\pip\req\req_install.py", line
> 734, in commit_uninstall
>
>   File "C:\Python27-32\lib\site-packages\pip\req\req_uninstall.py",
> line 153, in commit
> self.save_dir = None
>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
> line 49, in wrapped_f
> return Retrying(*dargs, **dkw).call(f, *args, **kw)
>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
> line 212, in call
> raise attempt.get()
>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
> line 247, in get
> six.reraise(self.value[0], self.value[1], self.value[2])
>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
> line 200, in call
> attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
>   File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
> 89, in rmtree
> shutil.rmtree(dir, ignore_errors=ignore_errors,
>   File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
> rmtree(fullname, ignore_errors, onerror)
>   File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
> rmtree(fullname, ignore_errors, onerror)
>   File "C:\Python27-32\lib\shutil.py", line 252, in rmtree
> onerror(os.remove, fullname, sys.exc_info())
>   File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
> 101, in rmtree_errorhandler
> # use the original function to repeat the operation
> WindowsError: [Error 5] Access is denied:
>
> 'c:\\users\\pwatson\\appdata\\local\\temp\\pip-4nt07e-uninstall\\python27-32\\scripts\\pip.exe'
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-26 Thread eryksun

eryksun added the comment:

> Ah, I misread that part. Will have to look deeper, but I'm not
> actually sure that shortcuts are supposed to support the same 
> operations (though if it shows up, I guess it should work).

A LNK shortcut should support the same commands (e.g. open, edit) as its 
target. This works for me in Windows 10. 

BTW, I don't see how to ShellExecute a subcommand documented on MSDN. One way 
is to just pass the subkey path as the 'verb', e.g. 
r"editwithidle\shell\edit35". Probably it's just passed along to RegOpenKeyEx 
as the subkey, so this shouldn't be used in practice. Could the installer 
create a simple "edit" command? It doesn't have to be smart about it. Just 
overwrite the current value, and let a per-user install take precedence.

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Tim Peters

Tim Peters added the comment:

I expect Peter is correct:  the C fromutc() doesn't match the logic of the 
Python fromutc(), and there are no comments explaining why the C version 
changed the logic.

The last 4 lines of his `time_issues.py` show the difference.  The simplified 
UKSummerTime tzinfo always says the total UTC offset and the DST offset are 
+1:00:00.  The Python .fromutc() adds that hour to the datetime passed in, but 
the C .fromutc() does not.  That's because they implement different functions, 
not because Peter is using .fromutc() ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For now "_utc" is not a part of API. When use it in pickling, you implicitly 
make it a part of API, and should support it forever (and force other Python 
implementations to support it). As far as it looks as implementation detail, 
there is a risk that the "_utc" variable can be renamed and this will break 
pickle compatibility.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I verified that inactiveselectbackground exists and starts as ''.  Since it 
should match the active selectbackground on all systems, as set by the current 
theme. I will try adding a line where selection colors are set: 
EditorWindow.ResetColorizer:
self.text.config(
...
selectforeground=select_colors['foreground'],
selectbackground=select_colors['background'],
inactiveselectbackground=select_colors['background']
)
I believe this is the only place where this is needed.  The select colors are 
used for a different widget in TreeWidget. The use in ParenMatch for 'paren' 
tag should be temporary.

We will need to reconsider the 'found' highlight and the select versus found 
usage after this change.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Django (Python Web Framework) Tutorial

2015-09-26 Thread Cai Gengyang
On Sunday, September 27, 2015 at 11:46:13 AM UTC+8, John Gordon wrote:
> In <1421a34f-d8cc-4367-adab-2c2b46504...@googlegroups.com> Cai Gengyang 
>  writes:
> 
> > Question : I am a little confused about the last paragraph : What exactly
> > is a "directory outside of the document root, such as /home/mycode." and
> > how do you "Put your code in this directory" ?
> 
> Django is a web application framework.  So, you have to use it together with
> a web server.  The "document root" is the directory where the web server
> expects to find files to be served as web pages.
> 
> You said you put the Django project code in a subdirectory of your home
> directory.  That should be fine.
> 
> -- 
> John Gordon   A is for Amy, who fell down the stairs
> gor...@panix.com  B is for Basil, assaulted by bears
> -- Edward Gorey, "The Gashlycrumb Tinies"


Ok.

As for the next chapter(Database setup), I opened up mysite/settings.py as per 
the instructions on the Django tutorial.

However, when I try to run the following command : $ python manage.py migrate 
to create the tables in the database,

CaiGengYangs-MacBook-Pro:Weiqi CaiGengYang$ python manage.py migrate  input

I get the following error message :

/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:
 can't open file 'manage.py': [Errno 2] No such file or directory  output

Any idea how to solve this issue?

Thanks a lot !

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


Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread eryksun
On 9/26/15, Zachary Ware  wrote:
> On Sat, Sep 26, 2015 at 1:13 PM,   wrote:
>> After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip
>> using pip fails. Am I doing this incorrectly? Any suggestions?
>
> This is a limitation of Windows: you can't replace the executable that
> you're currently running.

A memory-mapped file can be renamed, so replacing the executable is
doable. The new name has to be on the same volume. That's doable. The
problem is that Windows doesn't allow deleting the file. Maybe pip
could spawn a clean-up script to which it pipes the list of renamed
files. The script waits for pip to exit and then tries to remove the
files.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25245] Compile warnings in _pickle.c

2015-09-26 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Changeset 88d98f6c2d7d causes compile warnings in Modules/_pickle.c.

/home/serhiy/py/cpython/Modules/_pickle.c: In function ‘load_counted_long’:
/home/serhiy/py/cpython/Modules/_pickle.c:4752:15: warning: ‘pdata’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 value = _PyLong_FromByteArray((unsigned char *)pdata, (size_t)size,
   ^
/home/serhiy/py/cpython/Modules/_pickle.c: In function ‘load’:
/home/serhiy/py/cpython/Modules/_pickle.c:5534:24: warning: ‘s’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 idx = Py_CHARMASK(s[0]);
^
/home/serhiy/py/cpython/Modules/_pickle.c:5529:11: note: ‘s’ was declared here
 char *s;
   ^
/home/serhiy/py/cpython/Modules/_pickle.c:4800:7: warning: ‘s’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 x = _PyFloat_Unpack8((unsigned char *)s, 0);
   ^
/home/serhiy/py/cpython/Modules/_pickle.c:4795:11: note: ‘s’ was declared here
 char *s;
   ^

--
components: Extension Modules
messages: 251683
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Compile warnings in _pickle.c
type: compile error
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Python program on induction heating

2015-09-26 Thread Steven D'Aprano
Hi, and welcome,

On Sun, 27 Sep 2015 06:28 am, Roïya souissi wrote:

> Hello,
> I have realized last year a mini project on induction heating and its
> application onto thermoelectricity. To back up my theoretical work, I
> created a python program ( I used mainly dictionnaries, PIL library and
> tkinter library). I have created a personal blog
> (https://souissiroiya.wordpress.com/) in a bid to publish my future works
> and projects and his the url to the python program in case you want to
> check it out (https://souissiroiya.wordpress.com/2015 ... en-python/).

Unfortunately that second link is broken and I don't understand enough
French to find it from the home page.



-- 
Steven

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


Re: Python program on induction heating

2015-09-26 Thread MRAB

On 2015-09-27 02:32, Steven D'Aprano wrote:

Hi, and welcome,

On Sun, 27 Sep 2015 06:28 am, Roïya souissi wrote:


Hello,
I have realized last year a mini project on induction heating and its
application onto thermoelectricity. To back up my theoretical work, I
created a python program ( I used mainly dictionnaries, PIL library and
tkinter library). I have created a personal blog
(https://souissiroiya.wordpress.com/) in a bid to publish my future works
and projects and his the url to the python program in case you want to
check it out (https://souissiroiya.wordpress.com/2015 ... en-python/).


Unfortunately that second link is broken and I don't understand enough
French to find it from the home page.




You don't know what "Implémentation en Python" means? Couldn't you make
a guess? :-)

https://souissiroiya.wordpress.com/2015/09/23/implementation-en-python/

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


Re: Django (Python Web Framework) Tutorial

2015-09-26 Thread John Gordon
In <1421a34f-d8cc-4367-adab-2c2b46504...@googlegroups.com> Cai Gengyang 
 writes:

> Question : I am a little confused about the last paragraph : What exactly
> is a "directory outside of the document root, such as /home/mycode." and
> how do you "Put your code in this directory" ?

Django is a web application framework.  So, you have to use it together with
a web server.  The "document root" is the directory where the web server
expects to find files to be served as web pages.

You said you put the Django project code in a subdirectory of your home
directory.  That should be fine.

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

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


[issue18814] Add utilities to "clean" surrogate code points from strings

2015-09-26 Thread Martin Panter

Martin Panter added the comment:

[padding]

I think my suggested colours for the bikeshed would be handle_surrogates() and 
handle_surrogateescape(). “Rehandle” seems awkward and too assuming to me. And 
I agree with Serhiy that surrogates are a Unicode thing, not just related to 
the “surrogatepass” handler.

Adding them to “codecs” makes sense to me. The most important one, 
handle_surrogateescape() or equivalent, is closely related to the error handler 
of that module.

Having handle_surrogateescape or equivalent would probably be useful for Issue 
25184 (displaying an arbitrary file path in a UTF-8 HTML file).

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25194] Register of Financial Interests for core contributors

2015-09-26 Thread Nick Coghlan

Nick Coghlan added the comment:

Posting an alternate draft that takes the approach MAL suggested, emphasising 
the personal motivation side of things.

This one doesn't attempt to pre-categories the list of contributors - instead, 
I'd expect us to do that based on analysis of the raw text.

The opening section also makes it clear that we're not shifting the goal posts 
on becoming a core contributor - the only required disclosure remains that 
which is needed to sign the CLA and submit the signed copy to the PSF.

I like this version a lot better then the previous draft, but am still open to 
suggestions for improving both the formatting and the content.

--
Added file: http://bugs.python.org/file40591/motives.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be /tmp is mounted on a filesystem that forbids setting the execution bit.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23329] _ssl cannot be compiled with LibreSSL anymore (on OpenBSD 5.5) because of ALPN

2015-09-26 Thread Remi Pointel

Remi Pointel added the comment:

Good, I think we should test on a machine with a version of openssl that does 
not support ALPN to be sure.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-26 Thread Open Genomes

New submission from Open Genomes:

Several tests for Python 3.5.0 failed. 
The install is a local one on a shared virtual server from bluehost.com
This is a local user install, with a prefix in $HOME/python directory. 
Output of uname -a:
Linux box874.bluehost.com 3.12.35.1418868052 #1 SMP Wed Dec 17 20:04:02 CST 
2014 x86_64 x86_64 x86_64 GNU/Linux

It would seem that there are no permissions to spawn() a new process, and to 
write temporary files to /tmp

The tests should be able to work on a virtual server, or the test should check 
if there are permissions to fork a process and write to a system-wide temporary 
directory. Of course many installations use Python on virtual hosts and often 
the system-wide default installation on Linux systems is 2.7.0. The tests need 
to fail gracefully or accommodate the lack of permissions for to fork new 
processes and write to system-wide temporary directories.

--
components: Tests
files: tests.out
messages: 251659
nosy: Open Genomes
priority: normal
severity: normal
status: open
title: Failed tests for Python 3.5.0 on shared virtual host
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file40590/tests.out

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Joel Goldstick
On Sat, Sep 26, 2015 at 2:52 PM, Joel Goldstick 
wrote:

> sudo pip ... etc
>
> On Sat, Sep 26, 2015 at 2:13 PM,  wrote:
>
>> After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip
>> using pip fails. Am I doing this incorrectly? Any suggestions?
>>
>> C:\Python27-32\Scripts>pip install --upgrade pip
>> You are using pip version 7.0.1, however version 7.1.2 is available.
>> You should consider upgrading via the 'pip install --upgrade pip' command.
>> Collecting pip
>>   Using cached pip-7.1.2-py2.py3-none-any.whl
>> Installing collected packages: pip
>>   Found existing installation: pip 7.0.1
>> Uninstalling pip-7.0.1:
>>   Successfully uninstalled pip-7.0.1
>> Exception:
>> Traceback (most recent call last):
>>   File "C:\Python27-32\lib\site-packages\pip\basecommand.py", line 223,
>> in main
>> logger.debug('Exception information:', exc_info=True)
>>   File "C:\Python27-32\lib\site-packages\pip\commands\install.py",
>> line 297, in run
>> wb = WheelBuilder(
>>   File "C:\Python27-32\lib\site-packages\pip\req\req_set.py", line
>> 633, in install
>> for requirement in to_install:
>>   File "C:\Python27-32\lib\site-packages\pip\req\req_install.py", line
>> 734, in commit_uninstall
>>
>>   File "C:\Python27-32\lib\site-packages\pip\req\req_uninstall.py",
>> line 153, in commit
>> self.save_dir = None
>>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
>> line 49, in wrapped_f
>> return Retrying(*dargs, **dkw).call(f, *args, **kw)
>>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
>> line 212, in call
>> raise attempt.get()
>>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
>> line 247, in get
>> six.reraise(self.value[0], self.value[1], self.value[2])
>>   File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
>> line 200, in call
>> attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
>>   File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
>> 89, in rmtree
>> shutil.rmtree(dir, ignore_errors=ignore_errors,
>>   File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
>> rmtree(fullname, ignore_errors, onerror)
>>   File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
>> rmtree(fullname, ignore_errors, onerror)
>>   File "C:\Python27-32\lib\shutil.py", line 252, in rmtree
>> onerror(os.remove, fullname, sys.exc_info())
>>   File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
>> 101, in rmtree_errorhandler
>> # use the original function to repeat the operation
>> WindowsError: [Error 5] Access is denied:
>>
>> 'c:\\users\\pwatson\\appdata\\local\\temp\\pip-4nt07e-uninstall\\python27-32\\scripts\\pip.exe'
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
>
> sorry, you have windows.  Do you need to be admin?

>
> --
> Joel Goldstick
> http://joelgoldstick.com
>



-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread Zachary Ware
On Sat, Sep 26, 2015 at 1:13 PM,   wrote:
> After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip
> using pip fails. Am I doing this incorrectly? Any suggestions?

This is a limitation of Windows: you can't replace the executable that
you're currently running.  To work around this, do "python -m pip
install --upgrade pip" instead.  If you have the Python Launcher for
Windows installed (included with Python 3.3+), you can use in place of
'python' in that command, and be very sure about which python's pip is
being upgraded.

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