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

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

Oh sorry, you reported the bug on my 2.7 backport but I ask you to report
the bug here, and now the bug is specific to 2.7 :-)

Yes, faulthandler implementation is different on Python 2.7. If you look in
depth, it is even very different especially "dump later" (2.7 uses alarm,
3.x uses a thread). The stdlib implementation is much more reliable because
of different Python enhancements likr native TLS.

--

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since I had the same wrong idea, I dug further into the site.
The explanation is at https://www.iso.org/about-us.html
'''
It's all in the name

Because 'International Organization for Standardization' would have different 
acronyms in different languages (IOS in English, OIN in French for Organisation 
internationale de normalisation), our founders decided to give it the short 
form ISO. ISO is derived from the Greek isos, meaning equal. Whatever the 
country, whatever the language, we are always ISO.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks :)

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 24404b4c92fc4195422c38563d0c6204fa7b16b1 by Mariatta in branch 
'2.7':
[2.7] bpo-30182: Use the correct name for ISO in Unicode HOWTO. (GH-1312). 
(#1315)
https://github.com/python/cpython/commit/24404b4c92fc4195422c38563d0c6204fa7b16b1


--

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset c4dfe2537fee970dc1bf3eb4fc2a3e007b36531c by Mariatta in branch 
'3.5':
[3.5] bpo-30182: Use the correct name for ISO in Unicode HOWTO. (GH-1312) 
(GH-1314)
https://github.com/python/cpython/commit/c4dfe2537fee970dc1bf3eb4fc2a3e007b36531c


--

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 33a5568f69301562d536852d12b9e03cd8dfc3a4 by Mariatta in branch 
'3.6':
[3.6] bpo-30182: Use the correct name for ISO in Unicode HOWTO. (GH-1312) 
(GH-1313)
https://github.com/python/cpython/commit/33a5568f69301562d536852d12b9e03cd8dfc3a4


--
nosy: +Mariatta

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1420

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1422

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +1421

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Jesse Gonzalez

Jesse Gonzalez added the comment:

PR created. CLA signed, but indicates otherwise in my account details.

--

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Jesse Gonzalez

Changes by Jesse Gonzalez :


--
pull_requests: +1419

___
Python tracker 

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



[issue21071] struct.Struct.format is bytes, but should be str

2017-04-26 Thread Xiang Zhang

Xiang Zhang added the comment:

+1 for change bytes to str. But struct.Struct() accepts both bytes and str, 
maybe in future buffer objects. When it gets a bytes object, converting it to a 
str looks unnecessary to me, and as OP said, comparison (a theoretical use 
case) could still fail. Could we just leave what the user passes in? 
bytes(bytes-like) -> bytes, str -> str. This looks more natural to me.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue30183] [HPUX] compilation error in pytime.c with cc compiler

2017-04-26 Thread David Haney

New submission from David Haney:

When compiling on HP-UX with the native cc compiler, the following compilation 
error occurs in pytime.c

cc -Ae -c  -O  -O -I. -I./Include-DPy_BUILD_CORE -o 
Python/pytime.o Python/pytime.c
"Python/pytime.c", line 723: error #2020: identifier "CLOCK_MONOTONIC" is
  undefined
  const clockid_t clk_id = CLOCK_MONOTONIC;
   ^

1 error detected in the compilation of "Python/pytime.c".
*** Error exit code 2

Stop.


HP-UX does not support the CLOCK_MONOTONIC state.

--
components: Build
messages: 292397
nosy: David Haney
priority: normal
severity: normal
status: open
title: [HPUX] compilation error in pytime.c with cc compiler
type: compile error
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



[issue30181] Incorrect parsing of test case docstring

2017-04-26 Thread Louie Lu

Louie Lu added the comment:

This is because unittest.TestCase method `shortDescription()` will only return 
the first line of docstring, writing at here*:

"""
The default implementation of this method returns the first line of the test 
method’s docstring, if available, or None.
"""

Not sure if we may change this default behavior for this.



* 
https://docs.python.org/3/library/unittest.html#unittest.TestCase.shortDescription

--
nosy: +louielu

___
Python tracker 

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



[issue30131] test_logging leaks a "dangling" thread

2017-04-26 Thread Xiang Zhang

Xiang Zhang added the comment:

Does this need to be backported?

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue30115] test_logging report reference leak

2017-04-26 Thread Xiang Zhang

Xiang Zhang added the comment:

Seems in #30131 Victor has solved this. :-)

--
nosy: +haypo
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



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

2017-04-26 Thread Gregory P. Smith

Gregory P. Smith added the comment:

So... it looks like this could and does happen only on the 2.7 backport of 
faulthandler.  2.7 is missing the following commit to use pthreads native TLS 
instead of our lock filled non-async signal safe implementation:
 
https://github.com/python/cpython/commit/2fea9b961d6ea1041ace66037513fcad1fc2173d

Which is easy to backport to 2.7 for anyone who maintains their own patched 
interpreter.  

For the faulthandler backport package on PyPI perspective I'm not sure what if 
anything you want to do about it or if you want to track that here or on the 
faulthandler github issue tracker.  It is not safe to call 
PyGILState_GetThisThreadState() on POSIX systems in a 2.7 extension module 
without the above patch to the interpreter.

No idea how many people run into this in practice, or if they do, have actually 
noticed what is going on.  Because the process is already crashing when it 
deadlocks so if they do, they are likely to just wind up killing it anyways at 
some point.

We happened to run into it in an integration test framework due to a crash 
introduced by an unrelated change that caused a single digit percentage of test 
runs to timeout instead of pass or fail as they had in the past.

--
assignee: gregory.p.smith -> haypo
versions: +Python 2.7 -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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
keywords: +easy
stage:  -> needs patch
versions: +Python 3.5, Python 3.6

___
Python tracker 

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



[issue30181] Incorrect parsing of test case docstring

2017-04-26 Thread Brian May

Changes by Brian May :


--
nosy: +brian

___
Python tracker 

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



[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2017-04-26 Thread Xiang Zhang

Changes by Xiang Zhang :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2017-04-26 Thread Xiang Zhang

Xiang Zhang added the comment:


New changeset 88c38b32b761cb566759b8ad96704bff590a1de9 by Xiang Zhang (Louie 
Lu) in branch 'master':
bpo-28415: Note 0 conversion different between Python and C (#885)
https://github.com/python/cpython/commit/88c38b32b761cb566759b8ad96704bff590a1de9


--

___
Python tracker 

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



[issue13349] Non-informative error message in index() and remove() functions

2017-04-26 Thread Zahari Dim

Changes by Zahari Dim :


--
pull_requests: +1418

___
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-04-26 Thread Gregory P. Smith

Gregory P. Smith added the comment:

This report is based on manual code inspection in CPython head after we 
encountered a deadlock using pytracemalloc on Python 2.7.12 where it _appeared_ 
to be the scenario I've described.

I see now that I missed noticing the "#ifndef Py_HAVE_NATIVE_TLS" within 
thread.c which should imply a different PyThread_get_key_value() implementation 
that likely does not use our lock acquiring fallback find_key().  So my code 
analysis may not make sense...

To give a taste of the large process setup we saw it in:

* A CPython process that has extension modules which create their own threads 
as well as potentially Python having created its own threads.
* We've called faulthandler.enable() *and* faulthandler.register(SIGTERM).
* We send a SIGTERM to processes in this environment which are taking too long 
to complete; the goal was to get a stack trace of what the process was 
potentially stuck doing when our external timeout monitoring mechanism kicked 
in.

our stuck process had received the SIGTERM and analyzing it revealed a deadlock 
between two threads which appeared to involve this faulthandler path.

let me gather more info into one place.  from there i should be able to come up 
with a way to reproduce it (or even better, not)

--
assignee: haypo -> gregory.p.smith

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Louie Lu

Louie Lu added the comment:

Add the link: 

Python 3: https://docs.python.org/3/howto/unicode.html
Python 2: https://docs.python.org/2/howto/unicode.html

Both of 2 and 3 howto unicode use "International Standards Organization"


Jesse, would you like to create a PR for this?

--
nosy: +louielu
versions: +Python 2.7, Python 3.7

___
Python tracker 

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



[issue30182] Incorrect in referring to ISO as "International Standards Organization"

2017-04-26 Thread Jesse Gonzalez

New submission from Jesse Gonzalez:

When reviewing the Unicode HOWTO, I found a reference to ISO as "International 
Standards Organization", which should instead read "International Organization 
for Standardization".

https://www.iso.org/home.html

--
assignee: docs@python
components: Documentation
messages: 292389
nosy: Jesse Gonzalez, docs@python
priority: normal
severity: normal
status: open
title: Incorrect in referring to ISO as "International Standards Organization"

___
Python tracker 

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



[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Xiang Zhang

Xiang Zhang added the comment:

I can't find any official, portable doc about the details so I don't prefer to 
have them. I support bit-masks are different. Previously I don't what's the 
better way to organize them, now I have a try. Please check the update. :-)

--

___
Python tracker 

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



[issue30181] Incorrect parsing of test case docstring

2017-04-26 Thread Ben Finney

New submission from Ben Finney:

The docstring of a test case is not correctly parsed for display.

The attached ‘test_foo.py’ module contains two test case functions. Both 
docstrings conform to PEP 257 : they 
have a single-line synopsis and some extra text in a new paragraph.

However, only one of the functions has its docstring synopsis used in the 
output:

=
==
FAIL: test_lower_returns_expected_code (test_foo.Foo_TestCase)
Should return expected code.
--
Traceback (most recent call last):
[…]

==
FAIL: test_reverse_returns_expected_text (test_foo.Foo_TestCase)
--
Traceback (most recent call last):
[…]

--
Ran 2 tests in 0.001s
=

This violates the docstring parsing as described in PEP 257. The synopsis 
should be obtained by, first, stripping leading and trailing whitespace from 
the docstring; then, from that stripped text, taking the first line as the 
synopsis.

So the expected output for ‘test_foo.Foo_TestCase. 
test_reverse_returns_expected_text’ should include its docstring synopsis, 
“Should return expected reverse text.”

--
components: Library (Lib)
files: test_foo.py
messages: 292387
nosy: benf_wspdigital
priority: normal
severity: normal
status: open
title: Incorrect parsing of test case docstring
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46831/test_foo.py

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2017-04-26 Thread Tim Graham

Tim Graham added the comment:

Does it seems likely that getfullargspec() will be deprecated after Python 2 is 
EOL? Django is currently reimplementing getargspec():
https://github.com/django/django/blob/8ab7ce8558792f41637d6f87f2a8a117e169dd18/django/utils/inspect.py#L4-L24

A pull request proposes to modify that implementation to behave as 
getfullargspec(): https://github.com/django/django/pull/8410

Django master now supports Python 3.4+, so I guess we would rather use 
getfullargspec() if it's not going to be deprecated in the future. The only 
downside is that it would introduce deprecation warnings for Python 3.5 users 
since those warnings haven't been removed yet. I guess Django could silence 
them.

--
nosy: +Tim.Graham

___
Python tracker 

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



[issue30180] PyArg_ParseTupleAndKeywords supports required keyword only arguments

2017-04-26 Thread Joe Jevnik

New submission from Joe Jevnik:

I opened a pr to remove a line in the docs about $ needing to follow | in 
PyArg_ParseTupleAndKeywords. In practice, you can just use a $ to create 
required keyword arguments which intuitively makes sense. I was told this 
should raise a SystemError; however, you can create required keyword only 
arguments in Python so I am not sure why we would want to fail when this is 
done with PyArg_ParseTupleAndKeywords.

--
messages: 292385
nosy: ll, serhiy.storchaka
priority: normal
pull_requests: 1417
severity: normal
status: open
title: PyArg_ParseTupleAndKeywords supports required keyword only arguments

___
Python tracker 

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



[issue30180] PyArg_ParseTupleAndKeywords supports required keyword only arguments

2017-04-26 Thread Joe Jevnik

Changes by Joe Jevnik :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

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



[issue30179] Update Copyright to 2017

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Duplicate of http://bugs.python.org/issue29555.

--
nosy: +Mariatta
resolution:  -> duplicate
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



[issue30179] Update Copyright to 2017

2017-04-26 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1416

___
Python tracker 

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



[issue30179] Update Copyright to 2017

2017-04-26 Thread Cheryl Sabella

New submission from Cheryl Sabella:

The copyright page is only through 2016.

--
assignee: docs@python
components: Documentation
messages: 292383
nosy: csabella, docs@python
priority: normal
severity: normal
status: open
title: Update Copyright to 2017
type: enhancement
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



[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2017-04-26 Thread John Beck

John Beck added the comment:

Solaris has this problem also, and Chris' patch fixes it for us.

--
nosy: +jbeck

___
Python tracker 

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



[issue28964] AST literal_eval exceptions provide no information about line number

2017-04-26 Thread Steve Merritt

Steve Merritt added the comment:

I'll try to get to it this weekend. A bit swamped on another project right now. 
Thanks for the interest and the reminder!

--

___
Python tracker 

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



[issue30149] inspect.signature() doesn't support partialmethod without explicit self parameter

2017-04-26 Thread Dong-hee Na

Dong-hee Na added the comment:

I submitted the PR for this issue.

--
nosy: +corona10

___
Python tracker 

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



[issue30149] inspect.signature() doesn't support partialmethod without explicit self parameter

2017-04-26 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1415

___
Python tracker 

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



[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +twouters

___
Python tracker 

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



[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I still think that the difference between the groups should be documented in 
more details. Not all functions that support A_BOLD support also A_ITALIC and 
A_HORIZONTAL (even if they are defined). Bit masks are used in totally 
different way than other constants.

--

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-04-26 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1414

___
Python tracker 

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



[issue30172] test_tools takes longer than 5 minutes on some buildbots

2017-04-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is expected. test_tools just runs a large number of subprocesses. Some 
subtests proceeds a large number of Python source files as test_tokenize and 
test_lib2to3.

Maybe it would be better to run and report tests for different tools as 
separate tests (test_tools.test_pindent, test_tools.test_unparse, etc), but 
allowing to run a group as a whole. Does unittest or regrtest support this?

--

___
Python tracker 

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



[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Xiang Zhang

Xiang Zhang added the comment:

+1 for group. I added "The exact constants available are system dependent" to 
note some may be absent.

--

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-04-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Dong-hee Na and Mariatta.

--

___
Python tracker 

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



[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Initially constants was enumerated in alphabetical order (except A_ITALIC). 
Maybe continue supporting this order? On other hand, it may be worth to group 
highlighting attributes separately. A_ATTRIBUTES, A_CHARTEXT and A_COLOR are 
not specific attributes, but bit masks, they also could be grouped separately 
or moved into a separate table.

Perhaps it is worth to add notes for A_ITALIC and highlighting attributes. They 
are not always available.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30178] Indent methods and attributes of MimeTypes class

2017-04-26 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
pull_requests: +1413

___
Python tracker 

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



[issue30178] Indent methods and attributes of MimeTypes class

2017-04-26 Thread Jim Fasarakis-Hilliard

New submission from Jim Fasarakis-Hilliard:

Similar to #30168 opened earlier. The MimeTypes class's methods and attributes 
aren't indented and the resulting documentation is not indented and duplicates 
the class name. 

Didn't find anything that might indicate this was intentional when trying to 
blame this change. It seems to have happened at some point between 2.6 [1] and 
2.7 [2], though, where the class directive was moved to the MimeTypes Objects 
section. Also didn't find an expert for this module in the index. 

Proposed change just indents these. 

[1]: https://github.com/python/cpython/blame/2.6/Doc/library/mimetypes.rst
[2]: https://github.com/python/cpython/blame/2.7/Doc/library/mimetypes.rst

--
assignee: docs@python
components: Documentation
messages: 292374
nosy: Jim Fasarakis-Hilliard, docs@python
priority: normal
severity: normal
status: open
title: Indent methods and attributes of MimeTypes class
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



[issue30167] site.main() does not work on Python 3.6 and superior if PYTHONSTARTUP is set

2017-04-26 Thread André Anjos

Changes by André Anjos :


--
title: site.main() does not work on Python 3.6 and superior with PYTHONSTARTUP 
is set -> site.main() does not work on Python 3.6 and superior if PYTHONSTARTUP 
is set

___
Python tracker 

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



[issue30167] site.main() does not work on Python 3.6 and superior with PYTHONSTARTUP is set

2017-04-26 Thread André Anjos

Changes by André Anjos :


--
title: site.main() does not work on Python 3.6 and superior -> site.main() does 
not work on Python 3.6 and superior with PYTHONSTARTUP is set

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 2fc3c543fc93d6211de8dcfaeac3a0fd10a356e0 by Mariatta (Dong-hee 
Na) in branch '3.6':
[3.6] bpo-30142: Remove "callable" from the 2to3fixer documentation. (GH-1303)
https://github.com/python/cpython/commit/2fc3c543fc93d6211de8dcfaeac3a0fd10a356e0


--

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 19b3a4885cc685adb42db6f8f7b625768f6d1baf by Mariatta (Dong-hee 
Na) in branch '2.7':
[2.7] bpo-30142: Remove "callable" from the 2to3fixer documentation. (GH-1305)
https://github.com/python/cpython/commit/19b3a4885cc685adb42db6f8f7b625768f6d1baf


--

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 9a626ec4e58c0bca1b4f71154e9e1da7e6d7e4a7 by Mariatta (Dong-hee 
Na) in branch '3.5':
[3.5] bpo-30142: Remove "callable" from the 2to3fixer documentation. (GH-1304)
https://github.com/python/cpython/commit/9a626ec4e58c0bca1b4f71154e9e1da7e6d7e4a7


--

___
Python tracker 

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



[issue30174] Duplicate code in pickletools.py

2017-04-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The variant without " in the string" is more correct and consistent with bytes4 
and bytes8.

The first bytes1 was added in issue16550. The duplicate was mistakenly added in 
issue17810.

This change can be backported, but it is not worth since the duplication 
doesn't have any effect.

--
components: +Library (Lib)
nosy: +pitrou, serhiy.storchaka
type:  -> behavior

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1412

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1411

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1410

___
Python tracker 

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



[issue30177] pathlib.resolve(strict=False) only includes first child

2017-04-26 Thread Michael Shuffett

New submission from Michael Shuffett:

According to the documentation 
https://docs.python.org/3/library/pathlib.html#pathlib.Path.resolve
If strict is False, the path is resolved as far as possible and any remainder 
is appended without checking whether it exists.

The current behavior is not consistent with this, and only appends the first 
remainder.

For example:
If we have an empty '/tmp' directory
Path('/tmp/foo').resolve() and Path('/tmp/foo/bar').resolve() both result in 
Path('/tmp/foo') but Path('/tmp/foo/bar').resolve() should result in 
Path('/tmp/foo/bar')

--
components: Library (Lib)
messages: 292369
nosy: mshuffett
priority: normal
severity: normal
status: open
title: pathlib.resolve(strict=False) only includes first child
type: behavior
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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset a90b990480f45b6a0ad02d43455cf8b620bac9c5 by Mariatta (Dong-hee 
Na) in branch 'master':
bpo-30142: Remove "callable" from the 2to3fixer documentation. (GH-1296)
https://github.com/python/cpython/commit/a90b990480f45b6a0ad02d43455cf8b620bac9c5


--

___
Python tracker 

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



[issue30174] Duplicate code in pickletools.py

2017-04-26 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Does this need to be backported?

--
nosy: +Mariatta
stage:  -> patch review
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



[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Xiang Zhang

Changes by Xiang Zhang :


--
pull_requests: +1409

___
Python tracker 

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



[issue30176] curses attribute constants list is incomplete

2017-04-26 Thread Xiang Zhang

Changes by Xiang Zhang :


--
assignee: docs@python
components: Documentation
nosy: berker.peksag, docs@python, haypo, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: curses attribute constants list is incomplete
versions: Python 2.7, 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



[issue30174] Duplicate code in pickletools.py

2017-04-26 Thread Tim Peters

Tim Peters added the comment:

I already commented on github - +1 for this change.

--
nosy: +tim.peters

___
Python tracker 

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



[issue30175] Random test_imaplib.test_logincapa_with_client_certfile failure on x86 Gentoo Installed with X 3.x

2017-04-26 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/593/steps/test/logs/stdio


==
ERROR: test_logincapa_with_client_certfile 
(test.test_imaplib.RemoteIMAP_SSLTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/test_imaplib.py",
 line 972, in test_logincapa_with_client_certfile
certfile=CERTFILE)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/imaplib.py",
 line 1280, in __init__
IMAP4.__init__(self, host, port)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/imaplib.py",
 line 197, in __init__
self.open(host, port)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/imaplib.py",
 line 1293, in open
IMAP4.open(self, host, port)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/imaplib.py",
 line 294, in open
self.sock = self._create_socket()
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/imaplib.py",
 line 1285, in _create_socket
server_hostname=self.host)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/ssl.py",
 line 401, in wrap_socket
_context=self, _session=session)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/ssl.py",
 line 808, in __init__
self.do_handshake()
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/ssl.py",
 line 1061, in do_handshake
self._sslobj.do_handshake()
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/ssl.py",
 line 683, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:749)

--
components: Tests
messages: 292365
nosy: haypo
priority: normal
severity: normal
status: open
title: Random test_imaplib.test_logincapa_with_client_certfile failure on x86 
Gentoo Installed with X 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



[issue30174] Duplicate code in pickletools.py

2017-04-26 Thread Jelle Zijlstra

New submission from Jelle Zijlstra:

The bytes1 ArgumentDescriptor is duplicated in pickletools.py.

--
messages: 292364
nosy: Jelle Zijlstra, alexandre.vassalotti
priority: normal
pull_requests: 1408
severity: normal
status: open
title: Duplicate code in pickletools.py

___
Python tracker 

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



[issue30101] Add support for ncurses A_ITALIC

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

Thanks Bastien Orivel for your first contribution to Python!

--
nosy: +haypo

___
Python tracker 

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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> Sorry for making a typo in your last name

No problem!
This actually happened maaany times with me :-)

--

___
Python tracker 

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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Mathias Rav

Mathias Rav added the comment:

Sorry for making a typo in your last name, Ivan Levkivskyi! I should know 
better and use copy-and-paste.

--

___
Python tracker 

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



[issue30101] Add support for ncurses A_ITALIC

2017-04-26 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue30101] Add support for ncurses A_ITALIC

2017-04-26 Thread Xiang Zhang

New submission from Xiang Zhang:


New changeset ab7886b78574d9224b26dc3a5b08e5c105fbbf11 by Xiang Zhang 
(Eijebong) in branch 'master':
bpo-30101: Add support for curses.A_ITALIC. (#1015)
https://github.com/python/cpython/commit/ab7886b78574d9224b26dc3a5b08e5c105fbbf11


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-04-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> davin

___
Python tracker 

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



[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2017-04-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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

___
Python tracker 

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



[issue30169] test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot

2017-04-26 Thread Thomas Wouters

Thomas Wouters added the comment:

Eh, commit a00c3fd12d421e41b769debd7df717d17b0deed5 wasn't supposed to affect 
any behaviour in release builds, just in non-debug builds *with asserts 
enabled*, and only in making them build. 

(There is a bug in that commit that was fixed right after,  commit 
06bb4873d6a9ac303701d08a851d6cd9a51e02a3, but there shouldn't be any 
behavioural change since that went in.)

What kind of behaviour change do you think the change caused?

--
nosy: +twouters

___
Python tracker 

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



[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2017-04-26 Thread Michael Seifert

Michael Seifert added the comment:

> zip.__length_hint__() must return NotImplemented or raise TypeError if any of 
> iterators don't implement __length_hint__ or its __length_hint__() returns 
> NotImplemented or raises TypeError.

> And what should return zip(range(3), range(2**1000)).__length_hint__()? I 
> expect 3, not OverflowError.

That's actually non-trivial because PyObject_LengthHint just returns a 
Py_ssize_t. To recover NotImplemented will be complicated and there's no way to 
discriminate if the OverflowError happened in PyObject_LengthHint or in the 
called __length_hint__. 

But TypeError is correctly re-raised in the tests I made.

--

___
Python tracker 

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



[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2017-04-26 Thread Michael Seifert

Michael Seifert added the comment:

> I would like to mark this tracker item as closed.  IMO it is a dead-end. 

Yes, even some (not very uncommon cases) give incorrect results:

it = iter([1,2,3])
zip(it, it, it)

has length_hint 3 but will only yield one item.

--

___
Python tracker 

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



[issue30173] x86 Windows7 3.x buildbot has the issue #26624 bug

2017-04-26 Thread STINNER Victor

New submission from STINNER Victor:

It looks like the x86 Windows7 3.x buildbot has the issue #26624 bug: 
test__locale hangs.

This buildbot slave is managed by David Bolen.

@David: please see:
* https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
* https://bugs.python.org/issue26624#msg270695


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

ValidateUcrtbase:
  setlocal
  set PYTHONPATH=D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\Lib
  
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\PCBuild\win32\python_d.exe"
 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\PC\validate_ucrtbase.py"
 ucrtbased
  C:\Windows\system32\ucrtbased.dll is version 10.0.10240.16384
  WARN: ucrtbased contains known issues. Please update the Windows 10 SDK.
  See:
http://bugs.python.org/issue27705
https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk


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

0:58:28 [335/404] test_base64 passed
running: test_venv (56 sec), test__locale (30 sec)
...

1:07:49 [403/404] test_asyncgen passed -- running: test__locale (562 sec)

command timed out: 3600 seconds without output running 
['Tools\\buildbot\\test.bat', '-j2'], attempting to kill
running: test__locale (592 sec)
...

running: test__locale (4162 sec)
2:07:54 [404/404/1] test__locale crashed (Exit code 1)
program finished with exit code 1
elapsedTime=7680.676000

--
components: Tests, Windows
keywords: buildbot
messages: 292356
nosy: db3l, haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: x86 Windows7 3.x buildbot has the issue #26624 bug
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



[issue30172] test_tools takes longer than 5 minutes on some buildbots

2017-04-26 Thread STINNER Victor

New submission from STINNER Victor:

On x86-64 El Capitan 3.x buildbot, test_tools takes longer than 5 minutes, 
whereas the overall test suite took 31 min. Is someone wrong in test_tools?

http://buildbot.python.org/all/builders/x86-64%20El%20Capitan%203.x/builds/92/steps/test/logs/stdio

Run tests in parallel using 2 child processes
...
10 slowest tests:
- test_tools: 5 min 3 sec
- test_tokenize: 4 min 52 sec
- test_multiprocessing_spawn: 4 min 4 sec
- test_datetime: 3 min 32 sec
- test_lib2to3: 3 min 14 sec
- test_mmap: 2 min 43 sec
- test_multiprocessing_forkserver: 2 min 11 sec
- test_multiprocessing_fork: 1 min 58 sec
- test_io: 1 min 54 sec
- test_subprocess: 1 min 11 sec
...
Total duration: 31 min 20 sec
...

--
components: Tests
keywords: buildbot
messages: 292355
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: test_tools takes longer than 5 minutes on some buildbots
type: performance
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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Berker Peksag

Berker Peksag added the comment:

Now all backport PRs have been merged. Thanks for the PR, Mathias.

> Thanks for making backport PRs! (and sorry for closing prematurely)

No problem, thanks for the reviews! By the way, sorry I missed the typo in your 
last name while doing the initial merge.

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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 04f389b8b357c8507b6c9642adcb8b956489e034 by Berker Peksag in 
branch '3.6':
bpo-29974: Improve typing.TYPE_CHECKING example (GH-982)
https://github.com/python/cpython/commit/04f389b8b357c8507b6c9642adcb8b956489e034


--

___
Python tracker 

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



[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2017-04-26 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 271a289a03ad10c91c5326bde3020f1cdf6a1fff by Berker Peksag in 
branch '3.5':
bpo-29974: Improve typing.TYPE_CHECKING example (GH-982)
https://github.com/python/cpython/commit/271a289a03ad10c91c5326bde3020f1cdf6a1fff


--

___
Python tracker 

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



[issue30160] BaseHTTPRequestHandler.wfile: supported usage unclear

2017-04-26 Thread Mike

Changes by Mike :


--
pull_requests: +1407

___
Python tracker 

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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> 87c07fe9d908d0a2143fcc8369255c6ff3241503 should still be backported to 3.5 
> and 3.6 branches so please don't close it yet.

Thanks for making backport PRs! (and sorry for closing prematurely)

--

___
Python tracker 

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



[issue18669] curses.chgat() moves cursor, documentation says it shouldn't

2017-04-26 Thread Berker Peksag

Berker Peksag added the comment:

I think this is a documentation issue. curses.chgat() documentation tries to 
describe different signatures in one place and some of these signatures change 
the behavior of the function. For example, curses.chgat() calls mvwchgat() when 
users pass y and x to it and mvwchgat() is documented as "the mvwchgat function 
does a cursor move before acting".

--
keywords: +easy
nosy: +berker.peksag
stage:  -> needs patch
versions: +Python 3.6, Python 3.7 -Python 3.2, Python 3.4

___
Python tracker 

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



[issue30131] test_logging leaks a "dangling" thread

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf by Victor Stinner in 
branch 'master':
bpo-30131: test_logging now joins queue threads (#1298)
https://github.com/python/cpython/commit/8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf


--

___
Python tracker 

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



[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I forgot that I hitted this issue while analyzing issue #30131: 
test_logging leaks a "dangling" thread. It took me a while to find 
multiprocessing queues in the big test_logging file!

--

___
Python tracker 

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



[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

Example:

haypo@selma$ ./python queue_leak.py 
number of thread diff: +1
dangling threads!
before: [<_MainThread(MainThread, started 139814961067072)>]
after: [<_MainThread(MainThread, started 139814961067072)>]

Note: queue_leak.py resource check is based on test.support.reap_threads.

--

___
Python tracker 

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



[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-04-26 Thread STINNER Victor

New submission from STINNER Victor:

A multiprocessing Queue object managers multiple resources:

* a multiprocessing Pipe
* a thread
* (a lock and a semaphore)

If a Queue is not cleaned up properly, your application may leak many resources.

Try attached queue_leak.py to see an example "leaking a thread".

I suggest to emit a ResourceWarning warning in Queue destrutor. I don't know 
what should be the test to decide if a warning must be emitted?

* if the queue wasn't closed yet?
* if the thread is alive?
* if the queue wasn't closed yet and/or the thread is alive? (my favorite 
choice)

Other examples of objects emitting ResourceWarning:

* io files: io.FileIO, io.TextIOWrapper, etc.
* socket.socket
* subprocess.Popen: I recently added a ResourceWarning on that one
* asyncio transports and event loops

--
components: Library (Lib)
files: queue_leak.py
messages: 292346
nosy: davin, haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Emit ResourceWarning in multiprocessing Queue destructor
type: resource usage
versions: Python 3.7
Added file: http://bugs.python.org/file46830/queue_leak.py

___
Python tracker 

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



[issue30170] "tests may fail, unable to create temporary directory" warning on buildbot: add a cleanup step to buildbots

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

I also see this warning on AppVeyor:

0:01:42 [170/404] test_fcntl skipped -- running: test_concurrent_futures (76 
sec)
C:\projects\cpython\lib\test\support\__init__.py:1012: RuntimeWarning: tests 
may fail, unable to create temporary directory 
'C:\\projects\\cpython\\build\\test_python_1080': [WinError 183] Cannot create 
a file when that file already exists: 
'C:\\projects\\cpython\\build\\test_python_1080'
  with temp_dir(path=name, quiet=quiet) as temp_path:
test_fcntl skipped -- No module named 'fcntl'
0:01:42 [171/404] test_eintr passed -- running: test_concurrent_futures (76 sec)

https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.1476

--

___
Python tracker 

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



[issue29941] Confusion between asserts and Py_DEBUG

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

> since the commit a00c3fd12d421e41b769debd7df717d17b0deed5 *or later* (who 
> knows?)...

Hum, my sentence is unclear: I mean that I am not sure that this
commit is related to issue #30169 crash.

--

___
Python tracker 

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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests: +1406

___
Python tracker 

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



[issue30131] test_logging leaks a "dangling" thread

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

After stressing test_logging during 2 days on my FreeBSD VM, it seems like I 
found the root bug: see https://github.com/python/cpython/pull/1298

--

___
Python tracker 

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



[issue30131] test_logging leaks a "dangling" thread

2017-04-26 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1405

___
Python tracker 

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



[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests: +1404

___
Python tracker 

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



[issue29941] Confusion between asserts and Py_DEBUG

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

Please see the issue #30169 "test_multiprocessing_spawn crashed on AMD64 
Windows8.1 Non-Debug 3.x buildbot", a mysterious and random bug on Windows 
which started to occur since the commit 
a00c3fd12d421e41b769debd7df717d17b0deed5 *or later* (who knows?)...

--

___
Python tracker 

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



[issue30169] test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

I also checked the last 250 builds of AMD64 Windows8 3.x: 
test_multiprocessing_spawn never crashed.

http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x

We got 8 crashed on "AMD64 Windows8.1 Non-Debug 3.x", but 0 crash on "AMD64 
Windows8 3.x" (similar Windows version, but it's a different buildbot slave, so 
different hardware, version, etc.)... So *maybe* it's related to the commit 
a00c3fd12d421e41b769debd7df717d17b0deed5 and the issue #29941 since this patch 
changed the behaviour of Python compiled in release mode.

--

___
Python tracker 

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



[issue30142] The "callable" fixer doesn't exist

2017-04-26 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1403

___
Python tracker 

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



[issue30170] "tests may fail, unable to create temporary directory" warning on buildbot: add a cleanup step to buildbots

2017-04-26 Thread STINNER Victor

New submission from STINNER Victor:

On buildbots, it's common to see such warning:


0:32:04 [269/404] test_property passed -- running: test_multiprocessing_spawn 
(74 sec)
D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py:1012: 
RuntimeWarning: tests may fail, unable to create temporary directory 
'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_1048': [WinError 
183] Cannot create a file when that file already exists: 
'D:\\buildarea\\3.x.bolen-windows10\\build\\build\\test_python_1048'
  with temp_dir(path=name, quiet=quiet) as temp_path:
running: test_cmd_line_script (30 sec), test_multiprocessing_spawn (104 sec)

I also got it *sometimes*. It took me months to understand where it does come 
from.

It's quite stupid in fact: temporary directories are not removed if a test does 
crash (ex: segfault). Later, if a test process has the same PID than the 
crashed process, you get the warning.

I suggest to add a "clean" step on buildbots to first remove old 
"test_python_*" directories leaked by previous runs.

First, I wanted to add such cleanup in regrtest directly, but it's common that 
I run two main regrtest processes in parallel, and I would like to keep this 
feature. If regrtest starts by removing test_python_*: it will break currently 
running tests.

I'm not 100% confident that the warning is caused by previous runs, but I think 
that it's worth it to try to cleanup to check if it's case ;-)

--
components: Tests
keywords: buildbot
messages: 292340
nosy: haypo, serhiy.storchaka, zach.ware
priority: normal
severity: normal
status: open
title: "tests may fail, unable to create temporary directory" warning on 
buildbot: add a cleanup step to buildbots
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



[issue30169] test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

Current thread 0x1644 (most recent call first):
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\_test_multiprocessing.py", 
line 3997 in ManagerMixin

Line 3997 is:
   Condition = property(operator.attrgetter('manager.Condition'))

I don't understand how creating operator.attrgetter() or property() object can 
crash? Maybe the memory was corrupted before?

Extract of _test_multiprocessing.py around this line:

class ManagerMixin(object):
TYPE = 'manager'
Process = multiprocessing.Process
Queue = property(operator.attrgetter('manager.Queue'))
JoinableQueue = property(operator.attrgetter('manager.JoinableQueue'))
Lock = property(operator.attrgetter('manager.Lock'))
RLock = property(operator.attrgetter('manager.RLock'))
Semaphore = property(operator.attrgetter('manager.Semaphore'))
BoundedSemaphore = property(operator.attrgetter('manager.BoundedSemaphore'))
Condition = property(operator.attrgetter('manager.Condition'))
Event = property(operator.attrgetter('manager.Event'))
Barrier = property(operator.attrgetter('manager.Barrier'))
Value = property(operator.attrgetter('manager.Value'))
Array = property(operator.attrgetter('manager.Array'))
list = property(operator.attrgetter('manager.list'))
dict = property(operator.attrgetter('manager.dict'))
Namespace = property(operator.attrgetter('manager.Namespace'))

--

___
Python tracker 

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



[issue30169] test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot

2017-04-26 Thread STINNER Victor

STINNER Victor added the comment:

The crash is probably random. I looked at the last 250 builds. Since build 421, 
the first crash occurred at build 578 (commit 
a00c3fd12d421e41b769debd7df717d17b0deed5, no idea if it's related):

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/578/

I found 8 test_multiprocessing_spawn crashes in builds:

* 578
* 579
* 659
* 660
* 661
* 664
* 665
* 670

--

___
Python tracker 

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



  1   2   >