[issue21470] Better seeding for the random module

2014-05-14 Thread Charles-François Natali

Charles-François Natali added the comment:

Thanks for the explanations!

--

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



[issue21505] cx_freeze multiprocessing bug

2014-05-14 Thread Shivani

New submission from Shivani:

Hey all,
I have problem with multiprocessing and cx_freeze..
I am freezing my UI application.

i have a line in code::-

multiprocessing.set_executable(os.path.join(sys.exec_prefix, 'pythonw.exe'))

when a commented out this line, my UI keeps iterating again and again.
and when i uncomment it, without throwing any error,UI just stuck in its second 
phase.

and moreover spoiling my unfreezen code olso.

What can be the problem with multi processing and cx_freeze relation..?

Thanks in Advance.

--
components: Tkinter
messages: 218503
nosy: shivani
priority: normal
severity: normal
status: open
title: cx_freeze multiprocessing bug
versions: Python 3.3

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



[issue21486] optimize v4 v6 netmask parsing

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

With C implementation (issue14373) functools.lru_cache is so fast as manually 
written specialized code.

--

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



[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not so easy, because it does not work with wantobject=False and can not 
work with future versions of Tk. Actually we should use self.tk instead of 
_default_root, but this will change the signature of _list_from_layouttuple() 
and _val_or_dict(). Due to the risk of breaking existing user code which uses 
these private functions, they should be left with old signature and new 
functions should be added.

--
assignee:  - serhiy.storchaka
versions: +Python 2.7, Python 3.5

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread Nick Coghlan

Nick Coghlan added the comment:

Brett, if you granted Berker commit privileges, you forgot to update the 
developer log and issue tracker...

That said, the patch LGTM too.

--

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



[issue21034] Python docs reference the Distribute package which has been deprecated in favor of Setuptools

2014-05-14 Thread Ezio Melotti

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


--
nosy: +eric.araujo
stage:  - patch review
type:  - enhancement

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



[issue21031] [patch] Add AlpineLinux to the platform module's supported distributions list

2014-05-14 Thread Ezio Melotti

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


--
nosy: +brett.cannon, ezio.melotti
stage:  - patch review

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



[issue21027] difflib new cli interface

2014-05-14 Thread Claudiu.Popa

Changes by Claudiu.Popa pcmantic...@gmail.com:


Added file: http://bugs.python.org/file35247/issue21027_1.patch

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



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2014-05-14 Thread mattip

mattip added the comment:

Here is a fix for arguments and return values, based on the support in cffi, 
for python2.7
I added a test in test_win32, removed the too-early attempt to fix in 
callproc.c, and merged in most of the changes in lib_msvc from cffi's code base.

These changes handle the following (in addition to callproc change):
- fix rtype handling by converting a return-by-value struct to a pointer-sized 
int
- fix stack byte-size calculation by checking for large pass-by-value structs, 
incrementing bytes by sizeof(void*) in this case
- fix avalue copying by checking for large pass-by-value structs and copying 
the pointer not the value
- fix bogus check for stack buffer  40 bytes

A similar patch for 3.4 will be posted soon.

Other related issues: http://bugs.python.org/issue11835

--
keywords: +patch
nosy: +mattip
Added file: http://bugs.python.org/file35248/issue_20160_python2_7.patch

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



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2014-05-14 Thread mattip

mattip added the comment:

and here is the promised patch for tip

--
Added file: http://bugs.python.org/file35249/issue_20160_tip.patch

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



[issue18492] Allow all resources if not running under regrtest.py

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You have convinced me. In general the approach and the patch LGTM.

But I agree with Terry that flag support.regrtest_run is redundant, it 
duplicates a bit of information which provides support.use_resources. Instead 
we can rewrite support.is_resource_enabled() as

return use_resources is None or resource in use_resources

Introducing regrtest_run can cause inconsistency between it and use_resources.

--

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

For Python 3.5, I would prefer to patch the code to support keywords instead.

--
nosy: +haypo

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

I sent a review on Rietveld.

--

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

codecs_decode_encode_kw.patch: Patch for Python 3.5 adding support of keyword 
arguments on codecs.encode and codecs.decode.

--
Added file: http://bugs.python.org/file35250/codecs_decode_encode_kw.patch

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



[issue6895] locale._parse_localename fails when localename does not contain encoding information

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For now the output of the code in msg132878 on Ubuntu is empty. May be this 
issue is outdated.

--
nosy: +serhiy.storchaka
status: open - pending

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



[issue21495] Sane default for logging config

2014-05-14 Thread Vinay Sajip

Vinay Sajip added the comment:

Just on backward compatibility grounds, a proposal like this isn't going to be 
acceptable on python-dev, I believe, and I'm not even sure it's necessary to 
have such a thing in the stdlib: why not just use the approach you suggested 
for your own projects, and leave it at that? I've certainly found that 
preferences for configuration approaches vary a lot across people, and nothing 
will please everyone :-(

Generally, before writing a PEP, ideas are broached on the python-ideas mailing 
list, then move to the python-dev mailing list when they seem to have enough 
mileage to do so, and the PEP discussion / life-cycle happens there.

--

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



[issue9266] ctypes ValueError: NULL pointer access on Win7 x64

2014-05-14 Thread Berker Peksag

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


--
resolution:  - out of date
stage:  - resolved
status: open - closed

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



[issue21487] Assorted ipaddress performance improvements

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Alternative implementations of _count_righthand_zero_bits():

def _count_righthand_zero_bits(number, bits):
if not number:
return bits
return (~number  (number-1)).bit_length()

or

def _count_righthand_zero_bits(number, bits):
if not number:
return bits
return (~(number | -number)).bit_length()

--
nosy: +serhiy.storchaka

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



[issue21343] os.path.relpath returns inconsistent types

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think this is not a bug and shouldn't be fixed in 2.7.

--
nosy: +serhiy.storchaka

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



[issue21387] Memory leaks when embedded interpreter is reinitialized

2014-05-14 Thread Stefan Krah

Stefan Krah added the comment:

I've run Evgeniy's example under Valgrind and changed it to import
various C extensions. Unfortunately they all leak more or less, so
perhaps we can revisit this when (if?) the PEP 3121 and PEP 384
changes have been implemented.

--

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



[issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present

2014-05-14 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

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



[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument

2014-05-14 Thread Andreas van Cranenburgh

Andreas van Cranenburgh added the comment:

Giampaolo, this patch is for ProcessPoolExecutor as well.

About keyboard interrupts, if my tests are correct, they work
in Python 3.3+ with both multiprocessing and concurrent.futures.
(Although for the latter I have to hit ctrl-c twice).

--

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



[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sworddragon, try to use content.encode('ascii', 
'backslashreplace').decode('unicode-escape').

It is too late to change the unicode-escape encoding.

--
nosy: +serhiy.storchaka

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



[issue21231] Issue a python 3 warning when old style classes are defined.

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I agree that this is not a good idea. Old-style classes are legal in Python 2 
and this syntax is legal in Python 3 where it means new-style classes and in 
most cases there is no difference between new-style and old-style classes.

--
nosy: +serhiy.storchaka

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread Ed Morley

New submission from Ed Morley:

A python.org 2.7.6 release of the Windows MSI installer, results in only the 
following python binaries in the installation directory:
C:\Python27\python.exe
C:\Python27\pythonw.exe

In Mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=957721 we would 
like to be able to force our 'mach' script to use Python2.7 (due to the 
assorted Python versions present on our CI machines), however doing so via the 
script shebang line breaks local developer workflows on Windows, since the 
default Python install doesn't include python2.7.exe and so the binary isn't 
found.

As such, it would be great if python.exe could be symlinked to pythonX.Y.exe 
(and also I guess pythonX.exe) as part of the Windows installation/build - 
giving us parity with Unix based platforms. 

This can be done on Windows using mklink (http://ss64.com/nt/mklink.html), eg:

c:\Python27mklink python2.7.exe python.exe
symbolic link created for python2.7.exe === python.exe

c:\Python27mklink python2.exe python.exe
symbolic link created for python2.exe === python.exe

c:\Python27dir python*

10/11/2013  19:2426,624 python.exe
14/05/2014  12:04SYMLINK  python2.exe [python.exe]
14/05/2014  12:04SYMLINK  python2.7.exe [python.exe]
10/11/2013  19:2427,136 pythonw.exe

Alternatively, just a plain copy of the binary prior to creating the MSI would 
be just as helpful for us too.

I searched for a while to see if there were any bugs filed for this already, 
but the closest I could find was:
* http://legacy.python.org/dev/peps/pep-0397/ - which is about a smart launcher 
that uses the shebang lines to run the correct Python version when multiple are 
installed (and thus is quite a different request to that in this bug).
* and https://mail.python.org/pipermail/python-dev/2011-March/108850.html which 
suggests the idea as in this bug summary here, but it seems like a bug for it 
was never filed.

Many thanks :-)

--
components: Build, Installation, Windows
messages: 218521
nosy: edmorley, loewis
priority: normal
severity: normal
status: open
title: Windows MSI installer should mklink (symlink) python.exe to python2.7.exe
type: enhancement
versions: Python 2.7

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread Ed Morley

Ed Morley added the comment:

Meant to add: the ActivePython release does this already - but it would be 
great if upstream did too.

--

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



[issue4999] multiprocessing.Queue does not order objects

2014-05-14 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone jean-p...@hybridcluster.com:


--
nosy:  -exarkun

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



[issue4928] Problem with tempfile.NamedTemporaryFile

2014-05-14 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone jean-p...@hybridcluster.com:


--
nosy:  -exarkun

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



[issue21046] Document formulas used in statistics

2014-05-14 Thread Ezio Melotti

Ezio Melotti added the comment:

 E.g.
 median([x1, x2, x3, x4, x5]) = x3
 median([x1, x2, x3, x4, x5, x6]) = (x3 + x4) / 2

The docs seem to already contain similar examples for some of the functions 
(e.g. median()), but not for others (e.g. mean()).
For these, if the formula can be expressed with a simple Python equivalent 
(e.g. sum(values) / len(values)), I think it would be reasonable to add it.

--
nosy: +ezio.melotti

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



[issue21507] memory used by frozenset created from set differs from that of frozenset created from other iterable

2014-05-14 Thread Lev Givon

New submission from Lev Givon:

Not sure if this is indicative of a bug, but I noticed that a frozenset created 
from a set seems to occupy a different amount of memory than a frozenset 
created from some other iterable. I observed this behavior with Python 2.7.5 
and with Python 3.4.0 on Ubuntu 14.04 x86_64:

 from sys import getsizeof
 x = range(100)
 s = set(x)
 f0 = frozenset(x)
 f1 = frozenset(s)
 getsizeof(s)
8424
 getsizeof(f0)
8424
 getsizeof(f1)
4328
 f0==f1
True

Original question on StackOverflow available at 
https://stackoverflow.com/questions/23618259/memory-occupied-by-set-vs-frozenset-in-python-2-7

--
messages: 218524
nosy: lebedov
priority: normal
severity: normal
status: open
title: memory used by frozenset created from set differs from that of frozenset 
created from other iterable
type: resource usage
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue21487] Assorted ipaddress performance improvements

2014-05-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Good point, this is a much faster implementation. Updated patch (and fixed the 
implementation to not return more than `bits`).

--
Added file: http://bugs.python.org/file35251/ipaddr_perf2.patch

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



[issue21507] memory used by frozenset created from set differs from that of frozenset created from other iterable

2014-05-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +rhettinger

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



[issue21496] pyvenv activate_this.py

2014-05-14 Thread couplewavylines

couplewavylines added the comment:

run the command directly...would run with the venv's environment:  I'm sorry 
I didn't realize this, the You don’t specifically need to activate an 
environment... part of the venv docs didn't sink in for me when I read it 
earlier.

So yes, using a subprocess will do what I'm after.

I don't know if the subprocess will cover the situation in that link where 
they're using execfile on activate_this, but I was just trying to find a 
common-looking use-case for activate_this.

--

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



[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Stephen Paul Chappell

Stephen Paul Chappell added the comment:

There is discussion of removing wantobjects in issue3015. If it gets removed, a 
better patch might be created for future versions of tkinter. However, 
accessing self.tk would probably be a good replacement for anywhere 
tkinter._default_root can be found (except in cases where a widget is not given 
a parent).

--

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



[issue21343] os.path.relpath returns inconsistent types

2014-05-14 Thread Matt Bachmann

Matt Bachmann added the comment:

Can you help me understand why not?

If I give it two unicode strings it sometimes gives me back a unicode and 
sometimes gives me back a string.

In python3 this does what I expect. 

In python27 I now have to check the type I get back because I cannot be sure 
what type I will be getting back.

--

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread Brett Cannon

Brett Cannon added the comment:

Nope, I forgot Berker had triage rights but not commit rights.

--
assignee: berker.peksag - docs@python

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



[issue21338] Silent mode for compileall

2014-05-14 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray

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



[issue21496] pyvenv activate_this.py

2014-05-14 Thread Vinay Sajip

Vinay Sajip added the comment:

Okay, I'll close this issue.

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

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



[issue21342] multiprocessing RLock and Lock raise incorrect exceptions when releasing an unlocked lock.

2014-05-14 Thread R. David Murray

R. David Murray added the comment:

As a historical note, the docs are probably correct...but at some point 
relatively recently we fixed the inconsistency in what was raised in the thread 
and threading modules, but obviously no one noticed that multiprocessing had 
the same issue.  It could be that a comment should be added to the 
thread/threading code mentioning the multiprocessing clones, and vice versa.  
Or perhaps the code can be unified?  I suspect the clones exist primarily 
because multiprocessing was originally an external project.

--
nosy: +r.david.murray
stage:  - patch review
versions:  -Python 2.7, Python 3.2, Python 3.4

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



[issue21345] multiprocessing.Pool._handle_workers sleeps too long

2014-05-14 Thread R. David Murray

R. David Murray added the comment:

I'm not that familiar with multiprocessing, but I'd guess it was to avoid 
burning cpu in a busy-wait (it seems to me that that doesn't matter during 
finalization, but does during normal running).  Maybe it could be changed to an 
event wait on a shutdown event?

--
nosy: +r.david.murray
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue21347] Don't use a list argument together with shell=True in subprocess' docs

2014-05-14 Thread R. David Murray

R. David Murray added the comment:

Thanks, Akira.

--
nosy: +r.david.murray
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue21347] Don't use a list argument together with shell=True in subprocess' docs

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5ef9a2c711f5 by R David Murray in branch '2.7':
#21347: use string not list in shell=True example.
http://hg.python.org/cpython/rev/5ef9a2c711f5

New changeset 3b27f3acf0c4 by R David Murray in branch '3.4':
#21347: use string not list in shell=True example.
http://hg.python.org/cpython/rev/3b27f3acf0c4

New changeset 217006c5455f by R David Murray in branch 'default':
Merge: #21347: use string not list in shell=True example.
http://hg.python.org/cpython/rev/217006c5455f

--
nosy: +python-dev

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread Zachary Ware

Zachary Ware added the comment:

A similar thought I've had is to add a feature to the PEP397 launcher, allowing 
it to figure out Python version from a suffix on its executable name and add 
symlinks to it for each installed version of Python.  That way PATH wouldn't 
need to be modified to make every installed version accessible from a single 
optionless command.

--
nosy: +steve.dower, tim.golden, zach.ware
versions: +Python 3.4, Python 3.5

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



[issue21508] C API PyArg_ParseTuple doc is innacurate

2014-05-14 Thread Steve

New submission from Steve:

PyArg_ParseTuple is defined as returning an int, but the documentation talks 
about returning a true/false value, and failling on false.  In addition to 
being inaccurate, considering that most other functions fail on !=0 (true), 
it can lead to confusion.

Doc:
int PyArg_ParseTuple(PyObject *args, const char *format, ...)
Parse the parameters of a function that takes only positional parameters into 
local variables. Returns true on success; on failure, it returns false and 
raises the appropriate exception.

--
assignee: docs@python
components: Documentation
messages: 218536
nosy: Banger, docs@python
priority: normal
severity: normal
status: open
title: C API PyArg_ParseTuple doc is innacurate
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I don't deal with Python 2.7 anymore, so I have no opinion on this matter.

--

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



[issue12985] Check signed arithmetic overflow in ./configure

2014-05-14 Thread Stefan Krah

Stefan Krah added the comment:

I won't have time to work on this.  It would also be an option to do
these checks in test_capi.

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

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cc5e3b93c35a by Victor Stinner in branch '2.7':
Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword 
support.
http://hg.python.org/cpython/rev/cc5e3b93c35a

New changeset 2e116176a81f by Victor Stinner in branch '3.4':
Issue #21488: Fix doc of codecs.decode() and codecs.encode(), no keyword 
support.
http://hg.python.org/cpython/rev/2e116176a81f

New changeset 889896471498 by Victor Stinner in branch 'default':
Merge 3.4: ignore change specific to 3.4 for #21488, I had a different patch 
for Python 3.5
http://hg.python.org/cpython/rev/889896471498

--
nosy: +python-dev

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



[issue16533] HPUX: Unable to fork() in thread

2014-05-14 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6ceedbd88b5f by Victor Stinner in branch '3.4':
Issue #21488: Add support of keyword arguments for codecs.encode and 
codecs.decode
http://hg.python.org/cpython/rev/6ceedbd88b5f

--

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



[issue16533] HPUX: Unable to fork() in thread

2014-05-14 Thread Stefan Krah

Stefan Krah added the comment:

Since this is 2.7 and an exotic system, I'm removing myself from the nosy list.

--

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

I applied all patches and added Brad Aylsworth to Misc/ACKS. Thanks Brad!

Note: I adapted the change for Python 2.7: the default encoding is ASCII, not 
UTF-8.

--
resolution:  - fixed
status: open - closed

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0d38044c0b02 by Victor Stinner in branch 'default':
Issue #21488: Add support of keyword arguments for codecs.encode and 
codecs.decode
http://hg.python.org/cpython/rev/0d38044c0b02

--

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

Ooops, I applied  codecs_decode_encode_kw.patch to the branch 3.4 instead of 
default :-/ I should now be fixed.

--

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread Berker Peksag

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


--
stage: commit review - resolved

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ddd7db7cf036 by Victor Stinner in branch '3.4':
Issue #21497: faulthandler functions now raise a better error if sys.stderr is
http://hg.python.org/cpython/rev/ddd7db7cf036

New changeset cb26887f9140 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #21497: faulthandler functions now raise a better error if
http://hg.python.org/cpython/rev/cb26887f9140

--
nosy: +python-dev

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



[issue21497] faulthandler should handle sys.stderr being None gracefully

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

I applied my patch, thanks for the report.

--
resolution:  - fixed
status: open - closed

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



[issue18777] Cannot compile _ssl.c using openssl 1.0

2014-05-14 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

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



[issue16442] PATH_MAX vs MAXPATHLEN vs pathconf(..., _PC_PATH_MAX).

2014-05-14 Thread Stefan Krah

Stefan Krah added the comment:

The HP-UX issue is fixed. Are we leaving this open for IRIX?

--

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



[issue21490] Add Py_ABS and Py_STRINGIFY macros

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 849efd365ab4 by Victor Stinner in branch 'default':
Issue #21490: Add new C macros: Py_ABS() and Py_STRINGIFY()
http://hg.python.org/cpython/rev/849efd365ab4

--
nosy: +python-dev

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



[issue21490] Add Py_ABS and Py_STRINGIFY macros

2014-05-14 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread Steve Dower

Steve Dower added the comment:

As far as Python 2.7 is concerned, I will be avoiding making any changes to the 
installer at all.

For Python 3.5 I'm trying to work out a few of the install issues, one of them 
being not installing into Program Files. I think symlinks may be the way to 
make that change work, in which case it will be trivial to add two more. That 
said, I prefer the py.exe launcher anyway (especially since it handles 
32/64-bit slightly better than this would), mostly since I intensely dislike 
permanently modifying PATH for anybody :)

--

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



[issue16442] PATH_MAX vs MAXPATHLEN vs pathconf(..., _PC_PATH_MAX).

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

 The HP-UX issue is fixed. Are we leaving this open for IRIX?

Python doesn't support IRIX. I tried to fix compilation issues on IRIX related 
to PATH_MAX, but there are more serious compilation issues (ex: in 
socketmodule.c for example if I remember correctly).

I suggest to close this issue.

changeset:   87113:159e51e5fc2c
branch:  3.3
parent:  87102:46fc4fb2c8c5
user:Victor Stinner victor.stin...@gmail.com
date:Fri Nov 15 17:09:24 2013 +0100
files:   Python/pythonrun.c
description:
pythonrun.c: fix Py_GetPythonHome(), use Py_ARRAY_LENGTH() to get the size of
the env_home buffer, not PATH_MAX+1. env_home is declared using MAXPATHLEN+1,
and PATH_MAX is not declared on IRIX.

--
nosy: +haypo

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



[issue7424] NetBSD: segmentation fault in listextend during install

2014-05-14 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
title: segmentation fault in listextend during install - NetBSD: segmentation 
fault in listextend during install

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



[issue3539] Problem with testembed make dependencies in certain circumstances

2014-05-14 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

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



[issue3539] Problem with testembed make dependencies in certain circumstances

2014-05-14 Thread Stefan Krah

Stefan Krah added the comment:

The original problem is fixed, but a similar one exists with
testembed (see msg113305 for instructions):

gcc -pthread   -Xlinker -export-dynamic -o Modules/_testembed 
Modules/_testembed.o libpython3.5dm.a -lpthread -ldl  -lutil   -lm
gcc: error: Modules/_testembed.o: No such file or directory
make: *** [Modules/_testembed] Error 1

--
title: Problem with pgen make dependencies in certain circumstances - Problem 
with testembed make dependencies in certain circumstances
versions: +Python 3.5 -Python 2.6

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



[issue20128] Re-enable test_modules_search_builtin() in test_pydoc

2014-05-14 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

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



[issue21495] Sane default for logging config

2014-05-14 Thread Eric Snow

Eric Snow added the comment:

FWIW, I agree with Vinay.

--
nosy: +eric.snow

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread eryksun

eryksun added the comment:

How about using hard links (mklink /H) instead? It's a minor issue, but there's 
a bug in Explorer that breaks opening symbolic links to EXE, COM, CMD, and BAT 
files (exefile, comfile, cmdfile, batfile). Explorer displays the error message 
the specified path does not exist. These file types have shell\open\command 
set to %1 %*, i.e. the file itself (%1) is used as the command. 

C:\reg query hkcr\exefile\shell\open\command /ve

HKEY_CLASSES_ROOT\exefile\shell\open\command
(Default)REG_EXPAND_SZ%1 %*

I assume that's because these file types can be passed directly to 
CreateProcess. However, the Explorer bug isn't a problem with CreateProcess, or 
even ShellExecuteEx. Maybe it's due to an overly strict security policy. 
Anyway, my 2 cents is use hard links.

--
nosy: +eryksun

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread Steve Dower

Steve Dower added the comment:

 there's a bug in Explorer that breaks opening symbolic links to EXE, COM, 
 CMD, and BAT files

Do you know which versions of Windows this applies to? It works fine for me 
(though I'm up to date), and the file associations have not changed.

I've seen some suggestions that creating a symlink without the right file 
extension (e.g. python2 === python.exe rather than python2.exe) will fail 
in some cases, but that's easily avoided by getting the symlink right.

--

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



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-05-14 Thread Berker Peksag

Berker Peksag added the comment:

Here's a patch to implement expandvars() for PurePath (with tests and 
documentation update).

--
keywords: +patch
nosy: +berker.peksag
stage:  - patch review
Added file: http://bugs.python.org/file35252/issue21301.diff

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



[issue21075] fileinput should use stdin.buffer for rb mode

2014-05-14 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread eryksun

eryksun added the comment:

Here's a related superuser question: 

http://superuser.com/q/304093

The message box shown in the older answer is what I get:

http://i.stack.imgur.com/bqXBs.png

The problem is only with Explorer. I can execute a symbolic link to an EXE via 
cmd, subprocess.Popen, os.startfile (ShellExecute), and so on. Also, Explorer 
only does this for the executable file types that I mentioned. It has no 
problem opening symbolic links to .py files; the difference is the open command 
line for a Python.File includes a program to run:

C:\ftype Python.File
Python.File=C:\Windows\py.exe %1 %*

It works if I change the shell\open\command for the exefile type to run via cmd 
/c. But that's just silly.

--

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



[issue21360] mailbox.Maildir should ignore files named with a leading dot

2014-05-14 Thread R. David Murray

R. David Murray added the comment:

I wonder if changing this would break any working programs.  I'd like to think 
not, but it is certainly possible for someone to be actually depending this bug.

--
components: +email
nosy: +akuchling, barry, r.david.murray

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



[issue12619] Automatically regenerate platform-specific modules

2014-05-14 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

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



[issue16124] fcntl_ioctl still not 100% sane with unsigned longs

2014-05-14 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy:  -skrah

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



[issue21075] fileinput should use stdin.buffer for rb mode

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7e640fefc9c1 by Serhiy Storchaka in branch '3.4':
Issue #21075: fileinput.FileInput now reads bytes from standard stream if
http://hg.python.org/cpython/rev/7e640fefc9c1

New changeset 4041d4077a85 by Serhiy Storchaka in branch 'default':
Issue #21075: fileinput.FileInput now reads bytes from standard stream if
http://hg.python.org/cpython/rev/4041d4077a85

--
nosy: +python-dev

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



[issue21075] fileinput should use stdin.buffer for rb mode

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Sam for your contribution.

--
resolution:  - fixed
stage:  - resolved
status: open - closed
versions: +Python 3.3

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



[issue1669539] Improve Windows os.path.join (ntpath.join) smart joining

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

ntpath.join() was fixed in issue19456.

--
nosy: +serhiy.storchaka

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



[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Due to the risk of breaking existing user code which uses these private 
functions, they should be left with old signature and new functions should be 
added.

The reason we make things private is so we don't have to do this. Why would you 
make an exception here?

--

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



[issue15809] IDLE console uses incorrect encoding.

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm going to commit my patch in few days. This is not perfect solution, but I 
believe it is better than current state.

--
nosy: +benjamin.peterson

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



[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Because there are explicit tests for these private functions.

--

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



[issue21402] tkinter.ttk._val_or_dict assumes tkinter._default_root exists

2014-05-14 Thread Stephen Paul Chappell

Stephen Paul Chappell added the comment:

Because there are explicit tests for these private functions.

Does that not mean that both the functions and their explicit tests should be 
changed?

--

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread Steve Dower

Steve Dower added the comment:

Apparently there's a distinction between absolute and relative symlinks. Do you 
see a difference between:

 mklink python2.7.exe python.exe

and 

 mklink python2.7.exe C:\Python27\python.exe

?

--

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



[issue20998] fullmatch isn't matching correctly under re.IGNORECASE

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6267428afbdb by Serhiy Storchaka in branch '3.4':
Issue #20998: Fixed re.fullmatch() of repeated single character pattern
http://hg.python.org/cpython/rev/6267428afbdb

New changeset bcf64c1c92f6 by Serhiy Storchaka in branch 'default':
Issue #20998: Fixed re.fullmatch() of repeated single character pattern
http://hg.python.org/cpython/rev/bcf64c1c92f6

--
nosy: +python-dev

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



[issue20998] fullmatch isn't matching correctly under re.IGNORECASE

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Matthew for your contribution.

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

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



[issue21487] Assorted ipaddress performance improvements

2014-05-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks as second alternative is few percents faster then first one.

--

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



[issue19625] IDLE 2.7 should use UTF-8 as it's default encoding

2014-05-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For the benefit of anyone finding this in a search, I fixed the title to match 
the actual request.  UTF-8 *is* already the default encoding in 3.x, and 
upgrading to 3.x if at all possible is the best solution to unicode problems.

--
nosy: +terry.reedy
title: IDLE should use UTF-8 as it's default encoding - IDLE 2.7 should use 
UTF-8 as it's default encoding

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



[issue20977] pyflakes: undefined ctype in 2 except blocks in the email module

2014-05-14 Thread Rose Ames

Rose Ames added the comment:

Thanks guys!  Added minimal tests necessary to expose the bug.

--
Added file: http://bugs.python.org/file35253/expose_bug.patch

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



[issue15809] 2.7 IDLE console uses incorrect encoding.

2014-05-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

It took me awhile to re-recognize Это из консоли: as 'made in konsole'.
I agree that the discrepancy between Idle shell and console is a bug relative 
to a general goal of having them work as nearly the same as possible and 
sensible.

 This bug is critical for non-ASCII-only users of IDLE.

This bug, like many others involving non-Ascii chars, has already been fixed in 
3.x, though it is not only a 2 versus 3 issue. Given that there are technical 
limits to imitating the console, we could have closed this issue as already 
fixed, wont fix in 2.7, upgrade to a version that has the fix.  However, 
since this is also a within 2.7, console versus Idle issue, improvement would 
be good.

The +coding cookie, -1 line hack induces a non-obvious dependency between files 
that I think should be documented by comments such as
# run.cleanup_traceback() compensates for added line
# compensation for coding cookie added in pyshel..runsource()

I think it ok to push less than perfect patches that make definite improvements 
and do not preclude possibly better patches in the future.  I have not seen any 
comment from alex whether this fixes his particular example on his machine, but 
if you are convinced that this fixes some problems and only causes a micro 
slowdown of working uses, go ahead.

--
title: IDLE console uses incorrect encoding. - 2.7 IDLE  console uses 
incorrect encoding.

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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2014-05-14 Thread eryksun

eryksun added the comment:

Using a relative target in the link isn't the problem for me here. (See issue 
13702 for another problem with relative links.) I'm in the same boat as 
commenter weberc2. Same symptom; apparently a different problem.

I'm using an absolute path for the target:

C:\Program Files\Python\Scriptsmklink python2.7.exe C:\Program 
Files\Python\Python27\python.exe
symbolic link created for python2.7.exe === C:\Program 
Files\Python\Python27\python.exe

(Mirror the --user layout in %AppData%.)

This works fine from cmd, but not Explorer. Anyway, the link would be added to 
support shell scripts that use shebangs for environments such as MSYS, so 
executing with Explorer isn't the goal anyway. The shortcut in the start menu 
would target python.exe, not the symbolic/hard link.

--

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



[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-14 Thread Kristian Benoit

New submission from Kristian Benoit:

I'm trying to parse a json and keep getting ValueError. File reports the file 
as being UTF-8 Unicode (with BOM) text, vim reports it as UTF-8, ...

json.load docs says it support UTF-8 out of the box.

Here's a link to the file : 
http://donnees.ville.sherbrooke.qc.ca/storage/f/2014-03-10T17%3A45%3A18.959Z/matieres-residuelles.json

--
files: matieres.json
messages: 218573
nosy: Kristian.Benoit
priority: normal
severity: normal
status: open
title: json.load fails to read UTF-8 file with (BOM) Byte Order Marks
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file35254/matieres.json

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



[issue21363] io.TextIOWrapper always closes wrapped files

2014-05-14 Thread R. David Murray

R. David Murray added the comment:

I think detach is the correct way to to this, so I'm closing the issue.

--
nosy: +r.david.murray
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue21488] codecs.encode/decode documentation inconsistency

2014-05-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a6f0aaeb96a by Victor Stinner in branch '2.7':
Issue #21488: Oops, the patch for codecs.encode/decode doc was written by
http://hg.python.org/cpython/rev/0a6f0aaeb96a

New changeset 91dca6b9ef0f by Victor Stinner in branch '3.4':
Issue #21488: Oops, the patch for codecs.encode/decode doc was written by
http://hg.python.org/cpython/rev/91dca6b9ef0f

--

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



[issue21363] io.TextIOWrapper always closes wrapped files

2014-05-14 Thread Armin Ronacher

Armin Ronacher added the comment:

Detach destroys the stream, so it's not a solution.  I can't just randomly 
destroy global state just because it's convenient.

This is what I am doing now which seems borderline insane: 
https://github.com/mitsuhiko/click/blob/master/click/_compat.py#L31

--

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



[issue21363] io.TextIOWrapper always closes wrapped files

2014-05-14 Thread Armin Ronacher

Armin Ronacher added the comment:

Ah. Misread.  This is about detaching the underlying stream from TextIOWrapper. 
 I assume this could be done in the __del__ so that would work.  I'm checking 
this now.

--

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



[issue21363] io.TextIOWrapper always closes wrapped files

2014-05-14 Thread Armin Ronacher

Armin Ronacher added the comment:

I can confirm that calling detach() in __del__ within an except block solves 
the issue.

--

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



[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

In Python 2, json.loads() accepts str and unicode types. You can support JSON 
starting with a UTF-8 BOM using the Python codec utf-8-sig. Example:

 codecs.BOM_UTF8 + b'{\n}'
'\xef\xbb\xbf{\n}'
 json.loads(codecs.BOM_UTF8 + b'{\n}')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib64/python2.7/json/__init__.py, line 338, in loads
return _default_decoder.decode(s)
  File /usr/lib64/python2.7/json/decoder.py, line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File /usr/lib64/python2.7/json/decoder.py, line 383, in raw_decode
raise ValueError(No JSON object could be decoded)
ValueError: No JSON object could be decoded
 json.loads((codecs.BOM_UTF8 + b'{\n}').decode('utf-8-sig'))
{}

--
nosy: +haypo

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



[issue21364] Documentation Recommends Broken Pattern

2014-05-14 Thread R. David Murray

R. David Murray added the comment:

The issue of (mixed) string and binary input/output on the standard streams is 
still a bit of a work in progress, I think, both documentation wise and code 
wise.  So I'm not sure we know yet what the best practice is to recommend here.

I think I agree with Armin, though.  I think mentioning reading binary from 
sys.stdin.buffer is fine, but suggesting replacing the streams is bad.  If 
someone figures that out on their own, it's on their own head, but I don't 
think we should suggest it.

That said, that shutdown error message is probably a bug of one sort or another.

--
nosy: +r.david.murray
versions:  -Python 3.3

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



[issue21364] Documentation Recommends Broken Pattern

2014-05-14 Thread Armin Ronacher

Armin Ronacher added the comment:

Sidestepping:  The shutdown message is a related issue.  TextIOWrapper tends to 
internally log errors apparently which is super annoying and probably should be 
fixed.  I encountered the same problem with sockets disconnecting wrapped in 
TextIOWrapper always writing some dummy traceback to stderr which I can't 
silence.

--

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



[issue21507] set and frozenset constructor should use operator.length_hint to guess the size of the iterator

2014-05-14 Thread STINNER Victor

STINNER Victor added the comment:

frozenset constructor has different implementations depending on the input 
type: set (or frozenset), dict or iterator. The constructor preallocates the 
frozenset for set and dict, but not for generic iterator and so the set may 
have a suboptimal size.

Attached patch set_length_hint.patch optimizes also the 3rd case using 
operator.length_hint (PyObject_LengthHint in C).

Since it is an optimization, I prefer to only apply it to Python 3.5 to limit 
the risk of regression.

--
keywords: +patch
nosy: +haypo
title: memory used by frozenset created from set differs from that of frozenset 
created from other iterable - set and frozenset constructor should use 
operator.length_hint to guess the size of the iterator
versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4
Added file: http://bugs.python.org/file35255/set_length_hint.patch

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



  1   2   >