[issue30993] IDLE: Document, fix, and complete configdialog font tests

2017-07-23 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ned.deily

___
Python tracker 

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



[issue30993] IDLE: Document, fix, and complete configdialog font tests

2017-07-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, in a comment on PR2826, Louie reported "The patch unittest work on Linux, 
but on MacOS, I get test.support.ResourceDeined: cannot run without OS X gui 
process, it is wierd, I'm inside the GUI mode.

Also, I'm not sure if this only on MacOS (is font problem or what), when 
checking bold box, some font won't render to bold (I've check that this may not 
relative to patch, in older commit have this problem, too)."

Have you run gui tests, and in particular, IDLE tests on OSX lately?  Is the 
OSX code in test.support for GUI required still working?

--

___
Python tracker 

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



[issue31000] Test failure in resource module on ZFS

2017-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I use 32-bit Linux and when tried to install the ZFS DKMS driver got a warning 
that ZFS is unstable on 32-bit.

--

___
Python tracker 

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



[issue30993] IDLE: Document, fix, and complete configdialog font tests

2017-07-23 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2881

___
Python tracker 

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



[issue30442] Skip test_xml_etree under coverage

2017-07-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2017-07-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions: +Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue30993] IDLE: Document, fix, and complete configdialog font tests

2017-07-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 77e97ca9ff6f3dbbf98b89b4103c46b43eef5642 by Terry Jan Reedy in 
branch 'master':
bpo-30993: IDLE - Improve configdialog font page and tests. (#2831)
https://github.com/python/cpython/commit/77e97ca9ff6f3dbbf98b89b4103c46b43eef5642


--

___
Python tracker 

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



[issue12568] Add functions to get the width in columns of a character

2017-07-23 Thread Socob

Changes by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue2636] Adding a new regex module (compatible with re)

2017-07-23 Thread Socob

Changes by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue12734] Request for property support in Python re lib

2017-07-23 Thread Socob

Changes by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue12733] Request for grapheme support in Python re lib

2017-07-23 Thread Socob

Changes by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes

2017-07-23 Thread Socob

Changes by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue30717] str.center() is not unicode aware

2017-07-23 Thread Socob

Changes by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue30999] statistics module: add "key" keyword argument to median, mode, ...

2017-07-23 Thread gerion

gerion added the comment:

My use case is some side data somehow connected to the statistical relevant 
data.
(I think, this is more less a similar use case as with the min and max 
function.)

A few examples:

The datastructure is a list of tuples: (score, [list of people that have this 
score])
```
median = median_low([(1, ['Anna']), (3, ['Paul', 'Henry']), (4, ['Kate'])], 
key=lambda elem: elem[0])
for name in median[1]:
print(f"{name} is one of the people that reach the median score.")
```
or you can enumerate:
```
data = [1, 3, 4]
median = median_low(enumerate(data), key=lambda elem: elem[1])
print(f"median is at position {median[0]}")
```
With the keyword argument, the input can also be a list of self defined 
objects, where the median make sense on some member variable or function, etc.:
```
>>> median_low(list_of_self_defined_objects, key=lambda elem: elem.get_score())
```

--

___
Python tracker 

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



[issue30451] parse windows path error in webbrowser.get() and lead to webbrowser.Error: could not locate runnable browser

2017-07-23 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> webbrowser.get(command_line) does not support Windows-style 
path separators
type:  -> behavior

___
Python tracker 

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



[issue30442] Skip test_xml_etree under coverage

2017-07-23 Thread Berker Peksag

Changes by Berker Peksag :


--
components: +Tests
stage:  -> backport needed
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



[issue30999] statistics module: add "key" keyword argument to median, mode, ...

2017-07-23 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Apart from being "cool", what is the purpose of this key argument?

For the example shown, where you extract an item from tuple data:

>>> median_low([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0])
(3, 3)

I'm not sure I understand when you would use this, and why you would describe 
(3,3) as a median (a kind of average) of the given data.


By the way, although it's not (yet?) officially supported, it turns out that 
this works:

py> median_low([(1, 2), (3, 3), (4, 1)])
(3, 3)

Officially, median requires numeric data. If the median* functions were to 
support tuples, I would be inclined to return a new tuple with the median of 
each column, as such:

median_low([(1, 2), (3, 3), (4, 1)])
(3, 2)  # median of 1,3,4 and median of 2,3,1


I can think of uses for that, e.g. calculating the "Q" correlation coefficient. 
What uses do you have for your suggested key argument?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-07-23 Thread Berker Peksag

Berker Peksag added the comment:


New changeset 26248ef58dcf49619930ffa2e050ffa687a88601 by Berker Peksag (Eli 
Boyarski) in branch 'master':
bpo-30456: Clarify example for duplicates in second argument of isinstance 
(GH-1699)
https://github.com/python/cpython/commit/26248ef58dcf49619930ffa2e050ffa687a88601


--
nosy: +berker.peksag

___
Python tracker 

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



[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-07-23 Thread Berker Peksag

Changes by Berker Peksag :


--
stage:  -> backport needed
type:  -> behavior
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



[issue30454] Python module cx_Oracle ld installation issue on Solaris11U3 SPARC: fatal: file /oracle/database/lib/libclntsh.so: wrong ELF class: ELFCLASS64 error

2017-07-23 Thread Berker Peksag

Berker Peksag added the comment:

cx_Oracle is not part of the Python standard library and according to 
https://community.oracle.com/thread/4048639 the solution is to install it from 
Solaris' package repository.

--
nosy: +berker.peksag
resolution:  -> third party
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



[issue30853] IDLE: configdialog -- factor out Tracer subclass

2017-07-23 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Would you like this change for fonts and indent before the tests for the other 
tabs are ready or would you like to have tests for all the tabs first?

--

___
Python tracker 

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



[issue30993] IDLE: Document, fix, and complete configdialog font tests

2017-07-23 Thread Cheryl Sabella

Cheryl Sabella added the comment:

The tests pass on linux and the htest looks good.  Thank you for making all 
these changes.  It seems much clearer now, but I do want to spend more time 
reading the code to understand it.  Looks like you grouped all the font-related 
functions, so they are ready to become a Class?  The only part I couldn't 
figure out is how to update highlight_sample since it wouldn't be in the class.

With the backwards compatibility, I thought maybe you have an idea about how to 
make the changes compatible because of the issue that moves the extensions.  I 
can see where that would be a problem as far as making changes is concerned.

Maybe I'll look at the creating tests for one of the other tabs next?

--

___
Python tracker 

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



[issue30274] Make importlib.abc.ExtensionFileLoader.__init__() documentation match code

2017-07-23 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue31000] Test failure in resource module on ZFS

2017-07-23 Thread Larry Hastings

New submission from Larry Hastings:

I use Linux (Ubuntu GNOME, 17.04, 64-bit) on all my computers, and I use  ZFS 
for the /home partition.  While releasing 3.4.7rc1 and 3.5.4rc1, I encountered 
this test failure:

% ./python -m test test_resource
0:00:00 load avg: 0.40 [1/1] test_resource
test test_resource failed -- Traceback (most recent call last):
  File "/home/larry/src/python/releases/test35/Lib/test/test_resource.py", line 
55, in test_fsize_enforced
f.write(b"X" * 1024)
OSError: [Errno 27] File too large

1 test failed:
test_resource
Tests result: FAILURE

If I run this test on another filesystem (e.g. ext4), with the exact same 
source tree, the test passes.  I also didn't see this failure when releasing 
3.4.6 and 3.5.3 earlier this year.

This is probably caused by new behavior in an recent update to ZFS.  So I'm not 
sure if this is a ZFS bug, and if it is I don't know whether or not we should 
work around it.  But it's hard to imagine ZFS is behaving correctly here.

I've confirmed that this happens in all four branches tagged (3.4 through 3.7). 
 Since it causes test failures, I'm willing to consider accepting a PR for 3.4 
and 3.5.

Serhiy, I've tagged you since you were the last person to touch 
resource.getrlimit and resource.setrlimit.  Are you interested / willing to 
look at this bug?  Do you have a computer with a ZFS filesystem you can use to 
run experiments?

--
assignee: serhiy.storchaka
messages: 298919
nosy: larry, ned.deily, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Test failure in resource module on ZFS
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30999] statistics module: add "key" keyword argument to median, mode, ...

2017-07-23 Thread gerion

New submission from gerion:

With Python 3.4 the statistics module was added. It would be cool, if the 
functions:
median_low()
median_high()
mode()
would have a "key" keyword argument, just like in max() and min():
```
>>> median_low([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0])
(3, 3)
```
This functions always choose a specific element of the list, so a "key" 
argument is meaningful.


Maybe such a parameter makes sense for mean() as well, if the return value 
always is the result itself, but this is another point:
```
>>> mean([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0])
2.6665
```

--
components: Library (Lib)
messages: 298918
nosy: gerion
priority: normal
severity: normal
status: open
title: statistics module: add "key" keyword argument to median, mode, ...
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



[issue30998] faulthandler: Show C stacktrace

2017-07-23 Thread Ammar Askar

Ammar Askar added the comment:

No need to close it off just yet, what I posted was just my opinion. We can 
wait for haypo's expert opinion seeing as he implemented faulthandler. 

Maybe it would be useful to have an option to say always generate a core dump? 
Something like the stuff listed here: 
https://stackoverflow.com/questions/979141/how-to-programmatically-cause-a-core-dump-in-c-c

--

___
Python tracker 

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



[issue30998] faulthandler: Show C stacktrace

2017-07-23 Thread Florian Bruhin

Florian Bruhin added the comment:

Hmm, fair point. I thought I had seen this being used in a SEGV handler in some 
other software I use, but I can't find that anymore - so either I was dreaming, 
or they noticed it was problematic and removed it again.

I'm closing this then. My goal was to get more useful crash reports from users 
(who typically don't want to install/attach gdb and reproduce the bug again, if 
even possible), but I guess my only remaining option is automatically getting 
the stacktrace from "coredumpctl" on the next start, at least on Linux systems 
using systemd...

--
resolution:  -> wont fix

___
Python tracker 

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



[issue30998] faulthandler: Show C stacktrace

2017-07-23 Thread Ammar Askar

Ammar Askar added the comment:

As the faulthandler documentation notes: 

> The fault handler is called on catastrophic cases and therefore can only use 
> signal-safe functions (e.g. it cannot allocate memory on the heap). Because 
> of this limitation traceback dumping is minimal compared to normal Python 
> tracebacks:

This immediately disqualifies glibc's backtrace function as it is explicitly 
marked as AS-Unsafe.

The Windows code you linked also has a heap allocation, it isn't open source 
like backtrace but I'd imagine its implementation is fairly complex underneath.

Overall, adding more complexity especially to a handler dealing with a 
catastrophic failure is generally not a very good idea and it's really not a 
trivial problem to have easy cross platform stack traces. As much as I like 
this idea I don't think implementing is going to be possible and this is one of 
the points where you just have to attach a debugger like gdb for good 
information.

--
nosy: +ammar2

___
Python tracker 

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



[issue30998] faulthandler: Show C stacktrace

2017-07-23 Thread Florian Bruhin

New submission from Florian Bruhin:

While faulthandler's output is already quite useful when dealing with crashes 
in C libraries, it'd be much more useful when it could also show a low-level 
C/C++ stack.

glibc has functions to do that: 
https://www.gnu.org/software/libc/manual/html_node/Backtraces.html

Windows seems to have something similar too: 
https://stackoverflow.com/a/5699483/2085149

--
components: Library (Lib)
messages: 298914
nosy: The Compiler, haypo
priority: normal
severity: normal
status: open
title: faulthandler: Show C stacktrace
type: enhancement

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-23 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2880

___
Python tracker 

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



[issue30993] IDLE: Document, fix, and complete configdialog font tests

2017-07-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

2nd and presumably last PR for this issue: please verify on linux.

--
stage: needs patch -> patch review
title: IDLE: Document and fix configdialog font tests. -> IDLE: Document, fix, 
and complete configdialog font tests

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f

2017-07-23 Thread Larry Hastings

Larry Hastings added the comment:

Quoting from the Python Dev Guide:

"As a guideline, critical and above are usually reserved for crashes, serious 
regressions or breakage of very important APIs. Whether a bug is a release 
blocker is a decision better left to the release manager so, in any doubt, add 
him or her to the nosy list."

--

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f

2017-07-23 Thread Larry Hastings

Larry Hastings added the comment:

I don't see how a fix for a *test* can be considered a *release blocker*.  The 
PR literally doesn't change Python's behavior; it only modifies two text files 
and a test.  There is no crash or exploitable security hole being addressed 
here.

--
priority: release blocker -> normal

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-07-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-07-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I updated the patch for git master. Some cleanup is in order.

--

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-07-23 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +2879

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 5aa3bf041de5ee90ccbfcff103dcf3e54c5af237 by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-30993: IDLE - Improve configdialog font page and tests.  (GH-2818) 
(#2826)
https://github.com/python/cpython/commit/5aa3bf041de5ee90ccbfcff103dcf3e54c5af237


--

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A big issue with changing to tagging individual elements is back compatibility. 
 Besides which, if the font is not bold, I cannot imaging bolding anything 
other than the definition names.  This also seems to venture beyond 'keep IDLE 
simple for beginners'.  How about a new option to just bold definition names?

Factoring out the call to set_samples to one place is a great idea that 
simplifies code and tests.  I did it and the htest dialog worked just fine.  
The tests also passed as were, but need reworking.  I am doing that now.  The 
result will be one FontTest class that tests that each widget sets its var, 
tests that var setting adds changes and calls set_samples, and tests 
set_samples.

--

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-23 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2878

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 07ba305a4c169e017e076e490a173a6f9b95b38e by Terry Jan Reedy in 
branch 'master':
bpo-30993: IDLE - Improve configdialog font page and tests.  (#2818)
https://github.com/python/cpython/commit/07ba305a4c169e017e076e490a173a6f9b95b38e


--

___
Python tracker 

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



[issue30997] TestCase.subTest and expectedFailure

2017-07-23 Thread Louie Lu

Louie Lu added the comment:

I'm successful to add a sub.expectedFailure() to subTest, but in current API, 
it isn't that will done.

First, you will not get any alarm or information that there is a  test been 
treat as "expected failure" at the result text.

Second, it just act like you putting @unittest.expectedFailure at the top of 
the test.

Third, current result didn't put expected failure as a result category, so it 
will not show it at the result if we skip some test in the subTest, and it will 
need to changed to add an expected failure list to handle multiple expected 
failure in a test.

--

___
Python tracker 

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



[issue8450] httplib: false BadStatusLine() raised

2017-07-23 Thread Shoham Peller

Changes by Shoham Peller :


--
pull_requests: +2877

___
Python tracker 

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



[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-23 Thread STINNER Victor

STINNER Victor added the comment:

Why it may be ok to avoid the copy, what is the advantage of applying the
change? The current code is correct.

--
nosy: +haypo

___
Python tracker 

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



[issue25571] Improve the lltrace feature with the Py_Debug mode

2017-07-23 Thread STINNER Victor

STINNER Victor added the comment:

I suggest to wait until sys.settrace() supports bytecode level tracing,
then rewrite lltrace on top of it, open a new issue to remove C lltrace and
close this issue. You need to write to python-dev if you want to remove the
current C lltrace.

--

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2017-07-23 Thread Mandeep Singh

Changes by Mandeep Singh :


--
pull_requests: +2876

___
Python tracker 

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



[issue30997] TestCase.subTest and expectedFailure

2017-07-23 Thread Ronald Oussoren

Ronald Oussoren added the comment:

That's correct, I have a test like:


def test_something(self):

for info in CASES:
   with self.subTest(info):
  self.assert_something(info)

For some values of 'info' the test is known to fail and I want to mark those as 
exptectedFailure somehow and there doesn't appear to be a way to do so right 
now.

I'm currently doing:
with self.subTest(info):
   try:
   ... # actual test

   except:
   if info in KNOWN_FAILURES:
   self.skipTest()
   raise

That suppresses the test failures, but in an unclean way and without getting a 
warning when the testcase starts working again.

I could generate testcases manually the old fashioned way without using 
subTest, but that results in more complicated test code and requires rewriting 
a number of tests.

One possible design for making it possible to mark subTests as known failures 
it to return a value in the subTest context manager that has a method for 
marking the subTest:

 with self.subTest(...) as tc:
if ...:
   tc.expectedFailure(...)
 
... # actual test

I don't know how invasive such a change would be.

--

___
Python tracker 

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



[issue30993] IDLE: Document and fix configdialog font tests.

2017-07-23 Thread Cheryl Sabella

Cheryl Sabella added the comment:

+1 on the Font/Indent name.  And I agree that the indent widget would make more 
sense on the General tab, or another name, like Editor/Shell Preferences.

Another thought I had was Fonts should maybe be part of a Theme.  At the theme 
level (not at the tag level), define font name/font size and then have font 
bold at the tag level.  Spyder has that, so the function names (IDLE tag of 
`definition`) are bolded and the rest aren't.  It's subtle, but I find it 
pleasing to work with because function/class/method names stand out.  That 
would be after everything else though.

Another thought I had with the cycle in fonts:  A wdiget is clicked on, which 
calls the tkinter command callback.  But, the Tk variable is also updated which 
calls the trace function.  Those are the two paths.  What if the trace function 
called set_samples?  Then font_bold and font_size widgets wouldn't need the 
command argument.  I think `opt_menu_highlight_target` does that now because 
the command is commented out.

instead of:
click bold-toggle ~> set font_bold -> var_changed_font
   |
\---> call set_sample

this:
click bold_toggle -> set font_bold -> var_changed_font -> set_sample

--

___
Python tracker 

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



[issue30995] Support logging.getLogger(style='{')

2017-07-23 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue26692] cgroups support in multiprocessing

2017-07-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Agreed that it is not possible for multiprocessing to choose an optimal default 
in all settings.  However, making the default adequate for more use cases 
sounds like a reasonable goal.

Currently, we are using `os.cpu_count()`. Ideally, we would have a second API 
`os.usable_cpu_count()` that would return the number of logical CPUs usable by 
the current process (taking into account affinity settings, cgroups, etc.).

--

___
Python tracker 

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



[issue28382] Possible deadlock on sys.stdout/stderr when combining multiprocessing with threads

2017-07-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Also, a reliable fix is to use the "forkserver" (or "spawn", but it is much 
slower) method:
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

--

___
Python tracker 

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



[issue30997] TestCase.subTest and expectedFailure

2017-07-23 Thread Louie Lu

Louie Lu added the comment:

There is a mailing-list discusss this before:

https://mail.python.org/pipermail/python-list/2016-June/710575.html


But after checking, current subTest contextmanager won't yield subtest, so the 
method of with self.subTest() as sub won't work.

Another problem is, inside the subTest, if there have expectfailed, it will 
raise _ShouldStop, causing the after test won't run it.

--

___
Python tracker 

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



[issue30997] TestCase.subTest and expectedFailure

2017-07-23 Thread Louie Lu

Louie Lu added the comment:

So for example:


for i in range(10):
with self.subTest(i=i):
DoSomething(i)

we have some platform specific in i=8, i=9, and you want to labeled as 
expectedFailure. Do I miss something?

--
nosy: +louielu

___
Python tracker 

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



[issue30919] Shared Array Memory Allocation Regression

2017-07-23 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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



[issue30919] Shared Array Memory Allocation Regression

2017-07-23 Thread Antoine Pitrou

Antoine Pitrou added the comment:


New changeset 3051f0b78e53d1b771b49375dc139ca13f9fd76e by Antoine Pitrou in 
branch 'master':
bpo-30919: shared memory allocation performance regression in multiprocessing 
(#2708)
https://github.com/python/cpython/commit/3051f0b78e53d1b771b49375dc139ca13f9fd76e


--

___
Python tracker 

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



[issue29902] copy breaks staticmethod

2017-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But I think it is worth to add a check and emit a deprecation warning in Py3k 
mode in 2.7. 2.7 has longer support term than 3.5. And since it is less 
compatible with 3.6, it is harder to use 3.6 for testing 2.7 programs.

--
stage:  -> patch review

___
Python tracker 

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



[issue29902] copy breaks staticmethod

2017-07-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2875

___
Python tracker 

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



[issue30997] TestCase.subTest and expectedFailure

2017-07-23 Thread Ronald Oussoren

New submission from Ronald Oussoren:

It would be nice if there were a way to mark a TestCase.subTest as an expected 
failure.

I have a number of testcases that use the subTest feature and where a small 
subset of those tests are expected failures due to platform issues. It would be 
nice if it were possible to mark those tests as such. 

I'm currently using self.skipTest() to mark these subTests as special, but 
that's less than ideal.

--
components: Library (Lib)
messages: 298895
nosy: ezio.melotti, michael.foord, rbcollins, ronaldoussoren
priority: low
severity: normal
status: open
title: TestCase.subTest and expectedFailure
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



[issue30996] add coroutine AbstractEventLoop.sock_close

2017-07-23 Thread Fengyuan Chen

New submission from Fengyuan Chen:

I suppose asyncio lack async version of sock_close that can call 
loop.remove_reader and others before close socket and perhaps lack something 
like coroutine AbstractEventLoop.sock_make_blocking that can do some deregister 
job.

switch constant in the script:
* change CALL_REMOVE_READING_BEFORE_CLOSE to True will make script running 
smoothly
* change USE_UVLOOP to True will make script use uvloop

--
components: asyncio
files: asyncio_wait_forever.py
messages: 298894
nosy: cfy, yselivanov
priority: normal
severity: normal
status: open
title: add coroutine AbstractEventLoop.sock_close
type: resource usage
versions: Python 3.6
Added file: http://bugs.python.org/file47034/asyncio_wait_forever.py

___
Python tracker 

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



[issue19903] Idle: Use inspect.signature for calltips

2017-07-23 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +2874

___
Python tracker 

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



[issue26579] Support pickling slots in subclasses of common classes

2017-07-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +haypo, r.david.murray
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue26579] Support pickling slots in subclasses of common classes

2017-07-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2873

___
Python tracker 

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



[issue26692] cgroups support in multiprocessing

2017-07-23 Thread Charles-François Natali

Charles-François Natali added the comment:

I'm not convinced.
The reason is that using the number of CPU cores is just a heuristic
for a *default value*: the API allows the user to specify the number
of workers to use, so it's not really a limitation.

The problem is that if you try to think about a more "correct" default
value, it gets complicated: here, it's about cgroups, but for example:
- What if they are multiple processes running on the same box?
- What if the process is subject to CPU affinity? Currently, the CPU
affinity mask is ignored.
- What if the code being executed by children is itself multi-threaded
(maybe because it's using a numerical library using BLAS etc)?
- What about hyper-threading? If the code has a lot of cache misses,
it would probably be a good idea to use one worker per logical thread,
but if it's cache-friendly, probably not.
- Etc.

In other words, I think that there's simply not reasonable default
value for the number of workers to use, that any value will make some
class of users/use-case unhappy, and it would add a lot of unnecessary
complexity.

Since the user can always specify the number of workers - if you find
a place where it's not possible, then please report it - I really
think we should let the choice/burden up to the user.

--

___
Python tracker 

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client (CVE-2016-5699)

2017-07-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +benjamin.peterson, larry
priority: normal -> release blocker

___
Python tracker 

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



[issue29902] copy breaks staticmethod

2017-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have decided to not merge these changes in 3.5. They help to avoid 
programmatic errors, but have a non-zero chance of breaking programs that work 
by accidence. Since this is the last non-secure bugfix we will not have a 
chance to rollback these changes.

An alternative to these changes is testing a program with Python 3.6.

--
versions:  -Python 3.5

___
Python tracker 

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



[issue26367] importlib.__import__ does not fail for invalid relative import

2017-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in 
branch '3.5':
[3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677)
https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-23 Thread Kevin williams

Changes by Kevin williams :


--
nosy:  -Nir Soffer, giampaolo.rodola, haypo

___
Python tracker 

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



[issue30876] SystemError on importing module from unloaded package

2017-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in 
branch '3.5':
[3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677)
https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae


--

___
Python tracker 

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



[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2017-07-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c824cc8426a16dd9f3949a3ed135523d37787bae by Serhiy Storchaka in 
branch '3.5':
[3.5] Backport bpo-30876 (GH-2639), bpo-18018 and bpo-26367. (#2677)
https://github.com/python/cpython/commit/c824cc8426a16dd9f3949a3ed135523d37787bae


--
nosy: +serhiy.storchaka

___
Python tracker 

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