[issue22472] OSErrors should use str and not repr on paths

2014-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

вівторок, 30-вер-2014 19:26:52 ви написали:
 How do I reconstruct an arbitrary OSError error message using the filename
 parameter?

if not e.args:
msg = ''
elif len(e.args) == 1:
msg = str(e.args[0])
elif len(e.args) = 5:
msg = '[Error %s] %s' % e.args[:2]
if len(e.args)  2:
msg = '%s: %r' % (msg, e.args[2]) # filename
if len(e.args)  4:
msg = '%s - %r' % (msg, e.args[4]) # filename2
else:
msg = str(e.args)

--

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



[issue20079] Add support for glibc supported locales

2014-10-01 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Thanks, Serhiy.

The patch looks good, except for one nit: the makelocalealias.py normaly also 
generates a list of changes and these are put at the top of the locale_alias 
dictionary.

Could you add that as well ?

--

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



[issue17873] _ctypes/libffi missing bits for aarch64 support

2014-10-01 Thread Andreas Schwab

Andreas Schwab added the comment:

https://build.opensuse.org/package/show/openSUSE:Factory:ARM/python3-base

--

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



[issue20079] Add support for glibc supported locales

2014-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The makelocalealias.py generates only a list of removes and updates, not 
additions.

I recommend first apply issue20076, it will eliminate most additions.

--

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



[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2014-10-01 Thread Xavier de Gaye

Xavier de Gaye added the comment:

This issue has been entered while checking for duplicate test names in issue 
16079.

--

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



[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-10-01 Thread STINNER Victor

STINNER Victor added the comment:

Oh by the way, I also prefer to revert the commit.

--

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



[issue21574] Port image types detections from PIL to the imghdr module

2014-10-01 Thread Andriy Sokolovskiy

Andriy Sokolovskiy added the comment:

I'll try to do this issue.
https://mail.python.org/mailman/private/core-mentorship/2014-October/002766.html

--
nosy: +coldmind

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



[issue22492] small addition to print() docs: no binary streams.

2014-10-01 Thread Georg Brandl

Georg Brandl added the comment:

Looks good.

 sys.stdout, when rebound to a binary mode file

Not sure that is supported in any way :)

--

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



[issue22531] Turn contextlib.{redirect_stdout, suppress} into ContextDecorators

2014-10-01 Thread Antony Lee

New submission from Antony Lee:

A small lib improvement suggestion could be to make contextlib.redirect_stdout 
and contextlib.suppress inherit from ContextDecorator.

As a side note, the source of contextlib has some classes inheriting explicitly 
from object while others don't, so perhaps this can be harmonized at the same 
time.

--
components: Library (Lib)
messages: 228065
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Turn contextlib.{redirect_stdout,suppress} into ContextDecorators
versions: Python 3.4, Python 3.5

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



[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Thanks, Serhiy

The patch looks good. Please apply.

--

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



[issue20079] Add support for glibc supported locales

2014-10-01 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 01.10.2014 09:52, Serhiy Storchaka wrote:
 
 The makelocalealias.py generates only a list of removes and updates, not 
 additions.

Ah, ok.

 I recommend first apply issue20076, it will eliminate most additions.

Agreed. Please apply both patches.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

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



[issue22494] default logging time string is not localized

2014-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm a bit surprised here, since the comma is not the default (US) decimal point.

--
nosy: +pitrou

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



[issue21971] Index and update turtledemo doc.

2014-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy

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



[issue22001] containers same does not always mean __eq__.

2014-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue21999] shlex: bug in posix mode handling of empty strings

2014-10-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage: needs patch - patch review

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



[issue22494] default logging time string is not localized

2014-10-01 Thread Georg Brandl

Georg Brandl added the comment:

It's not so surprising, since the string before the milliseconds part is a 
strftime() result, not a whole number.  The decimal point need not necessarily 
be used for this.

Just like the rest of the default time format, it is probably best for the 
millisecond part to be locale independent unless chosen to be locale aware by 
the programmer.

Using the comma is apparently common among loggers. I've seen it in logs 
generated by log4j and log4cpp as well.

--
nosy: +georg.brandl

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



[issue22531] Turn contextlib.{redirect_stdout, suppress} into ContextDecorators

2014-10-01 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +ncoghlan

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



[issue22494] default logging time string is not localized

2014-10-01 Thread Vinay Sajip

Vinay Sajip added the comment:

ISO 8601 governs the format used. From the Wikipedia article on the same:

A decimal mark, either a comma or a dot (without any preference as stated in 
resolution 10 of the 22nd General Conference CGPM in 2003, but with a 
preference for a comma according to ISO 8601:2004) is used as a separator 
between the time element and its fraction.

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

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Eric V. Smith

Eric V. Smith added the comment:

Is there some particular problem you're trying to solve, which this would make 
easier?

Without a use case, I'm -1.

--
nosy: +eric.smith

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum

Ram Rachum added the comment:

I needed it for an internal calculation in a combinatorics package I'm writing. 
Do you want me to take the time to explain the calculation? It's quite complex.

--

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



[issue22532] A suggested change

2014-10-01 Thread Padmanabhan Tr

New submission from Padmanabhan Tr:

Take a complex number n = 3+4j. n.real is taken as 3.0  n.imag as 4.0 in 
Python3.  One has to use the int(0 function to get back the parts as integers.  
I guess this is a compiler error?

--
messages: 228073
nosy: Padmanabhan.Tr
priority: normal
severity: normal
status: open
title: A suggested change
type: compile error
versions: Python 3.4

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



[issue22472] OSErrors should use str and not repr on paths

2014-10-01 Thread R. David Murray

R. David Murray added the comment:

Thank you, Serhiy.

--

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



[issue22531] Turn contextlib.{redirect_stdout, suppress} into ContextDecorators

2014-10-01 Thread R. David Murray

R. David Murray added the comment:

-100 on doing this for suppress.  That would be exactly the kind of 
wrong-headed code that I was worried that context manager would invite.

--
nosy: +r.david.murray

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



[issue22532] A suggested change

2014-10-01 Thread Geoffrey Spear

Geoffrey Spear added the comment:

From the documentation: Complex numbers have a real and imaginary part, which 
are each a floating point number.

Needing to use int() to convert these floats to integers is not a bug, it's the 
expected behavior.

--
nosy: +geoffreyspear

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



[issue22532] A suggested change

2014-10-01 Thread Geoffrey Spear

Changes by Geoffrey Spear geoffsp...@gmail.com:


--
components: +Interpreter Core
type: compile error - behavior

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



[issue22532] A suggested change

2014-10-01 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


--
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Eric V. Smith

Eric V. Smith added the comment:

No need to explain it. It sounds like it's not generally useful, so I'm still 
-1.

--

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



[issue22531] Turn contextlib.{redirect_stdout, suppress} into ContextDecorators

2014-10-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Aye, suppress is only intended for use around a single line of code. Using it 
for an entire function would be OnError Resume Next levels of poor coding 
style.

I'm also -1 on implicitly wrapping redirect_stdout around functions due to the 
immediate thread safety problem doing so introduces. The stdout redirection 
really only makes sense in a single-threaded scripting context, and using it as 
a decorator rather than inline makes it far too easy to inadvertently violate 
that constraint.

As far as the explicitly inherit from object or not goes, it wouldn't 
surprise me if that's just a migrated from Python 2 vs first introduced in 
Python 3 distinction. It's not something I would change solely for the sake of 
consistency.

--
resolution:  - rejected
stage:  - resolved
status: open - closed

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



[issue22528] Missing hint to source code

2014-10-01 Thread Friedrich Spee von Langenfeld

Friedrich Spee von Langenfeld added the comment:

Excuse me, but it would be nice to fix the documentation of the modules 
symtable and compileall too. Thanks.

--
resolution: fixed - 
status: closed - open

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



[issue22532] A suggested change

2014-10-01 Thread Padmanabhan Tr

Padmanabhan Tr added the comment:

Dear Mr SpearThanks for the prompt response  clarification.(in Python) If the 
real  imaginary parts of numbers you deal with are integers, results of 
operations (except division)  - like +, -, *, **, - appear with respective 
integers as real  imginary parts.  In line with these, changes in '.real'  
'.imag' may be desirable?

 On Wednesday, October 1, 2014 8:19 PM, Eric V. Smith 
rep...@bugs.python.org wrote:

Changes by Eric V. Smith e...@trueblade.com:

--
resolution:  - not a bug
stage:  - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22532
___

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Even if you don't find it useful, Eric, it doesn't take up the method space. 
You can very easily ignore it, there's no cognitive burden.

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

Curiousity question:  What happens if you try to sort a list of partially 
ordered Counters?

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 If it is so specialized as to only be needed in complex combinatorial 
 calculations

How do you know it is only needed in complex combinatorial calculations?

 What happens if you try to sort a list of partially ordered Counters?

Try it with partially ordered sets.

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

If it is so specialized as to only be needed in complex combinatorial 
calculations, does it belong in the general-purpose part of the language?  
After all, we have the math and cmath modules for more specialized arithmetic 
operations.

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum

Ram Rachum added the comment:

I don't see why it's so hard to imagine how this will be used. Say I have a 
counter signifying how many of each product I have in my warehouse, and I have 
another counter saying how many of each product a client wants. I may use 
`counter2 = counter1` to check whether there are enough products in stock. 
Sounds straightforward to me.

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

-- s1 = set([1])
-- s2 = set([1, 2])
-- s3 = set([1, 2, 3])
-- s4 = set([2])
-- s5 = set([2, 3])
-- s6 = set([3])

-- l = [s1, s2, s3, s4, s5, s6]
-- sorted(l)
[{1}, {2}, {1, 2}, {3}, {2, 3}, {1, 2, 3}]

-- s1  s4
False

-- s4  s2
True

-- s1  s2
True

-- s4  s6
False

-- l = [s1, s4]
-- sorted(l)
[{1}, {2}]

-- sorted(l)
[{1}, {2}]


Looks horribly messy to me.  In the last example we can see that neither s1 nor 
s4 are smaller, yet s1 is consistently put first.

On the other hand, I suppose it's okay for Counter to have this behavior since 
it's already in sets.

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Ethan said:

 If it is so specialized as to only be needed in complex combinatorial 
 calculations, does it belong in the general-purpose part of the 
 language?

It's a multi-set, a general purpose and fairly fundamental data type.

https://en.wikipedia.org/wiki/Set_%28abstract_data_type%29#Multiset

And later:

 Curiousity question:  What happens if you try to sort a list of 
 partially ordered Counters?

The same thing that happens when you sort a list of any partially 
ordered objects, such as sets:

py sorted([{1, 2, 3, 4}, {2, 4}, {1, 3}, {2, 3, 4}, {1, 2, 3}])
[{2, 4}, {1, 3}, {2, 3, 4}, {1, 2, 3}, {1, 2, 3, 4}]

You get some order, but since sorting assumes a total order, not just 
partial order, the result isn't really meaningful, and will very likely 
depend on the initial order of the items. If that worries you, then 
don't sort items that implement only a partial order.

--

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



[issue9949] os.path.realpath on Windows does not follow symbolic links

2014-10-01 Thread Thomas Kluyver

Changes by Thomas Kluyver tak...@gmail.com:


--
nosy: +takluyver

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

I'll go with +0.5.  :)

If this goes in, I think a missing key in either Counter should default to 0 
for purposes of the ordering.

--
stage:  - test needed

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum

Ram Rachum added the comment:

If/when there's general agreement that this functionality should be merged in 
(assuming the implementation is acceptable), let me know and I'll be happy to 
write the code and tests.

--

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



[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a4da150fbfd4 by Georg Brandl in branch 'default':
Closes #20218: Added convenience methods read_text/write_text and read_bytes/
https://hg.python.org/cpython/rev/a4da150fbfd4

--
nosy: +python-dev
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks, Georg!

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I'll go with +0.5.  :)

I was going to make a joke about Counters only accepting integral values, but 
the constructor is actually quite laxist:

 Counter({'a': 2.5})
Counter({'a': 2.5})
 Counter({'a': 2.5 + 1j})
Counter({'a': (2.5+1j)})
 Counter({'a': 'b'})
Counter({'a': 'b'})

(!)

--

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



[issue19529] Fix unicode_aswidechar() with 4byte unicode and 2byte wchar_t, for AIX

2014-10-01 Thread Georg Brandl

Georg Brandl added the comment:

Committed in 18983332626b.

--
resolution:  - fixed
status: open - closed

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



[issue22187] commands.mkarg() buggy in East Asian locales

2014-10-01 Thread Glyph Lefkowitz

Glyph Lefkowitz added the comment:

Would simply replacing this function with pipes.quote resolve the issue?

--
nosy: +glyph

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

That does seem odd -- how can you have 'b' of something?

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum

Ram Rachum added the comment:

The real problem is that `Counter` was put into the standard library with such 
lenient conditions on how it should be used-- basically looking at it as a 
`dict` subclass rather than a counter, putting emphasis on implementation 
rather than purpose, which was a mistake that we'll now have to deal with 
forever.

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Stefan Behnel

Stefan Behnel added the comment:

 That does seem odd -- how can you have 'b' of something?

Don't ask this kind of question as long as any math guys are listening.

But seriously, I consider this proposal reasonable. If the problem is that the 
counter values can be non-integers, then why not just raise an exception if 
someone tries to test the ordering with illegal (i.e. unordered or 
uncomparable) values? Data quality issues are best handled on user side.

--
nosy: +scoder

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum

Ram Rachum added the comment:

Stefan: If you'd want to raise an exception, you'll need to define in which 
cases. Should it raise an exception for decimal numbers? Complex numbers? etc.

Personally I'd enjoy it raising exceptions in as many situations as possible 
(so we could keep Counter usage focused to actual counter usage and not just 
wild dicts) but I doubt it'll sit well with people who might use Counters with 
weird values.

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Stefan Behnel

Stefan Behnel added the comment:

I'd raise an exception whenever the values of the Counter turn out to be 
uncomparable. If users manage to fill Counters with non-number values that are 
comparable amongst each other, or even if each key has a value of a different 
type, why not just support that?

All that is really required for this is that you can compare a) keys for 
equality and b) values of identical keys for ordering, right?

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

I have to disagree.  The intent is clearly expressed in the docs [1].  However, 
if I have a need to deal with partial amounts (say, 2.5 apples because I gave 
half of one to my horse ;), Counter will still work with that:

  -- treats = Counter({'carrots':12, 'apples':3, 'sugar_cubes':100})
  -- treats
  Counter({'sugar_cubes': 100, 'carrots': 12, 'apples': 3})
  -- treats['apples'] -= 0.5
  -- treats
  Counter({'sugar_cubes': 100, 'carrots': 12, 'apples': 2.5})

At least, it will until we fix that bug.  ;)

--

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ram Rachum

Ram Rachum added the comment:

Ah, now I understand you Stefan. That sounds like a good scheme; let any 
comparison errors between the values simply propagate up.

--

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



[issue22512] 'test_distutils.test_bdist_rpm' causes creation of directory '.rpmdb' on home dir

2014-10-01 Thread Francis MB

Francis MB added the comment:

I have to thank for your time, David!

--

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



[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-01 Thread anon

anon added the comment:

I noticed feature freeze for 3.5 is in May 2015 which is actually only 7-8 
months. It'd be really awesome if this feature could make it. Is there anyone 
who can get this into 3.5?

--
status: open - pending

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



[issue22515] Implement partial order on Counter

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

[1] https://docs.python.org/3/library/collections.html#collections.Counter

--

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



[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2014-10-01 Thread Andrej A Antonov

Changes by Andrej A Antonov polymor...@gmail.com:


--
nosy: +polymorphm

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



[issue19622] Default buffering for input and output pipes in subprocess module

2014-10-01 Thread Ryan

Ryan added the comment:

This is not fixed. The documentation may be more correct now, but the behavior 
still does not match Python 2 as purported.

The default bufsize changed in 3.3.1 is incorrect, at least when tested in 
3.4.0 and 3.4.1.

Here is a test for systems with cat available.

import subprocess
proc = subprocess.Popen('cat', stdin=subprocess.PIPE)
proc.stdin.write('test\n'.encode('utf8'))

This test will succeed in Python 2.x and Python 3.0 - 3.3.0, but fail on 3.4.x. 
This is a regression as the documentation states did not match the behavior of 
Python 2 as most code expected, while the current behavior definitely does not 
match Python 2.

--
nosy: +lunixbochs
versions:  -Python 3.2

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



[issue18096] bad library order returned by python-config.in

2014-10-01 Thread Logan Chien

Logan Chien added the comment:

It seems that this is still reproducible with Python 3.5 (dev) by running:

$ gcc test.c `python3-config --includes --ldflags`

cpython-install/lib/python3.5/config-3.5m/libpython3.5m.a(pytime.o): In 
function `_PyTime_ObjectToTime_t':
cpython-build/../cpython/Python/pytime.c:371: undefined reference to `ceil'
cpython-build/../cpython/Python/pytime.c:373: undefined reference to `floor'
... skipped ...

I have slightly revised the patch to include Misc/python-config.sh.in as well.  
Please have a look.  Thanks.

--
keywords: +patch
nosy: +Logan.Chien
versions: +Python 3.5
Added file: http://bugs.python.org/file36767/fix-undef-ref.patch

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



[issue17293] uuid.getnode() MAC address on AIX

2014-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Aivars for your patch. I have verified and confirm that this method 
works on AIX and True64 UNIX (it should also work on IRIX, but I can't login in 
Snakebite's i6).

Here is modified patch. MAC address is now searched only in column with the 
Address header. Added try/except around converting to int for the case if 
candidate word contains non-heximal digits. Synchronized _netstat_getnode() 
with current code of _find_mac and extracted common code in separate function. 
Split _ifconfig_getnode() into separate functions which use different commands: 
ifconfig, arp and lanscan.

--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka
stage:  - patch review
Added file: http://bugs.python.org/file36768/uuid_netstat_getnode.patch

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



[issue22103] bdist_wininst does not run install script

2014-10-01 Thread Cybjit

Cybjit added the comment:

3f7d5c235d82 runs script, 70ea05f762a1 does not.

0c8f41ca9c94 + t.patch from #21354 does not run script.

--

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



[issue22492] small addition to print() docs: no binary streams.

2014-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9b519f72860a by Terry Jan Reedy in branch '3.4':
Issue 22492: Be explicit that print does not support binary mode files.
https://hg.python.org/cpython/rev/9b519f72860a

--
nosy: +python-dev

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



[issue22492] small addition to print() docs: no binary streams.

2014-10-01 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


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

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



[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ethan Furman

New submission from Ethan Furman:

According to the docs [1]:

 Counter objects have a dictionary interface except that they return a
 zero count for missing items instead of raising a KeyError

Which a simple test confirms:

-- Counter()['b']
0

However, if the key is present but set to zero, equality fails:

-- Counter() == Counter(b=0)
False

It is my thought that a Counter with all its keys set to zero is as empty as a 
Counter with no keys:

-- c1 = Counter()
-- c2 = Counter(a=0, b=0, c=0)
-- for item in c2.keys():
...   assert c2[item] == c1[item]
(no execption raised)


[1] https://docs.python.org/2/library/collections.html#collections.Counter

--
messages: 228111
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: Counter with no keys does not compare equal to Counter with keys which 
zero value
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue20079] Add support for glibc supported locales

2014-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, sorry, issue20076 doesn't eliminate additions in this issue, but vice verse 
this issue eliminates some additions of issue20076. So this patch should be 
applied first.

--
assignee:  - serhiy.storchaka

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



[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2014-10-01 Thread Georg Brandl

Georg Brandl added the comment:

I see test failures on Windows:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20custom/builds/62/steps/test/logs/stdio

http://buildbot.python.org/all/builders/x86%20Windows7%20custom/builds/52/steps/test/logs/stdio

Do the tests need changing too?

--
priority: normal - release blocker
status: closed - open
versions: +Python 3.2 -Python 2.7, Python 3.3, Python 3.4

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



[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2014-10-01 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
status: open - closed

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



[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2014-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ce56727edc7 by Georg Brandl in branch '3.2':
ref #19855: skip uuid test_find_mac on non-Posix as in later branches
https://hg.python.org/cpython/rev/7ce56727edc7

--

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



[issue21614] Case sensitivity problem in multiprocessing.

2014-10-01 Thread Nathan McCorkle

Nathan McCorkle added the comment:

I've just got done experiencing this bug. It would be much more helpful if the 
error message was a bit more helpful (I had no idea where to start looking with 
the ImportError: No module named [moduleStartingMultiprocess] exception 
message)

--
nosy: +nmz787

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



[issue4609] Allow use of 256 FD's on solaris in 32 bit mode

2014-10-01 Thread Mark Lawrence

Mark Lawrence added the comment:

@Peter could you provide a patch for this?

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.2

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



[issue20079] Add support for glibc supported locales

2014-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 810542d07b4e by Serhiy Storchaka in branch 'default':
Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
https://hg.python.org/cpython/rev/810542d07b4e

New changeset 00e4190b308f by Serhiy Storchaka in branch '3.4':
Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
https://hg.python.org/cpython/rev/00e4190b308f

New changeset 3bc5edbbadae by Serhiy Storchaka in branch '2.7':
Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
https://hg.python.org/cpython/rev/3bc5edbbadae

--
nosy: +python-dev

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



[issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function

2014-10-01 Thread Mark Lawrence

Mark Lawrence added the comment:

@Eric can you provide a doc patch for this?

--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2

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



[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

@anon: if there is a patch, any committer here can get it into 3.5. You'll 
recognize them as they have a nice Python logo next to their usernames ;-) If 
you want to try your hand at a patch, see https://docs.python.org/devguide/

By the way, I think it would be extra cool to implement this as a .bits 
pseudo-sequence, e.g.

 x = 255
 x.bits[0]
1
 x.bits[1:3]
7

However, it might not be so easy to do it in C...

--
status: pending - open

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



[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After applying patch from issue20079, pa_pk.utf8, te_in.utf8, and zh_sg.utf8 
are eliminated from this patch.

--
assignee:  - serhiy.storchaka

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



[issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded

2014-10-01 Thread Mark Lawrence

Mark Lawrence added the comment:

@Santiago can you provide a patch for this issue?

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6

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



[issue17446] doctest test finder doesnt find line numbers of properties

2014-10-01 Thread Mark Lawrence

Mark Lawrence added the comment:

@Ronny can you provide a patch for this?

--
nosy: +BreamoreBoy
type:  - behavior
versions: +Python 2.7, Python 3.4, Python 3.5

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



[issue17582] xml.etree.ElementTree does not preserve whitespaces in attributes

2014-10-01 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +eli.bendersky, scoder
type:  - behavior
versions: +Python 3.4, Python 3.5 -Python 3.2

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



[issue17753] test_zipfile: requires write access to test and email.test

2014-10-01 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +alanmcintyre, serhiy.storchaka
type:  - behavior
versions: +Python 3.5 -Python 3.3

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



[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c4284fa75ec7 by Serhiy Storchaka in branch '2.7':
Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
https://hg.python.org/cpython/rev/c4284fa75ec7

New changeset 3bff73df6dab by Serhiy Storchaka in branch '3.4':
Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
https://hg.python.org/cpython/rev/3bff73df6dab

New changeset 301b9a58021c by Serhiy Storchaka in branch 'default':
Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
https://hg.python.org/cpython/rev/301b9a58021c

--
nosy: +python-dev

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



[issue17784] the test suite should honor an http_proxy for running the test suite

2014-10-01 Thread Mark Lawrence

Mark Lawrence added the comment:

@Matthias can you provide a patch for this?

--
nosy: +BreamoreBoy
type:  - enhancement
versions: +Python 3.5

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



[issue20079] Add support for glibc supported locales

2014-10-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Marc-Andre.

See also related issue20087.

--

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



[issue20079] Add support for glibc supported locales

2014-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue17780] the test suite should use a TEMPDIR in the build directory, not the source directory

2014-10-01 Thread Mark Lawrence

Mark Lawrence added the comment:

@Matthias can you provide a patch for this?

--
nosy: +BreamoreBoy

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



[issue22534] Possible Memory Leak with 'shelve'

2014-10-01 Thread TJ

New submission from TJ:

The following code causes memory usage to grow excessively.

'''
import shelve

def func():
for i in range(100):
sh = shelve.open('blah')
sh.close()

func()
'''

--
components: Library (Lib)
messages: 228127
nosy: tjhnson
priority: normal
severity: normal
status: open
title: Possible Memory Leak with 'shelve'
versions: Python 2.7

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



[issue22535] headerregistry.Address introduces extra quotes without addr_spec parameter

2014-10-01 Thread Kristian Rother

New submission from Kristian Rother:

I am trying to create an email address as in the Python doc example 
https://docs.python.org/3/library/email-examples.html

The example does not work as given on the page.

I tried Python 3.4rc1 and the 3.5 compiled from source on Ubuntu 12.

I found two possible reasons:

1) Python bug in headerregistry.py
The string resulting from the command below contains extra quotes:

str(Address('Foo Example', 'f...@example.com'))
-- 'Foo Example f...@example.com'


2) Documentation bug

The documentation of headerregistry.Address states:

username and domain may be specified together by using 
the addr_spec keyword *instead of* the username and domain keywords

However, this is inconsistent with example 19.1.14.1. on
https://docs.python.org/3/library/email-examples.html

Attached are two tests that reproduce the situation.
The first test below fails but the second passes.

Conclusion:
In my opinion, it is more intuitive if the following would work as well:
Address('Foo Example', 'f...@example.com')

--
components: email
files: test_email_address_with_quotes.py
messages: 228128
nosy: barry, krother, r.david.murray
priority: normal
severity: normal
status: open
title: headerregistry.Address introduces extra quotes without addr_spec 
parameter
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file36769/test_email_address_with_quotes.py

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



[issue20076] Add UTF-8 locale aliases

2014-10-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Alex Gaynor

Alex Gaynor added the comment:

Attached patch sound fix the issue. I guess this function has no tests :-(

--
keywords: +needs review, patch
Added file: http://bugs.python.org/file36770/issue22523.diff

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



[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Reading the note on the Counter class (about intent vs. actual use), it looks 
like changing this behavior would involve potentially breaking a lot of code.

If you're using Counters that are intended to maintain positive counts 
(treating a count = 0 as if the key does not exist), it seems like you could 
either perform your operations using the + and - (or += and -=) binary 
operators (which will remove keys when the values drop to 0 or below) or if you 
have to use subtract or manual count tweaking, normalize the Counters at 
comparison time, that is, use +counter1 == +counter2 (unary + support added in 
3.3).

I agree it's sort of weird, but I feel like fixing it will just break a ton of 
existing code.

--
nosy: +josh.rosenberg

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



[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Alex Gaynor

Alex Gaynor added the comment:

My patch is incomplete, I'm working on an improved one.

--

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



[issue22523] [regression] Lib/ssl.py still references _ssl.sslwrap

2014-10-01 Thread Alex Gaynor

Alex Gaynor added the comment:

New patch resolves the issue. Turns out there were tests, but they weren't 
being run. Now they are.

--
Added file: http://bugs.python.org/file36771/issue22523.diff

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



[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +rhettinger

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



[issue22103] bdist_wininst does not run install script

2014-10-01 Thread Cybjit

Cybjit added the comment:

Turns out I had a build problem (#11598).
0c8f41ca9c94 + t.patch does actually solve the problem.

--

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



[issue1521950] shlex.split() does not tokenize like the shell

2014-10-01 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


Added file: http://bugs.python.org/file36772/80eea6bd898c.diff

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



[issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express

2014-10-01 Thread Cybjit

Cybjit added the comment:

Building bdist_wininst with VS2010 Express also gives RC1015. With this patch 
it works.

--
nosy: +Cybjit

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



[issue22534] Possible Memory Leak with 'shelve'

2014-10-01 Thread Ned Deily

Ned Deily added the comment:

What happens if you use xrange instead of range?

 range(100).__sizeof__()
856
 xrange(100).__sizeof__()
56

--
nosy: +ned.deily

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



[issue21999] shlex: bug in posix mode handling of empty strings

2014-10-01 Thread Vinay Sajip

Vinay Sajip added the comment:

I've updated the patch on #1521950 to address this case, and also added a test 
there (which is not in this patch). Thanks, RDM, for the notification.

--

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



[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-10-01 Thread paul j3

paul j3 added the comment:

A simpler solution is to make a copy of each Action when importing a parent 
parser.  The current practice is to just copy references.  With a copy, an 
Action will belong to only one group and parser, and the 'resolve' handler will 
operate without problems.

In the attached patch, I added a `.copy` method to Action.  I believe 
'.option_strings' is the only attribute that needs special handling, since it 
is a list, and 'resolve' operates on it.  The other attributes are strings, or 
objects that the user defines (e.g. 'default', 'choices').

The other change is in '_add_container_actions', the method which imports 
parents.  Here I make the copy action contingent on a 'action_copy' attribute 
of the conflict handler object (a function).  I also define this attribute for 
the 'resolve' handler.  I've made this copy contingent just to be safe w/r to 
backward compatibility, even though, I can't think of a reason for preferring 
the existing copy by reference.

In another Stackoverflow question, a poster wanted to use the same parent for 2 
subparsers, but give the 2 actions different defaults.  This copy approach 
solves that issue.

This patch needs testing and documentation changes.

--
keywords: +patch
Added file: http://bugs.python.org/file36773/patch_1.diff

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



[issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express

2014-10-01 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +steve.dower, tim.golden, zach.ware
type:  - compile error

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



[issue22533] Counter with no keys does not compare equal to Counter with keys which zero value

2014-10-01 Thread Ethan Furman

Ethan Furman added the comment:

Exactly what operation is unary minus supposed to be?  It seems to act like 
absolute value.

--

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



[issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express

2014-10-01 Thread Steve Dower

Steve Dower added the comment:

We could add an afxres.h file alongside install.rc that includes the code 
posted by Lorenz Aebi. That will avoid the auto-generation issue, though it may 
be overwritten if VS does actually generate code for it. 

(I had thought that file was generated on project creation and not 
automatically changed after that, but I could be wrong.)

--

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



[issue21614] Case sensitivity problem in multiprocessing.

2014-10-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Can you try with Python 3.x? The import machinery is different there.

--
nosy: +ncoghlan, pitrou

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



  1   2   >