[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2014-01-01 Thread Stefan Behnel

Stefan Behnel added the comment:

*bump* - patch pending review.

--

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



[issue20065] Python-3.3.3/Modules/socketmodule.c:1660:14: error: 'CAN_RAW' undeclared (first use in this function)

2014-01-01 Thread Charles-François Natali

Changes by Charles-François Natali cf.nat...@gmail.com:


--
assignee:  - neologix

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



[issue20102] shutil._make_zipfile possible resource leak

2014-01-01 Thread Peter Santoro

New submission from Peter Santoro:

Now that zipfile.ZipFile supports the context manager protocol, shouldn't
shutil._make_zipfile make use of it to avoid the possibility of the archive 
file not being closed properly if an exception occurs?  It should be noted that 
shutil._unpack_zipfile does use try/finally to ensure that files are closed.

--
components: Library (Lib)
files: shutil.diff
keywords: patch
messages: 207132
nosy: pe...@psantoro.net
priority: normal
severity: normal
status: open
title: shutil._make_zipfile possible resource leak
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file33291/shutil.diff

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



[issue20101] Determine correct behavior for time functions on Windows

2014-01-01 Thread Jeremy Kloth

Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:


--
nosy: +jkloth

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



[issue20077] Format of TypeError differs between comparison and arithmetic operators

2014-01-01 Thread Mitchell Model

Mitchell Model added the comment:

Patch looks good to me. I like the choice to drop the parens. This is my first 
time reviewing a change; did I go through the right mechanics? I clicked Review 
on the issue's patch, looked at the diff, and a published a message similar to 
this one. Was I supposed to do something else? Is that message what Review is 
looking for? Was the Please review directed at me? Am I supposed to make a 
comment like looks good here? do something else?

--

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



[issue20075] help(open) eats first line

2014-01-01 Thread Gennadiy Zlobin

Gennadiy Zlobin added the comment:

Zachary, thank you for review. Here's the updated patch.

--
Added file: http://bugs.python.org/file33292/20075-3.patch

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



[issue20103] Documentation of itertools.accumulate is confused

2014-01-01 Thread Mitchell Model

New submission from Mitchell Model:

The documentation of itertools.accumulate (10.1) starts out with 2 misleading 
sentences: Make an iterator that returns accumulated sums. Elements may be any 
addable type... It then goes on to show examples of using the func parameter 
added in 3.3 that are not additions. It should be changed to something like: 
Make an iterator that returns accumulated values. Elements may be any type 
that can be an argument to func. Func defaults to addition, so by default 
elements can be any addable types, ... My wording is awkward, but you get the 
idea. I think this is a significant documentation issue, not just a nit.

--
assignee: docs@python
components: Documentation
messages: 207135
nosy: MLModel, docs@python
priority: normal
severity: normal
status: open
title: Documentation of itertools.accumulate is confused
versions: Python 3.3, Python 3.4

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



[issue20098] email policy needs a mangle_from setting

2014-01-01 Thread Gennadiy Zlobin

Gennadiy Zlobin added the comment:

I created the patch, please review it.

--
keywords: +patch
nosy: +gennad
Added file: http://bugs.python.org/file33293/20098.patch

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



[issue20103] Documentation of itertools.accumulate is confused

2014-01-01 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
nosy: +rhettinger

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



[issue20104] expose posix_spawn(p)

2014-01-01 Thread Benjamin Peterson

New submission from Benjamin Peterson:

posix_spawn is a nice, efficient replacement for fork()/exec(). We should 
expose it and possibly use it in subprocess where possible.

--
components: Extension Modules
messages: 207137
nosy: benjamin.peterson
priority: normal
severity: normal
stage: needs patch
status: open
title: expose posix_spawn(p)
type: performance
versions: Python 3.5

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



[issue20104] expose posix_spawn(p)

2014-01-01 Thread Gennadiy Zlobin

Changes by Gennadiy Zlobin gennad.zlo...@gmail.com:


--
nosy: +gennad

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



[issue20104] expose posix_spawn(p)

2014-01-01 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +alex

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



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2014-01-01 Thread R. David Murray

R. David Murray added the comment:

The patch looks good to me, but since I'm not familiar with perf.py I'm not a 
good person to do a final review and commit it.

One trivial question: why do you check for tupleness in PythonRuntime's init?  
Don't you control the input on both code paths to obtaining the version?

--
nosy: +r.david.murray

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



[issue20104] expose posix_spawn(p)

2014-01-01 Thread Antoine Pitrou

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


--
nosy: +gregory.p.smith, neologix

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



[issue20104] expose posix_spawn(p)

2014-01-01 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Unless it could replace the fork+exec code path in its entirety, which I do not 
believe is possible, I see posix_spawn() as a distraction and additional 
maintenance burden with no benefit.

http://pubs.opengroup.org/onlinepubs/759899/functions/posix_spawn.html

Read the RATIONALE section.  The posix_spawn API was not created to make 
subprocess creation easier (i'd argue that it is the same burden to setup a 
proper call to posix_spawn as it is to do everything right for fork and exec).

One notable thing posix_spawn() does not support: setsid() 
(start_new_session=True) of the child process.  Obviously it also couldn't 
handle the arbitrary preexec_fn but preexec_fn is in general considered harmful.

--
priority: normal - low

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



[issue20065] Python-3.3.3/Modules/socketmodule.c:1660:14: error: 'CAN_RAW' undeclared (first use in this function)

2014-01-01 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue20098] email policy needs a mangle_from setting

2014-01-01 Thread R. David Murray

R. David Murray added the comment:

Sorry, my message wasn't clear.  The current default needs to remain the same.  
What needs to be added is email.policy.Policy.mange_from, which should be True 
in the compat32 policy and False in EmailPolicy. Then it needs to be hooked up 
the Generator, so that an explicit specificaion in the __init__ overrides the 
policy, but specifying one of EmailPolicy dervived policies will override the 
default value of the __init__ argument if the argument is not speicifed 
explicitly in the Generator constructor call.  (Backward compatibility is a 
pain.)

--

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



[issue20101] Determine correct behavior for time functions on Windows

2014-01-01 Thread Tim Peters

Tim Peters added the comment:

I'm not sanguine about fixing any of this :-(  The Microsoft docs are awful, 
and the more web searches I do the more I realize that absolutely everyone is 
confused, just taking their best guesses.

FYI, here are results from your new program on my 32-bit Vista box:

3.4.0b1 (default:9d1fb265b88a, Dec 10 2013, 18:48:53) [MSC v.1600 32 bit 
(Intel)]
Windows-Vista-6.0.6002-SP2
Running:
...
monotonic namespace(adjustable=False, implementation='GetTickCount64()', 
monotonic=True, resolution=0.015625)
.
total: 25 good: 25 bad: 0
[(0.5, 25)]

time namespace(adjustable=True, implementation='GetSystemTimeAsFileTime()', 
monotonic=False, resolution=0.015625)
F
total: 25 good: 0 bad: 25
[(0.4999678134918213, 5), (0.4999680519104004, 20)]

clock namespace(adjustable=False, implementation='QueryPerformanceCounter()', 
monotonic=True, resolution=2.793651148400146e-07)
.
total: 25 good: 1 bad: 24
[(0.49919109830998076, 1), (0.4996682539261279, 1), (0.4997051301212867, 1),
 (0.4997221713932909, 1), (0.49972636187001385, 1), (0.499727479330474, 1),
 (0.49973139044208104, 1), (0.49973390472811463, 1), (0.4997383745699526, 1),
 (0.49974479996759325, 1), (0.4997501079047755, 1), (0.4997501079047756, 1),
 (0.49975318092104004, 1), (0.499756533302417, 1), (0.4997598856837939, 1),
 (0.49976239996982863, 1), (0.49976714917678144, 1), (0.49977078092327387, 1), 
(0.49977189838373315, 1), (0.4997724571139628, 1),
 (0.49965051145, 1), (0.49979173330688553, 1), (0.4997973206091828, 1),
 (0.4998065396579734, 1), (0.500726488981142, 1)]

perf_counter namespace(adjustable=False, 
implementation='QueryPerformanceCounter()', monotonic=True, 
resolution=2.793651148400146e-07)
Same clock as time.clock

--

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



[issue20105] Codec exception chaining is losing traceback details

2014-01-01 Thread Nick Coghlan

New submission from Nick Coghlan:

The exception chaining in the codecs subsystem is currently losing the details 
of the original traceback.

Compare this traceback from Python 3.3:

 codecs.decode(babcdefgh, hex_codec)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib64/python3.3/encodings/hex_codec.py, line 20, in hex_decode
return (binascii.a2b_hex(input), len(input))
binascii.Error: Non-hexadecimal digit found

With the current behaviour of Python 3.4:

 codecs.decode(babcdefgh, hex)
binascii.Error: Non-hexadecimal digit found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File stdin, line 1, in module
binascii.Error: decoding with 'hex' codec failed (Error: Non-hexadecimal digit 
found)

The original traceback header and details are missing in the latter. It should 
look more like the following:

 try:
... 1/0
... except Exception as e:
... raise Exception(Explicit chaining) from e
... 
Traceback (most recent call last):
  File stdin, line 2, in module
ZeroDivisionError: division by zero

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File stdin, line 4, in module
Exception: Explicit chaining

--
assignee: ncoghlan
components: Interpreter Core
keywords: 3.4regression
messages: 207142
nosy: ncoghlan
priority: deferred blocker
severity: normal
stage: test needed
status: open
title: Codec exception chaining is losing traceback details
type: behavior
versions: Python 3.4

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



[issue20097] Bad use of `self` in importlib

2014-01-01 Thread Eric Snow

Eric Snow added the comment:

Here's a patch with tests that cover find_module() and find_spec() for 
WindowsRegistryFinder (the missing case) and fixes the bug.

--
keywords: +patch
nosy: +eric.snow
stage: test needed - patch review
Added file: http://bugs.python.org/file33294/issue20097-tests.diff

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



[issue20097] Bad use of `self` in importlib

2014-01-01 Thread Eric Snow

Eric Snow added the comment:

The patch passes on my linux box and on my windows 7 laptop (using Visual 
Studio 2010 Express).

--

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



[issue20097] Bad use of `self` in importlib

2014-01-01 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


Removed file: http://bugs.python.org/file33294/issue20097-tests.diff

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



[issue20097] Bad use of `self` in importlib

2014-01-01 Thread Eric Snow

Eric Snow added the comment:

Here's an updated patch that fixes as copy-and-paste mistake.

--
Added file: http://bugs.python.org/file33295/issue20097-tests.diff

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



[issue20080] Unused variable in Lib/sqlite3/test/factory.py

2014-01-01 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Thanks, Eric! Attached the patch to address Eric's concern.

--
Added file: 
http://bugs.python.org/file33296/unused_variable_in_factory_py_v2.patch

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