[issue30308] Add code coverage for argument in random.shuffle

2017-05-09 Thread Mark Dickinson

Mark Dickinson added the comment:

I see you've added a test for the behaviour of:

shuffle(seq, random=lambda: -1.0)

I'd suggest leaving that test out: that this works right now is really just an 
accident of the (CPython) implementation, and it may well not work on other 
Python implementations. Adding a test in effect says that there was a 
deliberate decision to support this (which as far as I know there isn't, and 
shouldn't be).

--

___
Python tracker 

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



[issue29262] Provide a way to check for *real* typing.Union instances

2017-05-09 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

The discussed functionality is published as a separate package:
https://pypi.python.org/pypi/typing-inspect
https://github.com/ilevkivskyi/typing_inspect

After the API is settled, some introspection functions may be added directly to 
typing.

--

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-09 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-09 Thread Mark Dickinson

Mark Dickinson added the comment:

I'm also a bit uncomfortable with adding tests for other specific exceptions 
when a misbehaving `random` is passed: again, the details of whether an 
exception is raised or not for "self.assertRaises(IndexError, shuffle, seq, 
random=lambda: -1.1)", and which precise class of exception is raised, seem 
like something that could be left as implementation-defined. I'm not sure I see 
much value in pinning down the precise behaviour in this case (which is 
effectively what a testcase does).

--

___
Python tracker 

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-09 Thread Louie Lu

Louie Lu added the comment:

I'm not sure the "safer" meaning. If it is about for beginner less confuse when 
mistakenly typing "d[long_", the answer will be yes for only complete 
string keys.

Impl complexity between str-only and not-str-only will not have too much 
different, only need to change the sentinel and some other work.

--

___
Python tracker 

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



[issue30297] Recursive starmap causes Segmentation fault

2017-05-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Since this is duplicate, marking as closed.

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



[issue30312] Small correction in set code sample

2017-05-09 Thread Oskar Weser

New submission from Oskar Weser:

There is a code example about the set type found under:
https://docs.python.org/3/tutorial/datastructures.html

It reads as:
```
>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
>>> print(basket)  # show that duplicates have been removed
{'orange', 'banana', 'pear', 'apple'}
>>> 'orange' in basket # fast membership testing
True
>>> 'crabgrass' in basket
False

>>> # Demonstrate set operations on unique letters from two words
...
>>> a = set('abracadabra')
>>> b = set('alacazam')
>>> a  # unique letters in a
{'a', 'r', 'b', 'c', 'd'}
>>> a - b  # letters in a but not in b
{'r', 'd', 'b'}
>>> a | b  # letters in either a or b
```

I read "either a or b" as "a .EXOR. b". Shouldn't it be:
```
>>> a | b  # letters in a or b
```
I don't speak English as a native language, so perhaps I am wrong.

--
assignee: docs@python
components: Documentation
messages: 293291
nosy: docs@python, mcocdawc
priority: normal
severity: normal
status: open
title: Small correction in set code sample
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30293] Peephole binops folding can lead to memory and bytecache ballooning

2017-05-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Looking back at the OP's timings in the referenced SO question, I would expect 
that if someone "fixed" this issue, it wouldn't be long before someone else 
filed a performance regression bug claiming a 63,000x slowdown in exactly the 
same code.

I'm marking this as closed because if this ever did arise in real code, it is 
unclear whether the desirable behavior is to eat memory but run fast, or to 
save memory upfront but run dog slow and eat memory later when the function is 
called.  Either way, the situation is likely to be very rare.

Your guess is as good as mine regarding which behavior would be more desirable 
to the user.  Presumably, if they direct the computer to build a large object, 
they won't be surprised if a large object is created.

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



[issue30312] Small correction in set code sample

2017-05-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

ISTM the result of the expression makes the meaning clear:

>>> a | b
{'r', 'l', 'b', 'c', 'z', 'd', 'a', 'm'}

That said, the text might be a little clearer like this:

   # letters in a or b or both

--
assignee: docs@python -> Mariatta
nosy: +Mariatta, rhettinger
priority: normal -> low

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2017-05-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Wouldn't be better to split _GeneratorContextManager on two classes rather than 
add a boolean argument? Currently _GeneratorContextManager used  two different 
functions -- an one-shot context manager and a decorator that recreates context 
managers.

Proposed patch makes _GeneratorContextManager an one-shot context manager again 
(it no longer keep references to arguments), and adds 
_GeneratorContextManagerDecorator which can be used either as an one-shot 
context manager (references to arguments are removed after use) or as a 
decorator (in the last case the gen attribute is not created).

--
keywords: +patch
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file46852/refactor-contextmanager.diff

___
Python tracker 

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



[issue30293] Peephole binops folding can lead to memory and bytecache ballooning

2017-05-09 Thread Martijn Pieters

Martijn Pieters added the comment:

Thanks Raymond, for the response. I agree, we can't prevent all possible 
misuse, and avoiding the memory issue would require overly costly checks as to 
what is being multiplied or added.

--

___
Python tracker 

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



[issue30258] [2.7] regrtest: handle child process crash

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 74683fc6247c522ae955a6e7308b8ff51def35d8 by Victor Stinner in 
branch 'master':
bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)
https://github.com/python/cpython/commit/74683fc6247c522ae955a6e7308b8ff51def35d8


--

___
Python tracker 

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



[issue504219] locale.resetlocale is broken

2017-05-09 Thread Nick Coghlan

Nick Coghlan added the comment:

Trying to come up with a short LC_MONETARY example for PEP 538, I just ran into 
what seems to be a related problem with locale.resetlocale(), which is that it 
doesn't work properly for categories other than LC_CTYPE: 
locale.getdefaultlocale() doesn't let you say which category you're actually 
interested in, so even if you specific a category for resetlocale(), it's going 
to look at the LC_CTYPE setting, *NOT* the one for the category you're 
interested in.


So perhaps a suitable design change here would be to update resetlocale() to 
just pass an empty string (letting the underlying platform API call figure out 
the right default), rather than passing the result of locale.getdefaultlocale()?

--
nosy: +ncoghlan

___
Python tracker 

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



[issue30301] “AttributeError: 'SimpleQueue' object has no attribute '_poll'”

2017-05-09 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +davin

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1613

___
Python tracker 

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



[issue30306] release arguments of contextmanager

2017-05-09 Thread Nick Coghlan

Nick Coghlan added the comment:

You're right, there's no actual requirement that _recreate_cm() call 
self.__class__, so it can use a different type internally.

--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

I backported test_regrtest from master to 2.7. I removed:

* ParseArgsTestCase: regrtest.py of 2.7 has no API to easily write unit tests 
for argument parsing
* test_huntrleaks_fd_leak(): this features doesn't exist in regrtest 2.7
* test_coverage(): regrtest 2.7 argument parser doesn't support --coverage, 
moreover this is an issue with the test summary
* check_executed_tests() doesn't check the final list "Tests results: xxx" 
since it doesn't exist in Python 2.7
* test_list_tests(): --list-tests feature doesn't exist in 2.7
* test_fromlist() only supports the most basic format: "test_xxx"
* test_slowest_interrupted(): the test failed and I was too lazy to try to fix 
it, this test is fragile
* test_wait(): no --wait feature in 2.7

I made minor changes (ex: super()) to port the code from Python 3.7 to 2.7. I 
removed code using faulthandler, since faulthandler doesn't exist in 2.7.

test_slowest() was renamed to test_slow(), since regrtest 2.7 has the cmdline 
option --slow, not --slowest.

I will try to fix test_coverage() later, after test_regrtest is added to 2.7.

test_crashed() uses "import ctypes; ctypes.string_at(0)" instead of "import 
faulthandler; faulthandler._sigsegv()", I hope that ctypes.string_at(0) is 
enough to crash on all platforms :-D Otherwise, I may add something to 
_testcapi.

I may try to backport/fix other issues later to fix other removed tests.

--

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

The coverage job has been fixed and I'm unable to reproduce bpo-15366 bug (my 
change doesn't seem to have introduced a regression), so I close the issue.

I sent an email to python-dev to warn about this change, so maybe others will 
double check.

@Jeremy: please double check my change to make sure that I didn't introduce a 
regression.

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



[issue15366] venv assumes header files in sys._home + '/Include'

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

I reverted the commit in 2.7, 3.5, 3.6 and master (3.7) branches to fix 
bpo-30273, but I'm unable to reproduce this bug so it seems like venv and 
virtualend have been updated in the meanwhile to add ${venv}/include to the 
include directories.

See for example the commit ab6b962ef241be97536573d7490ce1cfc74fde18.

--
nosy: +haypo

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset d2aff607199a24182714404777c80c7f180a35af by Victor Stinner in 
branch '2.7':
[2.7] bpo-30283: Backport test_regrtest from master to 2.7 (#1513)
https://github.com/python/cpython/commit/d2aff607199a24182714404777c80c7f180a35af


--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

Oh, test_regrtest of Python 3.5 only tests regrtest command line parser, it 
doesn't contain functional tests. We may also backport functional tests for 3.5.

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



[issue15366] venv assumes header files in sys._home + '/Include'

2017-05-09 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1615

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-09 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1614

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-09 Thread Jeremy Kloth

Jeremy Kloth added the comment:

PR1515 addresses the issue from bpo-15366 (venv from Python compiled with 
builddir != srcdir).  It seems that the original fix from bpo-15366 no longer 
worked.  This addresses that.

--

___
Python tracker 

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



[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-09 Thread Louie Lu

Louie Lu added the comment:

The reason why click on listbox will disappear is because we bind 
HIDE_VIRTUAL_EVENT with  on widget.text. When click on listbox, it 
will focusOut the widget.text then focusOn listbox, thus trigger the hide 
process.

The reason why click on listbox and move the cursor out of box, then click will 
freeze IDLE cursor, it because tk will generate three event:  FocusOut, 
FocusOut, and ButtonPress:


hidell  generated by:  
.!listedtoplevel.!frame.text.!toplevel2.!listbox focus on:  None
hidell  generated by:  .!listedtoplevel.!frame.text.!toplevel2 
focus on:  None
prove  generated by:  
.!listedtoplevel.!frame.text focus on:  .!listedtoplevel.!frame.text

Becase we bind HIDE process on widget.text, it will then trigger hide_window, 
and at the same time, FoucsOut event is still on the half-way, and then the 
listbox is destory and reset to None, I think this is why it will freeze until 
re-focus on IDEL.


Attach PR solve this problem, it re-bind the HIDE process from widget.text to 
listbox, thus it will not trigger some race-contidion when destroying 
autocompletewindow.

--
nosy: +louielu

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

I reopen the issue since Jeremy posted a new PR.

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

___
Python tracker 

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



[issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers()

2017-05-09 Thread flying sheep

flying sheep added the comment:

well, we should just allow

extractall(members=['foo', 'bar'])

currently members only accepts TarInfo objects, not filenames, but it’s easy to 
accept both.

https://github.com/python/cpython/blob/74683fc6247c522ae955a6e7308b8ff51def35d8/Lib/tarfile.py#L1991-L1999

sth like:

filenames = set()
for member in members:
if isinstance(member, TarInfo):
# do what’s done now
else:
filenames.add(member)

for tarinfo in self:
if tarinfo.name in filenames:
self.extract(tarinfo)

--
nosy: +flying sheep

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1616

___
Python tracker 

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



[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-09 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1617

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-09 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Yeah, sorry, I was working (fighting ;) with the new GitHub workflow while you 
updated the status.

--

___
Python tracker 

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



[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-09 Thread Louie Lu

Louie Lu added the comment:

Test PR on MacOS with Tk 5.8.9, when double click on listbox will cause freeze 
after hide window

--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

PR 1516 is the real stuff. I would like to enhance regrtest output in 2.7 to be 
able to debug buildbots stuck somewhere.

Example:
---
filecmp
[398/402] test_setcomps
[399/402] test_array
[400/402] test_tools
[24166 refs]
(...)
[24167 refs]
recursedown('@test_33891_tmp')
[401/402] test_trace

command timed out: 1200 seconds without output running ['make', 'buildbottest', 
'TESTOPTS=-j2 -j4', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1628.312249
---
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%202.7/builds/73/steps/test/logs/stdio

--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

I chose to not backport "loadavg: 1.73" feature (bpo-30263) in PR 1516. I still 
consider this feature as experimental, not sure that it's really useful :-)

--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

test_regrtest failed on "x86 Windows XP VS9.0 2.7" buildbot, but passed on "x86 
Windows XP 2.7" buildbot?

---
[279/402/1] test_regrtest
test test_regrtest failed -- multiple errors occurred; run in verbose mode for 
details
---
http://buildbot.python.org/all/builders/x86%20Windows%20XP%20VS9.0%202.7/builds/140/steps/test/logs/stdio

The test isn't rerun in verbose mode. Another bug?

--

___
Python tracker 

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



[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-09 Thread Tomas Orsava

Changes by Tomas Orsava :


--
pull_requests: +1618

___
Python tracker 

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



[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-05-09 Thread Charalampos Stratakis

Changes by Charalampos Stratakis :


--
pull_requests: +1619

___
Python tracker 

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



[issue30313] Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

After my commit d2aff607199a24182714404777c80c7f180a35af of bpo-30283, 
test_regrtest failed with "multiple errors occurred; run in verbose mode for 
details" on "x86 Windows XP VS9.0 2.7" buildbot, but tests are not re-run in 
verbose mode on this buildbot :-(

See http://bugs.python.org/issue30283#msg293312

The "test" step of the buildbot runs directly the PC/VS9.0/rt.bat command which 
only pass -j2 option to regrtest.py, but not -uall -rwW.

Other Windows buildbots run Tools/buildbot/test.bat which pass -uall -rwW to 
regrtest.py.

I see different options:

* Modify PC/VS9.0/rt.bat to pass extra options: I dislike this option, it 
changes the behaviour, some people may rely on the current behaviour (and 
Python 2.7 is now considered as super stable)

* Copy Tools/buildbot/test.bat to PC/VS9.0/test.bat and modify the copy to run 
PC/VS9.0/rt.bat. I dislike this option, it duplicates code.

* Modify Tools/buildbot/test.bat to add an option to specify the pass to rt.bat 
and then modify the buildbot config to use test.bat instead of rt.bat but also 
use the new option to pass PC/VS9.0/rt.bat (or just "PC/VS9.0/" depending how 
the option is designed).

@Zach: I request your advice on this issue ;-)

--
components: Tests, Windows
keywords: buildbot
messages: 293313
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options
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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

> The test isn't rerun in verbose mode. Another bug?

Yes, I opened bpo-30313.

--

___
Python tracker 

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



[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 03b8a378dfa46372b96790f82c85e9b72518f1bf by Victor Stinner 
(torsava) in branch '3.6':
[3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) 
(#1518)
https://github.com/python/cpython/commit/03b8a378dfa46372b96790f82c85e9b72518f1bf


--

___
Python tracker 

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



[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-09 Thread Tomas Orsava

Changes by Tomas Orsava :


--
pull_requests: +1620

___
Python tracker 

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



[issue30314] Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

We should give more than 15 min to the "x86 Tiger 3.6" buildbot, since 
test_tools was killed by the timeout. On the previous build, test_tools took 
min 25 sec.

The global 15 min timeout was designed to detect deadlocks issues, but here 
it's just that the buildbot is sometimes too slow.

Maybe we should increase the timeout to 30 min on all buildbots, but also 
increase the timeout of the "tests" step to long than 1 hour? Otherwise, the 
test can be killed by buildbot without logging the Python traceback.

Maybe we can configured buildbot to first send a signal (SIGUSR1? SIGINT?) 
before killing the process to dump a traceback, but that's something different.

---
0:15:54 [ 52/405] test_tools crashed -- running: test_zipfile (178 sec)
Timeout (0:15:00)!
Thread 0xa000d000 (most recent call first):
  File "/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/ast.py", line 101 in 

  ...
  File 
"/Users/db3l/buildarea/3.6.bolen-tiger/build/Lib/test/test_tools/test_unparse.py",
 line 124 in assertASTEqual
  ...
---
http://buildbot.python.org/all/builders/x86%20Tiger%203.6/builds/349/steps/test/logs/stdio

See also bpo-30172: "test_tools takes longer than 5 minutes on some buildbots".

--
messages: 293316
nosy: haypo
priority: normal
severity: normal
status: open
title: Buildbots: 15 min is too low for test_tools on x86 Tiger 3.6 buildbot

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 453a6857023a0a2c714772cda8717ecf03de64f5 by Victor Stinner in 
branch '2.7':
bpo-30283: Backport regrtest features from master to 2.7 (#1516)
https://github.com/python/cpython/commit/453a6857023a0a2c714772cda8717ecf03de64f5


--

___
Python tracker 

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



[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

I merged a first serie of enhancements for regrtest output in the 2.7 branch. 
Let's see how things are going, if it helps to debug stuck buildbots.

For Python 3.5, I'm less motivated to backport enhancements since Python 3.5 
has faulthandler which is used in regrtest to kill a stuck test after 15 min 
with a nice Python traceback. But maybe I will do the similar backports, since 
I'm now trying to watching buildbots of all Python branches, not only matser ;-)

--

___
Python tracker 

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



[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 8489409bbfabb2ddc30ed55c9f4d679a3710ebe4 by Victor Stinner 
(torsava) in branch '3.5':
[3.5] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) 
(#1520)
https://github.com/python/cpython/commit/8489409bbfabb2ddc30ed55c9f4d679a3710ebe4


--

___
Python tracker 

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



[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-09 Thread Tomas Orsava

Changes by Tomas Orsava :


--
pull_requests: +1621

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I reproduced the bug:

cd ~/prog/python/master
git clean -fdx

mkdir ~/build_cpython
cd ~/build_cpython/
~/prog/python/master/configure --with-pydebug --prefix=/home/haypo/prefix
make
./python -m venv ~/venv

cd ~/venv
. bin/activate
python -m pip install fat

=> error on missing Python.h

--

___
Python tracker 

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



[issue15366] venv assumes header files in sys._home + '/Include'

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3 by Victor Stinner 
(Jeremy Kloth) in branch 'master':
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515)
https://github.com/python/cpython/commit/dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3


--

___
Python tracker 

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



[issue3839] wsgi.simple_server resets 'Content-Length' header on empty content even if app defined it.

2017-05-09 Thread kxroberto

kxroberto added the comment:

However, setting a default "0" when no content, that is still too much in 
general. 

In case of a '304 Not Modified' for example (which is probably the most 
frequent HTTP status used on the web overall!) a Content-Length header  
obviously is disallowed at all according to 
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5

"this prevents inconsistencies between cached entity-bodies and updated headers"

Apache, NGINX and other servers observed indeed do not set Content-Length in 
304.  And there were bugfix issues regarding that.

Some browsers obviously pick up a Content-Length "0", update the cached 
resource and thus zero the cached data. Literally obeying "If a cache uses a 
received 304 response to update a cache entry, the cache MUST update the entry 
to reflect any new field values given in the response."  (Though that seems 
rather silly, as that would mean "Modified". And Content-Length should 
reasonably perhaps be better always associated with the current transmission 
for needs of keep-alive connections and buffer management at a lower level, and 
not with cache & status issues.)

Possibly the same problem for 204.

--
nosy: +kxroberto

___
Python tracker 

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



[issue30273] The coverage job is broken: distutils build_ext fails on None

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3 by Victor Stinner 
(Jeremy Kloth) in branch 'master':
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515)
https://github.com/python/cpython/commit/dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3


--

___
Python tracker 

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



[issue30217] Missing entry for the tilde (~) operator in the Index

2017-05-09 Thread Marco Buttu

Marco Buttu added the comment:

Looking at Doc/reference/expressions.rst and Doc/reference/datamodel.rst, I do 
not see any reference to the symbols, but only to the operator name (negation, 
minus, plus, inversion, etc.).  Therefore I think it is better to not change 
these files.

In the PR [*] I added (in Doc/library/stdtypes.rst) both a reference to the 
symbol and to the name.

Thank you very much 

[*] https://github.com/python/cpython/pull/1502/

--

___
Python tracker 

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



[issue30280] Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

Warning also seen on FreeBSD 10:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/240/steps/test/logs/stdio

Warning -- threading._dangling was modified by test_asyncio
  Before: <_weakrefset.WeakSet object at 0x805f5d810>
  After:  <_weakrefset.WeakSet object at 0x807929948>

--
title: Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 
-> Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 
10

___
Python tracker 

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



[issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/246/steps/test/logs/stdio

test_check_hostname (test.test_ftplib.TestTLS_FTPClass) ... Exception in thread 
Thread-84:
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 83, in read
obj.handle_read_event()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py",
 line 366, in handle_read_event
super(SSLConnection, self).handle_read_event()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 423, in handle_read_event
self.handle_read()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asynchat.py", 
line 171, in handle_read
self.found_terminator()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py",
 line 116, in found_terminator
method(arg)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py",
 line 207, in cmd_quit
self.close()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py",
 line 406, in close
super(SSLConnection, self).close()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 397, in close
self.socket.close()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/socket.py", line 
417, in close
self._real_close()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/socket.py", line 
411, in _real_close
_ss.close(self)
ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 916, in _bootstrap_inner
self.run()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py",
 line 279, in run
asyncore.loop(timeout=0.1, count=1)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 207, in loop
poll_fun(timeout, map)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 150, in poll
read(obj)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/asyncore.py", 
line 87, in read
obj.handle_error()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py",
 line 399, in handle_error
raise Exception
Exception

ERROR

(...)

==
ERROR: test_check_hostname (test.test_ftplib.TestTLS_FTPClass)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_ftplib.py",
 line 950, in test_check_hostname
self.client.connect("localhost", self.server.port)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 
155, in connect
self.welcome = self.getresp()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 
234, in getresp
resp = self.getmultiline()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 
220, in getmultiline
line = self.getline()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/ftplib.py", line 
202, in getline
line = self.file.readline(self.maxline + 1)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/socket.py", line 
586, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out

--
Ran 89 tests in 15.001s

FAILED (errors=1)
Warning -- threading_cleanup() failed to cleanup 0 threads after 4 sec (count: 
0, dangling: 2)
Warning -- threading._dangling was modified by test_ftplib
  Before: <_weakrefset.WeakSet object at 0x80577ce28>
  After:  <_weakrefset.WeakSet object at 0x80577c810> 
test test_ftplib failed

--
components: Tests
messages: 293326
nosy: haypo
priority: normal
severity: normal
status: open
title: test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on 
"AMD64 FreeBSD CURRENT Debug 3.x" buildbot
versions: Python 3.7

___
Python tracker 

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



[issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2017-05-09 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +buildbot

___
Python tracker 

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



[issue30316] test_default_timeout() of test_threading.BarrierTests: random failures on AMD64 FreeBSD CURRENT Debug 3.x

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

test_default_timeout() of test_threading.BarrierTests randomly fails on AMD64 
FreeBSD CURRENT Debug 3.x:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/246/steps/test/logs/stdio


test_default_timeout (test.test_threading.BarrierTests) ... ERROR
test_reset (test.test_threading.BarrierTests) ... Unhandled exception in thread 
started by .task at 0x8057bed48>
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 38, in task
Unhandled exception in thread started by .task 
at 0x8057bed48>
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 38, in task
f()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 917, in f
i = barrier.wait()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 603, in wait
self._enter() # Block while the barrier drains.
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 627, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by .task 
at 0x8057bed48>
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 38, in task
f()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 917, in f
i = barrier.wait()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 612, in wait
self._wait(timeout)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 652, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by .task 
at 0x8057bed48>
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 38, in task
f()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 917, in f
i = barrier.wait()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 603, in wait
self._enter() # Block while the barrier drains.
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 627, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
f()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 917, in f
i = barrier.wait()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 612, in wait
self._wait(timeout)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 652, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError
ok

(...)


test_frame_tstate_tracing (test.test_threading.ThreadTests) ... ok
test_ident_of_no_threading_threads (test.test_threading.ThreadTests) ... ok
test_is_alive_after_fork (test.test_threading.ThreadTests) ... Warning -- 
threading_cleanup() failed to cleanup 0 threads after 4 sec (count: 0, 
dangling: 21)
ok
test_join_nondaemon_on_shutdown (test.test_threading.ThreadTests) ... ok
test_limbo_cleanup (test.test_threading.ThreadTests) ... ok

(...)

==
ERROR: test_default_timeout (test.test_threading.BarrierTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 922, in test_default_timeout
self.run_threads(f)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 751, in run_threads
f()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/lock_tests.py",
 line 917, in f
i = barrier.wait()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 612, in wait
self._wait(timeout)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/threading.py", 
line 650, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError

--
components: Tests
keywords: buildbot
messages: 293327
nosy: haypo
priority: normal
severity: normal
status: open
title: test_default_timeout() of test_threading.BarrierTests: random failures 
on AMD64 FreeBSD CURRENT Debug 3.x
versions: Python 3.7

___
Python tracker 

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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-05-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please make a review?

--

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/588/steps/test/logs/stdio

0:49:08 [225/405/1] test_multiprocessing_spawn failed
Process Process-59:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1385, in _test_timeout_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 1040, in wait
return self._callmethod('wait', (timeout,))
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 774, in _callmethod
raise convert_to_error(kind, result)
threading.BrokenBarrierError
Process Process-60:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1385, in _test_timeout_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 1040, in wait
return self._callmethod('wait', (timeout,))
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 774, in _callmethod
raise convert_to_error(kind, result)
threading.BrokenBarrierError
Process Process-62:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1385, in _test_timeout_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 1040, in wait
return self._callmethod('wait', (timeout,))
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 774, in _callmethod
raise convert_to_error(kind, result)
threading.BrokenBarrierError
Process Process-61:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1385, in _test_timeout_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 1040, in wait
return self._callmethod('wait', (timeout,))
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\managers.py",
 line 774, in _callmethod
raise convert_to_error(kind, result)
threading.BrokenBarrierError
test_answer_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) 
... ok
test_deliver_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) 
... ok

(...)

==
ERROR: test_timeout (test.test_multiprocessing_spawn.WithManagerTestBarrier)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1399, in test_timeout
self.run_threads(self._test_timeout_f, (self.barrier, results))
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1228, in run_threads
f(*args)
  F

[issue30318] test_distutils is too verbose on Windows

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

test_distutils should only dump stdout/stderr on compilation failure, but hide 
them on success (by default).

Example of output:

http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/588/steps/test/logs/stdio

0:58:52 [277/405/1] test_distutils passed (124 sec) -- running: test_tokenize 
(322 sec)
xxmodule.c
   Creating library 
d:\temp\tmp1byjf67b\Debug\temp\tmp1byjf67b\xx_d.cp37-win32.lib and object 
d:\temp\tmp1byjf67b\Debug\temp\tmp1byjf67b\xx_d.cp37-win32.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
foo.c
   Creating library 
d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.lib and object 
d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
foo.c
   Creating library 
d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.lib and object 
d:\temp\tmp78_8qa47\tempt\temp\tmpduqip5h3\foo_d.cp37-win32.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
xxmodule.c
   Creating library 
d:\temp\tmpruuda1qt\Debug\temp\tmpruuda1qt\xx_d.cp37-win32.lib and object 
d:\temp\tmpruuda1qt\Debug\temp\tmpruuda1qt\xx_d.cp37-win32.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
foo.c
   Creating library 
d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.lib and object 
d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
foo.c
   Creating library 
d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.lib and object 
d:\temp\tmpxzrh56h5\tempt\temp\tmpht642isv\foo_d.cp37-win32.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance
xxmodule.c
   Creating library build\temp.win32-3.7-pydebug\Debug\xx_d.cp37-win32.lib and 
object build\temp.win32-3.7-pydebug\Debug\xx_d.cp37-win32.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the 
link command line to improve linker performance

D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\build\test_python_204>exit
 1 

D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\build\test_python_204>exit
 0

--
components: Distutils, Tests, Windows
messages: 293330
nosy: dstufft, haypo, merwok, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_distutils is too verbose on Windows
versions: Python 3.7

___
Python tracker 

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



[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a473a73d0cb42c534a3047bbf781b3c592fc33ca by Victor Stinner 
(torsava) in branch '2.7':
[2.7] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) 
(#1522)
https://github.com/python/cpython/commit/a473a73d0cb42c534a3047bbf781b3c592fc33ca


--

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

Other similar errors.

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

1:05:52 [382/405/1] test_multiprocessing_spawn failed -- running: test_mmap 
(556 sec)
Process Process-129:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1317, in _test_reset_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
603, in wait
self._enter() # Block while the barrier drains.
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
627, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
Process Process-130:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1317, in _test_reset_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
603, in wait
self._enter() # Block while the barrier drains.
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
627, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
Process Process-132:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1317, in _test_reset_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
603, in wait
self._enter() # Block while the barrier drains.
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
627, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
Process Process-131:
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 249, in _bootstrap
self.run()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\multiprocessing\process.py",
 line 93, in run
self._target(*self._args, **self._kwargs)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1179, in task
self.f(*self.args)
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 1317, in _test_reset_f
i = barrier.wait()
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
603, in wait
self._enter() # Block while the barrier drains.
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\threading.py", line 
627, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
test_answer_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) 
... ok
test_deliver_challenge_auth_failure (test.test_multiprocessing_spawn.OtherTest) 
... ok

(...)

test_barrier_10 (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... 
ok
test_default_timeout (test.test_multiprocessing_spawn.WithProcessesTestBarrier) 
... ok
test_reset (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... ERROR
test_single_thread (test.test_multiprocessing_spawn.WithProcessesTestBarrier) 
... ok
test_thousand (test.test_multiprocessing_spawn.WithProcessesTestBarrier) ... ok

(...)

==
ERROR: test_reset (test.test_multiprocessing_spawn.WithProcessesTestBarrier)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3

[issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/129/steps/test/logs/stdio

running: test_eintr (584 sec)
0:16:01 [405/405/1] test_eintr failed
test_all (test.test_eintr.EINTRTests) ... FAIL

==
FAIL: test_all (test.test_eintr.EINTRTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_eintr.py", 
line 18, in test_all
script_helper.assert_python_ok("-u", tester)
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/script_helper.py",
 line 150, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/script_helper.py",
 line 136, in _assert_python
err))
AssertionError: Process return code is 1
command line: ['/usr/home/buildbot/python/3.6.koobs-freebsd10/build/python', 
'-X', 'faulthandler', '-I', '-u', 
'/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py']

stdout:
---
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_accept (__main__.SocketEINTRTest) ... ok
test_open (__main__.SocketEINTRTest) ... ok
test_os_open (__main__.SocketEINTRTest) ... ok
test_recv (__main__.SocketEINTRTest) ... ok
test_recvmsg (__main__.SocketEINTRTest) ... ok
test_send (__main__.SocketEINTRTest) ... ok
test_sendall (__main__.SocketEINTRTest) ... ok
test_sendmsg (__main__.SocketEINTRTest) ... ok
test_sleep (__main__.TimeEINTRTest) ... ok
test_sigtimedwait (__main__.SignalEINTRTest) ... ok
test_sigwaitinfo (__main__.SignalEINTRTest) ...
---

stderr:
---
Timeout (0:10:00)!
Thread 0x000802006400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 422 in test_sigwaitinfo
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", 
line 601 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/case.py", 
line 649 in __call__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/unittest/runner.py", 
line 176 in run
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1889 in _run_suite
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1923 in run_unittest
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 492 in test_main
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 496 in 
---

--
Ran 1 test in 607.847s

FAILED (failures=1)
test test_eintr failed

--
components: Tests
messages: 293332
nosy: haypo, martin.panter
priority: normal
severity: normal
status: open
title: test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x 
Shared 3.6
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



[issue30319] test_invalid_authentication() of test_imaplib: random failure on AMD64 FreeBSD 9.x 3.6

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/128/steps/test/logs/stdio

test_invalid_authentication (test.test_imaplib.NewIMAPSSLTests) ... SENT: b'* 
OK IMAP4rev1'
GOT: b'OMOH0 CAPABILITY'
SENT: b'* CAPABILITY IMAP4rev1'
SENT: b'OMOH0 OK CAPABILITY completed'
GOT: b'OMOH1 AUTHENTICATE MYAUTH'
SENT: b'+'
GOT: b'ZmFrZQ=='
SENT: b'OMOH1 NO [AUTHENTICATIONFAILED] invalid'
ERROR

==
ERROR: test_invalid_authentication (test.test_imaplib.NewIMAPSSLTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/test/test_imaplib.py", 
line 223, in _cleanup
self.client.shutdown()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/imaplib.py", 
line 326, in shutdown
self.sock.close()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 
417, in close
self._real_close()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/ssl.py", line 
1052, in _real_close
socket._real_close(self)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd9/build/Lib/socket.py", line 
411, in _real_close
_ss.close(self)
ConnectionResetError: [Errno 54] Connection reset by peer

--
Ran 95 tests in 32.694s

FAILED (errors=1, skipped=2)
Warning -- threading._dangling was modified by test_imaplib
  Before: <_weakrefset.WeakSet object at 0x805e2b608>
  After:  <_weakrefset.WeakSet object at 0x8014a25a0> 
test test_imaplib failed

--
components: Tests
keywords: buildbot
messages: 293331
nosy: haypo
priority: normal
severity: normal
status: open
title: test_invalid_authentication()  of test_imaplib: random failure on AMD64 
FreeBSD 9.x 3.6
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



[issue30318] test_distutils is too verbose on Windows

2017-05-09 Thread Jeremy Kloth

Changes by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-05-09 Thread Brett Cannon

Brett Cannon added the comment:

I've added your PR to my review queue, Serhiy, so I will get to it, I just 
can't make any promises as to when (hopefully this week).

--

___
Python tracker 

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



[issue29889] test_asyncio fails always

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

Can someone test again with a development branch? The bpo-29243 has been fixed 
in 2.7, 3.5, 3.6 and master (3.7) branches thanks to Tomas Orsava!

--
nosy: +torsava

___
Python tracker 

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



[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2017-05-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue30313] Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options

2017-05-09 Thread Zachary Ware

Zachary Ware added the comment:

I think best would be to add a flag to the Tools/buildbot scripts (build and 
clean as well as test) that is ignored on 3.x and substitutes PC/VS9.0 for 
PCbuild on 2.7.  The buildbot config will need to be updated to pass the flag 
on the VS9 builders.  My first thought for a name for the flag was '--legacy', 
but that doesn't seem quite right.

--
stage:  -> needs patch

___
Python tracker 

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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-05-09 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-05-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Brett.

--

___
Python tracker 

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



[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

While 8.5.9 on OSX is more usable than 8.5.7, it is known to crash 
occasionally.  Hence the startup warning.  See idlelib.macosx.tkVersionWarning 
and https://www.python.org/download/mac/tcltk/. (The problems listed in the 
latter for 8.5.9 seems incomplete ;-).  So I am not greatly concerned about 
another one specific to Apple 8.5.9.

runscript.Script_binding.run_module_event has a workaround, a 200 millesecond 
delay, when one uses F5 instead of the menu.  Would that work here?  
(editor.get_accelerator has a different workaround for other keys.)

--

___
Python tracker 

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



[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-05-09 Thread Devin Jeanpierre

Devin Jeanpierre added the comment:

https://github.com/google/oss-fuzz/pull/583 is the PR to oss-fuzz to add the 
project. I'm working on actual tests to be submitted here.

--

___
Python tracker 

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



[issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue

2017-05-09 Thread Wolfgang Maier

Wolfgang Maier added the comment:

The section is correct as it is. Just try it in the interactive interpreter to 
convince yourself.

--
nosy: +wolma

___
Python tracker 

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



[issue30307] https://docs.python.org/3/tutorial/introduction.html#strings Section 3.1.2 doc issue

2017-05-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-05-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset f93234bb8a87855f295d441524e519481ce6ab13 by Serhiy Storchaka in 
branch 'master':
bpo-30024: Circular imports involving absolute imports with binding (#1264)
https://github.com/python/cpython/commit/f93234bb8a87855f295d441524e519481ce6ab13


--

___
Python tracker 

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



[issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']`

2017-05-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch 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



[issue30321] format() function prints fillchar as backslash twice

2017-05-09 Thread PradeepKumar

New submission from PradeepKumar:

The output expected is,
'\R\'

but it shows this.

>>> '{:\^3}'.format('R')
'\\R\\'
>>>

--
messages: 293343
nosy: pradeepkr
priority: normal
severity: normal
status: open
title: format() function prints fillchar as backslash twice
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



[issue30321] format() function prints fillchar as backslash twice

2017-05-09 Thread Zachary Ware

Zachary Ware added the comment:

>>> result = '{:\^3}'.format('R')
>>> result
'\\R\\'
>>> print(result)
\R\
>>> print("backslash (\\) is escaped by another backslash in str's repr")
backslash (\) is escaped by another backslash in str's repr

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



[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-09 Thread Louie Lu

Louie Lu added the comment:

There is a difference between Linux and Mac freeze. On linux, if freeze and I 
insert pdb.set_trace() at the end of the hide_window, it will let cursor blink 
again, while on Mac, this won't work.

I try self.widget.after(200, self.hide_window) and it doesn't work, too.

I install Tk 8.5.18 as the web recommand, should I need to reboot or chnage the 
default path? it still bump out the warning that I'm using 8.5.9 instead.

--

___
Python tracker 

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



[issue30322] PyObject_GetIter does not behave as documented on dict objects

2017-05-09 Thread Sam De Meyer

New submission from Sam De Meyer:

According to the docs (https://docs.python.org/3/c-api/object.html) the 
`PyObject_GetIter` method should be equivalent to the python call 
`iter()`, but, when given a dict, the `PyObject_GetIter` returns an 
iterator over key-value pairs whereas the `iter()` method returns an iterator 
over keys only.

I tripped over this when giving the `.update()` a dict-like object 
that does not inherit from the builtin dict and implements its own `__iter__()`.

The `update()` method eventually reaches the following piece of code:
https://hg.python.org/cpython/file/4243df51fe43/Objects/dictobject.c#l2383

>it = PyObject_GetIter(seq2);
> ...
>item = PyIter_Next(it);
> ...
>fast = PySequence_Fast(item, "");
> ...
>key = PySequence_Fast_GET_ITEM(fast, 0);
>value = PySequence_Fast_GET_ITEM(fast, 1);

displaying the difference in behaviour between `PyObject_GetIter` and `iter(o)`.

--
assignee: docs@python
components: Documentation
messages: 293346
nosy: Sam De Meyer, docs@python
priority: normal
severity: normal
status: open
title: PyObject_GetIter does not behave as documented on dict objects
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



[issue30322] PyObject_GetIter does not behave as documented on dict objects

2017-05-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I can't believe in this since one-argument iter() just calls PyObject_GetIter().

dict.update() accepts either a dict-like object (which should have the keys() 
method) or an iterable producing key-value pairs. If your dict-like object 
doesn't work as expected, check that it has the keys() method.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30285] Optimize case-insensitive regular expressions

2017-05-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 6d336a027913327fc042b0d758a16724fea27b9c by Serhiy Storchaka in 
branch 'master':
bpo-30285: Optimize case-insensitive matching and searching (#1482)
https://github.com/python/cpython/commit/6d336a027913327fc042b0d758a16724fea27b9c


--

___
Python tracker 

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



[issue30285] Optimize case-insensitive regular expressions

2017-05-09 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch 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



[issue30289] make distclean and Misc/python-config.sh

2017-05-09 Thread Дилян Палаузов

Дилян Палаузов added the comment:

3.5 is also affected.

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



[issue30190] unittest's assertAlmostEqual improved error message

2017-05-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

New test produce deprecation warnings:

/home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:228: 
DeprecationWarning: invalid escape sequence \(
  ["^1 != 2 within 7 places \(1 difference\)$", "^oops$",
/home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:229: 
DeprecationWarning: invalid escape sequence \(
  "^1 != 2 within 7 places \(1 difference\)$",
/home/serhiy/py/cpython/Lib/unittest/test/test_assertions.py:230: 
DeprecationWarning: invalid escape sequence \(
  "^1 != 2 within 7 places \(1 difference\) : oops$"])

--
status: closed -> open

___
Python tracker 

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



[issue30165] faulthandler acquires lock from signal handler, can deadlock while crashing

2017-05-09 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Follow up note:

Note that even with POSIX TLS in use, it isn't entirely safe.  
pthread_getspecific() as used by the posix thread code is not required to be 
async signal safe by the POSIX standard.  :(

The Linux glibc implementation thankfully does not use locks.  But it does 
suffer from a consistency issue in its current implementation when used 
asynchronously.  A trivial patch to fix glibc's pthread_getspecific() with a 
test exists - https://sourceware.org/ml/libc-alpha/2014-12/msg00583.html - but 
upstream glibc maintainers are obstinate as usual.

Regardless, I believe the worst that happens in that relatively uncommon race 
condition situation is a faulthandler crash reporting odd information or 
crashes while crashing.  not a deadlock.

I have not investigated other pthread_getspecific implementations.

The systems I care most about today thankfully run a modified glibc.

--

___
Python tracker 

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



[issue30322] PyObject_GetIter does not behave as documented on dict objects

2017-05-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This from the help on dict.update():

 |  update(...)
 |  D.update([E, ]**F) -> None.  Update D from dict/iterable E and F.
 |  If E present and has a .keys() method, does: for k in E: D[k] = E[k]
 |  If E present and lacks .keys() method, does: for (k, v) in E: D[k] 
= v
 |  In either case, this is followed by: for k in F: D[k] = F[k]

Likewise in the source for collections.abc.MutableMapping:

def update(*args, **kwds):
''' D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
If E present and has a .keys() method, does: for k in E: D[k] = 
E[k]
If E present and lacks .keys() method, does: for (k, v) in E: 
D[k] = v
In either case, this is followed by: for k, v in F.items(): D[k] = v
'''
if not args:
raise TypeError("descriptor 'update' of 'MutableMapping' object "
"needs an argument")
self, *args = args
if len(args) > 1:
raise TypeError('update expected at most 1 arguments, got %d' %
len(args))
if args:
other = args[0]
if isinstance(other, Mapping):
for key in other:
self[key] = other[key]
elif hasattr(other, "keys"):
for key in other.keys():
self[key] = other[key]
else:
for key, value in other:
self[key] = value
for key, value in kwds.items():
self[key] = value

--
nosy: +rhettinger

___
Python tracker 

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



[issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used

2017-05-09 Thread Klamann

New submission from Klamann:

The Executor's map() function accepts a function and an iterable that holds the 
function arguments for each call to the function that should be made. This 
iterable could be a generator, and as such it could reference data that won't 
fit into memory.

The behaviour I would expect is that the Executor requests the next element 
from the iterable whenever a thread, process or whatever is ready to make the 
next function call.

But what actually happens is that the entire iterable gets converted into a 
list right after the map function is called and therefore any underlying 
generator will load all referenced data into memory. Here's where the list gets 
built from the iterable:
https://github.com/python/cpython/blob/3.6/Lib/concurrent/futures/_base.py#L548

The way I see it, there's no reason to convert the iterable to a list in the 
map function (or any other place in the Executor). Just replacing the list 
comprehension with a generator expression would probably fix that.


Here's an example that illustrates the issue:

from concurrent.futures import ThreadPoolExecutor
import time

def generate():
for i in range(10):
print("generating input", i)
yield i

def work(i):
print("working on input", i)
time.sleep(1)

with ThreadPoolExecutor(max_workers=2) as executor:
generator = generate()
executor.map(work, generator)

The output is:

generating input 0
working on input 0
generating input 1
working on input 1
generating input 2
generating input 3
generating input 4
generating input 5
generating input 6
generating input 7
generating input 8
generating input 9
working on input 2
working on input 3
working on input 4
working on input 5
working on input 6
working on input 7
working on input 8
working on input 9

Ideally, the lines should alternate, but currently all input is generated 
immediately.

--
messages: 293353
nosy: Klamann
priority: normal
severity: normal
status: open
title: concurrent.futures.Executor.map() consumes all memory when big 
generators are used
type: resource usage
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30165] faulthandler acquires lock from signal handler, can deadlock while crashing

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

> Note that even with POSIX TLS in use, it isn't entirely safe.

I wrote faulthandler to collect debug data just before dying, when something 
already gone very bad, like a deadlock or a memory corruption. I didn't design 
faulthandler for correctness.

If you call faulthandler.dump_traceback() from regular Python code, you are 
safe. For example, if you register your own Python signal handler using 
signal.signal(), it's ok.

The grey area is when you use C signal handlers using the C API of 
faulthandler, like faulthandler.register().

--

___
Python tracker 

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



[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I would try rebooting, but not having a Mac, I am not familiar with the details 
of the instructions on that page.  It they are not clear enough, they should be 
improved.

--
assignee:  -> terry.reedy

___
Python tracker 

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



[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread BeamPower

New submission from BeamPower:

I am using the newline='' feature in my program to avoid the extra lines being 
placed between each line being written to a CSV file.
This error is odd though... I used it before on a previous rev, and it worked 
fine.
I think the CSV file writing feature has been available since Python 2.3?

Here's the error I am getting:

Traceback (most recent call last):
  File "C:\Python\parser\parser.py", line 91, in 
    write_header_to_csv()
  File "C:\Python\parser\parser.py", line 44, in write_header_to_csv
    csvfile = open('decodedfile.csv', 'w', newline='')
TypeError: 'newline' is an invalid keyword argument for this function

At the top of my program, I have the following imports:
import sys
import binascii
import csv

--
messages: 293356
nosy: BeamPower
priority: normal
severity: normal
status: open
title: Error using newline='' when writing to CSV file

___
Python tracker 

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



[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread BeamPower

BeamPower added the comment:

Sorry, I left out a detail... I am running Python 2.7.13

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



[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread Martin Panter

Martin Panter added the comment:

In Python 2, the "open" function doesn't have a "newline" parameter. Perhaps 
you were looking at the wrong documentation version.

--
nosy: +martin.panter
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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-09 Thread Cheryl Sabella

Cheryl Sabella added the comment:

OK, I've removed the test for the negative values returned by random.  In 
core-mentorship, David Murray had suggested adding a comment to document it as 
unexpected behavior.  I had asked there because I wasn't quite sure what to do 
about it.

Should I also leave out the test for being able to shuffle a dict with numeric 
keys?

Thanks.

--

___
Python tracker 

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



[issue30308] Add code coverage for argument in random.shuffle

2017-05-09 Thread Cheryl Sabella

Cheryl Sabella added the comment:

I've also changed the test to use Mock for the random function.  I'm new to 
mock, so I'm not sure if I did it right.  Using a return_value seemed to be the 
best way to go.  I didn't know if it was necessary to test if an incorrect 
function was sent in.

--

___
Python tracker 

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



[issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6

2017-05-09 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1622

___
Python tracker 

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



[issue30320] test_eintr.test_sigwaitinfo(): race condition on AMD64 FreeBSD 10.x Shared 3.6

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

I checked manually in my FreeBSD CURRENT VM that:

* sigwaitinfo() and sigtimedwait() fail with EINTR and automatically restart 
the interrupted syscall
* running the test in a loop doesn't fail: I ran the test during 5 min in 10 
shells (tests running 10 times in parallel) => no failure, the race condition 
seems to be gone. I hacked the test file to only run the sigwaitinfo() and 
sigtimedwait() unit tests.

--

___
Python tracker 

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



[issue30325] Buildbot: send email notifications to buildbot-status@

2017-05-09 Thread STINNER Victor

New submission from STINNER Victor:

I created a new mailing list to get email notifications when a buildbot starts 
failing (state change from green/success to red/failure).

It seems like the buildbot config already sends email, but I don't see them in 
the archives of the python-checkins list?

Config:
https://github.com/python/buildmaster-config/blob/master/master/master.cfg#L820-L827

python-checkins archives:
https://mail.python.org/pipermail/python-checkins/2017-May/thread.html

--
components: Tests
keywords: buildbot
messages: 293362
nosy: haypo, zach.ware
priority: normal
severity: normal
status: open
title: Buildbot: send email notifications to buildbot-status@
versions: Python 3.7

___
Python tracker 

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



[issue30325] Buildbot: send email notifications to buildbot-status@

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

On the buildbot server, I see the following code in 
lib/python/buildbot/status/mail.py:

# GB: NEW: add test logfile excerpts
if "test" in t: # only if the test went wrong
for log in build.getLogs():
if "test" in log.getStep().getName():
text += "\n"
text += "Excerpt from the test logfile:"
text += interpret_test_logfile(log.getText().splitlines())
text += "\n"
break

But I'm unable to find this code in the upstream code:

https://github.com/buildbot/buildbot/blob/v0.8.12/master/buildbot/status/mail.py#L742

Do we have downstream changes on buildbot? I'm asking because it seems like 
emails cannot be send because of these lines. Extract of logs:

2017-05-05 11:55:42+ [-] Exception caught notifying 
 of buildFinished 
event
2017-05-05 11:55:42+ [-] Unhandled Error
Traceback (most recent call last):
  File "/data/buildbot/lib/python/buildbot/status/build.py", line 320, 
in buildFinished
(...)  
  File "/data/buildbot/lib/python/buildbot/status/mail.py", line 792, 
in buildMessage
if "test" in t: # only if the test went wrong
exceptions.NameError: global name 't' is not defined

Note: It seems like 0.8.14 is deployed, but I don't see any v0.8.14 tag on 
GitHub, the last one of the 0.8 branch is v0.8.12. 
https://pypi.python.org/pypi/buildbot/0.8.14 wasn't tagged in Git?

--

___
Python tracker 

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



[issue30325] Buildbot: send email notifications to buildbot-status@

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

It seems like the code is copied by rsync from a server called dinsdale:

https://github.com/python/psf-chef/blob/master/cookbooks/buildmaster.txt#L13

--

___
Python tracker 

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



[issue30325] Buildbot: send email notifications to buildbot-status@

2017-05-09 Thread STINNER Victor

STINNER Victor added the comment:

To rebuild the lib/python/buildbot/ directory, you can start from buildbot 
0.8.14 and then apply attached buildbot-0.8.14py1.patch diff.

--
keywords: +patch
Added file: http://bugs.python.org/file46853/buildbot-0.8.14py1.patch

___
Python tracker 

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



[issue25652] collections.UserString.__rmod__() raises NameError

2017-05-09 Thread Jonathan Goble

Jonathan Goble added the comment:

Any decision on this? I recently played around and found a reasonable use case 
where UserString.__rmod__ does get called; run the attached userstringerror.py 
to see it in action.

Basically, it seems the idea of UserString is to subclass it, tweak as desired, 
and use your subclass as necessary. If you then subclass your subclass (e.g. 
for a portion of your code with a specialized need) and extend __mod__ and 
__rmod__ in that sub-subclass (calling the parent method with super()), then 
any case of "subclass instance % sub-subclass instance" results in Python 
calling the sub-subclass's __rmod__ method directly without trying a __mod__ 
method. If that method then calls super().__rmod__ (e.g. it just needed to 
pre-process the data, such as to normalize it, before the formatting 
operation), then UserString.__rmod__ will be called and result in the NameError.

--
versions: +Python 3.7 -Python 3.5
Added file: http://bugs.python.org/file46854/userstringerror.py

___
Python tracker 

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



  1   2   >