[issue34134] multiprocessing memory huge usage

2018-07-16 Thread INADA Naoki


INADA Naoki  added the comment:

> I think we should add something like "if you are using generator, consider 
> use imap instead" 

I think it's not good hint.
There are short generator.  And there are long (or infinite) iterator other 
than generator too.
Maybe, "if iterator is not sequence (e.g. generator) and can be very big, 
consider using `imap` or `imap_unorderd` with explicit `chunksize` option for 
better efficiency."

But I'm not good at writing English.
Someone other than me can write better paragraph.

--

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-16 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7847

___
Python tracker 

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



[issue34134] multiprocessing memory huge usage

2018-07-16 Thread Windson Yang


Windson Yang  added the comment:

Thank you for the hint, INADA. I think we should add something like "if you are 
using generator, consider use imap instead" in 
https://docs.python.org/3.4/library/multiprocessing.html?highlight=process#multiprocessing.pool.Pool.map

--

___
Python tracker 

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



[issue24618] Invalid read in PyCode_New

2018-07-16 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7846

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7845

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 28f07364f066792ceee93231dbb80ae8ad98b2bb by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an 
exception set (GH-8282)
https://github.com/python/cpython/commit/28f07364f066792ceee93231dbb80ae8ad98b2bb


--

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki


Change by INADA Naoki :


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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread miss-islington


miss-islington  added the comment:


New changeset 8b5d191386350d28a0f20283dcb366cf50f82b97 by Miss Islington (bot) 
in branch '3.6':
bpo-33967: Fix wrong use of assertRaises (GH-8306)
https://github.com/python/cpython/commit/8b5d191386350d28a0f20283dcb366cf50f82b97


--

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2018-07-16 Thread Amin Radjabov


Amin Radjabov  added the comment:

yes I try to install to all user, but I have no any other python installations 
in my OS. I succeeded to install it to just me.

--

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread miss-islington


miss-islington  added the comment:


New changeset 892df9d15aae08d4033faeb34698e3c550c85854 by Miss Islington (bot) 
in branch '3.7':
bpo-33967: Fix wrong use of assertRaises (GH-8306)
https://github.com/python/cpython/commit/892df9d15aae08d4033faeb34698e3c550c85854


--

___
Python tracker 

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



[issue34134] multiprocessing memory huge usage

2018-07-16 Thread INADA Naoki


INADA Naoki  added the comment:

Do you imap or imap_unorderd?
They are intended for use with iterator, including generator.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue34135] The results of time.tzname print broken.

2018-07-16 Thread 김태환

New submission from 김태환 :

When I call time.tzname at Korean Windows. (Microsoft Windows 10 Pro(10.0.17134 
Build 17134))

It prints like below. This problem occurred Python 2 and 3 both.
>>> import time
>>> time.tzname
('´ëÇѹα¹ Ç¥ÁؽÃ', '´ëÇѹα¹ Àϱ¤ Àý¾à ½Ã°£')

I used chardet for getting correct tzname.
>>> import chardet
>>> tzname = [tzn.encode('latin-1').decode('cp949') for tzn in time.tzname]
>>> tzname
['대한민국 표준시', '대한민국 일광 절약 시간']

I think that cause of this problem is tzname encoded by 'latin-1' at Window s.

--
components: Windows
messages: 321790
nosy: paul.moore, steve.dower, tim.golden, zach.ware, 김태환
priority: normal
severity: normal
status: open
title: The results of time.tzname print broken.
type: behavior
versions: Python 2.7, Python 3.5

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7844

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7843

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2 by INADA Naoki in branch 
'master':
bpo-33967: Fix wrong use of assertRaises (GH-8306)
https://github.com/python/cpython/commit/56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2


--

___
Python tracker 

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



[issue34134] multiprocessing memory huge usage

2018-07-16 Thread Windson Yang


New submission from Windson Yang :

I'm using macOX and I got huge memory usage when using generator with 
multiprocess. (see file) 

I think this is because 
(https://github.com/python/cpython/blob/master/Lib/multiprocessing/pool.py#L383)

if not hasattr(iterable, '__len__'):
iterable = list(iterable)

if chunksize is None:
chunksize, extra = divmod(len(iterable), len(self._pool) * 4)
if extra:
chunksize += 1

When we convert an iterable to list(iterable), we lost the advantage of using 
the generator. I'm not sure how to fix it, maybe we can set a default value for 
an object don't have '__len__' attr, any ideas?

--
files: test.py
messages: 321788
nosy: Windson Yang, zach.ware
priority: normal
severity: normal
status: open
title: multiprocessing memory huge usage
type: resource usage
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47698/test.py

___
Python tracker 

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



[issue34132] Obscure netrc parser "bug"

2018-07-16 Thread Xiang Zhang


Change 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



[issue34132] Obscure netrc parser "bug"

2018-07-16 Thread bbayles


Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue34123] ambiguous documentation for dict.popitem

2018-07-16 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue34123] ambiguous documentation for dict.popitem

2018-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset bfa8a358e2cec40484c4655138ca3c6b10f8462a by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-34123: Fix missed documentation update for dict.popitem(). (GH-8292) 
(GH#8307)
https://github.com/python/cpython/commit/bfa8a358e2cec40484c4655138ca3c6b10f8462a


--

___
Python tracker 

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



[issue34118] Fix some class entries in 'Built-in Functions'

2018-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

SO user abarnert, who I presume is bpo abarnert (Andrew Barnert) claims that 
"Create a new dictionary. The dict object is the dictionary class." sounds a 
bit like dict returns the dictionary class.  It is different from "Return a new 
set object, ... . set is a built-in class."  I like the latter better and will 
use it as the pattern.

--

___
Python tracker 

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



[issue31342] test.bisect module causes tests to fail

2018-07-16 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

Yes, it looks like the same issue as bpo-29512.  Renaming test.bisect is the 
simplest solution.  I have trained myself to run "python -m test.regrtest " so this issue doesn't affect me any more.  However, I think it was a 
trap that will catch some people.  So, thanks for fixing.

I considered adding a 'bisect' command to the test/__main__, e.g. you could run 
'python -m test --bisect ..'.  That looks not entirely simple to implement 
though.

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



[issue34133] ValueError should not be documented as being restricted to only "a built-in operation or function"

2018-07-16 Thread Nathaniel Manista


New submission from Nathaniel Manista :

The documentation for ValueError currently describes it as being "Raised when a 
built-in operation or function receives an argument that has the right type but 
an inappropriate value, and the situation is not described by a more precise 
exception such as IndexError.", but the Python community has (quite rightly!) 
adopted it as the exception to raise in any system when that system is passed a 
value for a parameter that is type-correct but of an invalid value.

(Because what, is every library going to present a "my_library.ValueError" 
exception instead? That would be ridiculous.)

ValueError's documentation should drop the "a built-in operation or function" 
wording.

Perhaps go with something like "When raised indicates that a function or method 
was passed a value of the correct type but an invalid value"?

--
assignee: docs@python
components: Documentation
messages: 321784
nosy: Nathaniel Manista, docs@python
priority: normal
severity: normal
status: open
title: ValueError should not be documented as being restricted to only "a 
built-in operation or function"
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor

2018-07-16 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

Huh, that's weird. My first thought was some kind of race condition, but... 
raise_signal uses raise(), which on Windows should be invoking the signal 
handler synchronously, so the warning should definitely be printed before 
raise_signal() returns.

Could the warning be trapped in some buffer? That would be weird too, usually 
stderr and warnings should not be buffered.

Of course putting a retry loop around the test is an option if we can't figure 
out how to fix it properly.

--

___
Python tracker 

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



[issue34123] ambiguous documentation for dict.popitem

2018-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 01b7d5898262dbe0e9edb321b3be9a34da196f6f by Raymond Hettinger in 
branch 'master':
bpo-34123: Fix missed documentation update for dict.popitem(). (GH-8292)
https://github.com/python/cpython/commit/01b7d5898262dbe0e9edb321b3be9a34da196f6f


--

___
Python tracker 

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



[issue34123] ambiguous documentation for dict.popitem

2018-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7842

___
Python tracker 

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



[issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

Traceback (most recent call last):
  File "", line 39, in 
AssertionError

According to the traceback, the captured stderr ('err' variable) is an empty 
string.

The test uses test.support.capture_stderr() which replaces sys.stderr.

The signal module calls PySys_WriteStderr(msg) which calls 
sys.stderr.write(msg). If the Python call fails, msg is supposed to be written 
into the C stderr stream. sys.stderr.flush() is not called, but it shouldn't be 
needed, since test.support.capture_stderr() replace sys.stderr with a 
io.StringIO object.

--

___
Python tracker 

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



[issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

The test failed at:

# Fill the send buffer
try:
while True:
write.send(b"x")
except BlockingIOError:
pass

# By default, we get a warning when a signal arrives
signal.set_wakeup_fd(write.fileno())

with captured_stderr() as err:
_testcapi.raise_signal(signum)

err = err.getvalue()
if ('Exception ignored when trying to {action} to the signal wakeup fd'
not in err):
raise AssertionError(err) # <~~ HERE

--

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki


Change by INADA Naoki :


--
pull_requests: +7840, 7841
stage: needs patch -> patch review

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread INADA Naoki


Change by INADA Naoki :


--
pull_requests: +7840
stage: needs patch -> patch review

___
Python tracker 

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



[issue34126] Profiling certain invalid calls crashes Python

2018-07-16 Thread ppperry


Change by ppperry :


--
title: Profiling certain invalid calls crash Python -> Profiling certain 
invalid calls crashes Python

___
Python tracker 

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



[issue26270] Support for read()/write()/select() on asyncio

2018-07-16 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue26270] Support for read()/write()/select() on asyncio

2018-07-16 Thread smheidrich


Change by smheidrich :


--
nosy: +smheidrich

___
Python tracker 

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



[issue34132] Obscure netrc parser "bug"

2018-07-16 Thread Skip Montanaro


Change by Skip Montanaro :


Added file: https://bugs.python.org/file47697/netrc-blank-comment

___
Python tracker 

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



[issue34132] Obscure netrc parser "bug"

2018-07-16 Thread Skip Montanaro


New submission from Skip Montanaro :

Not sure I can really call this a bug, however there is a behavioral change 
between 2.7 and at least 3.6 and 3.7 (probably earlier versions of the 3.x 
series as well). There is no spec for .netrc files that I can find, certainly 
nothing which mentions comment or blank lines. Still, Python's netrc file 
parser seems happy with both.

However, in 3.x a blank line followed immediately by a comment line containing 
actual comment text causes the parser to raise a parse error. I've attached two 
netrc files, netrc-comment-blank, and netrc-blank-comment, identical save for 
the ordering of a blank line and a comment line. Here's what a 2.7.14 session 
looks like:

Python 2.7.14 |Anaconda, Inc.| (default, Mar 27 2018, 17:29:31) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import netrc
>>> rc = netrc.netrc(file="/home/skip/tmp/netrc-comment-blank")
>>> rc = netrc.netrc(file="/home/skip/tmp/netrc-blank-comment")

Here's 3.7.0:

Python 3.7.0 (default, Jun 28 2018, 13:15:42) 
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import netrc
>>> rc = netrc.netrc(file="/home/skip/tmp/netrc-comment-blank")
>>> rc = netrc.netrc(file="/home/skip/tmp/netrc-blank-comment")
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/skip/miniconda3/envs/python3/lib/python3.7/netrc.py", line 30, in 
__init__
self._parse(file, fp, default_netrc)
  File "/home/skip/miniconda3/envs/python3/lib/python3.7/netrc.py", line 63, in 
_parse
"bad toplevel token %r" % tt, file, lexer.lineno)
netrc.NetrcParseError: bad toplevel token 'Comment' 
(/home/skip/tmp/netrc-blank-comment, line 2)

--
components: Library (Lib)
files: netrc-comment-blank
messages: 321779
nosy: skip.montanaro
priority: normal
severity: normal
stage: needs patch
status: open
title: Obscure netrc parser "bug"
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47696/netrc-comment-blank

___
Python tracker 

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



[issue34131] test_threading: BarrierTests.test_default_timeout() failed on AppVeyor

2018-07-16 Thread STINNER Victor


New submission from STINNER Victor :

test_threading.BarrierTests.test_default_timeout() failed on AppVeyor. Related 
issues:

* bpo-11871, commit d4d1d068dcf4e1aaf93772ccc0824207a21606e5: change timeout
* bpo-30316

https://ci.appveyor.com/project/python/cpython/build/3.8build19370

test_barrier (test.test_threading.BarrierTests) ... ok
test_barrier_10 (test.test_threading.BarrierTests) ... ok
test_default_timeout (test.test_threading.BarrierTests) ... ERROR
test_reset (test.test_threading.BarrierTests) ... Unhandled exception in thread 
started by .task at 0x03266728>
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task
f()
  File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f
i = barrier.wait()
  File "C:\projects\cpython\lib\threading.py", line 613, in wait
self._wait(timeout)
  File "C:\projects\cpython\lib\threading.py", line 653, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by .task 
at 0x03266728>
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task
f()
  File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f
i = barrier.wait()
  File "C:\projects\cpython\lib\threading.py", line 613, in wait
self._wait(timeout)
  File "C:\projects\cpython\lib\threading.py", line 653, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by .task 
at 0x03266728>
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task
f()
  File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f
i = barrier.wait()
  File "C:\projects\cpython\lib\threading.py", line 604, in wait
self._enter() # Block while the barrier drains.
  File "C:\projects\cpython\lib\threading.py", line 628, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by .task 
at 0x03266728>
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 41, in task
f()
  File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f
i = barrier.wait()
  File "C:\projects\cpython\lib\threading.py", line 604, in wait
self._enter() # Block while the barrier drains.
  File "C:\projects\cpython\lib\threading.py", line 628, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError
ok
test_single_thread (test.test_threading.BarrierTests) ... ok
test_timeout (test.test_threading.BarrierTests) ... ok
test_wait_return (test.test_threading.BarrierTests) ... ok
test_acquire (test.test_threading.BoundedSemaphoreTests) ... ok

...

==
ERROR: test_default_timeout (test.test_threading.BarrierTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 943, in 
test_default_timeout
self.run_threads(f)
  File "C:\projects\cpython\lib\test\lock_tests.py", line 772, in run_threads
f()
  File "C:\projects\cpython\lib\test\lock_tests.py", line 938, in f
i = barrier.wait()
  File "C:\projects\cpython\lib\threading.py", line 613, in wait
self._wait(timeout)
  File "C:\projects\cpython\lib\threading.py", line 651, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError


test_threading succeeded when it has been re-run in verbose mode.

--
components: Tests
messages: 321778
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_threading: BarrierTests.test_default_timeout() failed on AppVeyor
versions: Python 3.8

___
Python tracker 

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



[issue8799] Hang in lib/test/test_threading.py

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

This issue discussed different things:

* test_threading was unable: I didn't see such failure the last 12 months, and 
I backported enhancements from master to 2.7, so I consider this issue as fixed
* documentation of threading locks: fixed
* Except on Windows, Python 2.7 uses its own implementation of TLS: this issue 
has been fixed in Python 3.

All discussed issues have been fixed, so I close the issue.

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



[issue18605] 2.7: test_threading hangs on Solaris 9

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

There is no more Solaris buildbot, there is no useful information to debug this 
issue, so I close the issue.

--
nosy: +vstinner
resolution:  -> out of date
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



[issue34130] test_signal: test_warn_on_full_buffer() failed on AppVeyor

2018-07-16 Thread STINNER Victor


New submission from STINNER Victor :

test_signal.test_warn_on_full_buffer() failed on AppVeyor.

https://ci.appveyor.com/project/python/cpython/build/3.8build19372

==
FAIL: test_warn_on_full_buffer (test.test_signal.WakeupSocketSignalTests)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_signal.py", line 538, in 
test_warn_on_full_buffer
assert_python_ok('-c', code)
  File "C:\projects\cpython\lib\test\support\script_helper.py", line 157, in 
assert_python_ok
return _assert_python(True, *args, **env_vars)
  File "C:\projects\cpython\lib\test\support\script_helper.py", line 143, in 
_assert_python
res.fail(cmd_line)
  File "C:\projects\cpython\lib\test\support\script_helper.py", line 84, in fail
err))
AssertionError: Process return code is 1
command line: ['C:\\projects\\cpython\\PCbuild\\win32\\python.exe', '-X', 
'faulthandler', '-I', '-c', 'if 1:\nimport errno\nimport 
signal\nimport socket\nimport sys\nimport time\n
import _testcapi\nfrom test.support import captured_stderr\n\n
signum = signal.SIGINT\n\n# This handler will be called, but we 
intentionally won\'t read from\n# the wakeup fd.\ndef 
handler(signum, frame):\npass\n\nsignal.signal(signum, 
handler)\n\nread, write = socket.socketpair()\n
read.setblocking(False)\nwrite.setblocking(False)\n\n# Fill the 
send buffer\ntry:\nwhile True:\n
write.send(b"x")\nexcept BlockingIOError:\npass\n\n
# By default, we get a warning when a signal arrives\n
signal.set_wakeup_fd(write.fileno())\n\nwith captured_stderr() as 
err:\n_testcapi.raise_signal(signum)\n
 \nerr = err.getvalue()\nif (\'Exception ignored when trying to 
send to the signal wakeup fd\'\nnot in err):\nraise 
AssertionError(err)\n\n# And also if warn_on_full_buffer=True\n
signal.set_wakeup_fd(write.fileno(), warn_on_full_buffer=True)\n\nwith 
captured_stderr() as err:\n_testcapi.raise_signal(signum)\n\n   
 err = err.getvalue()\nif (\'Exception ignored when trying to send to 
the signal wakeup fd\'\nnot in err):\nraise 
AssertionError(err)\n\n# But not if warn_on_full_buffer=False\n
signal.set_wakeup_fd(write.fileno(), warn_on_full_buffer=False)\n\nwith 
captured_stderr() as err:\n_testcapi.raise_signal(signum)\n\n   
 err = err.getvalue()\nif err != "":\nraise 
AssertionError("got unexpected output %r" % (err,))\n\n# And then check 
the default again, to make sure warn_on_full_buffer\n# settings don
 \'t leak across calls.\nsignal.set_wakeup_fd(write.fileno())\n\n   
 with captured_stderr() as err:\n_testcapi.raise_signal(signum)\n\n 
   err = err.getvalue()\nif (\'Exception ignored when trying to 
send to the signal wakeup fd\'\nnot in err):\nraise 
AssertionError(err)\n\n']
stdout:
---
---
stderr:
---
Traceback (most recent call last):
  File "", line 39, in 
AssertionError
---
--

The test passed when run again sequentially ("Re-running test 'test_signal' in 
verbose mode").

--
components: Tests
messages: 321775
nosy: njs, pitrou, vstinner
priority: normal
severity: normal
status: open
title: test_signal: test_warn_on_full_buffer() failed on AppVeyor
versions: Python 3.8

___
Python tracker 

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



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

yep.  i'm going to close this, it seems arch specific.  there isn't much we can 
realistically do to prevent people overriding things to their peril for 
configure or make. :)

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



[issue31342] test.bisect module causes tests to fail

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

> This is still broken, IMHO.  Either we should rename test.bisect (...)

I renamed it:

commit 823c295efa4efea93cadc640ed6122cd9d86cec4
Author: Victor Stinner 
Date:   Wed May 30 17:24:40 2018 +0200

bpo-29512: Rename Lib/test/bisect.py to bisect_cmd.py (#7229)

Can we close this issue a duplicate of bpo-29512?

--

___
Python tracker 

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



[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2018-07-16 Thread Tianon


Tianon  added the comment:

This was reported on the Docker image for Python in 
https://github.com/docker-library/python/issues/111, with the note that it 
affects the Twisted inotify implementation, so it'd be really neat to see a 
proper patch in Python (instead of the very musl-/Alpine-assuming patch found 
in 
https://github.com/alpinelinux/aports/blob/202f4bea916b0cf974b38ced96ab8fca0b192e3f/main/python2/musl-find_library.patch).
 <3

--
nosy: +tianon

___
Python tracker 

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



[issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method

2018-07-16 Thread Michael Handler


Change by Michael Handler :


--
pull_requests: +7839

___
Python tracker 

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



[issue34118] Fix some class entries in 'Built-in Functions'

2018-07-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I was forgetting that this is a Python, not CPython doc.  So I agree to not tag 
the iterator classes as such.  For all I know, PyPy might use (compiled?) 
generator functions.  And if we were to allow use of Cython, say, for CPython, 
we might  try that.

How about a note under the index table:

Functions that must be classes are tagged *class*.  The iterator functions 
enumerate, filter, map, reversed, and zip are classes in CPython, but they are 
not tagged because they could be implemented as generator functions.

Or we could add an *iterator* tag.

--

___
Python tracker 

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



[issue34129] CGITB does not mangle variables names

2018-07-16 Thread Pavel Jurkas


Change by Pavel Jurkas :


--
pull_requests: +7838

___
Python tracker 

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



[issue34129] CGITB does not mangle variables names

2018-07-16 Thread Pavel Jurkas


Pavel Jurkas  added the comment:

https://github.com/python/cpython/pull/8304

--

___
Python tracker 

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



[issue28909] Adding LTTng-UST tracing support

2018-07-16 Thread Francis Deslauriers


Francis Deslauriers  added the comment:

Hi all,

It seems that, as of right now, the thing blocking this patchset from
going forward is the name of the intrumentation point. 

Two naming approached were suggested:
- Keeping PyDtrace*
- Changing to PyProbe*

I prefer the PyProbe option as it's a more generic name and is not misleading
of the underlying tracing engine but if people prefer that we keep the PyDtrace
version let's go with that.
So, what should we go with?

I can easily update and rebase this patchset.

As an example of how this feature could be used, a colleague of mine gave a
talk[1] at PyCon Canada 2017 about tracing Python applications using this
patchset. He built a tool to visualize Python Logging, Python function calls
and Linux syscalls all in the same view. This was done using the existing
Python logger tracing of LTTng-UST, the LTTng kernel tracer and the CPython
LTTng-UST instrumentation of this patchset. Here is an asciinema[2] recording
used in the talk, it shows the tool in action.

[1]: https://youtu.be/gKmtmPqr6H8
[2]: https://asciinema.org/a/v20Hxnoh3lpzzz3FPmF86fNDS

Cheers!
Francis

--

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

Thank you Antoine for fixing this issue! This issue annoyed me forever, but
I never tried to fix it. It was very annoying when using git bisect for
example.

--

___
Python tracker 

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



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Erich Eckner


Erich Eckner  added the comment:

ah, that would explain, why we don't get it set automatically on archlinux32 - 
there's "export OPT=$CFLAGS" right infront of ./configure ... - so $OPT is set 
and thus, -fwrapv is not appended

--

___
Python tracker 

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



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://github.com/python/cpython/blob/2.7/configure.ac#L1067

appears to add -fwrapv as desired if the gcc or clang version being used 
supports it.

--

___
Python tracker 

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



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

IIRC that we decided that CPython and extension modules always require -fwrapv.

--

___
Python tracker 

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



[issue34128] Do not block threads when pickle/unpickle

2018-07-16 Thread ppperry


ppperry  added the comment:

um, something doesn't make sense about this. the python implementation of 
pickle never released the GIL (it can't, by definition -- it's written in 
python). The C implementation releasing the GIL wouldn't make sense, as the 
pickle api involves calls into python everywhere (for example, `__reduce__`)

--
nosy: +ppperry

___
Python tracker 

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



[issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152

2018-07-16 Thread Segev Finer


Change by Segev Finer :


--
keywords: +patch
pull_requests: +7837
stage:  -> patch review

___
Python tracker 

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



[issue34129] CGITB does not mangle variables names

2018-07-16 Thread Pavel Jurkas


Pavel Jurkas  added the comment:

https://github.com/python/cpython/pull/8302

--

___
Python tracker 

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



[issue34129] CGITB does not mangle variables names

2018-07-16 Thread Pavel Jurkas


Change by Pavel Jurkas :


--
pull_requests: +7836

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks for the report and for the patch, Jon.

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



[issue31342] test.bisect module causes tests to fail

2018-07-16 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

This is still broken, IMHO.  Either we should rename test.bisect or we should 
remove all of the 'if __name__ == "__main__"' part of the test scripts.  You 
can't run the tests reliably as scripts anymore.  Doing so puts Lib/test into 
sys.path.  Then, anything that imports 'bisect' (e.g. the random module) will 
get test.bisect and not the real bisect module.

I tried making it so that test.bisect could not be imported as bisect but I 
can't think of a way.  E.g. adding to test/__init__.py

import test._bisect as bisect
sys.modules['test.bisect'] = bisect

does not work.  I don't understand the import system good enough to think of a 
solution.

--

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset f1ab9cac909449ad85595245fa49b8660214cd0e by Berker Peksag (Miss 
Islington (bot)) in branch '3.6':
bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297)
https://github.com/python/cpython/commit/f1ab9cac909449ad85595245fa49b8660214cd0e


--

___
Python tracker 

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



[issue32554] random.seed(tuple) uses the randomized hash function and so is not reproductible

2018-07-16 Thread Lee Griffiths


Lee Griffiths  added the comment:

a) This below issue added doc to py2.7 that calls out PYTHONHASHSEED, but py 
doesn't currently contain those words

https://bugs.python.org/issue27706

It'd be useful to have the something whether the "behaviour" is fixed or not, 
as providing other objects (like a tuple) will still be non-deterministic.

b) I don't know if this is the correct issue to heap this on, but I think it 
might as you're looking at changing the seed function? 

The documentation for `object.__hash__` calls out `str`, `bytes` and `datetime` 
as being affected by `PYTHONHASHSEED`. Doesn't it seem odd that there's a 
workaround in the seed function for str and bytes, but not for datetime?

https://docs.python.org/3/reference/datamodel.html#object.__hash__

I mainly point this out as seeding random with the current date/time is 
idiomatic in many languages and environments (usually used when you log the 
seed to be able to recreate things later, or just blindly copying the 
historical use `srand(time(NULL))` from C programs!). Anyone shoving a datetime 
straight into seed() is going to find it non-deterministic and might not 
understand why, or even notice, especially as the documentation for seed() 
doesn't call this out. 

Those "in the know" will get a unix timestamp out of the datetime and put that 
in seed instead, but I feel that falls under the same argument as 
users-in-the-know SHA512ing a string, mentioned above, which is undesirable and 
apparently something the function should implement and not users.

Would it be wise for datetime to have a specific implementation as well?

--
nosy: +poddster

___
Python tracker 

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



[issue34129] CGITB does not mangle variables names

2018-07-16 Thread Pavel Jurkas


Pavel Jurkas  added the comment:

https://github.com/python/cpython/pull/8301

--

___
Python tracker 

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



[issue34129] CGITB does not mangle variables names

2018-07-16 Thread Pavel Jurkas


Change by Pavel Jurkas :


--
keywords: +patch
pull_requests: +7835
stage:  -> patch review

___
Python tracker 

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



[issue34129] CGITB does not mangle variables names

2018-07-16 Thread Pavel Jurkas


New submission from Pavel Jurkas :

CGITB does not mangle private variables names. So they are displayed as 
undefined even though they are defined. Example:

self.__core undefined

--
messages: 321757
nosy: pjurkas
priority: normal
severity: normal
status: open
title: CGITB does not mangle variables names

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-16 Thread Tim Peters


Tim Peters  added the comment:

Ya, Mark's got a point there.  Perhaps

s/the internal/a finite two's complement/

?

--

___
Python tracker 

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



[issue34126] Profiling certain invalid calls crash Python

2018-07-16 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +7834
stage:  -> patch review

___
Python tracker 

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



[issue34128] Do not block threads when pickle/unpickle

2018-07-16 Thread Martin Bammer


New submission from Martin Bammer :

Hi,

the old and slow python implementation of pickle didn't block background
thread.
But the newer C-implementation blocks other threads while dump/load is
running.
Wouldn't it be possible to allow other threads during this time?
Especially could load/loads release the GIL, because Python objects are not 
available to the Python code until these functions have finished?

Regards,
Martin

--
components: Interpreter Core
messages: 321755
nosy: Martin Bammer
priority: normal
severity: normal
status: open
title: Do not block threads when pickle/unpickle
type: enhancement
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



[issue34126] Profiling certain invalid calls crash Python

2018-07-16 Thread ppperry


Change by ppperry :


--
type:  -> crash

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2018-07-16 Thread Mark Dickinson


Mark Dickinson  added the comment:

The wording for change 1 looks fine to me.

For change 2, the mention of the internal representation is misleading, since 
the internal representation of (long) integers in current CPython is 
effectively sign-magnitude, and so there are some shenanigans to make the 
operations behave *as though* the internal representation were some form of 
two's complement [1]. The previously proposed wording (in msg321679) (with the 
"infinite sign bits" extracted into the main text as Tim suggests) looks fine 
to me.

[1] 
https://github.com/python/cpython/blob/c9265c1534b7e62bb9b15460d0420c0c3bb57ff9/Objects/longobject.c#L4415-L4429

--

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 43c2fabb2fe7760be462e008b39169cf16c28b4c by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297)
https://github.com/python/cpython/commit/43c2fabb2fe7760be462e008b39169cf16c28b4c


--

___
Python tracker 

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



[issue34127] Gramatically incorrect error message for some descriptor calls with wrong number of arguments

2018-07-16 Thread ppperry


New submission from ppperry :

`{}.get()`
Traceback (most recent call last):
  File "", line 1, in 
TypeError: get expected at least 1 arguments, got 0

Shouldn't that be "TypeError: get expected at least 1 argument, got 0" instead?

--
components: Interpreter Core
messages: 321752
nosy: ppperry
priority: normal
severity: normal
status: open
title: Gramatically incorrect error message for some descriptor calls with 
wrong number of arguments
versions: 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



[issue34126] Profiling certain invalid calls crash Python

2018-07-16 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Also:

>>> import sys; sys.setprofile(lambda *args: None)
>>> dict.get([], "foo")
Segmentation fault

--
title: Profiling dict.get() crashes Python -> Profiling certain invalid calls 
crash Python

___
Python tracker 

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



[issue28643] Broken makefile depends for profile-opt target

2018-07-16 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

Closing this as the current makefile works much better in this regard, at least 
based on my experience.

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



[issue34126] Profiling dict.get() crashes Python

2018-07-16 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Simple patch coming up...

--

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset c9265c1534b7e62bb9b15460d0420c0c3bb57ff9 by Berker Peksag (Jon 
Ribbens) in branch 'master':
bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297)
https://github.com/python/cpython/commit/c9265c1534b7e62bb9b15460d0420c0c3bb57ff9


--
nosy: +berker.peksag

___
Python tracker 

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



[issue34126] Profiling dict.get() crashes Python

2018-07-16 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

>>> import sys; sys.setprofile(lambda *args:None)
>>> dict.get()
Segmentation fault

--
components: Interpreter Core
messages: 321747
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: Profiling dict.get() crashes Python
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue34125] Profiling depends on whether **kwargs is given

2018-07-16 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

Enable profiling for C functions:

>>> def prof(frame, typ, arg):
... if typ.startswith("c_"):
... print(arg, typ)
>>> import sys; sys.setprofile(prof)

and notice how profiling depends on **kwargs:

>>> list.append([], None)
 c_call
 c_return

>>> list.append([], None, **{})

There is no specification of what should be profiled and what not, so it's not 
clear what is the "correct" behavior. For the record: in Python 3.6, neither of 
these were profiled.

--
components: Interpreter Core
messages: 321746
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: Profiling depends on whether **kwargs is given
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7833

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7832

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

With PR #8229 pushed the distinction between Setup.dist and Setup has 
disappeared: you have a Modules/Setup file in the source tree and that's where 
you do any changes, which you are responsible to track yourself (e.g. using a 
patch file or a git fork).

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 961d54c5c1916c09883ebcf7191babc969e5a5cf by Antoine Pitrou in 
branch 'master':
bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229)
https://github.com/python/cpython/commit/961d54c5c1916c09883ebcf7191babc969e5a5cf


--

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The purpose of using assertRaisesRegexp() was testing the error message. 
assertRaises() doesn't do this. Needed to restore the appropriate assertion 
method, but using a non-deprecated alias: assertRaisesRegex().

--
nosy: +serhiy.storchaka
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2018-07-16 Thread Steve Dower


Steve Dower  added the comment:

Amin, it looks like you are trying to upgrade an all-users install of an 
earlier version of Python 3.7 (one of the betas?) to a just-for-me install.

If you know which older version you have installed, or you can find it in 
Programs and Features, I'd suggest uninstalling it first. If you can't find it, 
installing 3.7.0 for all users (go through the Advanced install section) should 
succeed, and then you can uninstall it if you specifically want a just-for-me 
install.

--

___
Python tracker 

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



[issue34123] ambiguous documentation for dict.popitem

2018-07-16 Thread Armin Rigo


Armin Rigo  added the comment:

Agreed with Raymond.

--

___
Python tracker 

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



[issue31652] make install fails: no module _ctypes

2018-07-16 Thread Bryan


Bryan  added the comment:

Similar error on CentOS 7

ModuleNotFoundError: No module named '_ctypes'
 
Install --  yum install libffi-devel

Repeat:
./configure --enable-optimizations
make altinstall

Results:
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-10.0.1 setuptools-39.0.1

NOTE: 
The error did not stop python3.7 from operating as noted on this page. 

# python3.7
Python 3.7.0 (default, Jul 16 2018, 11:25:12)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print ("Hello Python")
Hello Python
>>>

--
nosy: +bryanf

___
Python tracker 

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



[issue33073] Add as_integer_ratio() to int() objects

2018-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Nofar, do you want to continue to work on this or should I reassign?

--

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread Berker Peksag


Change by Berker Peksag :


--
type: compile error -> behavior

___
Python tracker 

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



[issue33073] Add as_integer_ratio() to int() objects

2018-07-16 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-16 Thread Ammar Askar


Ammar Askar  added the comment:

Hey Lysandros.

Take a look at 
https://github.com/python/cpython/blob/master/Lib/wave.py#L126-L139

Notice how there's a Chunk made from the `file` argument but then another Chunk 
created using the previous chunk as a file.

While it might seem like self.size_read is magically changing between the 
steps, the thing to realize there is that self.file is another chunk and when 
you step, you're stepping into the seek of another Chunk instance, which has 
its own self.size_read

--
nosy: +ammar2

___
Python tracker 

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



[issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault

2018-07-16 Thread Erich Eckner


Erich Eckner  added the comment:

ok, some update:

1st: running the complete test suite with xvfb fails (as already reported):
> LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \
xvfb-run "${srcdir}/Python-${pkgver}/python" -m test.regrtest -v -uall
...
0:02:14 load avg: 0.90 [174/403/1] test_idle
test_close (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_misc (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_read (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_readline (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_readlines (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_unsupported (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_close (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_misc (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_unsupported (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_write (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
/usr/bin/xvfb-run: line 181: 13491 Segmentation fault  (core dumped) 
DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1


running w/o xvfb-run succeeds:
> LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} 
> ${srcdir}/Python-${pkgver}/python -m test.regrtest -v -m test_io test_idle
== CPython 2.7.15 (default, Jul 16 2018, 12:22:58) [GCC 8.1.1 20180531]
==   Linux-4.17.4-1.0-ARCH-i686-with-glibc2.1.3 little-endian
==   /home/vagrant/python2/src/Python-2.7.15/build/test_python_14208
== CPU count: 2
Run tests sequentially
0:00:00 load avg: 0.26 [1/1] test_idle
test_close (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_misc (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_read (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_readline (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_readlines (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_unsupported (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_close (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_misc (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_unsupported (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_write (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok

--
Ran 11 tests in 0.003s

OK
1 test OK.

Total duration: 150 ms
Tests result: SUCCESS


running only these tests with xvfb-run _succeeds_:
> LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} xvfb-run 
> ${srcdir}/Python-${pkgver}/python -m test.regrtest -v -m test_io test_idle
== CPython 2.7.15 (default, Jul 16 2018, 12:22:58) [GCC 8.1.1 20180531]
==   Linux-4.17.4-1.0-ARCH-i686-with-glibc2.1.3 little-endian
==   /home/vagrant/python2/src/Python-2.7.15/build/test_python_14226
== CPU count: 2
Run tests sequentially
0:00:00 load avg: 0.15 [1/1] test_idle
test_close (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_misc (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_read (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_readline (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_readlines (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_unsupported (idlelib.idle_test.test_io.PseudeInputFilesTest) ... ok
test_close (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_misc (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_unsupported (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_write (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok
test_writelines (idlelib.idle_test.test_io.PseudeOutputFilesTest) ... ok

--
Ran 11 tests in 0.004s

OK
1 test OK.

Total duration: 144 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault

2018-07-16 Thread Erich Eckner


Erich Eckner  added the comment:

> Can you try to get the Python traceback and/or C traceback using gdb?
Sry, I can't - I don't know how to use gdb :-(
Is there some one-line command which makes gdb start xvfb-run and attach to it? 
Or do I need to start xvfb-run and separately attach gdb to it? (how do I do 
this?)

> ... and hence would need xvfb-run on a headless server, as opposed to a 
> workstation with screen.  Erich, I assume you are running on the latter.

I'm running this on a headless box (packaging for archlinux32). Setting up a 
desktop on the test box would be some effort, but should be possible in 
principle.

In the original PKGBUILD which Eli posted, there is a comment about when the 
tests started failing - which suggests, the problem is connected to xvfb-run.

--

___
Python tracker 

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



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

Mark, Serhiy, Gregory and other fanboys of Undefined Behaviour: it seems like 
audioop is miscompiled on x86 (32-bit) without -fwrapv :-)

--
nosy: +gregory.p.smith, mark.dickinson, serhiy.storchaka

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread Jon Ribbens


Change by Jon Ribbens :


--
keywords: +patch
pull_requests: +7831
stage:  -> patch review

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2018-07-16 Thread Amin Radjabov


Amin Radjabov  added the comment:

log

--
Added file: https://bugs.python.org/file47695/Python 3.7.0 
(32-bit)_20180628184532.log

___
Python tracker 

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



[issue34124] email.message_from_binary_file documentation is broken

2018-07-16 Thread Jon Ribbens


New submission from Jon Ribbens :

The documentation for email.message_from_binary_file is missing a 
line-continuation backslash at the end of the `.. function::` line which means 
the output formatting is mangled and it has no permalink.

--
assignee: docs@python
components: Documentation
messages: 321733
nosy: docs@python, jribbens
priority: normal
severity: normal
status: open
title: email.message_from_binary_file documentation is broken
type: compile error
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34118] Fix some class entries in 'Built-in Functions'

2018-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I propose that the 2nd 3 follow the model of the 1st 3,

This makes sense and would read a little better.

> Classes enumerate, filter, map, memoryview, range, reversed, 
> tuple, and zip are untagged.  I think, to be consistent, 
> that they should all get the *class* tag.

To me, that makes the most sense for: memoryview, range and tuple.

The rest are used like functions.  Even though they are technically classes, it 
is confusing to think of them as such (we don't call map() to get an instance 
of a mapobject and do a dir() to what interesting methods it may have).  Tools 
like map() and filter() actually were functions at one time.  The substantive 
change was that they were made to be lazy.  The implementation detail was that 
they were implemented as classes -- they could have been generators instead.  
Accordingly, I think tagging these as classes is pedantically correct but 
actually makes the docs a little less usable.

--

___
Python tracker 

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



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Erich Eckner


Erich Eckner  added the comment:

yes, you were absolutely right: just adding "-fwrapv" to $OPT is enough.

Ok, is this something, we at archlinux32 need to opt in for, or is this 
something, that the configure script should add for x86?

--

___
Python tracker 

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



[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2018-07-16 Thread Carl Banks


Carl Banks  added the comment:

I guess I'll weigh in since I was pinged.

I agree with the approach in the patch.  All the memoryview does is to use the 
format field verbatim from the underlying buffer, so if the format field is 
inaccurate then the only thing to do is to fix the object providing the buffer.

Since the format field is only there for interpretation of the data, and is not 
used to calculate of itemsizes or strides anywhere as far as I know, it's a 
fairly low-risk change.

However, the patch still leaves ctypes inaccurate for the case of unions.  It 
should be fairly simple to modify the code to use a format of "B" for 
unions, so that it at least matches the itemsize, even if the type information 
is lost.

(As an aside, let me point out that I did not actually write or advocate for 
the PEP; for some reason my name was added to it even though I all I did was to 
provide feedback.)

--

___
Python tracker 

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



[issue33073] Add as_integer_ratio() to int() objects

2018-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I put the easy tag here because it was suitable for our mentees and because it 
is isn't a very difficult task (literally, this is the definition of "easy").

FWIW, it is not "triaging" when the tag was set by a seasoned core developer 
who was familiar with the issue and already working with a mentee.  Triaging is 
making an initial assessment when no one else has looked at an issue.

--

___
Python tracker 

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



[issue34116] Move all bytes/bytearray/int/float/complex documentation to Built-in Types

2018-07-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I disagree that this would be an improvement.  The current organization has 
worked well for us.  In particular, some of the these types sometimes used like 
functions that produce a type (this is where the builtin functions docs do a 
good job).  In the stdtypes docs, we go into detail about what the types do and 
have them grouped in a way that can be compared and contrasted.

As a Python instructor, I ask newcomers to read the built-in functions section 
because it tells them a lot of what they need to know to get up and running 
with the language (indeed, that is why these are all builitins rather than 
relegated to modules).  The stdtypes section is more voluminous and rarely read 
start to finish (mostly just used as a reference).

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0a820a203032e3b1b9413afba45acd8f79f27f81 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8296)
https://github.com/python/cpython/commit/0a820a203032e3b1b9413afba45acd8f79f27f81


--

___
Python tracker 

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



[issue34060] regrtest: log "CPU usage" on Windows

2018-07-16 Thread Ammar Askar


Ammar Askar  added the comment:

I don't think taking instantaneous values instead of averaging will work out 
too well. For reference I've attached a screenshot. It has sampled values at 
every second on an unloaded computer and then with running prime95 for cpu 
stress testing. The load tends to peak and fall.

>Is it exactly the same thing on Unix (load average)?

Indeed it is: 
https://en.wikipedia.org/wiki/Load_(computing)#Unix-style_load_calculation

"An idle computer has a load number of 0 (the idle process isn't counted). Each 
process using or waiting for CPU (the ready queue or run queue) increments the 
load number by 1."

>From what I can tell, the number of processors are dealt with the same way as 
>on Linux, that is, a single core processor is overloaded when the load is >1 
>and a quad core processor is overloaded when the load is >4

--
Added file: https://bugs.python.org/file47694/benchmark.PNG

___
Python tracker 

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



  1   2   >