[issue34086] logging.Handler.handleError regressed in python3

2018-07-31 Thread Vinay Sajip


Change by Vinay Sajip :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-07-31 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Moving the scrollwheel in either direction scrolls down, so I have to use the 
scrollbar once stuck on the bottom of the file.  (The Macbook has no PageUp 
key.)  For me, this is the most obnoxious bug.  Tomorrow, I will add prints to 
the scroll event handling code to see what is being generated.

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you! Adding update worked for calltip_w.  Adding update to tooltip and 
copying
   tw.lift()  # work around bug in Tk 8.5.18+ (issue #24570)
from calltip worked for tooltip.  (It seems the bug is still present. ;-)  I 
will either patch these files directly or modify the patch for #33839 tomorrow.

--

___
Python tracker 

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



[issue34304] clarification on escaping \d in regular expressions

2018-07-31 Thread Saba Kauser


New submission from Saba Kauser :

Hello,

I have a program that works well upto python 3.6 but fails with python 3.7.

import re

pattern="DBMS_NAME: string(%d) %s"
sym = ['\[','\]','\(','\)']
for chr in sym:
  pattern = re.sub(chr, '\\' + chr, pattern)
  print(pattern)
  
pattern=re.sub('%s','.*?',pattern)
print(pattern)
pattern = re.sub('%d', '\\d+', pattern) 
print(pattern)
result=re.match(pattern, "DBMS_NAME: string(8) \"DB2/NT64\" ")
print(result)
result=re.match("DBMS_NAME python4: string\(\d+\) .*?", "DBMS_NAME python4: 
string(8) \"DB2/NT64\" ")
print(result)

expected output:
DBMS_NAME: string(%d) %s
DBMS_NAME: string(%d) %s
DBMS_NAME: string\(%d) %s
DBMS_NAME: string\(%d\) %s
DBMS_NAME: string\(%d\) .*?
DBMS_NAME: string\(\d+\) .*?



However, the below statement execution fails with python 3.7:
pattern = re.sub('%d', '\\d+', pattern) 

DBMS_NAME: string(%d) %s
DBMS_NAME: string(%d) %s
DBMS_NAME: string\(%d) %s
DBMS_NAME: string\(%d\) %s
DBMS_NAME: string\(%d\) .*?
Traceback (most recent call last):
  File 
"c:\users\skauser\appdata\local\programs\python\python37\lib\sre_parse.py", 
line 1021, in parse_template
this = chr(ESCAPES[this][1])
KeyError: '\\d'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pattern.txt", line 11, in 
pattern = re.sub('%d', '\\d+', pattern)
  File "c:\users\skauser\appdata\local\programs\python\python37\lib\re.py", 
line 192, in sub
return _compile(pattern, flags).sub(repl, string, count)
  File "c:\users\skauser\appdata\local\programs\python\python37\lib\re.py", 
line 309, in _subx
template = _compile_repl(template, pattern)
  File "c:\users\skauser\appdata\local\programs\python\python37\lib\re.py", 
line 300, in _compile_repl
return sre_parse.parse_template(repl, pattern)
  File 
"c:\users\skauser\appdata\local\programs\python\python37\lib\sre_parse.py", 
line 1024, in parse_template
raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \d at position 0

if I change the statement to have 3 backslash like 
pattern = re.sub('%d', '\\\d+', pattern) 

I can correctly generate correct regular expression.

Can you please comment if this has changed in python 3.7 and we need to escape 
'd' in '\d' as well ?

Thank you!

--
components: Regular Expressions
messages: 322842
nosy: ezio.melotti, mrabarnett, sabakauser
priority: normal
severity: normal
status: open
title: clarification on escaping \d in regular expressions
type: behavior
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



[issue34303] micro-optimizations in functools.reduce()

2018-07-31 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue34303] micro-optimizations in functools.reduce()

2018-07-31 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

`PyTuple_SetItem()` can be replaced with macro version and `PyObject_Call()` 
can be used instead of `PyEval_CallObject()`.

Here's benchmark results:

$ python -m perf timeit --compare-to ~/tmp/cpython-master-venv/bin/python -s 
"from functools import reduce; from operator import is_; r = range(5)" 
"reduce(is_, r)"
/home/sergey/tmp/cpython-master-venv/bin/python: . 1.64 ms 
+- 0.01 ms
/home/sergey/tmp/cpython-venv/bin/python: . 1.40 ms +- 0.00 
ms

Mean +- std dev: [/home/sergey/tmp/cpython-master-venv/bin/python] 1.64 ms +- 
0.01 ms -> [/home/sergey/tmp/cpython-venv/bin/python] 1.40 ms +- 0.00 ms: 1.17x 
faster (-15%)

--
components: Extension Modules
messages: 322841
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: micro-optimizations in functools.reduce()
type: enhancement

___
Python tracker 

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



[issue34269] logging in 3.7 behaves different due to caching

2018-07-31 Thread Vinay Sajip


Vinay Sajip  added the comment:

> But, seems like one has no public api to reinitialize logging to a like-fresh 
> state

For the use case of testing, you could use a context manager approach as 
described here in the logging cookbook:

https://docs.python.org/3/howto/logging-cookbook.html#using-a-context-manager-for-selective-logging

The approach outlined can be built on to add more convenience according to the 
specifics of your use case.

In this way, you can restore logging to "the state in which you found it" which 
is a potentially more useful thing than just clearing out everything.

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

___
Python tracker 

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



[issue25095] test_httpservers hangs since Python 3.5

2018-07-31 Thread Martin Panter


Martin Panter  added the comment:

I reproduced the problem on a Windows computer, and now understand why my 
"Content-Length: 0" suggestion isn't good enough on its own. It does solve the 
initial deadlock, but there is a further deadlock. The main thread is waiting 
for the server to shut down while it is holding the HTTP connection open, and 
the server is still trying to read a second request on that connection.

Setting "self.close_connection = True" in the server (or using "Connection: 
close") solves both deadlocks. But it seems cleaner for the client to close the 
connection and response objects anyway, before shutting down the server. I 
would modify the "test_get" method:

with support.captured_stderr() as err:
self.con.request('GET', '/')
res = self.con.getresponse()
res.close()  # Not needed but cleans up socket if no Content-Length
self.con.close()  # Needed to shut down connection with Content-Length

I think my Windows computer has a firewall that holds TCP data if it looks like 
an unfinished HTTP request or response. I suspect Terry and William had a 
similar firewall. Here is a demonstration of the socket behaviour it causes:

>>> from socket import *
>>> listener = socket()
>>> listener.bind(("127.1", 0))
>>> listener.listen()
>>> outgoing = create_connection(listener.getsockname())
>>> [incoming, address] = listener.accept()
>>> outgoing.sendall(b"GET / HTTP/1.1\r\n")  # Unfinished HTTP request
>>> incoming.settimeout(3)
>>> incoming.recv(300)  # Partial request should normally be received
Traceback (most recent call last):
  File "", line 1, in 
socket.timeout: timed out
>>> outgoing.sendall(b"\r\n")  # Complete the request
>>> incoming.recv(300)  # Only now is the request received
b'GET / HTTP/1.1\r\n\r\n'
>>> incoming.sendall(b"HTTP/1.1 200 OK\r\n")  # Unfinished response
>>> outgoing.settimeout(3)
>>> outgoing.recv(300)  # Should normally be received
Traceback (most recent call last):
  File "", line 1, in 
socket.timeout: timed out
>>> incoming.sendall(b"Content-Length: 0\r\n\r\n")  # Complete the response
>>> outgoing.recv(300)  # Only now received
b'HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n'

--

___
Python tracker 

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



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread INADA Naoki


INADA Naoki  added the comment:

FYI, _lsprof uses PyObject_Call()
https://github.com/python/cpython/blob/ea68d83933e6de6cabfb115ec1b301947369/Modules/_lsprof.c#L120-L123

If PyObject_Call() trigger profiler, lsprof should avoid recursion.

--

___
Python tracker 

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



[issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS

2018-07-31 Thread Kevin Walzer


Kevin Walzer  added the comment:

Removing the call "self.grab_set" in configdialog.py (line 87 or so) and 
help_about.py (line 47 or so) appears to fix the problem with the main window 
freezing when the modal dialog is destroyed on macOS. "Grab" has never worked 
properly on Tk on the Mac, but it has additional problems in the Cocoa 
implementation of Tk; it causes all kinds of problems with the event loop and 
is best avoided altogether. If the call to grab is crucial on other platforms, 
it can be wrapped in a call to "tk windowingsystem ne aqua" to exclude the Mac. 
If other modal dialogs present similar behavior on the Mac, look for calls to 
grab and try omitting that call. I'll leave it to someone else to propose a 
thorough patch, but this should point you in the right direction.

--

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Kevin Walzer


Kevin Walzer  added the comment:

With the attached patch, the calltip now displays in the test in calltips_w.py 
on macOS. As I suspected, a judicious call to "update" forces the event loop to 
cycle on macOS. It should be harmless on other platforms, but if it causes some 
sort of performance slowdown, it can be wrapped in a call to "tk 
windowingsystem" eq "aqua" (not sure how to implement that in this module) so 
it only runs on the Mac. I also removed the platform call to "MacWindowStyle" 
as it is no longer needed on recent versions of the Mac.

--
keywords: +patch
Added file: https://bugs.python.org/file47725/calltip_w.diff

___
Python tracker 

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



[issue34298] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Seonggi Kim


Seonggi Kim  added the comment:

Request PR again : https://bugs.python.org/issue34302

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



[issue34302] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread ksg97031


New submission from ksg97031 :

Source base : heads/master:b75d7e2435, Aug  1 2018, 10:32:28

$ cat test.py
import timeit

queue_setup = '''
from collections import deque
q = deque()
start = 10**5
stop = start + 500
for i in range(0, stop):
q.append(i)
'''

code = '''
index = q.index(30, 1, stop)
assert index == 30
'''
code2 = '''
index = q.index((start >> 1) + 1, start >> 1, stop >> 1)
assert index == (start >> 1) + 1
'''
code3 = '''
index = q.index(start + 1, start, stop)
assert index == start + 1
'''

repeat = 10
print(timeit.timeit(setup = queue_setup, stmt = code, number = repeat * 20))
print(timeit.timeit(setup = queue_setup, stmt = code2, number = repeat))
print(timeit.timeit(setup = queue_setup, stmt = code3, number = repeat))

$ ./python_cur.exe test.py
2.154346022
2.899595406
5.265440983

$ ./python_ksg.exe test.py
2.145782732002
0.717190736
1.993419697999

--

--
components: Library (Lib)
messages: 322834
nosy: ksg97031, rhettinger
priority: normal
severity: normal
status: open
title: Avoid inefficient way to find start point in deque.index
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread ppperry


ppperry  added the comment:

issue30990 is related

--
nosy: +ppperry

___
Python tracker 

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



[issue34298] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Seonggi Kim


Seonggi Kim  added the comment:

Base commit : Python 3.8.0a0 (heads/master:b75d7e2435, Aug  1 2018, 10:32:28)

$ test.py
import timeit

queue_setup = '''
from collections import deque
q = deque()
start = 10**5
stop = start + 500
for i in range(0, stop):
q.append(i)
'''

code = '''
index = q.index(30, 1, stop)
assert index == 30
'''
code2 = '''
index = q.index((start >> 1) + 1, start >> 1, stop >> 1)
assert index == (start >> 1) + 1
'''
code3 = '''
index = q.index(start + 1, start, stop)
assert index == start + 1
'''

repeat = 10
print(timeit.timeit(setup = queue_setup, stmt = code, number = repeat * 20))
print(timeit.timeit(setup = queue_setup, stmt = code2, number = repeat))
print(timeit.timeit(setup = queue_setup, stmt = code3, number = repeat))
$ ./python_cur.exe test.py
2.154346022
2.899595406
5.265440983

$ ./python_ksg.exe test.py
2.145782732002
0.717190736
1.993419697999

--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9851227382431a40a138fdff994278d9e7743c74 by Victor Stinner in 
branch 'master':
bpo-34170: Rename _PyCoreConfig.unbuffered_stdip (GH-8594)
https://github.com/python/cpython/commit/9851227382431a40a138fdff994278d9e7743c74


--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ea68d83933e6de6cabfb115ec1b301947369 by Victor Stinner in 
branch 'master':
bpo-34170: _PyCoreConfig_Read() defaults to argc=0 (GH-8595)
https://github.com/python/cpython/commit/ea68d83933e6de6cabfb115ec1b301947369


--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a4d20b2e5ece2120f129cb4dda951a6c2461e92d by Victor Stinner in 
branch 'master':
bpo-34170: Py_Main() updates config when setting Py_InspectFlag (GH-8593)
https://github.com/python/cpython/commit/a4d20b2e5ece2120f129cb4dda951a6c2461e92d


--

___
Python tracker 

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



[issue33499] Environment variable to set alternate location for pycache tree

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8106

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8105

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8104

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b75d7e243512afcfb2285e6471262478383e09db by Victor Stinner in 
branch 'master':
bpo-34170: Add _PyCoreConfig._frozen parameter (GH-8591)
https://github.com/python/cpython/commit/b75d7e243512afcfb2285e6471262478383e09db


--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8103

___
Python tracker 

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



[issue34301] Add _PyInterpreterState_Get() helper function

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34301] Add _PyInterpreterState_Get() helper function

2018-07-31 Thread STINNER Victor


New submission from STINNER Victor :

Add _PyInterpreterState_Get() helper function: IMHO it's more explicit to call 
_PyInterpreterState_Get() than having to write PyThreadState_GET()->interp or 
PyThreadState_Get()->interp.

--
components: Interpreter Core
messages: 322827
nosy: eric.snow, vstinner
priority: normal
severity: normal
status: open
title: Add _PyInterpreterState_Get() helper function
versions: Python 3.8

___
Python tracker 

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



[issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file

2018-07-31 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

On 10.13.6 with 3.7.0, 'python3 -m idlelib.configdialog' in bash terminal runs 
configdialog unittests and brings up a human-verified test (htest) driver box 
with a ttk scrollbar whose slider does not stick.  I has a dead zone beneath or 
above, but I wonder if this has anything to do with the portion of the file 
already visible.

Kevin, tk_scroll(2).py are failed attempts at simplified reproducers.  Now that 
I have a Mac running, I will try again.

--

___
Python tracker 

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



[issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS

2018-07-31 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As with the tooltip modules (see #34275, msg322824), the dialog modules all 
have run-when-main test functions.  Unittests are also run, before the 
human-verified test.

python3 -m idlelib.searchbases fails in that the driver-box is not activated 
(lighted) when the searchbase box is closed.
Replace 'searchbase' with 'search', 'replace', or 'grep' which text subclasses 
of Searchbase, and an intermediate lighted window with a Text widget and 2nd 
button appear.  (For the grep test, click the window and maybe type something 
to put focus on the text.)  Click the button to get the dialog.  Close it.  The 
text window does not get lighted.  It does on Windows.  (There are other 
glitches on Windows that do not appear in IDLE itself).

Reproducing the 'wrong' text window being activated will require something new 
with two Toplevel text windows.

--

___
Python tracker 

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



[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8101

___
Python tracker 

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



[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2018-07-31 Thread Ionut Turturica


Change by Ionut Turturica :


--
nosy: +jonozzz

___
Python tracker 

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



[issue28695] Add SSL_CTX_set_client_cert_engine

2018-07-31 Thread Bryan Hunt


Change by Bryan Hunt :


--
nosy: +bryguy

___
Python tracker 

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



[issue34275] Problems with tkinter and tk8.6 on MacOS

2018-07-31 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

IDLE currently uses tooltips only for calltips describing a function's call 
signature.  Within Lib/idlelib:
calltip.py (renamed from calltips.py after the 3.7.0/3.6.6 release) has the 
logic for when to raise one and its content.
calltip_w.py (which I intend to merge into calltip.py) has the code for the 
calltip itself and its closing.

Issue #1529353 and PR7626) proposes a second use of tooltips. I would also like 
to add helptips to some dialog fields and if possible, some menu entries.

tooltip.py has simple generic tooltip code.  calltip_w does not import this but 
says in its docstring 'after tooltip.py'. Since tooltip is not currently used 
anywhere in IDLE, I have considered removing it.

Issue #33839 and PR7683 instead propose to upgrade tooltip and refactor 
calltip_w to import and use tooltip.  I have held off merging the PR because of 
tooltips not working on Mac.  But I need to do so soon to unblock the issue 
above and possible other enchancements.

Both tooltip and calltip_w have run-when-main test functions that work on 
Windows (and I presume Linux) but fail on 10.13.6 with 3.7.0.  The tooltip test 
is simpler in that it does not involve any truly IDLE-specific code.  The 
calltip_w test does not involve calltip.  Both use IDLE's human-verification 
test driver that provides a root window with test instructions.  In the bash 
terminal, run
python3 -m idlelib.tooltip
python3 -m idlelib.calltip_w

Kevin, I would be very appreciative if you can suggest a tweak that makes 
tooltips work everywhere.

--

___
Python tracker 

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



[issue34211] Cygwin build broken due to use of _Type in static declaration in _abc module

2018-07-31 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

For those who are not very aware of Cygwin issues: what is wrong with

PyVarObject_HEAD_INIT(_Type, 0);

--
nosy: +jdemeyer

___
Python tracker 

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



[issue34299] argparse description formatting

2018-07-31 Thread Phillip M. Feldman


Phillip M. Feldman  added the comment:

That works.  Thanks!

I think that this boils down to a documentation issue.  The following says
that the default behavior is to line-wrap the help messages.  At least to
me, this doesn't imply that whitespace is getting eaten.

RawDescriptionHelpFormatter

and RawTextHelpFormatter

give more control over how textual descriptions are displayed. By default,
ArgumentParser

objects line-wrap the description
 and epilog
 texts in
command-line help messages:

On Tue, Jul 31, 2018 at 12:43 PM, Zsolt Cserna 
wrote:

>
> Zsolt Cserna  added the comment:
>
> You would need to use the RawTextHelpFormatter as format_class for the
> constructor. In this case, argparse will apply no re-wrapping of the
> description.
>
> import argparse
>
> parser = argparse.ArgumentParser(description="""foo
> bar
> baz""", formatter_class=argparse.RawTextHelpFormatter)
>
> --
> nosy: +csernazs
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue34286] lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0)

2018-07-31 Thread Berker Peksag


Change by Berker Peksag :


--
assignee:  -> berker.peksag
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread Zsolt Cserna


Zsolt Cserna  added the comment:

Alright, I created a PR for this. We will see if this can be merged to upstream 
or not.

--

___
Python tracker 

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



[issue29400] Add instruction level tracing via sys.settrace

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> rejected

___
Python tracker 

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



[issue34113] LLTRACE segv

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Constantin Petrisor to fix and thanks Andrew Valencia for the bug report!

It was the first time that I see a bug report on LLTRACE on the last 5 years, 
it seems like almost no one uses it. Likely because you need to compile Python 
manually (or find a binary compiled in debug mode). So I don't think that it's 
worth it to backport the fix to 2.7, 3.6 and 3.7 branches. I'm not comfortable 
to modify ceval.c in stable branches.

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread Zsolt Cserna


Change by Zsolt Cserna :


--
pull_requests: +8100
stage:  -> patch review

___
Python tracker 

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



[issue34113] LLTRACE segv

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8ed317f1ca42a43df14282bbc3ccc0b5610432f4 by Victor Stinner 
(costypetrisor) in branch 'master':
bpo-34113: Fix a crash when using LLTRACE is on (GH-8517)
https://github.com/python/cpython/commit/8ed317f1ca42a43df14282bbc3ccc0b5610432f4


--

___
Python tracker 

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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

>> Is it really important to accept integral float?

> Possibly not, but acceptance of integral floats is deliberate, by-design, 
> tested behaviour, so it at least deserves a deprecation period if we're going 
> to get rid of it.

Ok. Let's keep it in that case ;-)

I also approved Pablo's PR.

--

___
Python tracker 

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



[issue34113] LLTRACE segv

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

By the way, see also bpo-25571.

--
nosy: +vstinner

___
Python tracker 

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



[issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc

2018-07-31 Thread Piotr Dobrogost


Change by Piotr Dobrogost :


--
nosy: +piotr.dobrogost

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread sds


sds  added the comment:

thanks for the patch.
alas, I do not build python myself, so I cannot try it.

--

___
Python tracker 

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



[issue34248] dbm errors should contain file names

2018-07-31 Thread Zsolt Cserna


Zsolt Cserna  added the comment:

I've made a patch which works for me.

>>> dbm.gnu.open("/tmp/z")
Traceback (most recent call last):
  File "", line 1, in 
_gdbm.error: [Errno 2] No such file or directory: '/tmp/z'
>>> 


Could you please give it a try?

--
keywords: +patch
nosy: +csernazs
Added file: https://bugs.python.org/file47724/patch.diff

___
Python tracker 

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



[issue33089] Add multi-dimensional Euclidean distance function to the math module

2018-07-31 Thread Mark Dickinson


Mark Dickinson  added the comment:

For the record, let me register my objection here. I'm not convinced by adding 
math.dist, and am surprised that this was committed. Almost all the discussion 
in this issue was about adding multi-argument hypot, which seems like an 
obviously useful building block. dist seems like a specialised function, and I 
don't think it belongs in the math module.

--

___
Python tracker 

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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-07-31 Thread Mark Dickinson


Mark Dickinson  added the comment:

[Victor]

> Is it really important to accept integral float?

Possibly not, but acceptance of integral floats is deliberate, by-design, 
tested behaviour, so it at least deserves a deprecation period if we're going 
to get rid of it. (I'm -0.0 on such a deprecation - it doesn't seem worth the 
code churn and the possible breakage.)

If we want to consider deprecation, please let's open a new issue for that. 
Then this one can be closed when Pablo's PR is merged.

Pablo's changes LGTM; I've added my approval to the PR.

--

___
Python tracker 

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



[issue34300] gcc 7.3 causes a warning when compiling getpath.c in python 2.7

2018-07-31 Thread tzickel


tzickel  added the comment:

Changing Py_FatalError prototype to add: __attribute__((noreturn)) also stops 
the warning.

--

___
Python tracker 

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



[issue34299] argparse description formatting

2018-07-31 Thread Zsolt Cserna


Zsolt Cserna  added the comment:

You would need to use the RawTextHelpFormatter as format_class for the 
constructor. In this case, argparse will apply no re-wrapping of the 
description.

import argparse

parser = argparse.ArgumentParser(description="""foo
bar
baz""", formatter_class=argparse.RawTextHelpFormatter)

--
nosy: +csernazs

___
Python tracker 

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



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I always assumed that enabling profiling only from the Python bytecode 
interpreter was a deliberate choice.

--
nosy: +jdemeyer

___
Python tracker 

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



[issue34300] gcc 7.3 causes a warning when compiling getpath.c in python 2.7

2018-07-31 Thread tzickel


New submission from tzickel :

When compiling on ubuntu 18.04 the 2.7 branch, I get this warning:

gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE 
-DPYTHONPATH='":plat-linux2:lib-tk:lib-old"' \
-DPREFIX='"/usr/local"' \
-DEXEC_PREFIX='"/usr/local"' \
-DVERSION='"2.7"' \
-DVPATH='""' \
-o Modules/getpath.o ./Modules/getpath.c
In file included from /usr/include/string.h:494:0,
 from Include/Python.h:38,
 from ./Modules/getpath.c:3:
In function 'strncpy',
inlined from 'joinpath' at ./Modules/getpath.c:202:5,
inlined from 'search_for_prefix' at ./Modules/getpath.c:265:9,
inlined from 'calculate_path' at ./Modules/getpath.c:505:8:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: 
'__builtin_strncpy': specified size between 9223372036854779906 and 
18446744073709551615 exceeds maximum object size
9223372036854775807 [-Wstringop-overflow=]
   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
  ^~

I think it's because the compiler can't reason that Py_FatalError aborts the 
program, and thus not overflow strncpy.

Since there are about 3-4 warnings while building, maybe we should add a manual 
return after Py_FatalError in joinpath ?

--
components: Build
messages: 322809
nosy: tzickel
priority: normal
severity: normal
status: open
title: gcc 7.3 causes a warning when compiling getpath.c in python 2.7
versions: Python 2.7

___
Python tracker 

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



[issue34299] argparse description formatting

2018-07-31 Thread Phillip M. Feldman


New submission from Phillip M. Feldman :

With `argparse`, I'm providing a triple-quoted string via the `description` 
argument of the constructor.  When I invoke the script with the -h or --help 
argument, all formatting in the triple-quoted string is lost, i.e., all 
paragraphs are run together into one giant paragraph, and the result is rather 
hard to read.

Phillip M. Feldman

--
components: Library (Lib)
messages: 322808
nosy: phillip.m.feld...@gmail.com
priority: normal
severity: normal
status: open
title: argparse description formatting
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue34286] lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0)

2018-07-31 Thread Brett Cannon


Brett Cannon  added the comment:

Could be related to https://bugs.python.org/issue21446 .

--
nosy: +berker.peksag

___
Python tracker 

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



[issue34269] logging in 3.7 behaves different due to caching

2018-07-31 Thread Thomas Waldmann


Thomas Waldmann  added the comment:

I agree that we should not dig that deep into logging internals and clear that 
dict from borg code.

But, seems like one has no public api to reinitialize logging to a like-fresh 
state, right? So maybe THAT is the real problem.

Add some .reset() method to do that?

BTW, removing that .clear() from our code made our tests work again. I am not 
sure why that was added in the first place as I could not find regressions 
after removing it.

--

___
Python tracker 

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



[issue34007] test_gdb fails in s390x SLES buildbots

2018-07-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

New failure on s390x SLES 3.7: 

https://buildbot.python.org/all/#/builders/122/builds/540

--

___
Python tracker 

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



[issue34203] documentation: recommend Python 3 over 2 in faq

2018-07-31 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34298] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Please run some timings to show whether the improvement is significant.  Also, 
please sign a CLA.

--
components: +Library (Lib) -Extension Modules
nosy: +rhettinger
versions:  -Python 2.7, 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



[issue34298] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Seonggi Kim


Change by Seonggi Kim :


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

___
Python tracker 

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



[issue34298] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Seonggi Kim


Change by Seonggi Kim :


--
components: Extension Modules
nosy: hacksg
priority: normal
severity: normal
status: open
title: Avoid inefficient way to find start point in deque.index
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34295] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

OP closed the PR.

--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7, 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



[issue34297] Windows py.exe launcher fail to handle quote correctly

2018-07-31 Thread Francois Godin


Change by Francois Godin :


--
type:  -> behavior
versions: +Python 2.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



[issue34297] Windows py.exe launcher fail to handle quote correctly

2018-07-31 Thread Francois Godin


New submission from Francois Godin :

Using double quote around the version argument will cause a failure.

Ex (failure): "py.exe" "-3" "test.py" 
=> run_child: about to run '3" "...\python.exe" "test.py"'
=> ...\python.exe: can't open file '3 test.py': [Errno 22] Invalid argument

Removing the double quote give (success): "py.exe" -3 "test.py" => run_child: 
about to run '"...\python.exe" "test.py"'

This is mainly problematic when a library or a tool want to be simpler and 
simply add double quotes around every parameters. This is impossible to do with 
the python launcher.

The issue seems to come from the PC/launcher.c file. It is the following line 
in the function process (around line 1622): command += wcslen(p);

This line is suppose to skip the -3 in the command line so that the rest can be 
given to python as-is. The problem is that while command come from 
GetCommandLineW and thus contain quote, p come from __wargv and does not 
contain the double quote. Thus, the 2 characters "- are skipped instead of -3.

--
components: Demos and Tools, Distutils, Windows
messages: 322802
nosy: copelnug, dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: Windows py.exe launcher fail to handle quote correctly
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34295] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Can you run some timings to show the difference.  Also, you need to sign a CLA.

--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue34296] Speed up python startup by pre-warming the vm

2018-07-31 Thread Cyker Way


New submission from Cyker Way :

I'm currently writing some shell tools with python3. While python can 
definitely do the job succinctly, there is one problem which made me feel I 
might have to switch to other languages or even pure bash scripts: python 
startup time.

Shell tools are used very often, interactively. users do feel the lag when they 
hit enter after their command. i did 2 implementations in both python and pure 
bash, python takes about 500ms to run while bash is more than 10 times faster.

I'm not saying bash is better than python, but for this task bash, or even 
perl, is a better choice. however, i think there is an easy way to improve 
python as i believe the lag is mostly due to its slow startup: pre-warm its vm. 

I can think of 2 scenarios for python to do a better shell job:

1.  Run a universal python as a daemon, which reads scripts from a socket, runs 
it, and returns the result to a socket. Because it's running as a daemon, the 
startup time is avoided each time user runs a script.

2.  Warm a python zygote during system boot. Every time a python script is run, 
fork from the zygote instead of cold-boot the vm. this is a similar approach to 
android zygote.

I haven't done experiments to see whether there will be obstacles in 
implementing these scenarios. But I think this should become a priority because 
it's real and tangible, and other people may face the slow startup problem as 
well. If there's ongoing work on these, I'd be happy to have a look. But I 
don't think these scenarios have already been put into released versions of 
python.

--
components: Interpreter Core
messages: 322800
nosy: cykerway
priority: normal
severity: normal
status: open
title: Speed up python startup by pre-warming the vm
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34295] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Seonggi Kim


Change by Seonggi Kim :


--
components: +Extension Modules -ctypes

___
Python tracker 

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



[issue34295] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Seonggi Kim


Change by Seonggi Kim :


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

___
Python tracker 

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



[issue34295] Avoid inefficient way to find start point in deque.index

2018-07-31 Thread Seonggi Kim


Change by Seonggi Kim :


--
components: ctypes
nosy: hacksg
priority: normal
severity: normal
status: open
title: Avoid inefficient way to find start point in deque.index
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34294] re.finditer and lookahead bug

2018-07-31 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

➜  cpython git:(70d56fb525) ✗ ./python.exe
Python 3.7.0a2+ (tags/v3.7.0a2-341-g70d56fb525:70d56fb525, Jul 31 2018, 
21:58:10)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
➜  cpython git:(70d56fb525) ✗ ./python.exe -c 'import re; print([m.groupdict() 
for m in re.finditer(r"(?=<(?P\w+)/?>(?:(?P.+?))?)", 
"")])'
[{'tag': 'test', 'text': ''}, {'tag': 'foo2', 'text': ''}]


➜  cpython git:(e69fbb6a56) ✗ ./python.exe
Python 3.7.0a2+ (tags/v3.7.0a2-340-ge69fbb6a56:e69fbb6a56, Jul 31 2018, 
22:12:06)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
➜  cpython git:(e69fbb6a56) ✗ ./python.exe -c 'import re; print([m.groupdict() 
for m in re.finditer(r"(?=<(?P\w+)/?>(?:(?P.+?))?)", 
"")])'
[{'tag': 'test', 'text': ''}, {'tag': 'foo2', 'text': None}]

Does this have something to do with 
70d56fb52582d9d3f7c00860d6e90570c6259371(bpo-25054, bpo-1647489) ?


Thanks

--

___
Python tracker 

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



[issue33729] Hashlib/blake2* missing 'data' keyword argument

2018-07-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In case of int() the name of it's first argument was documented, in both the 
module documentation, and in interactive help. But the documented name of the 
first blake2b() argument was "data", and it never worked. Since help() was not 
worked for blake2b, the user had weak chance to know that the actual name is 
"string". Thus there is much less chance of breaking the user code by making 
this parameter a positional-only than in case of int().

But I think Christian has other concerns.

--

___
Python tracker 

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



[issue34294] re.finditer and lookahead bug

2018-07-31 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34269] logging in 3.7 behaves different due to caching

2018-07-31 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue34269] logging in 3.7 behaves different due to caching

2018-07-31 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Okay, I did some code search on GitHub for 
`logging.Logger.manager.loggerDict.clear()` 
(https://github.com/search?q=logging.Logger.manager.loggerDict.clear%28%29=Code)
 and there was some code in the test_logging where it was used in tearDown and 
setUp so I thought it's a public function. My bad on not reading the docs. I 
agree that it's not a bug if it's an undocumented internal implementation 
related change that one should not rely upon. 

Thanks

--

___
Python tracker 

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



[issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7

2018-07-31 Thread Wolfgang Maier


Wolfgang Maier  added the comment:

Oh, sorry, I didn't realize there was another file and it seems I did not keep 
it so I just ran the installer again to reproduce.
Attached is the new pair of log files.

--
Added file: https://bugs.python.org/file47722/Python 3.7.0 
(64-bit)_20180731180657_000_core_JustForMe.log

___
Python tracker 

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



[issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7

2018-07-31 Thread Wolfgang Maier


Change by Wolfgang Maier :


Added file: https://bugs.python.org/file47723/Python 3.7.0 
(64-bit)_20180731180657.log

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2018-07-31 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Yes test_poplib and test_ftplib on fedora rawhide when run against openssl 
1.1.1 pre8. Haven't tried the pr7, but assuming that the tests were fine before 
here is the list of changes between pre7 and pre8:

https://github.com/openssl/openssl/compare/OpenSSL_1_1_1-pre7...OpenSSL_1_1_1-pre8

--
nosy: +cstratak

___
Python tracker 

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



[issue34237] faq/design: PEP 572 adds assignment expressions

2018-07-31 Thread Chris Angelico


Chris Angelico  added the comment:

BTW, sorry for sounding a bit snippy in my comment. Jonathan, in future, rather 
than dropping someone an email, it'd be more normal to just ping the person on 
the issue itself.

--

___
Python tracker 

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



[issue34237] faq/design: PEP 572 adds assignment expressions

2018-07-31 Thread Emily Morehouse


Emily Morehouse  added the comment:

This issue was brought to my attention -- I'm helping build the PEP 572 
implementation. I'll make sure the docs get updated (and Jonathan, I didn't 
actually know that assignment expressions were mentioned in the FAQ, so this 
was still helpful!)

--
assignee: docs@python -> emilyemorehouse
nosy: +emilyemorehouse

___
Python tracker 

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



[issue29036] logging module: Add `full_module_name` to LogRecord details

2018-07-31 Thread Vinay Sajip


Vinay Sajip  added the comment:

If you use the recommended approach of using

logger = logging.getLogger(__name__),

then the logger's name (the name field in the LogRecord) will be the full 
module path.

--

___
Python tracker 

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



[issue34269] logging in 3.7 behaves different due to caching

2018-07-31 Thread Vinay Sajip


Vinay Sajip  added the comment:

Well, loggerDict is an internal implementation detail which shouldn't be 
directly called by the code in borgbackup. Hence I'm not sure you can call it a 
bug. When messing around with internals of objects, caveats apply.

Note that loggerDict isn't mentioned in the documentation: this is deliberate.

--

___
Python tracker 

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



[issue34244] Add support of check logger

2018-07-31 Thread Vinay Sajip


Vinay Sajip  added the comment:

What is your use case?

--

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2018-07-31 Thread Jens Troeger

Jens Troeger  added the comment:

>  Well, posting on a closed issue is generally not the best way :)

Fair enough ;)

>  The multiple carriage returns is a bug, and there is an open issue for it, 
> though I'm not finding it at the moment.

Oh good, yes that should be fixed!

My current workaround is setting `international = True` _always_, which 
prevents the multiple CRs. Not pretty but it works…

--

___
Python tracker 

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



[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-31 Thread Yury Selivanov


Yury Selivanov  added the comment:

Merged. Thank you, hope that you'll keep contributing! :)

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



[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-31 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 6f16ffc1879fc934eba297b3e81bd940e32a7e03 by Yury Selivanov (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-34263 Cap timeout submitted to epoll/select etc. to one day. 
(GH-8532) (GH-8587)
https://github.com/python/cpython/commit/6f16ffc1879fc934eba297b3e81bd940e32a7e03


--

___
Python tracker 

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



[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-31 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 172a81e42bc30da1bd4027db9cd3b6172469f7fe by Yury Selivanov (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-34263 Cap timeout submitted to epoll/select etc. to one day. 
(GH-8532) (GH-8586)
https://github.com/python/cpython/commit/172a81e42bc30da1bd4027db9cd3b6172469f7fe


--

___
Python tracker 

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



[issue34035] Several AttributeError in zipfile seek() methods

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

Note: the seek() method has been added by bpo-22908 (commit 
066df4fd454d6ff9be66e80b2a65995b10af174f), and Python 3.6 is not affected.

--
nosy: +vstinner

___
Python tracker 

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



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

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

I opened a wider discussion: bpo-29502. The discussion didn't go anywhere yet.

--
nosy: +vstinner

___
Python tracker 

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



[issue34279] RFC: issue a warning in regrtest when no test have been executed?

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

> I would prefer shorter and totally different from the normal output in case 
> of no tests ran.

That's basically the whole purpose of the issue, yep ;-)

--

___
Python tracker 

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



[issue24809] Add getprotobynumber to socket module

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

I concur with Yury that there is not enough users and use cases needing this 
feature, so it doesn't deserve to pay the maintenance burden in the standard 
library. Start with a project on PyPI.

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



[issue33729] Hashlib/blake2* missing 'data' keyword argument

2018-07-31 Thread STINNER Victor


STINNER Victor  added the comment:

I have no opinion on the change in the master branch, but I agree with 
Christian that the 3.7 change should be reverted since it breaks the backward 
compatibility.

Serhiy modified int() in Python 3.7 to convert its first parameter to 
positional only parameter. IMHO it's ok to do such change. Moreover, the change 
has been documented in What's New in Python 3.7:
https://docs.python.org/dev/whatsnew/3.7.html#api-and-feature-removals

If you decide to keep the change in the master branch, it should be documented 
in What's New in Python 3.8, no?

--

___
Python tracker 

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



[issue27494] 2to3 parser failure caused by a comma after a generator expression

2018-07-31 Thread Jakub Stasiak


Jakub Stasiak  added the comment:

I appreciate the example, but I'd claim that's a "missing fixer" issue, not a 
"parser accepts too much" issue. Considering the syntax wasn't ambiguous (I 
think) and had been accepted before 3.7 I'll remain not totally convinced here.

--

___
Python tracker 

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



[issue34291] UnboundLocalError raised on call to global

2018-07-31 Thread Tim Peters


Tim Peters  added the comment:

Yes, the assignment does "hide the global definition of g".  But this 
determination is made at compile time, not at run time:  an assignment to `g` 
_anywhere_ inside `f()` makes _every_ appearance of `g` within `f()` local to 
`f`.

--
nosy: +tim.peters

___
Python tracker 

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



[issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc

2018-07-31 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I just learned of this issue. Rather than adding has_netloc, etc. attributes, 
why not use None to distinguish missing values as is preferred above, but add a 
new boolean keyword argument to urlparse(), etc. to get the new behavior (e.g. 
"allow_none" to parallel "allow_fragments")?

It seems like this would be more elegant, IMO, because it would lead to the API 
we really want. For example, the ParseResult(), etc. signatures and repr() 
values would be simpler. Changing the default value of the new keyword 
arguments would also provide a clean and simple deprecation pathway in the 
future, if desired.

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8096

___
Python tracker 

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



[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8095

___
Python tracker 

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



[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-31 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 944451cd8d3e897138f4b43569de13cd081ee251 by Yury Selivanov 
(MartinAltmayer) in branch 'master':
bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532)
https://github.com/python/cpython/commit/944451cd8d3e897138f4b43569de13cd081ee251


--

___
Python tracker 

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



[issue34274] Python launcher behavior with "#!/usr/bin/env python" shebang

2018-07-31 Thread Eryk Sun


Eryk Sun  added the comment:

See the discussion in issue 28686 regarding the use of version detection and/or 
versioned executable names with env shebangs. I think the launcher should at 
least support searching PATH for pythonX.exe and pythonX.Y.exe, so users can at 
least manually copy or symlink to python.exe.

--
nosy: +eryksun

___
Python tracker 

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



[issue1764286] inspect.getsource does not work with decorated functions

2018-07-31 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Should `getsourcefile` be changed to match?

I'd say yes. There's no point in getsourcefile returning the file location of 
the topmost decorator. Feel free to open a new issue and submit a PR to fix 
this!

--

___
Python tracker 

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



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2018-07-31 Thread jfbu


jfbu  added the comment:

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

--

___
Python tracker 

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



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2018-07-31 Thread jfbu


Change by jfbu :


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

___
Python tracker 

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



[issue34294] re.finditer and lookahead bug

2018-07-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2018-07-31 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi David,

What is the related issue with the new lines?

> On 31 Jul 2018, at 15:18, R. David Murray  wrote:
> 
> 
> R. David Murray  added the comment:
> 
> Well, posting on a closed issue is generally not the best way :)
> 
> The current behavior with regards to the SMTPUTF8 flag is correct (it only 
> matters for *addresses*, display names can already be transmitted if they 
> contain non-ascii using non SMTPUTF8 methods).
> 
> The multiple carriage returns is a bug, and there is an open issue for it, 
> though I'm not finding it at the moment.
> 
> --
> 
> ___
> Python tracker 
> 
> ___
> ___
> Python-bugs-list mailing list
> Unsubscribe: 
> https://mail.python.org/mailman/options/python-bugs-list/stephane%40wirtel.be
>

--
nosy: +matrixise

___
Python tracker 

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



  1   2   >