[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-07-10 Thread Michael Foord

Michael Foord added the comment:

I'd like to review this properly before committing it. I agree it solves a real 
problem and your new patch looks good.

--

___
Python tracker 

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



[issue6742] Embedding python into shared library crash on AIX

2013-07-10 Thread Christian Heimes

Changes by Christian Heimes :


--
status: open -> languishing

___
Python tracker 

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



[issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy.

2013-07-10 Thread Christian Heimes

Christian Heimes added the comment:

The code has changed considerable since you have created the patch. Is this 
still an issue for Python 3.3?

--
nosy: +christian.heimes
status: open -> languishing
versions: +Python 3.4

___
Python tracker 

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



[issue2123] ctypes pointer not always keeping target alive

2013-07-10 Thread Christian Heimes

Changes by Christian Heimes :


--
status: open -> languishing
versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue18352] collections.Counter with added attributes are not deepcopied properly.

2013-07-10 Thread Vajrasky Kok

Vajrasky Kok added the comment:

The question is whether we should give the freedom to user to add dynamic 
attribute to Counter object.

Is this freedom has any practicality? Why do we want to add dynamic attributes 
to Counter object?

Decimal object does not have this freedom.

>>> from decimal import Decimal
>>> z = Decimal('1.0')
>>> z.foo = 'a'
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'decimal.Decimal' object has no attribute 'foo'

Actually I am not really sure about this. Maybe someone knows the answer.

--
nosy: +vajrasky

___
Python tracker 

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



[issue15859] PyUnicode_EncodeFSDefault win32 inconsistancy.

2013-07-10 Thread STINNER Victor

STINNER Victor added the comment:

> Is this still an issue for Python 3.3?

Yes.

--

___
Python tracker 

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



[issue18421] Refactor call_with_frame() function of pyexpat.c

2013-07-10 Thread STINNER Victor

New submission from STINNER Victor:

Modules/pyexpat.c contains a call_with_frame() function which uses many 
low-level attributes like tstate->c_profilefunc. I don't think that pyexpat.c 
is the best place for such function, it should be moved to Python/ceval.c.

Except the call to XML_StopParser(self->itself, XML_FALSE); on failure, the 
code doesn't look to be specific to (py)expat.

--
components: XML
messages: 192796
nosy: christian.heimes, fdrake, haypo
priority: normal
severity: normal
status: open
title: Refactor call_with_frame() function of pyexpat.c
versions: Python 3.4

___
Python tracker 

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



[issue18408] Fixes crashes found by pyfailmalloc

2013-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f730c045f5f by Victor Stinner in branch 'default':
Issue #18408: Fix call_exc_trace(): if the traceback is NULL, use None when
http://hg.python.org/cpython/rev/4f730c045f5f

--

___
Python tracker 

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



[issue18360] Won't install. Keeps telling me DLL is missing.

2013-07-10 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I'm pretty sure the problem is the one reported in

http://superuser.com/questions/478631/dll-could-not-be-run-for-msi-installers

The solution/work-around is to give full access to Everyone in the Temp folder.

Please report whether this works.

--

___
Python tracker 

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



[issue18422] is_package missing so can't use -m

2013-07-10 Thread andrew cooke

New submission from andrew cooke:

Using python 3.3, if I try to run __main__ I see this error:

Traceback (most recent call last):  
  File "/usr/local/lib/python3.3/runpy.py", line 140, in _run_module_as_main
mod_name, loader, code, fname = _get_module_details(mod_name)   
  File "/usr/local/lib/python3.3/runpy.py", line 105, in _get_module_details
if loader.is_package(mod_name): 
AttributeError: 'NamespaceLoader' object has no attribute 'is_package'  

My directory structure is:

> tree .
.
├── README.md
├── src
│   └── simplessl
│   ├── ca.py
│   ├── __main__.py
│   ├── req.py
│   └── utils.py
└── ssl.iml

i assume this is related to http://bugs.python.org/issue18058 but don't 
understand why this is not a bugfix that can be back-ported.  this appears to 
be a bug to me...

--
components: Installation
messages: 192799
nosy: acooke
priority: normal
severity: normal
status: open
title: is_package missing so can't use -m
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



[issue18422] is_package missing so can't use -m

2013-07-10 Thread Christian Heimes

Christian Heimes added the comment:

You can't edit posts. :)

I was going to ask how you are running __main__ but you were faster than me.

--
assignee:  -> brett.cannon
nosy: +brett.cannon, christian.heimes
type:  -> behavior
versions: +Python 3.4

___
Python tracker 

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



[issue18422] is_package missing so can't use -m

2013-07-10 Thread andrew cooke

andrew cooke added the comment:

can't see how to edit posts, so adding as a comment, this is what triggers the 
bug:

> PYTHONPATH=src python -m simplessl

--

___
Python tracker 

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



[issue15792] Fix compiler options for x64 builds on Windows

2013-07-10 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Just to note that, as it stands, these wrongly assigned options account for 28 
of the 216 warnings (or 13%) currently emitted.  This is just one easy step 
towards a warning-free 64-bit Windows build.

It would be nice to get Win64 to be one of the warning-free platforms (see 
msg63893 of issue1616).

--

___
Python tracker 

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



[issue18422] is_package missing so can't use -m

2013-07-10 Thread Brett Cannon

Brett Cannon added the comment:

The solution from issue #18058 can't be backported because it would expose a 
new public API on the NamespaceLoader class. It would also introduce new 
functionality which would differ between Python 3.3.2 and Python 3.3.3 which 
can't really be classified as a bugfix since it's new functionality that didn't 
exist previously.

You're also not losing any abilities by not having this in Python 3.3. All it 
means is that the status quo holds compared to Python 3.2 in that normal 
packages are the only way to execute a package with __main__ defined, while 
Python 3.4 gains the ability to also support namespace packages.

Because of all of these points, I'm closing this issue as rejected (sorry; I 
know it would be handy to have but I just can't justify it).

--
components: +Library (Lib) -Installation
dependencies: +Define is_package for NamespaceLoader
resolution:  -> rejected
status: open -> closed
versions:  -Python 3.4

___
Python tracker 

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



[issue18423] Document limitations on -m

2013-07-10 Thread andrew cooke

New submission from andrew cooke:

Apparently the limited support for -m is standard behaviour - see 
http://bugs.python.org/issue18422 - but it's not documented at 
http://docs.python.org/3/using/cmdline.html#cmdoption-m

That should say, somewhere, that it only applies to leaf modules and packages.

--
assignee: docs@python
components: Documentation
messages: 192804
nosy: acooke, docs@python
priority: normal
severity: normal
status: open
title: Document limitations on -m

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Marco Buttu

New submission from Marco Buttu:

The documentaion of sum():

Returns the sum of a sequence of numbers (NOT strings) plus the 
value of parameter 'start' (which defaults to 0).  
When the sequence is empty, returns start.

A. According to the PEP-8 it should be: "Return the sum...", and
   "When the sequence is empty, return start.", like the other docs. 
   For instance:

   >>> print(len.__doc__)
   len(object) -> integer

   Return the number of items of a sequence or mapping.

B. When the second argument is a tuple or a list, you can add sequences
   of sequences:

   >>> sum([['a', 'b', 'c'], [4]], [])
   ['a', 'b', 'c', 4]
   >>> sum(((1, 2, 3), (1,)), (1,))
   (1, 1, 2, 3, 1)

C. sum() takes not just sequences:

   >>> sum({1: 'one', 2: 'two'})
   3

Maybe it is not a good idea to give a complete description of sum() in the 
docstring, but perhaps something "good enough". In any case, I think the lack 
of the PEP-8 recommendation should be fixed.

--
assignee: docs@python
components: Documentation
messages: 192805
nosy: docs@python, marco.buttu
priority: normal
severity: normal
status: open
title: sum() does not return only the sum of a sequence of numbers + PEP8 
reccomandation
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue18422] is_package missing so can't use -m

2013-07-10 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue18417] urlopen() has a hidden default for its timeout argument

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

See also issue 4079, if you are concerned about timeouts in urllib.

--

___
Python tracker 

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



[issue18407] Fix compiler warnings in pythoncore for Win64

2013-07-10 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Added new patch that removes the duplicate changes from issue #15792 and 
comments the lone explicit cast.

These changes fix 116 of the 216 warnings (54%!) for Win64.  Together with 
issue #15792 brings the remaining count to 72.

I am unsure if splitting the changes further makes much sense as guidance I 
have received on IRC and as others have noted in various bug reports about 
"spamming" the tracker with issues per file.

With that and MvL's comment in issue #18295, I do not think that it is 
advisable to separate out changes for that issue.

--
Added file: http://bugs.python.org/file30883/issue18407-2.diff

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

Perhaps we could add something like "Also works, though possibly inefficiently, 
on any iterable whose elements support addition".  The biggest part of the 
sphinx docs for this are about what to use instead, and that doesn't really 
seem appropriate for a docstring.  So it may indeed be best to just not mention 
it in the docstring.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread R. David Murray

Changes by R. David Murray :


--
versions: +Python 3.4 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue18402] Finding perl64

2013-07-10 Thread Martin v . Löwis

Martin v. Löwis added the comment:

OTOH, perl is not a prerequisite in the first place for building Python with 
OpenSSL. Why do you think you need it?

--
nosy: +loewis

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Ronald Oussoren

Ronald Oussoren added the comment:

There's an annoyingly long discussion about sum() on python-ideas.

IMHO the documentation should mention, as it does now, that sum is intended to 
be used with a sequence of numbers even it does work with most objects that 
support the + operator (such as by implementing __add__). In particular, using 
sum with a sequence of lists or tuples is extremely inefficient.

The fact that sum({1:'a', 2: 'b'}) works is a side effect of the how python 
works with sequences and IMHO doesn't have to be documented in every function 
that accepts a sequence as an argument.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue18417] urlopen() has a hidden default for its timeout argument

2013-07-10 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jul 10, 2013, at 05:53 AM, R. David Murray wrote:

>Please see issue 14425 and then let us know if this is still valid.  It's
>been a while since I looked at the code and I no longer remember the details,
>but I seemed confident in my conclusion at the time... :)

I'm not sure I completely understand the arguments in #14425 and #2451 which
it refers to.  I could be wrong, but it seems to me that these are arguing
against using socket.getdefaulttimeout() in favor of the magic non-public
attribute that's currently being used.  While I don't like that particular
aspect, it's not the real point of *this* bug.

Even if socket._GLOBAL_DEFAULT_TIMEOUT is the effective default for `timeout`,
I still think using that as the default value for the keyword argument is
wrong, both for usability of this API and for the documentation of it.

I don't see why `timeout=None` wouldn't be acceptable, but let's assume it
isn't.  A documented, public sentinel would be acceptable and it could either
be defined as:

DEFAULT_TIMEOUT = object()

or

DEFAULT_TIMEOUT = socket._GLOBAL_DEFAULT_TIMEOUT

With the latter, the function's signature would then change to:

def urlopen(url, data=None, timeout=DEFAULT_TIMEOUT, ...)

and nothing functional would change.  The documentation update would be much
more helpful too.  If it weren't for the new module attribute, it could
probably even be backported.

Then users of this module could do something like this:

from urllib.request import DEFAULT_TIMEOUT, urlopen

def my_open(url, timeout=None):
my_timeout = DEFAULT_TIMEOUT if timeout is None else timeout
return urlopen(url, timeout=my_timeout)

--

___
Python tracker 

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



[issue18417] urlopen() has a hidden default for its timeout argument

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

OK, I reviewed the issue enough to remember:  If socket.setdefaulttimeout is 
never called, then the default timeout is None (no timeout).  Since 
socket.setdefaulttimeout is deprecated, the global default should always be 
None.  Therefore, if you want to use the "default" timeout in a new 
application, you could pass None as the value for timeout...but of course that 
probably doesn't do what you want.  What you *really* want to do is pass the 
default timeout value being used by your application, whatever that is, managed 
however your application/library manages it.

If you are writing a library that for some reason wants to retain backward 
compatibility with setdefaulttimeout (and I think you probably shouldn't be), 
you could call getdefaulttimeout to get the current default value.  Since 
urlopen is creating a new socket object, this should have the correct semantics.

Mind, I don't claim that there can't be a better solution, I'm just trying to 
explain the current state of affairs as I understand it.  However, aside from 
the ugliness of the current signature for urlopen, at the moment it seems 
reasonable to me :)

That said, this argument is premised firmly on setdefaulttimeout being 
deprecated, and there is currently no indication of that in its documentation 
that I can see.

--

___
Python tracker 

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



[issue18417] urlopen() has a hidden default for its timeout argument

2013-07-10 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +facundobatista

___
Python tracker 

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



[issue18352] collections.Counter with added attributes are not deepcopied properly.

2013-07-10 Thread Olivier Gagnon

Olivier Gagnon added the comment:

The dictionary and the set do not give the freedom to add dynamic attributes to 
them. I agree that the Counter should have the same behaviour.

However, this will raise the same bug when we inherit from a Counter object.

>>> class mylist(list): pass
... 
>>> l = mylist()
>>> l.foo = "bar"
>>> c = copy.deepcopy(l)
>>> print(c.foo) # prints bar

>>> class myCounter(Counter): pass
... 
>>> original = myCounter()
>>> original.foo = "bar"
>>> c = copy.deepcopy(original)
>>> c.foo
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'myCounter' object has no attribute 'foo'

The reduction function should still copy every dynamic attribute of the object.

--

___
Python tracker 

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



[issue18423] Document limitations on -m

2013-07-10 Thread Brett Cannon

Changes by Brett Cannon :


--
keywords: +easy
stage:  -> needs patch
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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

OK, so your vote is to leave the doc string alone (except for the PEP8 
changes), right?

--

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Yes, the docstring isn't meant to be exhaustive documentation. The manual is 
more exhaustive and, as you noted, already contains links to alternatives.

--

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Ezio Melotti

Ezio Melotti added the comment:

Currently sum() is intended to work with numbers, explicitly forbids strings 
(as noted in the docstring), but also works with other types (even though it's 
inefficient).

If we want to document this, a possible wording might be:
Returns the sum of a sequence of numbers plus the 
value of parameter 'start' (which defaults to 0).  
When the sequence is empty, returns start.
Using sum() with a sequence of strings is not allowed,
and might be inefficient with sequences of other types.

We should also consider that the implementation/behavior might change in 
future, but we can always update the docstring again.

+1 on the PEP 8 changes.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue18416] Move to absolute file paths for module.__file__

2013-07-10 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Isn't this because the first entry of sys.path is '' when python is started 
without a script? All other paths on sys.path are already absolute paths 
(tested with a relative path in $PYTHONPATH).

If that's correct, just adding os.getcwd() instead of '' as the first entry of 
sys.path would fix this issue, and would also make sure that imports of modules 
next to the script keep working when the script uses os.chdir.

The disadvantage is that some users might depend on the current behavior :-(

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Marco Buttu

Marco Buttu added the comment:

By reading the Ronald's comment, I realized it is better to keep it simple, so 
I agree with him.

The "extremely inefficient" reason seems to be less important (Python 3.3):

$ python -m timeit -s "a=['a']*1; b=['b']*1; a+b"
1 loops, best of 3: 0.00831 usec per loop
$ python -m timeit -s "a=['a']*1; b=['b']*1; sum([a, b], [])"
1 loops, best of 3: 0.0087 usec per loop

--

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Appending a sequence of lists with sum is inefficient because it (currently) 
does a lot of copying, and that gets noticable when you sum a larger number of 
lists

Note how using sum for add 200 lists is more than twice as long as adding 100 
lists:

ronald@gondolin[0]$ python -m timeit -s "lists=[['a']*100 for i in range(100)]" 
"sum(lists, [])"
100 loops, best of 3: 2.04 msec per loop


ronald@gondolin[0]$ python -m timeit -s "lists=[['a']*100 for i in range(200)]" 
"sum(lists, [])"
100 loops, best of 3: 9.2 msec per loop


Also note how using itertools.chain is both a lot faster and behaves better:

ronald@gondolin[0]$ python -m timeit -s "import itertools; lists=[['a']*100 for 
i in range(100)]" "list(itertools.chain.from_iterable(lists))"
1 loops, best of 3: 165 usec per loop


ronald@gondolin[0]$ python -m timeit -s "import itertools; lists=[['a']*100 for 
i in range(100)]" "list(itertools.chain.from_iterable(lists))"
1 loops, best of 3: 155 usec per loop

(I used python2.7 for this, the same behavior can be seem with python 3).

See also #18305, which proposed a small change to how sum works which would fix 
the performance problems for summing a sequence of lists (before going too far 
and proposing to add special-case tuples and string)

--

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-10 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Why do you need the "getdefaultlocale" function in the first place? I'd advise 
against using it, precisely because it can trigger problems like this one.

--
nosy: +loewis

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-10 Thread Dmitry Jemerov

Dmitry Jemerov added the comment:

I personally don't, but the function is used by Sphinx, which is what I was 
trying to get to work when I ran into this problem.

--

___
Python tracker 

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



[issue18324] set_payload does not handle binary payloads correctly

2013-07-10 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the preliminary patch for email module to pass the test.

--
nosy: +vajrasky
Added file: 
http://bugs.python.org/file30884/set_payload_handles_binary_correctly.txt

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

Regardless of the resolution here, the use of getdefaultlocale could be 
reported as a bug on the sphinx tacker.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue18399] Fix grammar in comment in python.c

2013-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c02656962b9c by R David Murray in branch '3.3':
#18399: fix comment typo.
http://hg.python.org/cpython/rev/c02656962b9c

New changeset b583fd54c8d6 by R David Murray in branch 'default':
Merge: #18399: fix comment typo.
http://hg.python.org/cpython/rev/b583fd54c8d6

--
nosy: +python-dev

___
Python tracker 

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



[issue18399] Fix grammar in comment in python.c

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

Thanks, Andrew.

--
nosy: +r.david.murray
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
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



[issue18324] set_payload does not handle binary payloads correctly

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

Thanks, but the patch is incorrect.  The model consistently stores its data as 
surrogateescaped strings, and this assumption is baked in to other parts of the 
code.  So the correct fix is to do the surrogateescape encoding at the time the 
payload is set.

It might in fact be better to store a binary payload as binary, but making that 
kind of change to the model requires much more extensive review and testing.

--

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2013-07-10 Thread Martin v . Löwis

Martin v. Löwis added the comment:

FWIW, I couldn't find any use of getdefaultlocale in any of the hg revisions 
(using hg grep) in

https://bitbucket.org/birkenfeld/sphinx/

Instead, it's (probably) docutils, which has this code:

locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
# locale.getpreferredencoding([do_setlocale=True|False])
# has side-effects | might return a wrong guess.
# (cf. Update 1 in 
http://stackoverflow.com/questions/4082645/using-python-2-xs-locale-module-to-format-numbers-and-currency)

I find that quite unfortunate, since locale.getpreferredencoding() would have 
don the right thing (IMO).

--

___
Python tracker 

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



[issue18324] set_payload does not handle binary payloads correctly

2013-07-10 Thread Vajrasky Kok

Vajrasky Kok added the comment:

I see. Thanks for the explanation. I'll do this patch if nobody is interested.

--

___
Python tracker 

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



[issue18324] set_payload does not handle binary payloads correctly

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

If you want to work on it that would be great.  Note that one of the things 
that is needed is a bunch more tests of setting various *kinds* of binary 
payload, including ones containing non-ascii data, and making sure the right 
thing happens when the payload is later fetched/serialized.

--

___
Python tracker 

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



[issue18416] Move to absolute file paths for module.__file__

2013-07-10 Thread Brett Cannon

Brett Cannon added the comment:

That's exactly why it currently happens. What I would do is change importlib to 
just associate '' with os.getcwd() in FileFinder. That locks down where the 
module was found to an absolute path while still allowing '' to function as the 
cwd and be dynamically calculated.

--

___
Python tracker 

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



[issue12735] request full Unicode collation support in std python library

2013-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2013-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue12734] Request for property support in Python re lib

2013-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue12733] Request for grapheme support in Python re lib

2013-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue12728] Python re lib fails case insensitive matches on Unicode data

2013-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4b3b87719e2c by R David Murray in branch '3.3':
#18424: PEP8ify the tense of the sum docstring.
http://hg.python.org/cpython/rev/4b3b87719e2c

New changeset 38b42ffdf86b by R David Murray in branch 'default':
Merge: #18424: PEP8ify the tense of the sum docstring.
http://hg.python.org/cpython/rev/38b42ffdf86b

New changeset c5f5b5e89a94 by R David Murray in branch '2.7':
#18424: PEP8ify the tense of the sum docstring.
http://hg.python.org/cpython/rev/c5f5b5e89a94

--
nosy: +python-dev

___
Python tracker 

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



[issue18424] sum() does not return only the sum of a sequence of numbers + PEP8 reccomandation

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

Ok, pep8 changes committed.

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue4079] new urllib2.Request 'timeout' attribute needs to have a default

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

Now we need a test :)

--

___
Python tracker 

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



[issue12681] unittest expectedFailure could take a message argument like skip does

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

Thanks, Adam.  I'm afraid it may be a while before Michael (or anyone else) 
gets a chance to review it and think about the issue some more.

--

___
Python tracker 

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



[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2013-07-10 Thread Walter Prins

Walter Prins added the comment:

What's the process for volunteering a buildbot?  Email python-dev?  I
*might* volunteer to set one up...

--

___
Python tracker 

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



[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2013-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 70f55dc9d43f by R David Murray in branch 'default':
#18116: getpass no longer always falls back to stdin.
http://hg.python.org/cpython/rev/70f55dc9d43f

--
nosy: +python-dev

___
Python tracker 

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



[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

I played around with this for a bit, but I couldn't come up with any test 
improvements, or any way to test the bug that is being fixed.  So I just 
committed it as is.  Thanks, Serhiy.  And thanks Vajrasky for giving it a try 
and figuring out some of the stuff that *doesn't* work as a fix :)

I decided to only commit this to 3.4.  I don't think the risk of an unexpected 
behavior change in a maintenance release is worth the relatively small benefit 
that this fix provides.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
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



[issue18360] Won't install. Keeps telling me DLL is missing.

2013-07-10 Thread Dale Smith

Dale Smith added the comment:

I got it!  None of these alone actually worked.  But it lead me to get 
it to work.  I did several solutions at once.  The three in combination 
that worked were getting this: 
http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista
 


then I disabled my antivirus and User Account Control in windows 7. I'll 
bet it was just disabling the UAC that did it though.  I will find out 
later.  I need to get back to class now that I have what I need.  Thank 
you so much.  If you do need more info or help, please feel free to ask!


--

___
Python tracker 

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



[issue18305] [patch] Fast sum() for non-numbers

2013-07-10 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2013-07-10 Thread R. David Murray

R. David Murray added the comment:

What information there is is here: http://wiki.python.org/moin/BuildBot.  
Antoine Pitrou is the current buildbot "master" and will issue you a password 
once you are set up, if you decide to do this.  You can also talk to us on the 
#python-dev irc channel.  Windows buildbots are the trickiest to get set up and 
running consistently.

--

___
Python tracker 

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



[issue18425] IDLE Unit test for IdleHistory.py

2013-07-10 Thread R. Jayakrishnan

New submission from R. Jayakrishnan:

Continuing the IDLE unittest framework #15392, unit test for IdleHistory.py. 
This test depends on mockText and uses the patch by Terry at issue #18365.
Because the mockText is still about to commit, first patch 
http://bugs.python.org/file30865/mock_text2.diff and then use 
test_idlehistory.patch to run test_idlehistory. 
Once the mock Text get committed I will improve the patch according to.

--
components: IDLE
files: test_idlehistory.patch
keywords: patch
messages: 192840
nosy: JayKrish, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Unit test for IdleHistory.py
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30885/test_idlehistory.patch

___
Python tracker 

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



[issue18416] Move to absolute file paths for module.__file__

2013-07-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Brett's plan sounds good to me. We should also check we make sure 
__main__.__file__ is always absolute.

--

___
Python tracker 

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



[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-07-10 Thread Jim Jewett

Jim Jewett added the comment:

> Since this is such an incredibly niche edge case 
> (the ordered comparison has to return NotImplemented
> while __eq__ returns True), 

*and* the types are explicitly supposed to ordered, 
based on what is being tested

> I remaining consistent with the existing behaviour 
> is the most important consideration.

Agreed, once I consider that additional caveat.

--

___
Python tracker 

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



[issue18422] is_package missing so can't use -m

2013-07-10 Thread andrew cooke

andrew cooke added the comment:

in case anyone else ends up here through google...

the problem described here is not related to the linked issue.  it was just a 
missing `__init__.py` in the module (plus sucky error messages).

the following works fine:

.
├── README.md
├── src
│   └── simplessl   
│   ├── ca.py   
│   ├── __init__.py 
│   ├── __main__.py 
│   ├── req.py  
│   └── utils.py
└── ssl.iml

--

___
Python tracker 

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



[issue18425] IDLE Unit test for IdleHistory.py

2013-07-10 Thread Phil Webster

Changes by Phil Webster :


--
nosy: +philwebster

___
Python tracker 

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



[issue18425] IDLE Unit test for IdleHistory.py

2013-07-10 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



[issue18360] Won't install. Keeps telling me DLL is missing.

2013-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.

2013-07-10 Thread R. Jayakrishnan

Changes by R. Jayakrishnan :


--
nosy: +JayKrish

___
Python tracker 

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



[issue18365] Idle: mock Text class and test thereof

2013-07-10 Thread R. Jayakrishnan

Changes by R. Jayakrishnan :


--
nosy: +JayKrish

___
Python tracker 

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



[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2013-07-10 Thread paul j3

paul j3 added the comment:

One usage option is to make a subclass of HelpFormatter (the accepted way of 
customizing a formatter), and write a function that formats each group 
independently.  For the example case, the resulting format might be:

   usage: PROG [-h] [-b] [-a | -c] [-a | -d]

-h and -b are not part of any group.  These are followed by the two groups.  -a 
is repeated because it appears in both groups.

--

___
Python tracker 

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



[issue18426] Crash when extension does not use PyModule_Create()

2013-07-10 Thread Ivan Johansen

New submission from Ivan Johansen:

In Python/importdl.c around line 99 in the function 
_PyImport_LoadDynamicModule() you can find the code:
  def = PyModule_GetDef(m);
  def->m_base.m_init = p;

If the module m, which is returned from a newly imported extension, is not 
created by PyModule_Create() but in some other way then PyModule_GetDef(m) will 
return NULL. The next line will then dereference a NULL pointer and crash. 

I suggest a check for this is added:
  def = PyModule_GetDef(m);
  if(def != NULL) 
def->m_base.m_init = p;

--
messages: 192845
nosy: Padowan
priority: normal
severity: normal
status: open
title: Crash when extension does not use PyModule_Create()
type: crash
versions: Python 3.1, Python 3.2, Python 3.3, 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