[issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin

2013-03-22 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Guess what, I hadn't read the thread on this python-dev yet :-(

--

___
Python tracker 

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



[issue17487] wave.Wave_read.getparams should be more user friendly

2013-03-22 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Hello, I signed the electronic contributor agreement (I received a mail with 
the final copy afterwards). Is there something else that I should do or that is 
the entire process?

--

___
Python tracker 

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



[issue17508] logging.config.ConvertingDict issue with MemoryHandler

2013-03-22 Thread Pierre Le Marre

Pierre Le Marre added the comment:

Thank you for the tip! I just try it, it works. This behavior is not 
documented, so it is quite confusing.
I try also to use ``collections.OrderedDict``, as a quick fix, but it does not 
work. It seems we need here a simple resolution order.

--

___
Python tracker 

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



[issue15392] Create a unittest framework for IDLE

2013-03-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue1747670] Limiting data copy in xmlrpclib

2013-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, str.join() already optimizes this case to avoid copies:

>>> s = "x" * 50
>>> id(s)
139712615414000
>>> id(''.join([s]))
139712615414000

--
nosy: +pitrou

___
Python tracker 

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



[issue1747670] Limiting data copy in xmlrpclib

2013-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I would close this as out of date, unless you have other suggestions to improve 
memory consumption.

--

___
Python tracker 

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



[issue17517] StringIO() does not behave like cStringIO() when given an array object

2013-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed, this is probably too late to fix, since it only affects 2.7. Calling 
StringIO / cStringIO with a non-str argument should probably have raised 
TypeError, for the sake of sanity.

--
nosy: +pitrou
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue15005] corrupted output from subprocess call under a trace

2013-03-22 Thread anatoly techtonik

anatoly techtonik added the comment:

This use case is actual for various kind of asynchronous operations.

--
title: trace corrupts return result on chained execution -> corrupted output 
from subprocess call under a trace

___
Python tracker 

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



[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik

Changes by anatoly techtonik :


--
title: corrupted output from subprocess call under a trace -> corrupted 
contents of stdout result from subprocess call under a trace

___
Python tracker 

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



[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik

anatoly techtonik added the comment:

I can't repeat this on Windows. Looks like it is a Linux issue, because of 
forks.

--

___
Python tracker 

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



[issue17514] Add the license to argparse.py

2013-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The whole Python distribution is licensed under the PSF license unless stated 
otherwise, so I'm not sure what you're complaining about? Just update your 
script so that it understand this simple matter. Besides I don't understand why 
you're complaining specifically about argparse.py.

Speaking personally, I wouldn't want license boilerplates to start cluttering 
every file in the Python source tree. They are an annoyance when opening and 
reading source files.

--
nosy: +pitrou

___
Python tracker 

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



[issue17514] Add the license to argparse.py

2013-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

That said if it's a simple one-liner I'm ok. You'll just have to wait for a 
core developer who's motivated enough to make such changes :-)

--

___
Python tracker 

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



[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

So, does this page report an issue with Python2, or Python3?

--

___
Python tracker 

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



[issue15797] bdist_msi does not pass -install/remove flags to install_script

2013-03-22 Thread Pierre Raybaut

Pierre Raybaut added the comment:

The submitted patch actually works (tested with Python 2.7.3 on Windows XP) and 
also fixes another bug: the installation script is executed when uninstalling 
(that feature is not implemented in current Python stable versions despite the 
mention in docstrings that install script should be executed at deinstallation).

--
nosy: +Pierre.Raybaut
versions: +Python 3.3

___
Python tracker 

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



[issue17518] urllib2 cannnot handle https and BasicAuth via Proxy.

2013-03-22 Thread masato

New submission from masato:

When urllib2 module is used, https connections to servers that BasicAuth is 
required, via proxies, can not be established properly.

Sample code:
import urllib2

def main():
url = "https://example.com/aplication/rpc";

proxy_support = urllib2.ProxyHandler({'http': 
'http://proxy.server.com:8080/','https': 'http://proxy.server.com:8080/'})

pass_mngr = urllib2.HTTPPasswordMgrWithDefaultRealm()
pass_mngr.add_password(None, url, 'user', 'password')
auth_handler = urllib2.HTTPBasicAuthHandler(pass_mngr)

opener = urllib2.build_opener(proxy_support,auth_handler)
req = urllib2.Request(url)
f = opener.open(req)
print f.read()


"opener.open" method throws an exception.

I found a similar case at http://bugs.python.org/issue7291. However, this issue 
indicates a case of authentication at a proxy server. In my case, the origin 
server uses basic authentication.

The origin server address is not set in Request URI in the https request in 
case of using proxy servers, because https request gets encripted with SSL when 
it passes through proxies.

urllib2 works well for the first on-going request and in-comming return. 
However, after the first in-comming return (401 code), urllib2 module sends a 
worng request that includes the origin server URL.

I suggest modification for set_proxy method in Request class.

Original code:
def set_proxy(self, host, type):
if self.type == 'https' and not self._tunnel_host:
self._tunnel_host = self.host
else:
self.type = type
self.__r_host = self.__original

self.host = host

As a value is already set to tunnel_host when the second out-going request is 
sent, "self.type == 'https' and not self._tunnel_host" is false.

Code suggested:
def set_proxy(self, host, type):
if self.type == 'https' and not self._tunnel_host:
self._tunnel_host = self.host
else:
self.type = type
if self.type != 'https':
self.__r_host = self.__original

self.host = host


regards.

--
components: Library (Lib)
messages: 184958
nosy: masato kawamura
priority: normal
severity: normal
status: open
title: urllib2 cannnot handle https and BasicAuth via Proxy.
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread Éric Piel

New submission from Éric Piel:

Since Python 2.6 there is the notion if abstract class (ABC). It could be 
useful to use it for test cases, but unittest doesn't support it. Typically, 
I'd like to test a bunch of classes which all should behave similarly (at least 
for some cases). So I'd like to have one abstract class containing many test 
cases, and a separate real tests classes which inherit from this abstract class.

Unfortunately, for now unittest tries to instantiate the abstract class, which 
fails. 

Note that I'm not the only one thinking of this, here is a mention of the same 
idea on stack overflow:
http://stackoverflow.com/questions/4566910/abstract-test-case-using-python-unittest

Attached are two small examples of test cases. test_abs.py shows what I think 
is a good usage of ABC, with unittest. It fails to run with this error:
TypeError: Can't instantiate abstract class VirtualTest with abstract methods 
important_num
fake_abc.py is typically what people end up doing for using abstract classes 
with unittests (that's what people used to do before ABC exists). It does work, 
but it's not really beautiful as VirtualTest uses self.assertGreater() and 
self.important_num which are not explicitly part of the class.

My guess is that the following patch to Lib/unittest/loader.py should be enough 
(but it's untested):
diff -r a2128cb22372 Lib/unittest/loader.py
--- a/Lib/unittest/loader.pyThu Mar 21 23:04:45 2013 -0500
+++ b/Lib/unittest/loader.pyFri Mar 22 12:22:46 2013 +0100
@@ -6,6 +6,7 @@
 import traceback
 import types
 import functools
+import inspect
 
 from fnmatch import fnmatch
 
@@ -74,7 +75,8 @@
 tests = []
 for name in dir(module):
 obj = getattr(module, name)
-if isinstance(obj, type) and issubclass(obj, case.TestCase):
+if (isinstance(obj, type) and issubclass(obj, case.TestCase) and
+not inspect.isabstract(test_class)):
 tests.append(self.loadTestsFromTestCase(obj))
 
 load_tests = getattr(module, 'load_tests', None)

--
components: Library (Lib)
files: test_abc.py
messages: 184959
nosy: Éric.Piel
priority: normal
severity: normal
status: open
title: unittest should not try to run abstract classes
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29544/test_abc.py

___
Python tracker 

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



[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread Éric Piel

Changes by Éric Piel :


Added file: http://bugs.python.org/file29545/fake_abc.py

___
Python tracker 

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



[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik

anatoly techtonik added the comment:

I can not repeat this neither on Python 2.7 nor on Python 3 on Windows Vista. 
Need to run this on a Linux system to confirm.

--

___
Python tracker 

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



[issue1747670] Limiting data copy in xmlrpclib

2013-03-22 Thread Gael Le Mignot

Gael Le Mignot added the comment:

Great that join does the optimisation by itself now, but the last issue of the 
patch (cleaning the _data array before calling f() so the memory of _data can 
be collected earlier) still seems meaningful today.

--

___
Python tracker 

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



[issue14979] pdb doc: Explain how to extend debugger instead of sending readers to the source

2013-03-22 Thread anatoly techtonik

anatoly techtonik added the comment:

A minimal example of debugger is needed, with the explanation how frame.f_trace 
is used by debuggers.

--
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik

anatoly techtonik added the comment:

Python 3 is not affected. Python 2.7, Linux only.

--

___
Python tracker 

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



[issue17509] Incorrect package version predicate parsing by distutils

2013-03-22 Thread ILja Orlovs

ILja Orlovs added the comment:

Whoops. Sorry.

My bad than.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

So the issue can be closed:

- subprocess was rewritten in C on Python3 for good reasons: it's wrong (and 
dangerous) to run Python code between fork() and exec(); this bug report is 
another example.

- This change is too large to be merged to 2.7.

- There is a backport available on pypi: 
https://pypi.python.org/pypi/subprocess32
Yes it's a distinct module, but it's possible to install it in place of the 
standard one if needed::

import sys
import subprocess32 as subprocess
sys.modules['subprocess'] = subprocess

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue17425] Update OpenSSL versions in Windows builds

2013-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Indeed. I hope to get to it later this evening.

--

___
Python tracker 

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



[issue13150] Most of Python's startup time is sysconfig

2013-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d174cb3f5b9e by Benjamin Peterson in branch '2.7':
backout 66e30c4870bb for breaking OSX (#13150)
http://hg.python.org/cpython/rev/d174cb3f5b9e

--

___
Python tracker 

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



[issue17487] wave.Wave_read.getparams should be more user friendly

2013-03-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I backed it out until it can be done without breaking OSX. d174cb3f5b9e

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue17487] wave.Wave_read.getparams should be more user friendly

2013-03-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Wrong issue, sorry.

--

___
Python tracker 

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



[issue17512] backport of the _sysconfigdata.py module (issue 13150) breaks the build on darwin

2013-03-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I backed it out until it can be done without breaking OSX. d174cb3f5b9e

--

___
Python tracker 

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



[issue17515] Add sys.setasthook() to allow to use a custom AST optimizer

2013-03-22 Thread Brett Cannon

Brett Cannon added the comment:

This is unnecessary. I added the source_to_code() method 
(http://docs.python.org/3.4/library/importlib.html#importlib.abc.SourceLoader.source_to_code)
 to loaders to explicitly handle this case.

--

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-22 Thread Charles-François Natali

Charles-François Natali added the comment:

Something bothers me:
"""
def wait(self, timeout=None):
if self._flag:
return True

self._cond.acquire()
"""

The _flag is checked without any lock held: although it won't be a
problem with CPython, a standard memory model (e.g. Java's one)
doesn't guarantee that reading _flag outside of the lock will return
the value most recently written to it (because of caching/hoisting, or
store buffers/invalidate queues at CPU level).

So in short, if wait() is called by a thread shortly after another
thread clear()ed it, the former thread might very well read _flag ==
True (while the later just set it to False) and return erroneously.

Now, it's probably being pedantic, especially because we lack a memory
model, but that bothers me.

Also, I'm not sure this is really a hot-path.

--

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-22 Thread Richard Oudkerk

Richard Oudkerk added the comment:

On 22/03/2013 3:19pm, Charles-François Natali wrote:
> The _flag is checked without any lock held: although it won't be a
> problem with CPython, a standard memory model (e.g. Java's one)
> doesn't guarantee that reading _flag outside of the lock will return
> the value most recently written to it (because of caching/hoisting, or
> store buffers/invalidate queues at CPU level).
>
> So in short, if wait() is called by a thread shortly after another
> thread clear()ed it, the former thread might very well read _flag ==
> True (while the later just set it to False) and return erroneously.

I was under the impression that dict access (and therefore attribute 
access for "simple" objects) was guaranteed to be atomic even in 
alternative implementations like Jython and IronPython.

Is this not a language guarantee?

--

___
Python tracker 

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



[issue17508] logging.config.ConvertingDict issue with MemoryHandler

2013-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8ae1c28445f8 by Vinay Sajip in branch '2.7':
Issue #17508: Handled out-of-order handler configuration correctly.
http://hg.python.org/cpython/rev/8ae1c28445f8

New changeset ea00ae184d60 by Vinay Sajip in branch '3.2':
Issue #17508: Handled out-of-order handler configuration correctly.
http://hg.python.org/cpython/rev/ea00ae184d60

New changeset d674bbbed333 by Vinay Sajip in branch '3.3':
Issue #17508: Merged fix from 3.2.
http://hg.python.org/cpython/rev/d674bbbed333

New changeset b916efe30d77 by Vinay Sajip in branch 'default':
Closes #17508: Merged fix from 3.3.
http://hg.python.org/cpython/rev/b916efe30d77

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-22 Thread Charles-François Natali

Charles-François Natali added the comment:

> I was under the impression that dict access (and therefore attribute
> access for "simple" objects) was guaranteed to be atomic even in
> alternative implementations like Jython and IronPython.
>
> Is this not a language guarantee?

AFAICT there's no such guarantee.
But even if dict access/assignment was guaranteed to be atomic, this
wouldn't solve the visibility issue.

--

___
Python tracker 

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



[issue17509] Incorrect package version predicate parsing by distutils

2013-03-22 Thread Éric Araujo

Éric Araujo added the comment:

Thank you for taking the time to report this.  Fixing the docs to discourage 
using the broken requires seems even more important now.

--
stage:  -> committed/rejected

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> So in short, if wait() is called by a thread shortly after another
> thread clear()ed it, the former thread might very well read _flag ==
> True (while the later just set it to False) and return erroneously.

Would that be erroneous? It can already happen because of thread switches:
e.g. wait() reads True from the flag, then releases the internal lock;
another thread gets scheduled in, takes the lock and resets the event;
the original thread is resumed and the calling function sees True as
the wait() return value even though the event was reset in-between.

> Now, it's probably being pedantic, especially because we lack a
> memory
> model, but that bothers me.

As for the memory model, Jeffrey had written a PEP draft years ago:
http://code.google.com/p/unladen-swallow/wiki/MemoryModel

Unfortunately I can't find the corresponding reference in the python-dev
archives again.

That said, I agree the performance improvement is probably not important
here. It was just drive-by optimization on my part :-)

--
nosy: +jyasskin

___
Python tracker 

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



[issue17515] Add sys.setasthook() to allow to use a custom AST optimizer

2013-03-22 Thread STINNER Victor

STINNER Victor added the comment:

> This is unnecessary.

Your change only concerns imports. eval() and compile() cannot be
hooked using your method.

2013/3/22 Brett Cannon :
>
> Brett Cannon added the comment:
>
> This is unnecessary. I added the source_to_code() method 
> (http://docs.python.org/3.4/library/importlib.html#importlib.abc.SourceLoader.source_to_code)
>  to loaders to explicitly handle this case.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue17520] Except(ValueError) on Integer returns the input value as 1

2013-03-22 Thread Rabcor

New submission from Rabcor:

I'm an amateur at best, but the issue is that if i do this.
---
try:
num = int(input('Write a number-->'))
except(ValueError) as noint:
print('You did not write an integer')
---
num will become 1 if i write an invalid value (like a) on the input line.

In that example code i made it will show you that. the code should be readable 
even if the language of what is going to be printed is not english, it converts 
999 to 1 fhr bill, 4 hr coins, 1 fty coin, 4 ten coins, 1 fiv coin and 4 coins

If you need context.

I commented out my temporary solution to it (turning num into 0.1 as that's not 
a valid integer and i'm only working with integers.)

--
components: Tkinter
files: Heimaverkefni5.py
messages: 184979
nosy: rabcor
priority: normal
severity: normal
status: open
title: Except(ValueError) on Integer returns the input value as 1
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file29546/Heimaverkefni5.py

___
Python tracker 

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



[issue15917] hg hook to detect unmerged changesets

2013-03-22 Thread Ezio Melotti

Ezio Melotti added the comment:

> Wouldn't it be simpler to find all topological heads in the new csets
> (a topological head is a cset without any child), and check that none
> of them is on a 3.* branch?

Indeed -- I was looking at this again and it occurred to me that checking that 
the only two topological heads are 2.7 and default would be simpler, which is 
basically the same thing you were suggesting.

I couldn't find a way to get the list of topological heads on active and 
non-closed heads using the `hg *` commands, but it shouldn't be difficult to do 
it from the API.
FWIW, `hg heads --topo` also includes closed heads that have never been merged 
with the other branches (e.g. 2.0, 2.1, etc.).  `hg branches` lists all the 
non-closed branches, and, among them, the one that are not "inactive" should be 
the ones with a topological head.  Therefore this should boil down to either a 
set intersection between open branches and topological heads, or a set 
difference between open branches and inactive branches.

Once the hook detects an extra head, it could try to figure out what's wrong 
and suggest a solution.

--

___
Python tracker 

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



[issue17520] Except(ValueError) on Integer returns the input value as 1

2013-03-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Hi,
The Python bug tracker is not designed to get help.
Please ask your questions on the python-list mailing list, or the 
comp.lang.python newsgroup.

A hint though: when there is an exception the "num = " part is not even 
executed, so num contains its previous value.

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue17521] fileConfig() disables any previously-used "named" loggers, even when getLogger() is called again.

2013-03-22 Thread Bob Igo

New submission from Bob Igo:

I am aware of the described behavior of fileConfig() when 
disable_existing_loggers is True, but what I am seeing happens whether 
disable_existing_loggers is True or False, and it also affects loggers obtained 
via future, fresh calls to getLogger(name).

Here's an example where disable_existing_loggers is True, but as I said, the 
same happens when it's False:

>>> import logging.config
>>> logging.config.fileConfig('unit_test_logging.conf')
>>> logger = logging.getLogger("foo")
>>> logger.critical("test")
2013-03-21 23:33:04,621fooCRITICALtest
>>> logging.config.fileConfig('unit_test_logging.conf')
>>> logger = logging.getLogger("foo")
>>> logger.critical("test")
>>>

Note that the final logging attempt silently fails. The thing that appears to 
break logging for ever is the second fileConfig() call, and not the following 
getLogger() call.

I can get a fresh logger with a different name and use it. (Continued from the 
above session):

>>> logger = logging.getLogger("bar")
>>> logger.critical("test")
2013-03-21 23:38:35,613barCRITICALtest


This issue does not affect the root logger, when no name is given to 
getLogger():

>>> import logging.config
>>> logging.config.fileConfig('unit_test_logging.conf')
>>> logger = logging.getLogger()
>>> logger.critical("test")
2013-03-22 11:49:29,957rootCRITICALtest
>>> logging.config.fileConfig('unit_test_logging.conf')
>>> logger = logging.getLogger()
>>> logger.critical("test")
2013-03-22 11:49:44,966rootCRITICALtest


However, it _does_ affect the root logger when "root" is given as the name to 
getLogger():

>>> import logging.config
>>> logging.config.fileConfig('unit_test_logging.conf')
>>> logger = logging.getLogger("root")
>>> logger.critical("test")
2013-03-22 12:42:49,742 rootCRITICALtest
>>> logging.config.fileConfig('unit_test_logging.conf')
>>> logger = logging.getLogger("root")
>>> logger.critical("test")
>>> 

I can attach the logging config file if desired, but it looks like the issue is 
unrelated. I will say that I'm relying on the root logger for all my logging, 
but that I use a different name to differentiate how the log is written.

--
components: Library (Lib)
messages: 184982
nosy: Bob.Igo
priority: normal
severity: normal
status: open
title: fileConfig() disables any previously-used "named" loggers, even when 
getLogger() is called again.
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2013-03-22 Thread Steve Dower

Steve Dower added the comment:

This becomes more of an issue since VC++ 2008 Express is no longer available 
for download (unless you're an MSDN subscriber), though the compiler itself is 
still available as part of 
http://www.microsoft.com/en-us/download/details.aspx?id=3138 (for VC9)

I'll admit I haven't read all the discussion on other issues that relates to 
this, but I see no reason why the following maps couldn't be tried if 
vcvarsall.bat is not found. This would at least handle more cases and as far as 
I can tell is the only realistic option.

VCVARS_TO_WINSDK_BAT = {
'x86' : 'bin\\vcvars32.bat',
'amd64' : 'bin\\vcvars64.bat',
'x86_amd64' : 'bin\\vcvarsx86_amd64.bat',
'x86_ia64' : 'bin\\vcvarsx86_ia64.bat',
}

VCVARS_TO_VS_BAT = {
'x86' : 'bin\\vcvars32.bat',
'amd64' : 'bin\\amd64\\vcvars64.bat',
'x86_amd64' : 'bin\\x86_amd64\\vcvarsx86_amd64.bat',
'x86_ia64' : 'bin\\x86_ia64\\vcvarsx86_ia64.bat',
}

I have no idea why, but the SDK installs the batch files into different 
locations. VCVARS_TO_VS_BAT should be unnecessary, since vcvarsall.bat should 
always exist in this case, but I see no harm in having more fallback options.

All of these scripts (at least for VC9, VC10 and VC11) will ignore extra 
arguments.

--
nosy: +steve.dower

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2013-03-22 Thread Steve Dower

Steve Dower added the comment:

('ignore extra arguments' meaning they could be returned from find_vcvarsall() 
and nobody will notice. Though it doesn't bother me if the fallback is handled 
at a higher level.)

--

___
Python tracker 

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



[issue17522] Add api PyGILState_Check

2013-03-22 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson:

Here is a function that is used by specialized part of our code.  Often it is 
useful for e.g. IO callbacks or memory hooks to know if the GIL is in place in 
order to know if certain things can be done or not.
Putting this here to see if anyone has strong opinions against adding this.

--
components: Interpreter Core
files: gilcheck.patch
keywords: patch
messages: 184985
nosy: kristjan.jonsson
priority: normal
severity: normal
status: open
title: Add api PyGILState_Check
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29547/gilcheck.patch

___
Python tracker 

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



[issue17515] Add sys.setasthook() to allow to use a custom AST optimizer

2013-03-22 Thread Brett Cannon

Brett Cannon added the comment:

And that's fine as it allows for more explicit control over what gets 
optimized. Basically if there is a global hook directly into the compiler there 
needs to be more control over detecting it's being optimized, what to do about 
.pyo files, etc. At least at the loader level it's much more modular and 
controlled as to what will and will not get the optimizations.

So if you want to pursue this I think there needs to be more thought than just 
a global sys hook for this sort of thing.

--

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2013-03-22 Thread paul j3

paul j3 added the comment:

This patch makes two changes to argparse.py ArgumentParser._parse_optional()

- accept negative scientific and complex numbers

- add the args_default_to_positional parser option

_negative_number_matcher only matches integers and simple floats.  This
is fine for detecting number-like options like '-1'.  But as used in
_parse_optional() it prevents strings like '-1e4' and '-1-4j' from being
classed as positionals (msg184174).  In this patch it is replaced with

try:
complex(arg_string)
return None
except ValueError:
pass

Immediately before this number test I added

if self.args_default_to_positional:
return None

to implement the idea suggested in msg169978.

I added the args_default_to_positional parser option to the documentation, 
along with some notes on its implications in the `Arguments containing -` 
section.  A few of the examples that I added use scientific or complex numbers.

I tested test_argparse.py with args_default_to_positional=True default.  A 
number of the 'failures' no longer failed.
class TestDefaultToPositionalWithOptionLike illustrates this in the
Option-Like situation.

The only 'successes' to fail were in the TestAddSubparsers case.  There
an argument string  '0.5 -p 1 b -w 7' produced 'wrong choice' error,
since the '-p' was assumed to be a commands choice, rather than an unknown 
optional.

I translated the TestStandard cases from the optparse test file.  argparse ran 
most of these without problem.  The value of args_default_to_positional makes 
no difference.  There a few optparse tests that use '--'  or a valid optional 
as positional that argparse does not handle.

--
keywords: +patch
Added file: http://bugs.python.org/file29548/final.patch

___
Python tracker 

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



[issue17487] wave.Wave_read.getparams should be more user friendly

2013-03-22 Thread R. David Murray

R. David Murray added the comment:

Claudiu: that's the entire process.  Now we just wait a day or two until the 
confirmation arrives from the PSF that they have accepted it (you'll get an '*' 
next to your name here in the tracker when that happens).

--

___
Python tracker 

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



[issue10212] struct.unpack and cStringIO.StringIO don't support new buffer

2013-03-22 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue12098] Child process running as debug on Windows

2013-03-22 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
status: open -> closed

___
Python tracker 

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



[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-22 Thread jan matejek

jan matejek added the comment:

Ismail, the sem_open thing is because in autobuild you don't get /proc or 
somesuch - it's a problem of our buildsystem, otherwise the test passes.

I can reproduce the failure in autobuild, but not separately yet. Will keep you 
posted, signs point to yet another misfeature of our buildsystem, but maybe 
it's something with test ordering...

--
nosy: +matejcik

___
Python tracker 

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



[issue10211] BufferObject doesn't support new buffer interface

2013-03-22 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2013-03-22 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

fixed for 2.7

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-22 Thread Ismail Donmez

Ismail Donmez added the comment:

Jan, thanks for the excellent explanation. We can close this bug I guess then?

--

___
Python tracker 

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



[issue15917] hg hook to detect unmerged changesets

2013-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

hg log -r 'head()-parents(merge())-closed()' --template '{branch}\n'

works for me. Alternatively,

hg log -r 'head()-parents(merge())-closed()-branch(2.7)-branch(default)'

should come out empty.

--

___
Python tracker 

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



[issue17523] Additional tests for the os module.

2013-03-22 Thread Will Weaver

New submission from Will Weaver:

I've reorganized and added some os module tests.

I split the makedirs tests into additional test methods that test one thing 
instead of a lot of different things. I added additional test coverage for a 
trailing '/'.

I've also added the same test for removedirs.

I reorganized the walk tests so that they actually run. Before there was only a 
setUp and a tearDown but no actual tests so the tests would not actually run.

Lastly, I added tests for renames as there weren't any before.

--
components: Tests
files: mywork.patch
keywords: patch
messages: 184992
nosy: willweaver
priority: normal
severity: normal
status: open
title: Additional tests for the os module.
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29549/mywork.patch

___
Python tracker 

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



[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-22 Thread jan matejek

jan matejek added the comment:

Not just yet, please. I can now reproduce the test_subprocess failures outside 
autobuild too. Interestingly, it's the reverse here: test_subprocess passes 
when /proc is not present, but fails when it is.

I'm pretty sure that we hijacked a completely different bug with a similar 
symptom :e) but whatever. I'll just go ahead and debug this.

--

___
Python tracker 

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



[issue16123] IDLE - deprecate running without a subprocess

2013-03-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

> The issue is usually with firewalls, security software, socket issues, etc

Surely nowadays there are better ways than sockets to communicate between 
processes? Pipes?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-22 Thread Mark Dickinson

Mark Dickinson added the comment:

Charles-François: would your objections also apply to the current 
implementation of 'is_set'?

--

___
Python tracker 

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



[issue17438] json.load docs should mention that it always return unicode

2013-03-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17462] argparse FAQ: how it is different from optparse

2013-03-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17473] -m is not universally applicable

2013-03-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17514] Add the license to argparse.py

2013-03-22 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe added the comment:

@Antoine OP is interesting in only that file. Why not just add that single line 
at the top (at least for 2.7, and 3.3+)?

--
nosy: +tshepang

___
Python tracker 

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



[issue15392] Create a unittest framework for IDLE

2013-03-22 Thread Francisco Martín Brugué

Changes by Francisco Martín Brugué :


--
nosy: +francismb

___
Python tracker 

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



[issue17516] Dead code should be removed

2013-03-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17524] Problem to run a method

2013-03-22 Thread Ali Massah Kiani

New submission from Ali Massah Kiani:

when i run attached code python.exe exit with code:

when i trace this code problem was the this method :
mat = cv.GetMat(AviFile)

and problem is, not error or exeption rises
this problem is for python or opencv?
thanks.

--
components: Library (Lib)
files: form.py
messages: 184998
nosy: aligoglos
priority: normal
severity: normal
status: open
title: Problem to run a method
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file29550/form.py

___
Python tracker 

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



[issue12466] sporadic failures of test_close_fds and test_pass_fds in test_subprocess

2013-03-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

fyi - subprocess uses /proc to get a list of open fd's in the child process 
before exec when possible.  search for FD_DIR in 
http://hg.python.org/cpython/file/d674bbbed333/Modules/_posixsubprocess.c

--

___
Python tracker 

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



[issue17521] fileConfig() disables any previously-used "named" loggers, even when getLogger() is called again.

2013-03-22 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-22 Thread Richard Oudkerk

Richard Oudkerk added the comment:

On 22/03/2013 3:31pm, Charles-François Natali wrote:
>> I was under the impression that dict access (and therefore attribute
>> access for "simple" objects) was guaranteed to be atomic even in
>> alternative implementations like Jython and IronPython.
>>
>> Is this not a language guarantee?
>
> AFAICT there's no such guarantee.
> But even if dict access/assignment was guaranteed to be atomic, this
> wouldn't solve the visibility issue.

"Atomic" was maybe the wrong word.

For implementations with a GIL the GIL ensures there are no visibility 
issues.

According to Antoine's link, Jython uses ConcurrentHashMap for its 
dicts, and IronPython uses a locked map.  So in those cases also there 
are no visibility issues.

--

___
Python tracker 

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



[issue17524] Problem to run a method

2013-03-22 Thread Brett Cannon

Brett Cannon added the comment:

It's probably opencv as Python never exits blindly like that without raising an 
exception or flat-out crashing.

--
nosy: +brett.cannon
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue17522] Add api PyGILState_Check

2013-03-22 Thread Brett Cannon

Brett Cannon added the comment:

Seems fine to me

--
nosy: +brett.cannon

___
Python tracker 

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



[issue17389] Optimize Event.wait()

2013-03-22 Thread Charles-François Natali

Charles-François Natali added the comment:

> Would that be erroneous? It can already happen because of thread switches:

That's not really the same thing. wait() would return True, which is
the right thing to do since the Event has been set at some point.
Here, it would make it possible for wait() to return immediately after
another thread clear()ed the Event, which would be just wrong.

> Charles-François: would your objections also apply to the current 
> implementation of 'is_set'?

Yes (in OpenJDK CountDownLatch implementation, a similar method uses a
volatile variable to guarantee memory visibility.)

> For implementations with a GIL the GIL ensures there are no visibility
> issues.

Agreed.

> According to Antoine's link, Jython uses ConcurrentHashMap for its
dicts, and IronPython uses a locked map.  So in those cases also there
are no visibility issues.

Agreed.

But the question remains whether that's something which is part of the
memory model: I'm skeptical about this, since it would pretty much
imply memory barriers everywhere and disable a whole class of
caching/hoisting, which would just kill performance.

--

___
Python tracker 

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



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2013-03-22 Thread Todd Rovito

Changes by Todd Rovito :


--
nosy: +Todd.Rovito

___
Python tracker 

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



[issue10359] ISO C cleanup

2013-03-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

It looks like someone has already done the Python-ast cleanup and I don't 
understand the point of the distutils test one or the libffi one (ffi has been 
updated but it's trivial and would still apply).

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue17344] checking size of size_t... configure: error:

2013-03-22 Thread Joe Hsiao

Joe Hsiao added the comment:

Thanks, Ned. What you suggested is working.
Apologize not seeing the Mac folder.

--

___
Python tracker 

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



[issue17425] Update OpenSSL versions in Windows builds

2013-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3d76d0cc by Martin v. Loewis in branch '2.7':
Issue #17425: Build against openssl 0.9.8y on Windows.
http://hg.python.org/cpython/rev/3d76d0cc

--
nosy: +python-dev

___
Python tracker 

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



[issue10359] ISO C cleanup

2013-03-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I'm not inclined to apply the patch to ffi unless someone can demonstrate that 
it is an actual problem.  given that nobody has applied it to *upstream* libffi 
(since we just pulled in v3.0.13 earlier this week) I doubt it matters to 
anyone.

everything here looks complete.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17425] Update OpenSSL versions in Windows builds

2013-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

0.9.8y seems to work fine on 2.7; I'll do the other ones later.

--

___
Python tracker 

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



[issue17425] Update OpenSSL versions in Windows builds

2013-03-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Thank you!

--

___
Python tracker 

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



[issue13733] Change required to sysconfig.py for Python 2.7.2 on OS/2

2013-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

Given the comment in msg150839 "I think OS/2 portability fixes should probably 
target 3.3 instead." and seeing that OS/2 is no longer supported 
http://docs.python.org/3/whatsnew/3.3.html#unsupported-operating-systems can 
this be closed?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue17521] fileConfig() disables any previously-used "named" loggers, even when getLogger() is called again.

2013-03-22 Thread Vinay Sajip

Vinay Sajip added the comment:

The logger obtained by logging.getLogger('root') is not the root logger, but a 
child of the root logger.

Please post your configuration, ideally the smallest version which allows you 
to reproduce the failure.

--

___
Python tracker 

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



[issue10359] ISO C cleanup

2013-03-22 Thread Éric Araujo

Éric Araujo added the comment:

> I don't understand the point of the distutils test one

Making the test not fail wrongly with some compilers.  This was committed.

--
stage: patch review -> committed/rejected

___
Python tracker 

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



[issue17522] Add api PyGILState_Check

2013-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

You probably want to add some docs to c-api/init.rst.

--
nosy: +pitrou

___
Python tracker 

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



[issue17525] os.getcwd() fails on cifs share

2013-03-22 Thread David Cuddihy

New submission from David Cuddihy:

Calls to os.getcwd() can fail if issued from a cifs-mounted directory once any 
of the files or subdirectories have been changed remotely.  To recreate this: 
on Linux, mount a windows share using the mount.cifs command.  cd to the share 
and run python.   

Python 2.7.3 (default, Jul 24 2012, 10:05:38)
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license for more information.
>>> import os
>>> print os.getcwd()
 /home/user/share
>>> exit()

That works.  Now, on the host machine, change a file in the current directory 
and save it.  The unix 'pwd' still works.  But now:
>>> import os
>>> print os.getcwd()
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 2] No such file or directory
>>>

Even though the unix 'pwd' and 'ls' commands still work, so I know my share is 
still accessible.

If I umount and then remount the share, the problem goes away until a file is 
changed remotely.

I'm running this on Fedora 17.

--
messages: 185014
nosy: dcuddihy
priority: normal
severity: normal
status: open
title: os.getcwd() fails on cifs share
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue15005] corrupted contents of stdout result from subprocess call under a trace

2013-03-22 Thread anatoly techtonik

anatoly techtonik added the comment:

And how to find all such issues for Python 2 that people need to be aware of in 
this tracker?

--

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2013-03-22 Thread Steve Dower

Steve Dower added the comment:

I've dug deeper into VC10 and things are even worse there - without VS 
installed I don't think there's any way for distutils to work without 
completely replacing query_vcvarsall() (or msvc9compiler, for that matter).

I'm willing to write such a replacement, assuming I can get permission from my 
management. But I'd rather not do it if someone else is already working on it.

--

___
Python tracker 

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



[issue10211] BufferObject doesn't support new buffer interface

2013-03-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
stage:  -> committed/rejected

___
Python tracker 

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



[issue10212] struct.unpack and cStringIO.StringIO don't support new buffer

2013-03-22 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
stage:  -> committed/rejected

___
Python tracker 

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



[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread R. David Murray

R. David Murray added the comment:

I leave it to Michael to decide if your suggestion is a good addition :)

I personally don't see anything wrong with fake_abc.py...the stdlib test suite 
uses that idom extensively.  Other developers insist it should be called a 
"mixin" instead of a base class, but I don't see the point of the distinction 
myself.

If you want an ABC so that certain required methods are supplied by the actual 
TestCases, you could omit TestCase in the ABC and only supply it in the actual 
TestCase.  I'm guessing you will find that ugly too :)

--
nosy: +michael.foord, r.david.murray

___
Python tracker 

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



[issue12207] Document ast.PyCF_ONLY_AST

2013-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

PyCF_ONLY_AST is defined in pythonrun.h and referenced in bltinmodule.c, 
Python-ast.c and pythonrun.c.  Should it be documented or not?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue17521] fileConfig() disables any previously-used "named" loggers, even when getLogger() is called again.

2013-03-22 Thread Bob Igo

Bob Igo added the comment:

Any configuration I tried still generates the bug, but here's a pared-down 
config file:

[loggers]
keys=root

[handlers]
keys=screen

[formatters]
keys=

[logger_root]
level=DEBUG
handlers=screen

[handler_screen]
level=DEBUG
class=StreamHandler
args=(sys.stdout,)
formatter=

--

___
Python tracker 

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



[issue16758] IDLE SubprocessStartupError

2013-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

Can this be closed as a duplicate of #10722 ?

--
nosy: +BreamoreBoy
title: SubprocessStartupError -> IDLE SubprocessStartupError

___
Python tracker 

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



[issue14101] example function in tertools.count docstring is misindented

2013-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

As this is a trivial patch could it be applied please?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue17519] unittest should not try to run abstract classes

2013-03-22 Thread Michael Foord

Michael Foord added the comment:

As David says, the current workaround is to provide a mixin (base) class that 
inherits from object. Because this doesn't inherit from TestCase there is no 
confusion.

We *may* add a class marker that allows you to provide TestCase subclasses that 
won't be run. I don't think we'll do this with the abstract class machinery as 
it is additional complication for no benefit.

--
assignee:  -> michael.foord
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed
versions:  -Python 2.7, Python 3.3

___
Python tracker 

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



[issue504219] locale.resetlocale is broken

2013-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

Can we simply document that getpreferredencoding should be used instead as 
stated in msg8781 ?  Should getdefaultlocale be earmarked for deprecation?

--

___
Python tracker 

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



[issue15392] Create a unittest framework for IDLE

2013-03-22 Thread Nick Coghlan

Nick Coghlan added the comment:

I'll start with a bit of philosophical guidance :)

1. As much as possible, push logic testing down into the non-GUI tests. Where 
unittest.mock can help here is when you have a piece of code to test that is 
*almost* independent of the GUI, but needs to call an API to either get input 
from the user or to send something to the screen. unittest.mock can then be set 
up to intercept that call, either to check that it happened as expected 
(display operations) or to provide a predetermined answer (input operations).

2. For the GUI tests, unittest.mock is likely to be most useful in providing 
predetermined input. There's only so much you can do with this, it's ultimately 
about ensuring that the code tested against mocked out APIs in the lower level 
tests at least doesn't throw exceptions when tested against the real APIs. 
Proper GUI testing is actually a much harder test automation problem, so it 
probably makes sense to focus on the non-GUI tests for now.

--

___
Python tracker 

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



[issue17526] inspect.findsource raises undocumented error for code objects with empty filename

2013-03-22 Thread Nils Bruin

New submission from Nils Bruin:

It would seem reasonable that an empty filename would be a legitimate way of 
indicating that a code object does not have a corresponding source file. 
However, if one does that then inspect.findsource raises an unexpected 
IndexError rather than the documented IOError.

This seems due to the fix introduced on issue9284

Python 3.2.3 (default, Jun  8 2012, 05:40:07) 
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> C=compile("print(1)","","single")
>>> D=compile("print(1)","","single")
>>> inspect.findsource(C)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.2/inspect.py", line 547, in findsource
raise IOError('could not get source code')
IOError: could not get source code
>>> inspect.findsource(D)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.2/inspect.py", line 537, in findsource
if not sourcefile and file[0] + file[-1] != '<>':
IndexError: string index out of range

--
components: Library (Lib)
messages: 185025
nosy: Nils.Bruin
priority: normal
severity: normal
status: open
title: inspect.findsource raises undocumented error for code objects with empty 
filename
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2013-03-22 Thread Todd Rovito

Todd Rovito added the comment:

Made minor modifications to Roger's Terminal.py to get the extension to work 
with Python 3.4.  This is an excellent extension as a user can toggle it on/off 
from the Options menu. The up/down arrow keys now allow a user to scroll 
through history but the meta-n meta-p keys still work offering the best of both 
worlds.  If a user wants to scroll around the screen with the arrow keys simply 
turn off the extension from the option bar and start moving the cursor with the 
arrow keys.  Excellent work Roger!

-Changed the original variable from enabled to enable to match other extensions
-Tested it on Mac OS X with 3.4 and it works PERFECT!
-Added a small if statement to pull in the right tkinter import based on 
sys.version

--
Added file: 
http://bugs.python.org/file29551/2704IDLEMakeShellBehaveLikeTerminalFor3dot4.patch

___
Python tracker 

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



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2013-03-22 Thread Todd Rovito

Todd Rovito added the comment:

I tested the patch on Linux CentOS 6.x and it seems to work.  Now if we could 
only get somebody to test on Windows?

--

___
Python tracker 

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



[issue17505] email.header.Header.__unicode__ does not decode header

2013-03-22 Thread Hrvoje Nikšić

Hrvoje Nikšić added the comment:

Thanks for pointing out the make_header(decode_header(...)) idiom, which I was 
indeed not aware of.  It solves the problem perfectly.

I agree that it is a doc bug.  While make_header is documented on the same 
place as decode_header and Header itself, it is not explained *why* I should 
call it if I already have in hand a perfectly valid Header instance.  
Specifically, it is not at all clear that while unicode(h) and 
unicode(make_header(decode_header(h)) will return different things -- I would 
have expected make_header(decode_header(h)) to return an object 
indistinguishable from h.

Also, the policy=default parameter in Python 3 sounds great, it's exactly what 
one would expect.

--

___
Python tracker 

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