[issue24951] Idle test_configdialog fails on Fedora 23, 3.6

2015-08-27 Thread Terry J. Reedy

New submission from Terry J. Reedy:

In response to my python-list request for testing tkinter/idle on linux, Petr 
wrote

On Fedora 21, the tests pass (Python 3.4.1 and latest dev version).

On Fedora 23, I see:

$ python3 -V
Python 3.4.3 

$ ./python -V
Python 3.6.0a0
$ ./python -m test -ugui test_tk test_ttk_guionly test_idle
[1/3] test_tk
[2/3] test_ttk_guionly
[3/3] test_idle
test test_idle failed -- Traceback (most recent call last):
  File "/home/pviktori/dev/cpython/Lib/idlelib/idle_test/test_configdialog.py",
line 27, in test_dialog
d=ConfigDialog(self.root, 'Test', _utest=True)
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line
71, in __init__
self.LoadConfigs()
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line
1078, in LoadConfigs
self.LoadFontCfg()
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line
980, in LoadFontCfg
self.SetFontSample()
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line
858, in SetFontSample
self.labelFontSample.config(font=newFont)
  File "/home/pviktori/dev/cpython/Lib/tkinter/__init__.py", line
1330, in configure
return self._configure('configure', cnf, kw)
  File "/home/pviktori/dev/cpython/Lib/tkinter/__init__.py", line
1321, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: expected integer but got ""

2 tests OK.
1 test failed:
test_idle

Tk version: 8.6.4
---

--
messages: 249275
nosy: encukou, markroseman, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Idle test_configdialog fails on Fedora 23, 3.6
type: behavior
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



[issue24950] FAIL: test_expanduser when $HOME=/

2015-08-27 Thread Felix Yan

Felix Yan added the comment:

btw, there seems to be a relevant failure in test_pathlib as well:

test test_pathlib failed -- Traceback (most recent call last):
  File "/build/python/src/Python-3.5.0rc2/Lib/test/test_pathlib.py", line 2015, 
in test_expanduser
self.assertEqual(p1.expanduser(), P(userhome) / 'Documents')
AssertionError: PosixPath('/Documents') != PosixPath('Documents')

(not sure if they are really relevant, though)

--

___
Python tracker 

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



[issue24950] FAIL: test_expanduser when $HOME=/

2015-08-27 Thread Felix Yan

Changes by Felix Yan :


--
title: FAIL: test_posixpath when $HOME=/ -> FAIL: test_expanduser when $HOME=/

___
Python tracker 

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



[issue24950] FAIL: test_posixpath when $HOME=/

2015-08-27 Thread Felix Yan

Changes by Felix Yan :


--
title: FAIL: test_expanduser when $HOME=/ -> FAIL: test_posixpath when $HOME=/

___
Python tracker 

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



[issue24950] FAIL: test_expanduser when $HOME=/

2015-08-27 Thread Felix Yan

New submission from Felix Yan:

test_expanduser in test.test_posixpath.PosixPathTest fails when the users $HOME 
being exactly "/", after the patch in issue17809 was introduced.

test test_posixpath failed -- Traceback (most recent call last):
  File "/build/python/src/Python-3.5.0rc2/Lib/test/test_posixpath.py", line 
249, in test_expanduser
self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))
AssertionError: '/' != ''
- /
+

Would it be appropriate to apply the rstrip() also to the left part of the 
equation?

--
components: Tests
messages: 249273
nosy: felixonmars
priority: normal
severity: normal
status: open
title: FAIL: test_expanduser when $HOME=/
type: behavior
versions: Python 3.3, 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



[issue24949] Identifier lookup in a multi-level package is flakey

2015-08-27 Thread Martin Panter

Martin Panter added the comment:

It sounds like you are trying to do a plain “import email”, and then expect all 
the submodules under that package to work, including “email.mime.nonmultipart”. 
That is not how it works. I understand the submodules and subpackages are only 
initialized if you ask for them explicitly. Hence the “no attribute 'mime' ” 
error in 3.4.

In your case perhaps you should change or extend the import statement to do

import email.mime.nonmultipart

The reason why your “from . . . import” works is it also initializes the 
submodule that you want, and stores it in a chain of attributes of the 
top-level module as a side effect.

Quickly scanning through 
, 
, 
, I didn’t see 
anything obvious pointing out that importing a top-level package doesn’t 
completely initialize the whole thing. But maybe there is something already 
there. You might have to read about how the __init__.py internals work to pick 
it up.

--
nosy: +martin.panter

___
Python tracker 

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



[issue24949] Identifier lookup in a multi-level package is flakey

2015-08-27 Thread R. David Murray

R. David Murray added the comment:

It should not be the case that email.mime.nonmultipart gets imported unless you 
import it explicitly.  I can't reproduce your case of trying to access its 
__file__ attribute and having it succeed the second time.  There must be 
something unusual about your setup or your linux distribution.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue24789] ctypes doc string

2015-08-27 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Updated create_string_buffer docstring to "create_string_buffer(aBytes, 
anInteger) -> character array".

--
keywords: +patch
nosy: +matheus.v.portela
Added file: http://bugs.python.org/file40279/issue24789_ctypes_doc_string.patch

___
Python tracker 

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



[issue24948] Multiprocessing not timely flushing stack trace to stderr

2015-08-27 Thread Jon Brandvein

Changes by Jon Brandvein :


--
nosy: +brandjon

___
Python tracker 

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



[issue24949] Identifier lookup in a multi-level package is flakey

2015-08-27 Thread Bob Hossley

New submission from Bob Hossley:

This seems like a bug to me, but it may be a recognized limitation even though 
I couldn't find any documentation suggesting that my tests should not work 
reliably.  I see no reason why my tests should not work reliably.

I have reliably reproduced the flakeyness under Windows XP with Python 2.6.4 
and under Xubuntu 14.04 64-bit with Python 2.7.6 and Python 3.4.0.

Ubuntu 14.04 (trusty)  - XFCE desktop (Xubuntu) 64-bit
Gnome:  3.8.4
Kernel:  3.13.0-62-generic
GCC Version:  4.8 (x86_64-linux-gnu)
Xorg Version:  1.15.1 (12 February 2015  02:49:29PM)

Rebooting doesn't help.

I first encountered the flakeyness in a complicated script which I will 
describe in outline first.  The very, very simple interactive Python sessions 
that follow are probably of more interest and use to you.
---
Outline of my complicated script:

import email

# The next line works around a flakeyness in Python
from email.mime.nonmultipart import MIMENonMultipart

msg = email.mime.nonmultipart.MIMENonMultipart('text', 'plain', 
charset='utf-8')

Without the above work around I always get Error:

AttributeError: 'module' object has no attribute 'nonmultipart'

Note "import email" is global.  "from email.mime.nonmultipart import 
MIMENonMultipart" is local to the function containing the "msg = " line which 
is the line that fails whenever the workaround is absent.
---
XP Interpreter Session:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Admin>python
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import email
>>> print email.mime.nonmultipart.__file__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'nonmultipart'
>>> print email.mime.nonmultipart.__file__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'nonmultipart'
>>> print email.mime.nonmultipart.__file__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'nonmultipart'
>>> print email.mime.nonmultipart.__file__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'nonmultipart'
>>> print email.mime.nonmultipart.__file__
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'nonmultipart'
>>> from email.mime import nonmultipart
>>> print email.mime.nonmultipart.__file__
C:\bin\Python26\lib\email\mime\nonmultipart.pyc
>>>

Xubuntu Python 2.7.6 Session

2015-08-25 14:02:46 /home/bob06
$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import email
>>> print(email.mime.nonmultipart.__file__)
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'nonmultipart'
>>> print(email.mime.nonmultipart.__file__)
/usr/lib/python2.7/email/mime/nonmultipart.pyc


Xubuntu Python 3.4.0 Session

2015-08-27 15:27:39 /home/bob06
$ python3
Python 3.4.0 (default, Jun 19 2015, 14:20:21) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import email
>>> print(email.mime.nonmultipart.__file__)
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'module' object has no attribute 'mime'
>>> print(email.mime.nonmultipart.__file__)
/usr/lib/python3.4/email/mime/nonmultipart.py

--
components: Interpreter Core
messages: 249269
nosy: SegundoBob
priority: normal
severity: normal
status: open
title: Identifier lookup in a multi-level package is flakey
type: compile error
versions: Python 2.7, Python 3.4

___
Python tracker 

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



[issue2786] Names in function call exception should have class names, if they're methods

2015-08-27 Thread Robert Collins

Robert Collins added the comment:

Here are some options.

a) Don't make the new thing public - instead export within Python.exe the 
existing private symbol _...withNames. Pros: no change to public API. Cons: 
extension modules using the public API cannot make these sorts of errors 
clearer.

b) Add a new API. Either narrow (add the parameter) or big (add a struct). 
Pros: everyone treated equally. Cons: More API surface area, and more complex 
calling convention.

c) use symbol versioning to change the existing API. Cons: more complex 
build-time detection for users. Pros: API surface area held constant.

d) Don't fix it. :)

I don't have a particular preference, though the struct thing is a wash IMO - 
it saves adding a serial to the API, at the cost of having a versioned 
datastructure which needs an embedded serial number. [Except perhaps that you 
can use symbol versioning to deal with evolutions of the struct - but thats 
fairly complex to carry off well, and I think this would be the first example 
w/in Python].

--

___
Python tracker 

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



[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-08-27 Thread Robert Collins

Changes by Robert Collins :


--
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



[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-08-27 Thread Robert Collins

Robert Collins added the comment:

2.7 is sufficiently different that I haven't backported this there - plus the 
report said it was introduced in 3.4. If someone can show this doesn't work in 
2.7 and also supply a patch, we could apply it there.

--

___
Python tracker 

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



[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-08-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a90c6d608b85 by Robert Collins in branch '3.4':
Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
https://hg.python.org/cpython/rev/a90c6d608b85

New changeset ac3f1a6b1de2 by Robert Collins in branch '3.5':
Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
https://hg.python.org/cpython/rev/ac3f1a6b1de2

New changeset bf789ae9bde7 by Robert Collins in branch 'default':
Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
https://hg.python.org/cpython/rev/bf789ae9bde7

--
nosy: +python-dev

___
Python tracker 

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



[issue24948] Multiprocessing not timely flushing stack trace to stderr

2015-08-27 Thread Memeplex

Memeplex added the comment:

One possible fix to multiprocessing/process.py:

< try:
< self.run()
< exitcode = 0
< finally:
< util._exit_function()
---
> self.run()
> exitcode = 0
274a272
> util._exit_function()

This removes the try/finally pair around self.run() and calls _exit_function in 
the last finally clause. It doesn't honour the original control flow, as this 
last clause is even executed when the flow is aborted before reaching 
self.run(). That said, I can't see any particular reason to prefer the original 
flow.

--

___
Python tracker 

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



[issue13812] multiprocessing package doesn't flush stderr on child exception

2015-08-27 Thread Memeplex

Memeplex added the comment:

http://bugs.python.org/issue24948

I posted a tentative solution there.

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-08-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Now that Larry Hastings has posted directions for handling changes pulled into 
3.5.0, I will soon commit the attached, or something close, and add a pull 
request.

--
keywords: +patch
Added file: http://bugs.python.org/file40278/@restart.diff

___
Python tracker 

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



[issue24948] Multiprocessing not timely flushing stack trace to stderr

2015-08-27 Thread Memeplex

New submission from Memeplex:

Related to but not the same than https://bugs.python.org/issue13812.

Try this:

```
import multiprocessing as mp
import time


def g():
time.sleep(100)

def f():
mp.Process(target=g).start()
1/0

mp.Process(target=f).start()
```

It won't show the ZeroDivisionError until you keyboard interrupt the g() 
process or wait for it to end. This is because _exit_function will join every 
active non-daemon child, which happens before printing and flushing the error. 
IMO the exception should be shown before joining children, since keeping the 
error silent is asking for trouble.

--
components: Library (Lib)
messages: 249262
nosy: memeplex
priority: normal
severity: normal
status: open
title: Multiprocessing not timely flushing stack trace to stderr
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



[issue17781] optimize compilation options

2015-08-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

You can test for yourself by passing `CFLAGS="-flto -O3" LDFLAGS="-flto -O3"` 
to ./configure (using gcc).

--

___
Python tracker 

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



[issue17781] optimize compilation options

2015-08-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For the record, the gain for LTO+PGO (with "-flto -O3") over PGO alone seems to 
be between 0% and 10% for most benchmarks.

--

___
Python tracker 

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



[issue24947] asyncio-eventloop documentation grammar (minor)

2015-08-27 Thread Zachary Ware

Zachary Ware added the comment:

Fixed, thanks for the report and patch!

--
nosy: +zach.ware
versions: +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



[issue24947] asyncio-eventloop documentation grammar (minor)

2015-08-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cf15066861fc by Zachary Ware in branch '3.4':
Issue #24947: Fix grammar in asyncio doc
https://hg.python.org/cpython/rev/cf15066861fc

New changeset 563d6f9fecfe by Zachary Ware in branch '3.5':
Issue #24947: Merge 3.4
https://hg.python.org/cpython/rev/563d6f9fecfe

New changeset b76346142b49 by Zachary Ware in branch 'default':
Closes #24947: Merge with 3.5
https://hg.python.org/cpython/rev/b76346142b49

--
nosy: +python-dev
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



[issue24947] asyncio-eventloop documentation grammar (minor)

2015-08-27 Thread tagatac

New submission from tagatac:

"amongst which" in the Base Event Loop subsection of the docs does not really 
describe a list of facilities. "amongst which are" would be better, but 
"including" conveys the same thing more succinctly.
https://docs.python.org/3/library/asyncio-eventloop.html

--
assignee: docs@python
components: Documentation
files: mywork.patch
keywords: patch
messages: 249257
nosy: docs@python, tagatac
priority: normal
severity: normal
status: open
title: asyncio-eventloop documentation grammar (minor)
Added file: http://bugs.python.org/file40277/mywork.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp parses timestamps incorrectly

2015-08-27 Thread Alexandre Conrad

Changes by Alexandre Conrad :


--
nosy: +aconrad

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-27 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

The profile merging is necessary in case you want to use a pure clang compiler 
or you use GCC in OSX. For example, a general profiling action using clang will 
result in at least one binary profile. For our case, when using regrtest, we 
will have multiple profiles as the test is a multi-process one. The application 
llvm-profdata has the ability to merge the information collected from multiple 
processes, thus having a more precise map of what is executed from the profiled 
application. 

This step is mandatory even if we train on a single threaded or single process 
workload and have just one profile. More information about the entire process 
can be found here: 
http://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation

--

___
Python tracker 

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



[issue13812] multiprocessing package doesn't flush stderr on child exception

2015-08-27 Thread R. David Murray

R. David Murray added the comment:

You should open a new issue.  Bonus if you can supply a unit test and patch :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue19905] Add 128-bit integer support to ctypes

2015-08-27 Thread Zachary Ware

Changes by Zachary Ware :


--
dependencies: +Add 128-bit integer support to struct
stage:  -> needs patch
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



[issue19904] Add 128-bit integer support to struct

2015-08-27 Thread Zachary Ware

Changes by Zachary Ware :


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



[issue3548] subprocess.pipe function

2015-08-27 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Sure. I'll leave this issue for a while before others can emit their opinions.

--

___
Python tracker 

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



[issue17781] optimize compilation options

2015-08-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note this patch is likely wrong, as it doesn't add the optimization options to 
the linker invocation. According to the gcc does, """To use the link-time 
optimizer, -flto and optimization options should be specified at compile time 
and during the final link""".

So probably $OPT should be added to $PY_LDFLAGS.

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Guido van Rossum

Guido van Rossum added the comment:

The traditional solution is to rewrite the sentence so the name is not the 
first word. :-)

--

___
Python tracker 

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



[issue13812] multiprocessing package doesn't flush stderr on child exception

2015-08-27 Thread Memeplex

Changes by Memeplex :


--
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



[issue13812] multiprocessing package doesn't flush stderr on child exception

2015-08-27 Thread Memeplex

Memeplex added the comment:

I would like to reopen this issue because of the following, very related, 
behavior. Try this:

```
import multiprocessing as mp
import time


def g():
time.sleep(100)

def f():
mp.Process(target=g).start()
1/0

mp.Process(target=f).start()
```

It won't show the ZeroDivisionError until you keyboard interrupt the g() 
process or wait for it to end. This is because _exit_function will join every 
active non-daemon child, which happens before printing and flushing the error. 
IMO the exception should be shown before joining children, since keeping the 
error silent is asking for trouble.

--
nosy: +memeplex

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Yann Sionneau

Yann Sionneau added the comment:

About the missing capitalization, I omitted it because it's the argument's 
name. But I can resubmit with it being capitalized.
I forgot to run flake8, sorry!

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Guido van Rossum

Guido van Rossum added the comment:

It can't go into 3.5.1 (a bugfix release) because it is a new feature (however 
small), and asyncio is not provisional in 3.5 (only in 3.4).

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Guido van Rossum

Guido van Rossum added the comment:

Also, I guess you'll need a branch that tracks what's going into 3.6.

--

___
Python tracker 

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



[issue24781] Improve UX of IDLE Highlighting configuration tab

2015-08-27 Thread Mark Roseman

Mark Roseman added the comment:

Attached uipreferences.py, which is a newer and more complete version of the 
one in prefs-wip.patch

--
Added file: http://bugs.python.org/file40276/uipreferences.py

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Can you explain what the profile-merging thing is achieving?

--
nosy: +pitrou

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Yury Selivanov

Yury Selivanov added the comment:

> Yeah, I think this is fine. I think the use case for multiple hosts is very 
> different than that for multiple ports, so I see no reason to link the two 
> features, and multiple ports hasn't been requested.

OK!

> The patch has a long line and the new docstring looks a little odd (sentences 
> not starting with capital letters) 

Yeah, I've noticed that too, and made a mental note to check line lengths 
before committing.

> but otherwise I'm in favor of this going into 3.6.

Why only 3.6?  The change is fully backwards compatible, why can't it go in 
3.5.1?

Also, what's the protocol for committing something that might take years to be 
available in github/asyncio?

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Guido van Rossum

Guido van Rossum added the comment:

Yeah, I think this is fine. I think the use case for multiple hosts is very 
different than that for multiple ports, so I see no reason to link the two 
features, and multiple ports hasn't been requested.

The patch has a long line and the new docstring looks a little odd (sentences 
not starting with capital letters) but otherwise I'm in favor of this going 
into 3.6.

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks!

The only remaining question is is it OK that we can specify more than one host 
but only one port?  Guido, Victor?

--

___
Python tracker 

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



[issue24790] Idle: improve stack viewer

2015-08-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 514f5d610175 by Terry Jan Reedy in branch '2.7':
Issue #24790: correct typo noticed by Eric Smith
https://hg.python.org/cpython/rev/514f5d610175

New changeset 213ae5626493 by Terry Jan Reedy in branch '3.4':
Issue #24790: correct typo noticed by Eric Smith
https://hg.python.org/cpython/rev/213ae5626493

--

___
Python tracker 

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



[issue3548] subprocess.pipe function

2015-08-27 Thread R. David Murray

R. David Murray added the comment:

Exactly like the string pipes API, but cmd would be a list of arguments instead 
of a string.  That would then become the argument list to the subprocess stage.

It is an interesting question whether we'd want to allow mixing stage types.  
I'd say no (at least initially, if people complain we can add it as a feature 
later, but we can't subtract it if we implement it now and decide it is a bad 
idea after putting it in the field).

Now, keep in mind that you've only got my opinion so far that this is even a 
good idea :)

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Yann Sionneau

Yann Sionneau added the comment:

All right, here is the new patch then.

--
Added file: http://bugs.python.org/file40275/multibind3.patch

___
Python tracker 

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



[issue3548] subprocess.pipe function

2015-08-27 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Oh, I see... The pipes module uses os.system and os.popen to execute commands 
under a "/bin/sh" environment. So you are proposing to re-implement it with 
subprocess in order to execute commands without shell and, also, extend by 
accepting argv-style parameters. Is this right this time?

How would an argv-style pipe look like?

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Yury Selivanov

Yury Selivanov added the comment:

> How am I supposed to handle the method being called with a Mock'ed 
> getaddrinfo?

Why would you call it that way?  Are regular asyncio users going to mock it in 
their production/test code?

If the only case for using mocks there are asyncio unittests -- just don't do 
that.

--

___
Python tracker 

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



[issue24946] Tkinter tests that fail on linux in tiling window manager

2015-08-27 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Serhiy, Florian emailed this to me in response to my pydev post on Linux gui 
tests. I'll let you decide if you think anything needs to be done.

>>>from Florian
FWIW, those tests seem to fail when using a tiling window manager
(herbstluftwm):

==
FAIL: test_pack_configure_anchor 
(tkinter.test.test_tkinter.test_geometry_managers.PackTest)
--
Traceback (most recent call last):
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
48, in test_pack_configure_anchor
check('n', '30x70+135+20')
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
47, in check
self.assertEqual(a.winfo_geometry(), geom)
AssertionError: '30x70+210+20' != '30x70+135+20'
- 30x70+210+20
?   - ^
+ 30x70+135+20
?^^


==
FAIL: test_pack_configure_expand 
(tkinter.test.test_tkinter.test_geometry_managers.PackTest)
--
Traceback (most recent call last):
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
86, in test_pack_configure_expand
check('20x40+0+80', '50x30+135+0', '80x80+220+75', '40x30+100+170')
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
78, in check
self.assertEqual(a.winfo_geometry(), geoms[0])
AssertionError: '20x40+0+102' != '20x40+0+80'
- 20x40+0+102
? ^ -
+ 20x40+0+80
? ^


==
FAIL: test_pack_configure_padx_ipadx_fill 
(tkinter.test.test_tkinter.test_geometry_managers.PackTest)
--
Traceback (most recent call last):
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
125, in test_pack_configure_padx_ipadx_fill
check('20x40+260+80', '240x200+0+0', side='right', padx=20)
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
123, in check
self.assertEqual(a.winfo_geometry(), geom1)
AssertionError: '20x40+412+102' != '20x40+260+80'
- 20x40+412+102
+ 20x40+260+80


==
FAIL: test_pack_configure_pady_ipady_fill 
(tkinter.test.test_tkinter.test_geometry_managers.PackTest)
--
Traceback (most recent call last):
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
167, in test_pack_configure_pady_ipady_fill
check('20x40+280+80', '280x200+0+0', side='right', pady=20)
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
165, in check
self.assertEqual(a.winfo_geometry(), geom1)
AssertionError: '20x40+432+102' != '20x40+280+80'
- 20x40+432+102
+ 20x40+280+80


==
FAIL: test_pack_configure_side 
(tkinter.test.test_tkinter.test_geometry_managers.PackTest)
--
Traceback (most recent call last):
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
208, in test_pack_configure_side
check('top', '20x40+140+0', '300x160+0+40')
  File 
"/usr/lib/python3.4/tkinter/test/test_tkinter/test_geometry_managers.py", line 
206, in check
self.assertEqual(a.winfo_geometry(), geom1)
AssertionError: '20x40+216+0' != '20x40+140+0'
- 20x40+216+0
?   - ^
+ 20x40+140+0
?^^

They however run fine in floating mode, so I'm guessing this is just a
limitation of those tests.

--
components: Tkinter
messages: 249237
nosy: The-Compiler, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Tkinter tests that fail on linux in tiling window manager
type: behavior
versions: 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



[issue23630] support multiple hosts in create_server/start_server

2015-08-27 Thread Yann Sionneau

Yann Sionneau added the comment:

All right, thanks.
I fixed everything but the thing about getaddrinfo being Mock'ed.
How am I supposed to handle the method being called with a Mock'ed getaddrinfo?

--

___
Python tracker 

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



[issue24945] Expose Py_TPFLAGS_ values from Python

2015-08-27 Thread Erik Bray

Erik Bray added the comment:

Alternatively (or additionally) it would be nice if type.__flags__ were some 
PyStructSequence-based type (though as a subtype of int for backwards compat).

--

___
Python tracker 

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



[issue24943] Simplifying os.exec*

2015-08-27 Thread R. David Murray

R. David Murray added the comment:

The functions in the os module are (for the most part) thin wrappers around OS 
apis (mostly posix).  The 8 function reflect the posix functions.  If you want 
a convenience interface, use the subprocess module.

--
nosy: +r.david.murray
resolution:  -> rejected
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



[issue24945] Expose Py_TPFLAGS_ values from Python

2015-08-27 Thread Erik Bray

New submission from Erik Bray:

Although admittedly rare, I've on more than one occasion wanted to inspect the 
tp_flags of a given class.  It seems silly to me that although tp_flags is 
exposed to Python via type.__flags__, I then have to go rummaging around in 
Include/object.h in order to actually interpret the value of that attribute.

It would be nice, then, if the Py_TPFLAGS_* values were exposed as constants 
somewhere in Python (perhaps in the sys module)?

If it's agreed this is a good idea I'll gladly provide a patch if someone can 
point me toward where this would best live.

--
components: Interpreter Core
messages: 249233
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Expose Py_TPFLAGS_ values from Python
type: enhancement

___
Python tracker 

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



[issue3548] subprocess.pipe function

2015-08-27 Thread R. David Murray

R. David Murray added the comment:

No, I'm talking about https://docs.python.org/3/library/pipes.html

--

___
Python tracker 

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



[issue24944] traceback when using tempfile module on windows

2015-08-27 Thread STINNER Victor

STINNER Victor added the comment:

> fcntl.__file__  returns  "fcntl.py". The file is located under site-packages.

Ok, it's not a bug in Python, but in your local setup. Rename this file to 
fcntl.py.old, it should fix your issue.

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

___
Python tracker 

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



[issue24944] traceback when using tempfile module on windows

2015-08-27 Thread Hassan El Karouni

Hassan El Karouni added the comment:

fcntl.__file__  returns  "fcntl.py". The file is located under site-packages.
The contents of the file are:
def fcntl(fd, op, arg=0):
return 0

def ioctl(fd, op, arg=0, mutable_flag=True):
if mutable_flag:
return 0
else:
return ""

def flock(fd, op):
return
  
def lockf(fd, operation, length=0, start=0, whence=0):
return

--

___
Python tracker 

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



[issue24944] traceback when using tempfile module on windows

2015-08-27 Thread STINNER Victor

STINNER Victor added the comment:

Hi, do you have a file called fcntl.py in your project?

Try:

>>> import fcntl
>>> fcntl.__file__
'/usr/lib64/python2.7/lib-dynload/fcntlmodule.so'

This module should be available on Windows.

--
nosy: +haypo

___
Python tracker 

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



[issue24944] traceback when using tempfile module on windows

2015-08-27 Thread Hassan El Karouni

New submission from Hassan El Karouni:

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tempfile
>>> tempfile.mkstemp()
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python27\lib\tempfile.py", line 308, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags)
  File "C:\Python27\lib\tempfile.py", line 240, in _mkstemp_inner
_set_cloexec(fd)
  File "C:\Python27\lib\tempfile.py", line 50, in _set_cloexec
flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
AttributeError: 'module' object has no attribute 'F_GETFD'


On line 51 in tempfile.py, an AttributeError exception is not caught. The 
problem is caused by the fact that on Windows, the fcntl module is supposed not 
to exist, but in my case, a dummy module with the same name was put on the 
path. This means that line 50 is run thru when making the mkstemp() call.
The fix is to catch the AttributeError exception on line 51.
The bug might also affect Python 3 but this is to be checked.

--
components: Library (Lib)
messages: 249228
nosy: Hassan El Karouni
priority: normal
severity: normal
status: open
title: traceback when using tempfile module on windows
type: crash
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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-27 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I fixed the files after the review. Regarding the PROFILE_OPT_OLD line, I think 
that it is better to keep also the old task used for PGO, until clear evidence 
and measurements that regrtest is performing better on other architectures 
exists.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-27 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40273/python2.7-pgo-v05.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-08-27 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40274/python3.6-pgo-v05.patch

___
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-08-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Both the fix and the v3 benchmark sound good to me. Note I haven't tried them.

--

___
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-08-27 Thread Florin Papa

Florin Papa added the comment:

I have modified the Django-1.8.zip archive to extract to Django-1.8 directory.

To apply the patch please follow these steps:

hg clone https://hg.python.org/benchmarks
cd benchmarks/
copy django_v3.patch to the current directory and Django-1.8.zip to the lib/ 
directory
hg import --no-commit django_v3.patch
cd lib/
unzip Django-1.8.zip

--
Added file: http://bugs.python.org/file40272/Django-1.8.zip

___
Python tracker 

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



[issue24943] Simplifying os.exec*

2015-08-27 Thread Sworddragon

New submission from Sworddragon:

I'm seeing in the documentation 8 different os.exec* functions that differ only 
slightly. I think from the way they are differing they could also all be merged 
into 1 function which could look like this:

os.exec(file, args, env, use_path)

- file is the path to the executable file and if use_path is True the PATH 
environment variable will be used to look for it (reflects p).
- args will be a dynamic list or tuple of arguments as it can handle a fixed 
and a variable number of arguments (reflects v).
- env is the mapping of the environment variables which will be used or None if 
the environment variables of the current process shall be used (reflects e).

env would default to None and use_path either to False or True.

--
components: Library (Lib)
messages: 249224
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: Simplifying os.exec*
type: enhancement
versions: Python 3.4

___
Python tracker 

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