Re: getting fileinput to do errors='ignore' or 'replace'?

2015-12-04 Thread Serhiy Storchaka

On 04.12.15 00:26, Oscar Benjamin wrote:

On 3 Dec 2015 16:50, "Terry Reedy"  wrote:

fileinput is an ancient module that predates iterators (and generators)

and context managers. Since by 2.7 open files are both context managers and
line iterators, you can easily write your own multi-file line iteration
that does exactly what you want.  At minimum:


for file in files:
 with codecs.open(file, errors='ignore') as f
 # did not look up signature,
 for line in f:
 do_stuff(line)


The above is fine but...


To make this reusable, wrap in 'def filelines(files):' and replace

'do_stuff(line)' with 'yield line'.

That doesn't work entirely correctly as you end up yielding from inside a
with statement. If the user of your generator function doesn't fully
consume the generator then whichever file is currently open is not
guaranteed to be closed.


You can convert the generator to context manager and use it in the with 
statement to guarantee closing.


with contextlib.closing(filelines(files)) as f:
for line in f:
...


--
https://mail.python.org/mailman/listinfo/python-list


Re: Is vars() the most useless Python built-in ever?

2015-12-04 Thread Serhiy Storchaka

On 02.12.15 11:28, Chris Angelico wrote:

On Wed, Dec 2, 2015 at 7:22 PM, Serhiy Storchaka  wrote:

On 01.12.15 03:00, Steven D'Aprano wrote:

I'm trying to understand why vars() exists. Does anyone use it?

I use vars() exclusively for introspection in interactive environment. As
well as dir() and help(). Sad that it doesn't work with __slots__.

Maybe the upshot of all this is a post to python-ideas recommending
that vars() grow support for __slots__ types? If it's most often used
interactively, this would make it more useful there, and it wouldn't
break backward compatibility unless there's some way that people are
depending on it raising an exception.


It already was discussed few times. And there is even open issue for 
this: http://bugs.python.org/issue13290.



--
https://mail.python.org/mailman/listinfo/python-list


[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Dominik Schmid

New submission from Dominik Schmid:

While implementing my own Integer class that keeps track of when operations are 
applied I noticed that setattr had a strange behaviour when I tried to wrap 
operator functions.

When the attribute string had a different id to its literal it failed to 
overload the operator.
Are we doing a 'is' rather than a '==' somewhere in setattr?


expected result: 
139723705431168a.__add__(b)= (5)a+b= (5)
139723705431168a.__add__(b)= (5)a+b= (5)
139723704361584a.__add__(b)= (5)a+b= (5)


actual result:
139723705431168a.__add__(b)= (5)a+b= (5)
139723705431168a.__add__(b)= (5)a+b= (5)
139723704361584a.__add__(b)= (5)a+b=
Traceback (most recent call last):
  File "/home/dom/Documents/leastOps/bug.py", line 41, in 
testSetattr(funcName3)
  File "/home/dom/Documents/leastOps/bug.py", line 28, in testSetattr
print '   a+b=', a+b
TypeError: unsupported operand type(s) for +: 'Integer' and 'Integer'



version:
2.7.10 (default, Oct 14 2015, 16:09:02) 
[GCC 5.2.1 20151010]
ubuntu 14.10

--
components: Interpreter Core
files: bug.py
messages: 255853
nosy: Dominik Schmid
priority: normal
severity: normal
status: open
title: __setattr__ does not always overload operators
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file41234/bug.py

___
Python tracker 

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



[issue25664] Logging cannot handle Unicode logger names

2015-12-04 Thread Vinay Sajip

Vinay Sajip added the comment:

The problem is that logger names which are Unicode are not handled correctly, 
leading to the error.

--
assignee:  -> vinay.sajip
title: Unexpected UnicodeDecodeError in logging module -> Logging cannot handle 
Unicode logger names

___
Python tracker 

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



Re: getting fileinput to do errors='ignore' or 'replace'?

2015-12-04 Thread Oscar Benjamin
On 4 Dec 2015 08:36, "Serhiy Storchaka"  wrote:
>
> On 04.12.15 00:26, Oscar Benjamin wrote:
>>
>> On 3 Dec 2015 16:50, "Terry Reedy"  wrote:
>>>
>>> fileinput is an ancient module that predates iterators (and generators)
>>
>> and context managers. Since by 2.7 open files are both context managers
and
>> line iterators, you can easily write your own multi-file line iteration
>> that does exactly what you want.  At minimum:
>>>
>>>
>>> for file in files:
>>>  with codecs.open(file, errors='ignore') as f
>>>  # did not look up signature,
>>>  for line in f:
>>>  do_stuff(line)
>>
>>
>> The above is fine but...
>>
>>> To make this reusable, wrap in 'def filelines(files):' and replace
>>
>> 'do_stuff(line)' with 'yield line'.
>>
>> That doesn't work entirely correctly as you end up yielding from inside a
>> with statement. If the user of your generator function doesn't fully
>> consume the generator then whichever file is currently open is not
>> guaranteed to be closed.
>
>
> You can convert the generator to context manager and use it in the with
statement to guarantee closing.
>
> with contextlib.closing(filelines(files)) as f:
> for line in f:
> ...

Or you can use fileinput which is designed to be exactly this kind of
context manager and to be used in this way. Although fileinput is slightly
awkward in defaulting to reading stdin.

--
Oscar
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25795] test_fork1 cannot be run directly: ./pyhon Lib/test/test_fork1.py

2015-12-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +zach.ware

___
Python tracker 

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



problem

2015-12-04 Thread Dylan Goodwin
Every time I try and run python 3.5 it keeps coming up with modify, repair
or uninstall
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Wolfgang Maier

Wolfgang Maier added the comment:

> The error() function in PC/launcher.c should call exit(rc) instead of 
> ExitProcess(rc). This allows the CRT to terminate properly and flush the 
> stderr FILE stream.

Interesting. Why do you need to flush stderr? I would have expected it to be 
unbuffered in the first place. What's the usecase/advantage of calling 
ExitProcess then?
Sorry, if that does not really belong here and just shows my limited knowledge 
of C.

--

___
Python tracker 

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



[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Vinay Sajip

Changes by Vinay Sajip :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue25795] test_fork1 cannot be run directly: ./pyhon Lib/test/test_fork1.py

2015-12-04 Thread STINNER Victor

New submission from STINNER Victor:

haypo@smithers$ ./python Lib/test/test_fork1.py 
Traceback (most recent call last):
  File "Lib/test/test_fork1.py", line 111, in 
unittest.main()
NameError: name 'unittest' is not defined

According to pyflakes, the error "undefined name 'unittest'" is found in:

- test_fork1
- test_list
- test_pyclbr
- test_telnetlib
- test_tuple
- test_userdict
- test_userlist
- test_wait4

I put the "easy" flag to give a simple issue to newcomers in Python ;-)

Please check other Python version: 2.7 and 3.5. I'm too lazy to check myself :-D

See issue the issue #25783 which is similar.

--
components: Tests
keywords: easy
messages: 255856
nosy: haypo
priority: normal
severity: normal
status: open
title: test_fork1 cannot be run directly: ./pyhon Lib/test/test_fork1.py
versions: Python 3.6

___
Python tracker 

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



[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-04 Thread STINNER Victor

STINNER Victor added the comment:

The test was introduced by the change 73afda5a4e4c of the issue ##17911 in 
Python 3.6:
---
changeset:   94850:73afda5a4e4c
parent:  94848:fc0201ccbcd4
user:Robert Collins 
date:Thu Mar 05 12:07:57 2015 +1300
files:   Doc/library/linecache.rst Doc/library/traceback.rst 
Lib/linecache.py Lib/test/test_linecache.py Lib/test/test_traceback.py L
description:
Issue #17911: traceback module overhaul

Provide a way to seed the linecache for a PEP-302 module without actually
loading the code.

Provide a new object API for traceback, including the ability to not lookup
lines at all until the traceback is actually rendered, without any trace of the
original objects being kept alive.
---

I would prefer that Robert reviews the change to make sure that it's correct.

It looks like running Lib/test/test_traceback.py creates a less deeper 
callback, the callback has 10 frames whereas the test ensures that we have 
*more* than 10 frames. Output of traceback.print_traceback():
---
..
  File "Lib/test/test_traceback.py", line 923, in 
unittest.main()
  File "/home/haypo/prog/python/default/Lib/unittest/main.py", line 94, in 
__init__
self.runTests()
  File "/home/haypo/prog/python/default/Lib/unittest/main.py", line 255, in 
runTests
self.result = testRunner.run(self.test)
  File "/home/haypo/prog/python/default/Lib/unittest/runner.py", line 176, in 
run
test(result)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 84, in 
__call__
return self.run(*args, **kwds)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 122, in run
test(result)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 84, in 
__call__
return self.run(*args, **kwds)
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 122, in run
test(result)
  File "/home/haypo/prog/python/default/Lib/unittest/case.py", line 648, in 
__call__
return self.run(*args, **kwds)
  File "/home/haypo/prog/python/default/Lib/unittest/case.py", line 600, in run
testMethod()
  File "Lib/test/test_traceback.py", line 683, in test_walk_stack
traceback.print_stack()
---

I count 11 frames, but I guess that we should exclude the latest one.

If I understood correctly, we should modify the unit test to check that we have 
at least *9* frames instead of 10.

I don't think that it's ok to test the *exact* number of frames, because it's 
highly dependent of the implementation of the unittest module. Tomorrow, the 
unittest module may be modified to add new calls in the call stacks... or maybe 
even remove some calls, but IMHO this is less likely.

---

This issue remembers me a very complex issue related to 
sys.setrecursionlimit(), issue #25274. I factored deeply Lib/test/regrtest.py 
(which even became a "library", Lib/test/libregrtest/), and with this change, I 
added more calls to the call stack. As a consequence, I triggered a new complex 
bug in how Python handles RecursionError.

At the end, I modified sys.setrecursionlimit() to raise directly a 
RecursionError if the new limit is too low *depending on the depth of the 
current call stack* ;-)

--

___
Python tracker 

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



[issue25796] Running test_multiprocessing_spawn is slow (more than 8 minutes)

2015-12-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

First, we have to mark longest tests with @support.requires_resource('cpu').

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Eryk Sun

Changes by Eryk Sun :


Removed file: http://bugs.python.org/file41235/issue25794_1.patch

___
Python tracker 

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



python 3.5.0rc1 problem opening IDLE in windows

2015-12-04 Thread Nicky Mac
Dear python team
since windows applied some updates last night to my windows 10 and windows
7 systems,
I can't open anything with IDLE as I usually do.
On windows 10 (64bit with 64bit python), I performed the installation
repair procedure.
* Edit with IDLE does not appear as an installed windows program.
* when I open my usual shortcut to IDLE (
C:\Python\Python35\Lib\idlelib\idle.py)
 something briefly flashes on the screen *and immediately disappears.*
* if I directly open a python program in windows, I get these options (as
usual):-
edit with IDLE (-> python launcher for windows console)
edit with IDLE  (-> edit with IDLE (64bit))  - which I always
use, *nothing
happens*

Any ideas gratefully received!!!
sincerely
Nick "Mac" McElwaine
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue10141] SocketCan support

2015-12-04 Thread Vinay Sajip

Changes by Vinay Sajip :


--
status: open -> closed

___
Python tracker 

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



[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-04 Thread STINNER Victor

STINNER Victor added the comment:

I found a similar bug in other tests, I opened the new issue #25795.

--

___
Python tracker 

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



[issue25796] Running test_multiprocessing_spawn is slow (more than 8 minutes)

2015-12-04 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Tests
type:  -> performance

___
Python tracker 

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



[issue25796] Running test_multiprocessing_spawn is slow (more than 8 minutes)

2015-12-04 Thread STINNER Victor

New submission from STINNER Victor:

Hi,

When I run the Python test suite with "./python -m test -j0 -rW",  
test_multiprocessing_spawn is almost the latest one to run. Example:
---
(...)
[399/401/1] test_lib2to3 (68 sec) -- running: test_zipfile (43 sec), 
test_multiprocessing_spawn (484 sec)
[400/401/1] test_zipfile (45 sec) -- running: test_multiprocessing_spawn (488 
sec)
^C
Waiting for test_multiprocessing_spawn

Test suite interrupted by signal SIGINT.
1 test omitted:
test_multiprocessing_spawn
(...)
---

Would it be possible to make it faster? Skip some tests? I don't know.

--
messages: 255860
nosy: haypo
priority: normal
severity: normal
status: open
title: Running test_multiprocessing_spawn is slow (more than 8 minutes)
versions: Python 3.6

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Eryk Sun

Eryk Sun added the comment:

Normally Python code calls built-in setattr, which calls the C API 
PyObject_SetAttr. This API interns the attribute name before calling the type's 
tp_setattro or tp_setattr function. Interning the string is a critical step, 
since the implementation for updating slots assumes the name is interned. 

The __setattr__ slot wrapper calls wrap_setattr in Objects/typeobject.c. In 
line with how PyObject_SetAttr works, the attached patch interns the name in 
wrap_setattr before calling the wrapped setattrofunc. For good measure it also 
applies the same change to wrap_delattr, though that's not strictly necessary.

--
keywords: +patch
nosy: +eryksun
versions: +Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41235/issue25794_1.patch

___
Python tracker 

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



[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Eryk Sun

Eryk Sun added the comment:

This updated patch calls PyUnicode_Check to ensure the name is a string before 
calling PyUnicode_InternInPlace.

--
Added file: http://bugs.python.org/file41236/issue25794_2.patch

___
Python tracker 

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



Re: How to bounce the ball forever around the screen

2015-12-04 Thread Peter Otten
phamton...@gmail.com wrote:

> from Tkinter import *
> window = Tk()
> canvas = Canvas(window, width=500, height=500, background="green")
> canvas.pack()
> 
> def move_ball(speed_x, speed_y):
> box = canvas.bbox("ball")
> x1 = box[0]
> y1 = box[1]
> x2 = box[2]
> y2 = box[3]
> 
> if x1 <= 0:
> speed_x = 0
> speed_y = 0
> 
> canvas.move("ball", speed_x, speed_y)
> canvas.after(30, move_ball, speed_x, speed_y)
> 
> canvas.create_oval(225, 225, 275, 275, fill="blue", tags="ball")
> 
> move_ball(-10, 7)
> 
> mainloop()
> 
>  where in the code should i change to make the ball bounce around forever. 
is it the x and y?

When the ball hits a wall you have to "reflect" it; for a vertical wall 
speed_x has to change:

if x1 <= 0: # ball hits left wall
speed_x = -speed_x
elif ... # ball hits right wall
speed_x = -speed_x

Can you come up with the correct check for the right wall?
To try if this part works correctly temporarily change

> move_ball(-10, 7)

to

move_ball(-10, 0)

so that the ball only moves in horizontal direction. Once this works handle 
the vertical walls and speed_y the same way.


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Emanuel Barry

Emanuel Barry added the comment:

As Stefan said, this is not a bug with Python. Enforcing strict type checking 
is the responsibility of third-party tools, not the interpreter.

--
nosy: +ebarry
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



Re: problem

2015-12-04 Thread Laura Creighton
In a message of Thu, 03 Dec 2015 21:25:53 +0200, Dylan Goodwin writes:
>Every time I try and run python 3.5 it keeps coming up with modify, repair
>or uninstall
>-- 
>https://mail.python.org/mailman/listinfo/python-list

What OS are you running?

If windows XP, your problem is that your OS is too old.  Python 3.5 is
not supported.  Stick with 3.4 or upgrade your OS.

If something else, you need to install 
the available service packs.  For instance, if you are running
Windows 7, https://www.microsoft.com/en-us/download/details.aspx?id=5842
is where you get service pack 1.

Laura Creighton

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Eryk Sun

Eryk Sun added the comment:

Patch 2 additionally modifies run_child to call exit() instead of ExitProcess. 
For example:

>>> import os, subprocess
>>> os.environ['PYLAUNCH_DEBUG'] = '1'
>>> p = subprocess.Popen(r'py -3 -c ""', stderr=subprocess.PIPE, 
stdout=subprocess.PIPE)
>>> p.stderr.read()
b''

Patched:

>>> p = subprocess.Popen(r'amd64\py_d -3 -c ""', stderr=subprocess.PIPE, 
stdout=subprocess.PIPE)
>>> p.stderr.readlines()[-1]
b'child process exit code: 0\r\n'

For good measure I also added a call to setvbuf to disable buffering stderr.

--
Added file: http://bugs.python.org/file41239/issue25789_2.patch

___
Python tracker 

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



[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Stefan Krah

Stefan Krah added the comment:

The compiler does not perform type checking.  These are
type *annotations* for third party tools like Mypy.

--
nosy: +skrah

___
Python tracker 

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



Re: [Python-ideas] Missing Core Feature: + - * / | & do not call __getattr__

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 7:20 AM, Stephan Sahm  wrote:
> Dear all,
>
> I just stumbled upon a very weird behaviour of python 2 and python 3. At
> least I was not able to find a solution.
>
> The point is to dynamically define __add__, __or__ and so on via __getattr__
> (for example by deriving them from __iadd__ or similar in a generic way).
> However this very intuitive idea is currently NOT POSSIBLE because * - * / &
> | and so on just bypass this standard procedure.
>
> I found two stackoverflow contributions stating this:
> http://stackoverflow.com/questions/11629287/python-how-to-forward-an-instances-method-call-to-its-attribute
> http://stackoverflow.com/questions/33393474/lazy-evaluation-forward-operations-to-deferred-value
>
> Neither the mentioned posts, nor I myself can see any reason why this is the
> way it is, nor how the operators are actually implemented to maybe bypass
> this unintuitive behaviour.

The cited reason is "speed optimizations":
https://docs.python.org/3/reference/datamodel.html#special-method-lookup

But there may be other reasons as well. __getattr__ and
__getattribute__ are meant to implement *attribute* lookup. Special
methods are best not regarded as attributes (although they can be
looked up as such), but as implementation of class behavior. You'll
note that special methods also aren't resolved in the instance dict,
but only in the class dict; this is viewed as a matter of correctness,
so that special methods work correctly on class objects (invoking the
metaclass) as well as on instances. In some cases there may also be a
chicken-and-egg problem; should Python call __getattribute__ in order
to resolve the __getattribute__ method?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Updated patch attached, responding to Martin's suggestions.

I'm not quite sure what to do about the 'finder' glossary entry. 'Finder' now 
seems to be a more abstract classification covering two distinct kinds of 
thing: *meta path finders* and *path entry finders*. They have similar methods 
(find_spec, find_module), but with slightly different signatures. Is 'finder' a 
sufficiently meaningful concept to remain in the glossary, or should we take it 
out and be explicit about what type of finder is meant elsewhere in the docs?

--
Added file: http://bugs.python.org/file41237/finders_and_specs2.patch

___
Python tracker 

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



Re: python 3.5.0rc1 problem opening IDLE in windows

2015-12-04 Thread Laura Creighton
In a message of Fri, 04 Dec 2015 11:26:59 +, Nicky Mac writes:
>Dear python team
>since windows applied some updates last night to my windows 10 and windows
>7 systems,
>I can't open anything with IDLE as I usually do.
>On windows 10 (64bit with 64bit python), I performed the installation
>repair procedure.
>* Edit with IDLE does not appear as an installed windows program.
>* when I open my usual shortcut to IDLE (
>C:\Python\Python35\Lib\idlelib\idle.py)
> something briefly flashes on the screen *and immediately disappears.*
>* if I directly open a python program in windows, I get these options (as
>usual):-
>edit with IDLE (-> python launcher for windows console)
>edit with IDLE  (-> edit with IDLE (64bit))  - which I always
>use, *nothing
>happens*
>
>Any ideas gratefully received!!!
>sincerely
>Nick "Mac" McElwaine

Go to a console window and type python -m idlelib

See if you get a useful traceback, and post it here.  (If idle just
works, tell us that, instead.)

Laura Creighton

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Steve Dower

Steve Dower added the comment:

ExitProcess is a system API and exit is the C runtime API. The C runtime is 
doing the buffering, so the system doesn't know about it and can't flush if you 
terminate through that API. The exit function should, or we could explicitly 
flush the buffer after writing to it.

--

___
Python tracker 

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



Re: urllib2.urlopen() crashes on Windows 2008 Server

2015-12-04 Thread Ulli Horlacher
Dennis Lee Bieber  wrote:

> >I have a Python2 program which runs fine on Windows 7, but
> >crashes on Windows 2008 Server R2 64 bit:
> >
> >downloading http://fex.belwue.de/download/7za.exe
> >Traceback (most recent call last):
> >  File "", line 1992, in 
> >  File "", line 180, in main
> >  File "", line 329, in get_ID
> >  File "", line 1627, in check_7z
> >  File "C:\Software\Python\lib\urllib2.py", line 154, in urlopen
> >  File "C:\Software\Python\lib\urllib2.py", line 431, in open
> >  File "C:\Software\Python\lib\urllib2.py", line 449, in _open
> >  File "C:\Software\Python\lib\urllib2.py", line 409, in _call_chain
> >  File "C:\Software\Python\lib\urllib2.py", line 1227, in http_open
> >  File "C:\Software\Python\lib\urllib2.py", line 1200, in do_open
> >  File "C:\Software\Python\lib\httplib.py", line 1132, in getresponse
> >  File "C:\Software\Python\lib\httplib.py", line 485, in begin
> >  File "C:\Software\Python\lib\mimetools.py", line 25, in __init__
> >  File "C:\Software\Python\lib\rfc822.py", line 108, in __init__
> >  File "C:\Software\Python\lib\httplib.py", line 319, in readheaders
> >  File "C:\Software\Python\lib\socket.py", line 480, in readline
> >error: [Errno 10054] Eine vorhandene Verbindung wurde vom Remotehost 
> >geschlossen
> >
> 
> Per MSDN:
> """
> WSAECONNRESET
> 10054
> 
> 
> 
> Connection reset by peer.
> 
> An existing connection was forcibly closed by the remote host. 

This is not true.
The server is under my control. Die client has terminated the connection
(or a router between).


How can I trap this within the python program?
I see no exception.


-- 
Ullrich Horlacher  Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de
Universitaet Stuttgart Tel:++49-711-68565868
Allmandring 30aFax:++49-711-682357
70550 Stuttgart (Germany)  WWW:http://www.tik.uni-stuttgart.de/
-- 
https://mail.python.org/mailman/listinfo/python-list


Sphinx 1.3.3 released

2015-12-04 Thread Takayuki Shimizukawa
Hi all,

I'm delighted to announce the release of Sphinx 1.3.3, now available on
the Python package index at .

It includes about 3 bug fixes for the 1.3 release series, among them a
regression in 1.3.2 that is including packaging error.

For the full changelog, go to .
Thanks to all coraborators and contributers!

What is it?
===

Sphinx is a tool that makes it easy to create intelligent and beautiful
documentation for Python projects (or other documents consisting of
multiple reStructuredText source files).

Website: http://sphinx-doc.org/
IRC: #sphinx-doc on irc.freenode.net

Enjoy!
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Dhruv Rajvanshi

New submission from Dhruv Rajvanshi:

Specifying default arguments break the type system. The types of default values 
aren't matched with the type of the argument.
Moreover, having None as a default value changes the type declaration to 
Optional[T]. So, the declaration may be 
f(a : int = None)
but this would be treated as
   f(a : Optional[int] = None)

--
components: Library (Lib)
files: test.py
messages: 255864
nosy: Dhruv Rajvanshi
priority: normal
severity: normal
status: open
title: Default argument values with type hints break type correctness
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41238/test.py

___
Python tracker 

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



Re: Exclude text within quotation marks and words beginning with a capital letter

2015-12-04 Thread Jason Friedman
>
> I am working on a program that is written in Python 2.7 to be compatible
> with the POS tagger that I import from Pattern. The tagger identifies all
> the nouns in a text. I need to exclude from the tagger any text that is
> within quotation marks, and also any word that begins with an upper case
> letter (including words at the beginning of sentences).
>
> Any advice on coding that would be gratefully received. Thanks.
>

Perhaps overkill, but wanted to make sure you knew about the Natural
Language Toolkit:  http://www.nltk.org/.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 10:37 AM, Ian Kelly  wrote:
> On Fri, Dec 4, 2015 at 10:21 AM, d...@forestfield.co.uk
>  wrote:
>> Python 3.5 will not run under Windows XP, but what about applications 
>> created using py2exe or cx_freeze under Windows 7, 8 or 10, is there any 
>> knowledge of whether they will run under XP?
>
> I wouldn't expect them to. Those bundlers are just packaging up the
> Python binary, so they should have all the same problems.

I'll confirm that expectation.

-- 
Zach
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Thomas Kluyver

Thomas Kluyver added the comment:

That's basically what I was aiming for. Should the description be briefer and 
more generic?

--

___
Python tracker 

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



[issue13033] Add shutil.chowntree

2015-12-04 Thread YoSTEALTH

YoSTEALTH added the comment:

Can this chowntree() function proposed here be implemented? It would have saved 
me a bunch of time and its a good feature to have.

--
nosy: +YoSTEALTH, r.david.murray

___
Python tracker 

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



[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

The generic "finder" glossary entry should be rather generic and then point to 
"meta path finder" and "path entry finder" for dis-ambiguity (and both of those 
terms are already in the glossary).

--

___
Python tracker 

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



Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread d...@forestfield.co.uk
Python 3.5 will not run under Windows XP, but what about applications created 
using py2exe or cx_freeze under Windows 7, 8 or 10, is there any knowledge of 
whether they will run under XP?

Regards,
David Hughes
Forestfield Software
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 10:21 AM, d...@forestfield.co.uk
 wrote:
> Python 3.5 will not run under Windows XP, but what about applications created 
> using py2exe or cx_freeze under Windows 7, 8 or 10, is there any knowledge of 
> whether they will run under XP?

I wouldn't expect them to. Those bundlers are just packaging up the
Python binary, so they should have all the same problems.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Unicode failure

2015-12-04 Thread Oscar Benjamin
On 4 Dec 2015 22:34, "D'Arcy J.M. Cain"  wrote:
>
> I thought that going to Python 3.4 would solve my Unicode issues but it
> seems I still don't understand this stuff.  Here is my script.
>
> #! /usr/bin/python3
> # -*- coding: UTF-8 -*-
> import sys
> print(sys.getdefaultencoding())
> print(u"\N{TRADE MARK SIGN}")
>
> And here is my output.
>
> utf-8
> Traceback (most recent call last):
>   File "./g", line 5, in 
> print(u"\N{TRADE MARK SIGN}")
> UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
> position 0: ordinal not in range(128)
>
> What am I missing?

The important thing is not the default encoding but the encoding associated
with stdout. Try printing sys.stdout.encoding to see what that is. It may
depend what terminal you're trying to print out in. Are you using cmd.exe?
If on Unix what's the value of LANG environment variable?

--
Oscar
-- 
https://mail.python.org/mailman/listinfo/python-list


counting unique numpy subarrays

2015-12-04 Thread duncan smith
Hello,
  I'm trying to find a computationally efficient way of identifying
unique subarrays, counting them and returning an array containing only
the unique subarrays and a corresponding 1D array of counts. The
following code works, but is a bit slow.

###

from collections import Counter
import numpy

def bag_data(data):
# data (a numpy array) is bagged along axis 0
# returns concatenated array and corresponding array of counts
vec_shape = data.shape[1:]
counts = Counter(tuple(arr.flatten()) for arr in data)
data_out = numpy.zeros((len(counts),) + vec_shape)
cnts = numpy.zeros((len(counts,)))
for i, (tup, cnt) in enumerate(counts.iteritems()):
data_out[i] = numpy.array(tup).reshape(vec_shape)
cnts[i] =  cnt
return data_out, cnts

###

I've been looking through the numpy docs, but don't seem to be able to
come up with a clean solution that avoids Python loops. TIA for any
useful pointers. Cheers.

Duncan
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-04 Thread Ned Deily

New submission from Ned Deily:

https://www.openssl.org/news/secadv/20151203.txt

--
components: Build
messages: 255880
nosy: benjamin.peterson, larry, ned.deily, steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Update python.org installers to use OpenSSL 1.0.2e
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



problem fixed

2015-12-04 Thread Ali Zarkesh
My problem fixed
That was only about User Account Control
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25500] docs claim __import__ checked for in globals, but IMPORT_NAME bytecode does not

2015-12-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 567baf74ebad by Brett Cannon in branch '3.5':
Issue #25500: Fix the language reference to not claim that import
https://hg.python.org/cpython/rev/567baf74ebad

New changeset 0259c2c555fb by Brett Cannon in branch 'default':
Merge for issue #25500
https://hg.python.org/cpython/rev/0259c2c555fb

--
nosy: +python-dev

___
Python tracker 

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



RE: Unicode failure

2015-12-04 Thread Albert-Jan Roskam
I think you need to use a raw unicode string, ur

>>> unicodedata.name(ur'\u2122')
'TRADE MARK SIGN'

> Date: Fri, 4 Dec 2015 13:07:38 -0500
> From: da...@vybenetworks.com
> To: python-list@python.org
> Subject: Unicode failure
> 
> I thought that going to Python 3.4 would solve my Unicode issues but it
> seems I still don't understand this stuff.  Here is my script.
> 
> #! /usr/bin/python3
> # -*- coding: UTF-8 -*-
> import sys 
> print(sys.getdefaultencoding()) 
> print(u"\N{TRADE MARK SIGN}") 
> 
> And here is my output.
> 
> utf-8
> Traceback (most recent call last):
>   File "./g", line 5, in 
> print(u"\N{TRADE MARK SIGN}")
> UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
> position 0: ordinal not in range(128)
> 
> What am I missing?
> 
> TIA.
> 
> -- 
> D'Arcy J.M. Cain
> Vybe Networks Inc.
> http://www.VybeNetworks.com/
> IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
> -- 
> https://mail.python.org/mailman/listinfo/python-list
  
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

By 'Start - All apps' I meant the list in the bottom left, as illustrated in 
some of the links of the search page you posted.  I am sure 2.7.10 was there at 
some point, though not necessarily earlier today.

--

___
Python tracker 

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



Re: counting unique numpy subarrays

2015-12-04 Thread Peter Otten
duncan smith wrote:

> Hello,
>   I'm trying to find a computationally efficient way of identifying
> unique subarrays, counting them and returning an array containing only
> the unique subarrays and a corresponding 1D array of counts. The
> following code works, but is a bit slow.
> 
> ###
> 
> from collections import Counter
> import numpy
> 
> def bag_data(data):
> # data (a numpy array) is bagged along axis 0
> # returns concatenated array and corresponding array of counts
> vec_shape = data.shape[1:]
> counts = Counter(tuple(arr.flatten()) for arr in data)
> data_out = numpy.zeros((len(counts),) + vec_shape)
> cnts = numpy.zeros((len(counts,)))
> for i, (tup, cnt) in enumerate(counts.iteritems()):
> data_out[i] = numpy.array(tup).reshape(vec_shape)
> cnts[i] =  cnt
> return data_out, cnts
> 
> ###
> 
> I've been looking through the numpy docs, but don't seem to be able to
> come up with a clean solution that avoids Python loops. 

Me neither :(

> TIA for any
> useful pointers. Cheers.

Here's what I have so far:

def bag_data(data):
counts = numpy.zeros(data.shape[0])
seen = {}
for i, arr in enumerate(data):
sarr = arr.tostring()
if sarr in seen:
counts[seen[sarr]] += 1
else:
seen[sarr] = i
counts[i] = 1
nz = counts != 0
return numpy.compress(nz, data, axis=0), numpy.compress(nz, counts)

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-12-04 Thread Zachary Ware

Changes by Zachary Ware :


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

___
Python tracker 

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



Unicode failure

2015-12-04 Thread D'Arcy J.M. Cain
I thought that going to Python 3.4 would solve my Unicode issues but it
seems I still don't understand this stuff.  Here is my script.

#! /usr/bin/python3
# -*- coding: UTF-8 -*-
import sys 
print(sys.getdefaultencoding()) 
print(u"\N{TRADE MARK SIGN}") 

And here is my output.

utf-8
Traceback (most recent call last):
  File "./g", line 5, in 
print(u"\N{TRADE MARK SIGN}")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
position 0: ordinal not in range(128)

What am I missing?

TIA.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25768] compileall functions do not document or test return values

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

I just realized there are no tests for this in test_compileall either. 
Nicholas, do you have any interest in attempting to add tests for the return 
values before we document them?

--
title: compileall functions do not document return values -> compileall 
functions do not document or test return values
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Thanks Brett :-)

--

___
Python tracker 

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



[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Steve Dower

Steve Dower added the comment:

It's worked fine on my Win10 machine (with all updates - they can't be turned 
off easily on Win10...).

If you browse through the All Apps menu 
(https://www.bing.com/search?q=windows+10+all+apps+menu) do you see Python 2.7 
there?

--

___
Python tracker 

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



Re: [Python-ideas] Using functools.lru_cache only on some arguments of a function

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 2:44 PM, Bill Winslow  wrote:
> This is a question I posed to reddit, with no real resolution:
> https://www.reddit.com/r/learnpython/comments/3v75g4/using_functoolslru_cache_only_on_some_arguments/
>
> The summary for people here is the following:
>
> Here's a pattern I'm using for my code:
>
> def deterministic_recursive_calculation(input, partial_state=None):
> condition = do_some_calculations(input)
> if condition:
> return deterministic_recursive_calculation(reduced_input,
> some_state)
>
> Basically, in calculating the results of the subproblem, the subproblem can
> be calculated quicker by including/sharing some partial results from the
> superproblem. (Calling the subproblem without the partial state still gives
> the same result, but takes substantially longer.)
>
> I want to memoize this function for obvious reasons, but I need the
> lru_cache to ignore the partial_state argument, for its value does not
> affect the output, only the computation expense.
>
> Is there any reasonable way to do this?

What form does the partial_state take? Would it be reasonable to
design it with __eq__ and __hash__ methods so that each partial state
(or a wrapper of it) is considered equal?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Unicode failure

2015-12-04 Thread Peter Otten
D'Arcy J.M. Cain wrote:

> I thought that going to Python 3.4 would solve my Unicode issues but it
> seems I still don't understand this stuff.  Here is my script.
> 
> #! /usr/bin/python3
> # -*- coding: UTF-8 -*-
> import sys
> print(sys.getdefaultencoding())
> print(u"\N{TRADE MARK SIGN}")
> 
> And here is my output.
> 
> utf-8
> Traceback (most recent call last):
>   File "./g", line 5, in 
> print(u"\N{TRADE MARK SIGN}")
> UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
> position 0: ordinal not in range(128)
> 
> What am I missing?

"""The character encoding is platform-dependent. Under Windows, if the 
stream is interactive (that is, if its isatty() method returns True), the 
console codepage is used, otherwise the ANSI code page. Under other 
platforms, the locale encoding is used (see locale.getpreferredencoding()).
"""

https://docs.python.org/dev/library/sys.html#sys.stdout



-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Zachary Ware

Zachary Ware added the comment:

STINNER Victor added the comment:
> Can you please check if the branch 3.5 is impacted?

It is.

--

___
Python tracker 

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



[issue25801] ResourceWarning in test_zipfile64

2015-12-04 Thread SilentGhost

New submission from SilentGhost:

Running test_zipfile64 from command line (i.e., ./python 
Lib/test/test_zipfile64.py) I get two ResourceWarnings:

» ./python Lib/test/test_zipfile64.py   
  
..Lib/test/test_zipfile64.py:82: ResourceWarning: unclosed file 
<_io.BufferedRandom name=4>
  for f in TemporaryFile(), TESTFN2:
.Lib/test/test_zipfile64.py:75: ResourceWarning: unclosed file 
<_io.BufferedRandom name=4>
  for f in TemporaryFile(), TESTFN2:
.
--
Ran 4 tests in 356.228s

OK

Wasn't able to test with "-m test" even with -uall. Will try again tomorrow.

--
components: Tests
messages: 255890
nosy: SilentGhost, alanmcintyre, serhiy.storchaka, twouters
priority: normal
severity: normal
status: open
title: ResourceWarning in test_zipfile64
versions: Python 3.6

___
Python tracker 

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



Re: Unicode failure

2015-12-04 Thread Terry Reedy

On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote:

I thought that going to Python 3.4 would solve my Unicode issues


Within Python itself, that should be mostly true.  As soon as you send 
text to a display, the rules of the display device take over.


#! /usr/bin/python3
# -*- coding: UTF-8 -*-


Redundant, as this is the default for 3.x


import sys
print(sys.getdefaultencoding())
print(u"\N{TRADE MARK SIGN}")

And here is my output.

utf-8
Traceback (most recent call last):
   File "./g", line 5, in 
 print(u"\N{TRADE MARK SIGN}")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in
position 0: ordinal not in range(128)


Tk widgets, and hence IDLE windows, will print any character from \u 
to \u without raising, even if the result is blank or ￿.  Higher 
codepoints fail, but allowing the entire BMP is better than any Windows 
codepage.


--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list


[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy

New submission from Terry J. Reedy:

I just installed 2.7.11rc1 on Win 10 and noticed that 'Python 2.7' is missing 
both from Start - All apps and from search bar results for 'python' (only 3.4 
and 3.5 appear in local search results).  To be sure, I uninstalled, installed 
fresh, and even restarted. Same result.  2.7.11 is present on disk and py.exe 
finds and starts it, but it is not fully installed as an app, and the 
associated icons are not available.

I was able to work around this and make an 'IDLE icon' from a pythonw.exe 
shortcut, but if this problem is general to at least Win 10, there will be a 
lot of confused users.

--
components: Installation, Windows
messages: 255881
nosy: benjamin.peterson, paul.moore, steve.dower, terry.reedy, tim.golden, 
zach.ware
priority: release blocker
severity: normal
stage: needs patch
status: open
title: 2.7.11rc1 not added to Win10 app list (start menu)
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue25800] errors running test_capi from command line

2015-12-04 Thread SilentGhost

New submission from SilentGhost:

Running:

./python Lib/test/test_capi.py

I got EmbeddingTests erroring out in setUp: first line of which (a triple 
application of os.path.dirname) creates an empty string which cannot be used as 
an argument to os.chdir afterwards. I'm to be honest not at all sure how this 
should be properly solved.

Just for the record: running ./python -m test test_capi works fine.

--
components: Tests
messages: 255888
nosy: SilentGhost, zach.ware
priority: normal
severity: normal
status: open
title: errors running test_capi from command line
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue24934] django_v2 benchmark not working in Python 3.6

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch, Florin! Only changes I made was to deprecate django_v2 
and to set the minimum Python version to 2.7.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



RE: counting unique numpy subarrays

2015-12-04 Thread Albert-Jan Roskam
Hi

(Sorry for topposting)

numpy.ravel is faster than numpy.flatten (no copy)
numpy.empty is faster than numpy.zeros
numpy.fromiter might be useful to avoid the loop (just a hunch)

Albert-Jan

> From: duncan@invalid.invalid
> Subject: counting unique numpy subarrays
> Date: Fri, 4 Dec 2015 19:43:35 +
> To: python-list@python.org
> 
> Hello,
>   I'm trying to find a computationally efficient way of identifying
> unique subarrays, counting them and returning an array containing only
> the unique subarrays and a corresponding 1D array of counts. The
> following code works, but is a bit slow.
> 
> ###
> 
> from collections import Counter
> import numpy
> 
> def bag_data(data):
> # data (a numpy array) is bagged along axis 0
> # returns concatenated array and corresponding array of counts
> vec_shape = data.shape[1:]
> counts = Counter(tuple(arr.flatten()) for arr in data)
> data_out = numpy.zeros((len(counts),) + vec_shape)
> cnts = numpy.zeros((len(counts,)))
> for i, (tup, cnt) in enumerate(counts.iteritems()):
> data_out[i] = numpy.array(tup).reshape(vec_shape)
> cnts[i] =  cnt
> return data_out, cnts
> 
> ###
> 
> I've been looking through the numpy docs, but don't seem to be able to
> come up with a clean solution that avoids Python loops. TIA for any
> useful pointers. Cheers.
> 
> Duncan
> -- 
> https://mail.python.org/mailman/listinfo/python-list
  
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

2.7.10 and 3.4.3 were on the Start menu before conversion to Win 10, so this is 
the first time I have added anything before 3.5.

--

___
Python tracker 

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



[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

2015-12-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b3a0765671d6 by Brett Cannon in branch 'default':
Issue #25771: Tweak ValueError message when package isn't specified
https://hg.python.org/cpython/rev/b3a0765671d6

--
nosy: +python-dev

___
Python tracker 

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



[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

Fixed in default (left 3.5 alone since it technically isn't a bug fix but a 
clarification; fine if someone else wants to handle the backport).

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

___
Python tracker 

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



[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-12-04 Thread Camilla Montonen

Camilla Montonen added the comment:

Hi everyone on the nosy list!
I think this issue can be closed. 
The maintainer of the stackless website
http://www.stackless.com/ has posted a message about technical problems and 
included links to the docs for the project.

--

___
Python tracker 

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



[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread STINNER Victor

STINNER Victor added the comment:

> How am I supposed to start?

Can you please check if the branch 3.5 is impacted?

--

___
Python tracker 

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



[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe I have auto-updates turned on, so this could be new after recent Win 
10 patches.

--

___
Python tracker 

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



[issue24934] django_v2 benchmark not working in Python 3.6

2015-12-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8a9b86071c15 by Brett Cannon in branch 'default':
Issue #24934: Introduce the django_v2 benchmark using Django 1.9.0.
https://hg.python.org/benchmarks/rev/8a9b86071c15

--
nosy: +python-dev

___
Python tracker 

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



Problem in pip

2015-12-04 Thread Ali Zarkesh
My pip can't download or upgrade anything
I use python 3.5 (win 32) and my pip version is 7.1.2.
The error message is this:

Exception:
Traceback (most recent call last):
File "c:\program files\python 3.5\lib\site-packages\pip\basecommand.py",
line 211, in main
status = self.run(options, args)
File "c:\program files\python
3.5\lib\site-packages\pip\commands\install.py", line 311, in run
root=options.root_path,
File "c:\program files\python 3.5\lib\site-packages\pip\req\req_set.py",
line 646, in install
**kwargs
File "c:\program files\python
3.5\lib\site-packages\pip\req\req_install.py", line 803, in install
self.move_wheel_files(self.source_dir, root=root)
File "c:\program files\python
3.5\lib\site-packages\pip\req\req_install.py", line 998, in move_wheel_files
insolated=self.isolated,
File "c:\program files\python 3.5\lib\site-packages\pip\wheel.py", line
339, in move_wheel_files
clobber(source, lib_dir, True)
File "c:\program files\python 3.5\lib\site-packages\pip\wheel.py", line
317, in clobber
shutil.copyfile(srcfile, destfile)
File "c:\program files\python 3.5\lib\shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'c:\program files\python
3.5\Lib\site-packages\PyWin32.chm'

What do I do?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem in pip

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 12:02 PM, Ali Zarkesh  wrote:
> My pip can't download or upgrade anything
> I use python 3.5 (win 32) and my pip version is 7.1.2.
> The error message is this:
>
> Exception:
> Traceback (most recent call last):
> ...
> PermissionError: [Errno 13] Permission denied: 'c:\program files\python
> 3.5\Lib\site-packages\PyWin32.chm'
>
> What do I do?

It looks like you're trying to install in the global environment,
which requires administrative privileges.  You'll either need to do
the above from an Administrative Command Prompt or create a virtual
environment (py -3.5 -m venv ) and try it using the pip from the venv.

Hope this helps,
-- 
Zach
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25500] docs claim __import__ checked for in globals, but IMPORT_NAME bytecode does not

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the bug report, Sergei! I fixed the docs in the end.

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

___
Python tracker 

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



[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Felippe da Motta Raposo

Felippe da Motta Raposo added the comment:

I did it!

Can you please take a look at it?

--
keywords: +patch
Added file: http://bugs.python.org/file41241/mywork.patch

___
Python tracker 

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



[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-04 Thread Steve Dower

Steve Dower added the comment:

Considering we're building 2.7 and 3.5 tomorrow, ought we delay them long 
enough to add a second RC with this change?

Looking at the issues that have been fixed, it doesn't seem like any are 
critical.

--

___
Python tracker 

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



[issue25800] errors running test_capi from command line

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

The code looks like it is trying to find the root of the source code tree, and 
then chdir() to it and access /Programs/_testembed etc.

In your case the chain of dirname() calls returns an empty string because that 
root is already the current directory. I would make chdir() conditional:

if basepath:
os.chdir(basepath)

--
nosy: +martin.panter

___
Python tracker 

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



[issue21240] Add an abstactmethod directive to the Python ReST domain

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

Are you willing to check this in, Berker? Or is it not needed anymore?

--
assignee: docs@python -> berker.peksag
nosy: +brett.cannon

___
Python tracker 

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



[issue25802] Finish deprecating load_module()

2015-12-04 Thread Brett Cannon

New submission from Brett Cannon:

There are a couple concrete implementations of load_module() in importlib that 
have not been explicitly deprecated that probably should be. As part of this I 
will finally add an Examples section to the importlib docs to show how to do 
common tasks such as load a source file.

--
assignee: brett.cannon
components: Library (Lib)
messages: 255905
nosy: brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
stage: test needed
status: open
title: Finish deprecating load_module()
versions: Python 3.6

___
Python tracker 

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



Re: counting unique numpy subarrays

2015-12-04 Thread duncan smith
On 04/12/15 22:36, Albert-Jan Roskam wrote:
> Hi
> 
> (Sorry for topposting)
> 
> numpy.ravel is faster than numpy.flatten (no copy)
> numpy.empty is faster than numpy.zeros
> numpy.fromiter might be useful to avoid the loop (just a hunch)
> 
> Albert-Jan
> 

Thanks, I'd forgotten the difference between numpy. flatten and
numpy.ravel. I wasn't even aware of numpy.empty.

Duncan

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

Either patch looks good to me. I don’t have a strong opinion about 
unittest.TestCase. I left a comment about adding the module=... back in 
test_pyclbr.

--
nosy: +martin.panter
stage: needs patch -> patch review

___
Python tracker 

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



msvcr100.dll missing ... error started after Windows 10 update to 10586.17

2015-12-04 Thread Glenn Linderman

My wife's 64-bit Win8 home machine has 32-bit Python 3.3 installed.

Then it upgraded to Win 8.1. Then I upgraded it to Win 10. Then I 
upgraded it to Threshold 2. It gets regular automatic updates also, like 
the one last night to build 10586.17.


That's the history.

When she tried a python script today, it failed, with an error saying 
that MSVCR100.dll was missing.


After a few false starts, like being surprised that the error happened 
when it worked yesterday, and that there was an MSVCR100.dll in 
%windir%\system32, doing a search for all MSVCR100.dll on her machine 
discovered quite a few in various application directories, but then also 
one in \windows.old\WINDOWS\SysWOW64, the light-bulb blinked on, I 
copied that one to the \python33 directory, and everything works.


Why M$ chose to delete MSVCR100.dll from %windir%\SysWOW64 in the recent 
update is a mystery, however.


So this is just a data point and warning and solution, not really an 
expectation that anyone will be able to explain M$.


Glenn
--
https://mail.python.org/mailman/listinfo/python-list


[issue21235] importlib's spec module create algorithm is not exposed

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

Is there anything left in this issue that hasn't been addressed in Python 3.5?

--
status: open -> pending

___
Python tracker 

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



[issue25755] Test test_property failed if run twice

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

Maybe it would be even better to wrap this up using 
unittest.mock.patch.object(). That is an obscure function that is hard to learn 
from the documentation, but very useful for testing. There is also 
test.support.swap_attr(), which is easier to figure out. Something like:

with patch.object(sub.__class__.spam, '__doc__', 'Spam'):
self.assertEqual(sub.__class__.spam.__doc__, 'Spam')

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

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



[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 88cee7d16ccb by Brett Cannon in branch '3.5':
Issue #23936: Clarify what finders are.
https://hg.python.org/cpython/rev/88cee7d16ccb

New changeset 1b1900d2a537 by Brett Cannon in branch 'default':
Merge for issue #23936
https://hg.python.org/cpython/rev/1b1900d2a537

--
nosy: +python-dev

___
Python tracker 

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



[issue13368] Possible problem in documentation of module subprocess, method send_signal

2015-12-04 Thread Eryk Sun

Eryk Sun added the comment:

You can send CTRL_C_EVENT to a process group. But it requires the group leader 
to manually enable Ctrl+C handling. Initially it's disabled when creating a 
process with CREATE_NEW_PROCESS_GROUP. 

The attached script demonstrates sending CTRL_C_EVENT to a process group. The 
child process is the group leader, so CTRL+C event processing has to be 
manually enabled in it by calling SetConsoleCtrlHandler(NULL, FALSE). This flag 
gets inherited by the grandchild process. Example output:

Process 0300: created process 0464
Process 0464: created process 0456
Process 0464: received CTRL+C
Process 0456: received CTRL+C

That said, given that MSDN [erroneously] claims that this isn't possible, 
probably the subprocess docs should only mention sending CTRL_BREAK_EVENT.

--
nosy: +eryksun
versions: +Python 3.4, Python 3.5, Python 3.6 -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file41242/proc_group_ctrl_c.py

___
Python tracker 

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



[issue25801] ResourceWarning in test_zipfile64

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

It looks like it is disabled from the regular test suite on purpose:

# XXX(nnorwitz): disable this test by looking for extra largfile [sic] resource
# which doesn't exist.  This test takes over 30 minutes to run in general
# and requires more disk space than most of the buildbots.
support.requires(
'extralargefile',
'test requires loads of disk-space bytes and a long time to run'
)

I’m not sure why the proper “largefile” flag cannot be used: “It is okay to run 
some test that may create huge files. These tests can take a long time and may 
consume >2GB of disk space temporarily.”

As for the reported problem, perhaps the TemporaryFile() call sites should have 
a “with” statement added.

--
nosy: +martin.panter

___
Python tracker 

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



[issue14285] Traceback wrong on ImportError while executing a package

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

I think the problem with doing a blind import of the parent package is it would 
be hard to differentiate between the ImportError when the package (or an 
ancestor) is missing, versus a user-generated ImportError. Maybe you could 
inspect the exception as a workaround (untested):

try:
__import__(pkg_name)
except ImportError as err:
if err.name != pkg_name and not pkg_name.startswith(err.name + "."):
raise
raise error(format(err))

--

___
Python tracker 

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



[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

Thanks, the fix is fine and there is no big need to backport it. For the 
record, I only came across this playing with runpy. Old message:

$ python3 -m .submodule
/sbin/python3: Error while finding spec for '.submodule' (: 
'.submodule' is not a relative name (no leading dot))

New message:

$ ./python -m .submodule
/media/disk/home/proj/python/cpython/python: Error while finding spec for 
'.submodule' (: no package specified for '.submodule' 
(required for relative module names))

--
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Felippe da Motta Raposo

Felippe da Motta Raposo added the comment:

SilentGhost suggested that I should change all occurrences of `TestCase`, on 
both `test_telnetlib` and `test_pyclbr`, by `unittest.TestCase`. This patch has 
these changes.

--
Added file: http://bugs.python.org/file41244/mywork.patch

___
Python tracker 

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



[issue21436] Consider leaving importlib.abc.Loader.load_module()

2015-12-04 Thread Brett Cannon

Brett Cannon added the comment:

Python 3.5 lets you do:

  spec = importlib.util.spec_from_file_location('what.ever', 'foo.py')
  module = importlib.util.module_from_spec(spec)
  spec.loader.exec_module(module)

I am satisfied that case for loading from a file is easy enough to not warrant 
keeping load_module() around just for this use case.

--
resolution:  -> rejected
stage:  -> resolved

___
Python tracker 

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



[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-12-04 Thread desbma

desbma added the comment:

Here is a new patch, with changes suggested by SilentGhost and josh.rosenberg 
in the review.

--
Added file: http://bugs.python.org/file41243/issue25156_v4.patch

___
Python tracker 

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



Re: counting unique numpy subarrays

2015-12-04 Thread duncan smith
On 04/12/15 23:06, Peter Otten wrote:
> duncan smith wrote:
> 
>> Hello,
>>   I'm trying to find a computationally efficient way of identifying
>> unique subarrays, counting them and returning an array containing only
>> the unique subarrays and a corresponding 1D array of counts. The
>> following code works, but is a bit slow.
>>
>> ###
>>
>> from collections import Counter
>> import numpy
>>
>> def bag_data(data):
>> # data (a numpy array) is bagged along axis 0
>> # returns concatenated array and corresponding array of counts
>> vec_shape = data.shape[1:]
>> counts = Counter(tuple(arr.flatten()) for arr in data)
>> data_out = numpy.zeros((len(counts),) + vec_shape)
>> cnts = numpy.zeros((len(counts,)))
>> for i, (tup, cnt) in enumerate(counts.iteritems()):
>> data_out[i] = numpy.array(tup).reshape(vec_shape)
>> cnts[i] =  cnt
>> return data_out, cnts
>>
>> ###
>>
>> I've been looking through the numpy docs, but don't seem to be able to
>> come up with a clean solution that avoids Python loops. 
> 
> Me neither :(
> 
>> TIA for any
>> useful pointers. Cheers.
> 
> Here's what I have so far:
> 
> def bag_data(data):
> counts = numpy.zeros(data.shape[0])
> seen = {}
> for i, arr in enumerate(data):
> sarr = arr.tostring()
> if sarr in seen:
> counts[seen[sarr]] += 1
> else:
> seen[sarr] = i
> counts[i] = 1
> nz = counts != 0
> return numpy.compress(nz, data, axis=0), numpy.compress(nz, counts)
> 

Three times as fast as what I had, and a bit cleaner. Excellent. Cheers.

Duncan
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue14911] generator.throw() documentation inaccurate

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

Changes in throw-3x.v2.patch:

* Split into two signatures
* Added parallel coroutine.throw(value) signature
* *Value* should be an exception instance; drop mentioning other options
* Default value is instantiated from *type*
* __traceback__ can be cleared
* Dropped the example
* Update generator and coroutine doc strings with double signatures

--
Added file: http://bugs.python.org/file41245/throw-3x.v2.patch

___
Python tracker 

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



[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Felippe da Motta Raposo

Felippe da Motta Raposo added the comment:

Martin Panter added the comment:
 > I left a comment about adding the module=... back in test_pyclbr.

I had to put it because `test_others` was failing:
(test output)
```
l1=['TestCase']
l2=['unittest.TestCase']
ignore={'object'}
class=
FAIL

==
FAIL: test_others (__main__.PyclbrTest)
--
Traceback (most recent call last):
  File "Lib/test/test_pyclbr.py", line 169, in test_others
cm('test.test_pyclbr')
  File "Lib/test/test_pyclbr.py", line 102, in checkModule
self.assertListEq(real_bases, pyclbr_bases, ignore)
  File "Lib/test/test_pyclbr.py", line 27, in assertListEq
self.fail("%r missing" % missing.pop())
AssertionError: 'unittest.TestCase' missing
```

--

___
Python tracker 

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



[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f4e2cbd2138 by Martin Panter in branch '3.4':
Issue #25764: Preserve subprocess fork exception when preexec_fn used
https://hg.python.org/cpython/rev/4f4e2cbd2138

New changeset ae27ad306dbf by Martin Panter in branch '3.5':
Issue #25764: Merge subprocess fix from 3.4 into 3.5
https://hg.python.org/cpython/rev/ae27ad306dbf

New changeset b10c58a740b9 by Martin Panter in branch 'default':
Issue #25764: Merge subprocess fix from 3.5
https://hg.python.org/cpython/rev/b10c58a740b9

--
nosy: +python-dev

___
Python tracker 

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



[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-04 Thread Martin Panter

Martin Panter added the comment:

OS X buildbots don’t like my resource change.

http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.4/builds/1377/steps/test/logs/stdio

It seems that the setrlimit() cleanup line is failing, all the subsequent tests 
fail to fork(). I don’t understand why it would fail to restore the original 
soft limit. The exception is “ValueError: not allowed to raise maximum limit” 
(corresponding to EPERM).

All I can think of is the soft limit is reported as RLIM_INFINITY, but maybe 
setrlimit() does not accept that if the hard limit is finite. Failing that, I 
will have to skip the test before reducing the soft limit if setting the 
original limit fails.

--

___
Python tracker 

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



[issue25194] Opt-in motivations & affiliations page for core contributors

2015-12-04 Thread R. David Murray

R. David Murray added the comment:

Is there any reason to keep this issue open at this point?

--

___
Python tracker 

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



[issue24903] Do not verify destdir argument to compileall

2015-12-04 Thread R. David Murray

R. David Murray added the comment:

Thanks, Jake.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



Re: Unicode failure

2015-12-04 Thread Random832
On 2015-12-04, Terry Reedy  wrote:
> Tk widgets, and hence IDLE windows, will print any character from \u 
> to \u without raising, even if the result is blank or �.  Higher 
> codepoints fail, but allowing the entire BMP is better than any Windows 
> codepage.

Well, any bar 1200, 1201, 12000, 12001, 65000, 65001, and 54936.

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-04 Thread Daniel Lepage

New submission from Daniel Lepage:

pathlib.Path('/').mkdir() raises an IsADirectoryError instead of a 
FileExistsError.

--
components: Library (Lib)
messages: 255916
nosy: Daniel Lepage
priority: normal
severity: normal
status: open
title: pathlib.Path('/').mkdir() raises wrong error type
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue24903] Do not verify destdir argument to compileall

2015-12-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b63fd82a8528 by R David Murray in branch '3.4':
#24903: Remove misleading error message to fix regression.
https://hg.python.org/cpython/rev/b63fd82a8528

New changeset c65e135df1dc by R David Murray in branch '3.5':
Merge: #24903: Remove misleading error message to fix regression.
https://hg.python.org/cpython/rev/c65e135df1dc

New changeset 1e5aacddb67d by R David Murray in branch 'default':
Merge: #24903: Remove misleading error message to fix regression.
https://hg.python.org/cpython/rev/1e5aacddb67d

--
nosy: +python-dev

___
Python tracker 

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



Re: Unicode failure

2015-12-04 Thread D'Arcy J.M. Cain
On Fri, 4 Dec 2015 22:49:49 +
Albert-Jan Roskam  wrote:
> I think you need to use a raw unicode string, ur
> 
> >>> unicodedata.name(ur'\u2122')
> 'TRADE MARK SIGN'

That seems to work in 2.x but not 3.x.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
-- 
https://mail.python.org/mailman/listinfo/python-list


  1   2   >