From report at bugs.python.org Wed Aug 1 00:17:06 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 01 Aug 2018 04:17:06 +0000 Subject: [issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro? In-Reply-To: <1486568378.9.0.904847418882.issue29502@psf.upfronthosting.co.za> Message-ID: <1533097026.68.0.56676864532.issue29502@psf.upfronthosting.co.za> INADA Naoki added the comment: FYI, _lsprof uses PyObject_Call() https://github.com/python/cpython/blob/ea68d83933e6de6cabfb115ec1b8888301947369/Modules/_lsprof.c#L120-L123 If PyObject_Call() trigger profiler, lsprof should avoid recursion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 00:32:15 2018 From: report at bugs.python.org (Martin Panter) Date: Wed, 01 Aug 2018 04:32:15 +0000 Subject: [issue25095] test_httpservers hangs since Python 3.5 In-Reply-To: <1442202993.28.0.395084299366.issue25095@psf.upfronthosting.co.za> Message-ID: <1533097935.12.0.56676864532.issue25095@psf.upfronthosting.co.za> 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 _______________________________________ From report at bugs.python.org Wed Aug 1 01:01:55 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 01 Aug 2018 05:01:55 +0000 Subject: [issue34269] logging in 3.7 behaves different due to caching In-Reply-To: <1532855036.26.0.56676864532.issue34269@psf.upfronthosting.co.za> Message-ID: <1533099715.04.0.56676864532.issue34269@psf.upfronthosting.co.za> 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 _______________________________________ From report at bugs.python.org Wed Aug 1 01:09:03 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 01 Aug 2018 05:09:03 +0000 Subject: [issue34303] micro-optimizations in functools.reduce() Message-ID: <1533100143.91.0.56676864532.issue34303@psf.upfronthosting.co.za> 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(50000)" "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 _______________________________________ From report at bugs.python.org Wed Aug 1 01:10:27 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 01 Aug 2018 05:10:27 +0000 Subject: [issue34303] micro-optimizations in functools.reduce() In-Reply-To: <1533100143.91.0.56676864532.issue34303@psf.upfronthosting.co.za> Message-ID: <1533100227.04.0.56676864532.issue34303@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +8107 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 01:13:39 2018 From: report at bugs.python.org (Saba Kauser) Date: Wed, 01 Aug 2018 05:13:39 +0000 Subject: [issue34304] clarification on escaping \d in regular expressions Message-ID: <1533100419.92.0.56676864532.issue34304@psf.upfronthosting.co.za> 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 _______________________________________ From report at bugs.python.org Wed Aug 1 01:39:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 01 Aug 2018 05:39:14 +0000 Subject: [issue34275] Problems with tkinter and tk8.6 on MacOS In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533101953.99.0.56676864532.issue34275@psf.upfronthosting.co.za> 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 _______________________________________ From report at bugs.python.org Wed Aug 1 01:43:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 01 Aug 2018 05:43:45 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533102225.81.0.56676864532.issue34047@psf.upfronthosting.co.za> 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 _______________________________________ From report at bugs.python.org Wed Aug 1 01:44:19 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 01 Aug 2018 05:44:19 +0000 Subject: [issue34086] logging.Handler.handleError regressed in python3 In-Reply-To: <1531245533.0.0.56676864532.issue34086@psf.upfronthosting.co.za> Message-ID: <1533102259.66.0.56676864532.issue34086@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 02:04:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 01 Aug 2018 06:04:17 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533103457.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The tkinter doc could use a section on 'OS-tk peculiarities and interactions' ;-). Anyway, thanks again. Some of the 'Windows peculiarities' I noted above, where the test behaved better on Mac, may be due to the absence of calls that should be avoided on Mac. Perhaps I can factor out some of the dialog setup and shutdown code, get it right for each platform, and then use it for all or at least multiple dialogs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 02:44:15 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 06:44:15 +0000 Subject: [issue34275] Problems with tkinter and tk8.6 on MacOS In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533105855.95.0.56676864532.issue34275@psf.upfronthosting.co.za> Tal Einat added the comment: Perhaps we can use .update_idletasks() rather than .update()? That tends to have less of a performance hit. My macOS setup is currently not working so I can't test this myself. Regarding the "MacWindowStyle" call, IDLE is backported to older versions of Python and generally strives to support older systems. Can you tell which versions of macOS/OSX this is needed in? If so, I suggest surrounding that call with an OS version check, which could be removed at a later time when the relevant OS versions are truly irrelevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 03:20:53 2018 From: report at bugs.python.org (Eric Wieser) Date: Wed, 01 Aug 2018 07:20:53 +0000 Subject: [issue34305] inspect.getsourcefile and inspect.getcomments do not work with decorated functions Message-ID: <1533108053.89.0.56676864532.issue34305@psf.upfronthosting.co.za> New submission from Eric Wieser : Following on from https://bugs.python.org/issue1764286 - inspect.getsourcefile and inspect.getcomments fall afoul of the same problem. ---------- components: Library (Lib) messages: 322847 nosy: Eric.Wieser priority: normal severity: normal status: open title: inspect.getsourcefile and inspect.getcomments do not work with decorated functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 03:21:09 2018 From: report at bugs.python.org (Eric Wieser) Date: Wed, 01 Aug 2018 07:21:09 +0000 Subject: [issue34305] inspect.getsourcefile and inspect.getcomments do not work with decorated functions In-Reply-To: <1533108053.89.0.56676864532.issue34305@psf.upfronthosting.co.za> Message-ID: <1533108069.58.0.56676864532.issue34305@psf.upfronthosting.co.za> Change by Eric Wieser : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 03:24:40 2018 From: report at bugs.python.org (Eric Wieser) Date: Wed, 01 Aug 2018 07:24:40 +0000 Subject: [issue34305] inspect.getsourcefile and inspect.getcomments do not work with decorated functions In-Reply-To: <1533108053.89.0.56676864532.issue34305@psf.upfronthosting.co.za> Message-ID: <1533108280.11.0.56676864532.issue34305@psf.upfronthosting.co.za> Change by Eric Wieser : ---------- keywords: +patch pull_requests: +8108 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 03:43:12 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Aug 2018 07:43:12 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1533109392.78.0.56676864532.issue24564@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: [ https://bugs.python.org/issue24564#msg246278 ] > Adding `EINVAL` to the ignored errnos would fix the problem, but might hide real failures (I'm not sure about the real failures, but it seems logical). I think this is an acceptable compromise considering that: 1) because of this the copy operation will ultimately fail (despite file will be copied) 2) there is nothing we can do except emit a warning somehow 3) EPERM and ENODATA are already silently ignored (also ENOTSUP but that is more legit) For completeness, other than copytree() also copy2() and move() are affected. I submitted a PR: https://github.com/python/cpython/pull/8601. ---------- nosy: +giampaolo.rodola pull_requests: +8109 stage: -> patch review versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 04:09:51 2018 From: report at bugs.python.org (=?utf-8?q?Kamil_Ga=C5=82uszka?=) Date: Wed, 01 Aug 2018 08:09:51 +0000 Subject: [issue23078] unittest.mock patch autospec doesn't work on staticmethods In-Reply-To: <1418892323.1.0.910322233262.issue23078@psf.upfronthosting.co.za> Message-ID: <1533110991.65.0.56676864532.issue23078@psf.upfronthosting.co.za> Kamil Ga?uszka added the comment: This affects all versions from 3.4 up to 3.8-dev. Would be nice if someone could do the review of the supplied patch. Thanks for awesome work on Python! I'm here because it just hit me also and I was for 1 h thinking that I don't know how to use patch/mock. ;) ---------- nosy: +galuszkak versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 04:27:28 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 Aug 2018 08:27:28 +0000 Subject: [issue34303] micro-optimizations in functools.reduce() In-Reply-To: <1533100143.91.0.56676864532.issue34303@psf.upfronthosting.co.za> Message-ID: <1533112048.08.0.56676864532.issue34303@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 04:31:48 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 08:31:48 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533112308.79.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by Tal Einat : ---------- keywords: +patch pull_requests: +8110 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 04:32:09 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 Aug 2018 08:32:09 +0000 Subject: [issue34304] clarification on escaping \d in regular expressions In-Reply-To: <1533100419.92.0.56676864532.issue34304@psf.upfronthosting.co.za> Message-ID: <1533112329.47.0.56676864532.issue34304@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 04:35:41 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 08:35:41 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533112541.82.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: I can confirm that removing .grab_set() calls fixes this issue on macOS 10.13.5 with Python 3.7.0 from python.org. Searching for those calls in all of IDLE's code lead me to discover additional similar issues, e.g. with the search dialog and the text viewer. Removing the .grab_set() and .grab_release() calls fixes those issues as well. I tried IDLE with these changes on Windows 10 with python build from the latest master branch. Things appear to be working well without these calls. Is it reasonable to simply remove the grab calls entirely? I've created a PR with such a change to facilitate evaluating this approach. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 04:49:44 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 08:49:44 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533113384.39.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: Confirmed on macOS 10.13.5 with the new Python 2.7.15 64-bit from python.org which bundles Tcl/Tk 8.6.8. The same fix works: Removing the grab_set() calls fixes the freezing after closing the about and config dialogs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 05:12:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 01 Aug 2018 09:12:25 +0000 Subject: [issue34303] micro-optimizations in functools.reduce() In-Reply-To: <1533100143.91.0.56676864532.issue34303@psf.upfronthosting.co.za> Message-ID: <1533114745.95.0.56676864532.issue34303@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- type: enhancement -> performance versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 05:15:56 2018 From: report at bugs.python.org (Michael Fischer) Date: Wed, 01 Aug 2018 09:15:56 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533114956.03.0.56676864532.issue34273@psf.upfronthosting.co.za> Michael Fischer added the comment: Thank you for your quick reply. I understand why you chose this description better now. However in C %f behaves exactly the same as in Python (for floating-point numbers) and you will mostly find the description for it along the lines of: '%f' Print a floating-point number in normal (fixed-point) notation. [The GNU C Library Reference Manual - https://www.gnu.org/software/libc/manual/pdf/libc.pdf] For the sake of simplicity I suggest the following wording: Fixed point notation. Displays the (floating-point) number as a fixed-point number. The default precision is 6. In my opinion this emphasizes the intent (fixed precision representation) and hints at the independence of input type, by putting the floating-point in brackets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 06:16:15 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 01 Aug 2018 10:16:15 +0000 Subject: [issue34304] clarification on escaping \d in regular expressions In-Reply-To: <1533100419.92.0.56676864532.issue34304@psf.upfronthosting.co.za> Message-ID: <1533118575.8.0.56676864532.issue34304@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: The reported behavior is reproducible in master as well as of ea68d83933 but not on 3.6.0. I couldn't bisect to the exact commit between 3.7.0 and 3.6.0 where this change was introduced though. I can also see some deprecation warnings as below while running the script : ? cpython git:(master) ./python.exe ../backups/bpo34034.py ../backups/bpo34034.py:4: DeprecationWarning: invalid escape sequence \[ sym = ['\[','\]','\(','\)'] ../backups/bpo34034.py:4: DeprecationWarning: invalid escape sequence \] sym = ['\[','\]','\(','\)'] ../backups/bpo34034.py:4: DeprecationWarning: invalid escape sequence \( sym = ['\[','\]','\(','\)'] ../backups/bpo34034.py:4: DeprecationWarning: invalid escape sequence \) sym = ['\[','\]','\(','\)'] ../backups/bpo34034.py:15: DeprecationWarning: invalid escape sequence \( result=re.match("DBMS_NAME python4: string\(\d+\) .*?", "DBMS_NAME python4: string(8) \"DB2/NT64\" ") 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 "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/sre_parse.py", line 1045, 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 "../backups/bpo34034.py", line 11, in pattern = re.sub('%d', '\\d+', pattern) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/re.py", line 192, in sub return _compile(pattern, flags).sub(repl, string, count) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/re.py", line 309, in _subx template = _compile_repl(template, pattern) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/re.py", line 300, in _compile_repl return sre_parse.parse_template(repl, pattern) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/sre_parse.py", line 1048, in parse_template raise s.error('bad escape %s' % this, len(this)) re.error: bad escape \d at position 0 Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 06:19:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Aug 2018 10:19:42 +0000 Subject: [issue34304] clarification on escaping \d in regular expressions In-Reply-To: <1533100419.92.0.56676864532.issue34304@psf.upfronthosting.co.za> Message-ID: <1533118782.74.0.56676864532.issue34304@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If you want to replace %d with literal \d, you need to repeat the backslash 4 times: pattern = re.sub('%d', '\\\\d+', pattern) or use a raw string literal and repeat the backslash 2 times: pattern = re.sub('%d', r'\\d+', pattern) Since the backslash has a special meaning in the replacement pattern, it needs to be escaped with a backslash, i.e. duplicated. But since it has a special meaning in Python string literals, every of these backslashes needs to be escaped with a backslash in a non-raw string literal, i.e. repeated 4 times. Python 3.6 is more lenient. It keeps a backslash if it is followed by a character which doesn't compound a known escape sequences in a replacement string. But it emits a deprecation warning, which you can see when run Python with corresponding -W option. $ python3.6 -Wa -c 'import re; print(re.sub("%d", "\d+", "DBMS_NAME: string(%d) %s"))' :1: DeprecationWarning: invalid escape sequence \d /usr/lib/python3.6/re.py:191: DeprecationWarning: bad escape \d return _compile(pattern, flags).sub(repl, string, count) DBMS_NAME: string(\d+) %s $ python3.6 -Wa -c 'import re; print(re.sub("%d", "\\d+", "DBMS_NAME: string(%d) %s"))' /usr/lib/python3.6/re.py:191: DeprecationWarning: bad escape \d return _compile(pattern, flags).sub(repl, string, count) DBMS_NAME: string(\d+) %s $ python3.6 -Wa -c 'import re; print(re.sub("%d", "\\\d+", "DBMS_NAME: string(%d) %s"))' :1: DeprecationWarning: invalid escape sequence \d DBMS_NAME: string(\d+) %s $ python3.6 -Wa -c 'import re; print(re.sub("%d", "\\\\d+", "DBMS_NAME: string(%d) %s"))' DBMS_NAME: string(\d+) %s Here "invalid escape sequence \d" is generated by the Python parser, "bad escape \d" is generated by the RE engine. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 06:54:55 2018 From: report at bugs.python.org (Kevin Walzer) Date: Wed, 01 Aug 2018 10:54:55 +0000 Subject: [issue34275] Problems with tkinter and tk8.6 on MacOS In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533120895.47.0.56676864532.issue34275@psf.upfronthosting.co.za> Kevin Walzer added the comment: Tal, your proposed revisions to the patch work fine. It's harmless to leave the older calls to MacWindowStyle there. New patch attached. ---------- Added file: https://bugs.python.org/file47726/calltips_w-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 07:40:54 2018 From: report at bugs.python.org (William Pickard) Date: Wed, 01 Aug 2018 11:40:54 +0000 Subject: [issue25095] test_httpservers hangs since Python 3.5 In-Reply-To: <1442202993.28.0.395084299366.issue25095@psf.upfronthosting.co.za> Message-ID: <1533123654.47.0.56676864532.issue25095@psf.upfronthosting.co.za> William Pickard added the comment: My computer was running BitDefender Total Security 2018 (At the time, currently running the 2019 edition) and MalwareBytes 3 Premium. BitDefender has both a built-in firewall and a web protection module while MalwareBytes has a web protection module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 08:05:23 2018 From: report at bugs.python.org (Erik Bray) Date: Wed, 01 Aug 2018 12:05:23 +0000 Subject: [issue34211] Cygwin build broken due to use of &PyType_Type in static declaration in _abc module In-Reply-To: <1532451616.3.0.56676864532.issue34211@psf.upfronthosting.co.za> Message-ID: <1533125123.75.0.56676864532.issue34211@psf.upfronthosting.co.za> Erik Bray added the comment: > For those who are not very aware of Cygwin issues: what is wrong with > > PyVarObject_HEAD_INIT(&PyType_Type, 0); I'm glad you asked, because it actually got me thinking, and since I added a fix (albeit an unsatisfying one) for issue34212, this fix is no longer strictly necessary *so long as* the _abc module is always built as a core built-in (that is, linked into libpython). IIUC that is the case since _abc is required for the core, but I'm not sure. The problem is explained somewhat in issue21124, but what it comes down to is that if the linker can't resolve PyType_Type at link time it will make a complaint like "can't initialize global with a non-constant". Because of issue34212, when compiling _abc.c it was using the wrong external linkage for PyType_Type (treating it as some data that needs to be imported from an other DLL, rather than data in the same DLL). But with a fix for issue34212 this is not a problem (again, so long as the _abc module is included in libpython). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 08:26:57 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 01 Aug 2018 12:26:57 +0000 Subject: [issue34211] Cygwin build broken due to use of &PyType_Type in static declaration in _abc module In-Reply-To: <1532451616.3.0.56676864532.issue34211@psf.upfronthosting.co.za> Message-ID: <1533126417.34.0.56676864532.issue34211@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Linker issues are always tricky... I understand that there is no problem within libpython, so the questions below refer to extension modules. I am asking them from the point of view of somebody writing Python extension modules who is clueless about Cygwin. So you're saying that it's not allowed to refer to &PyType_Type in a static struct? But it is OK to refer to &PyType_Type in code? I assume that there is nothing special about PyType_Type and that this apply for all variables. Are functions OK? For example, in functools.c I see static PyGetSetDef partial_getsetlist[] = { {"__dict__", PyObject_GenericGetDict, PyObject_GenericSetDict}, {NULL} /* Sentinel */ }; What makes functions different from variables? Aren't they essentially just pointers? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 08:37:41 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Aug 2018 12:37:41 +0000 Subject: [issue34302] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533090665.19.0.56676864532.issue34302@psf.upfronthosting.co.za> Message-ID: <1533127061.19.0.56676864532.issue34302@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm not sure what your proposal is. Do you have a patch that increases the performance of collections.deque in some cases? If so please share that patch, preferably as a pull request on GitHub (see for an explanation). ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 09:32:29 2018 From: report at bugs.python.org (Victor Porton) Date: Wed, 01 Aug 2018 13:32:29 +0000 Subject: [issue34306] minidom: wrong processing of xmlns attributes Message-ID: <1533130349.62.0.56676864532.issue34306@psf.upfronthosting.co.za> New submission from Victor Porton : The below script prints http://www.w3.org/2000/xmlns/ aa:aa It should print None aa:aa because xmlns:z is NOT an attribute of xmlns namespace. ~~~ import xml.dom.minidom x = xml.dom.minidom.parseString("") for i in x.documentElement.attributes.values(): print(i.namespaceURI) ~~~ ---------- components: XML messages: 322860 nosy: porton priority: normal severity: normal status: open title: minidom: wrong processing of xmlns attributes versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 09:34:16 2018 From: report at bugs.python.org (Romuald Brunet) Date: Wed, 01 Aug 2018 13:34:16 +0000 Subject: [issue34307] NullHandler init refusing arguments Message-ID: <1533130455.97.0.56676864532.issue34307@psf.upfronthosting.co.za> New submission from Romuald Brunet : Context: I'm using a custom Handler that relies on a third-party library that may not be present try: from acme.logging import CustomHandler as BaseHandler except ImportError: import logging.NullHandler as BaseHandler class MoreCustomHandler(BaseHandler): def handle(self): self.stuff() The logging configuration has some arguments for the CustomHandler. The problem is that the NullHandler does not accept them. I expected it to be a "dummy" handler that might accept any argument ---------- components: Library (Lib) messages: 322861 nosy: Romuald priority: normal severity: normal status: open title: NullHandler init refusing arguments type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 09:45:22 2018 From: report at bugs.python.org (Romuald Brunet) Date: Wed, 01 Aug 2018 13:45:22 +0000 Subject: [issue34307] NullHandler init refusing arguments In-Reply-To: <1533130455.97.0.56676864532.issue34307@psf.upfronthosting.co.za> Message-ID: <1533131122.96.0.56676864532.issue34307@psf.upfronthosting.co.za> Change by Romuald Brunet : ---------- keywords: +patch pull_requests: +8111 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 09:53:14 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 Aug 2018 13:53:14 +0000 Subject: [issue34307] NullHandler init refusing arguments In-Reply-To: <1533130455.97.0.56676864532.issue34307@psf.upfronthosting.co.za> Message-ID: <1533131594.47.0.56676864532.issue34307@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 10:12:44 2018 From: report at bugs.python.org (Seonggi Kim) Date: Wed, 01 Aug 2018 14:12:44 +0000 Subject: [issue34302] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533090665.19.0.56676864532.issue34302@psf.upfronthosting.co.za> Message-ID: <1533132764.32.0.56676864532.issue34302@psf.upfronthosting.co.za> Seonggi Kim added the comment: Sorry, I'm waiting for permit CLA signing. I will request PR after CLA was signed. ---------- nosy: +hacksg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 10:15:24 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Aug 2018 14:15:24 +0000 Subject: [issue34302] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533090665.19.0.56676864532.issue34302@psf.upfronthosting.co.za> Message-ID: <1533132924.62.0.56676864532.issue34302@psf.upfronthosting.co.za> Ronald Oussoren added the comment: That's ok, I hadn't expected that you'd sign the CLA before being asked to do so :-) Good luck. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 10:16:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 14:16:51 +0000 Subject: [issue33499] Environment variable to set alternate location for pycache tree In-Reply-To: <1526310769.71.0.682650639539.issue33499@psf.upfronthosting.co.za> Message-ID: <1533133011.27.0.56676864532.issue33499@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fc96437db4fa95dff99d43d4500beaf12bad5bff by Victor Stinner in branch 'master': bpo-33499: Fix pymain_init_pycache_prefix() (GH-8596) https://github.com/python/cpython/commit/fc96437db4fa95dff99d43d4500beaf12bad5bff ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 10:18:09 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 01 Aug 2018 14:18:09 +0000 Subject: [issue32752] no information about accessing typing.Generic type arguments In-Reply-To: <1517612346.62.0.467229070634.issue32752@psf.upfronthosting.co.za> Message-ID: <1533133089.87.0.56676864532.issue32752@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > 3.7 is less convenient and less consistent Taking into account that internal API is something one should never use, I don't think these terms apply here. Anyway, we will provide some helpers for external use in one of the next releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 10:51:51 2018 From: report at bugs.python.org (Chantal Ackermann) Date: Wed, 01 Aug 2018 14:51:51 +0000 Subject: [issue34308] shutil.copystat fails in dockered Linux (Debian) on Azure (Windows) Message-ID: <1533135111.37.0.56676864532.issue34308@psf.upfronthosting.co.za> New submission from Chantal Ackermann : root:/media/documents# df -h Filesystem Size Used Available Use% Mounted on overlay 29.0G 24.0G 5.0G 83% / tmpfs 1.7G 0 1.7G 0% /dev tmpfs 1.7G 0 1.7G 0% /sys/fs/cgroup //storage01.file.core.windows.net/kubernetes-dynamic-pvc-526aa3da-6993-11e8-8c6f-0a58ac1f00ad 1.0G 384.0K 1023.6M 0% /media root:/media/documents# ls -al insgesamt 267 drwxrwxrwx 2 1000 1000 0 Jul 31 15:29 . drwxrwxrwx 2 1000 1000 0 Jul 31 15:29 .. -rwxrwxrwx 1 1000 1000 136479 Jul 31 16:48 orig.pdf -rwxrwxrwx 1 1000 1000 136479 Jul 31 15:29 testfile root:/media/documents# lsattr --S-----c-jI------- ./orig.pdf --S-----c-jI------- ./testfile root:/media/documents# python Python 3.6.6 (default, Jul 17 2018, 11:12:33) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import shutil >>> shutil.copystat('orig.pdf', 'testfile') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/shutil.py", line 225, in copystat _copyxattr(src, dst, follow_symlinks=follow) File "/usr/local/lib/python3.6/shutil.py", line 157, in _copyxattr names = os.listxattr(src, follow_symlinks=follow_symlinks) OSError: [Errno 38] Function not implemented: 'orig.pdf' >>> shutil.copystat('orig.pdf', 'testfile', follow_symlinks=False) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/shutil.py", line 225, in copystat _copyxattr(src, dst, follow_symlinks=follow) File "/usr/local/lib/python3.6/shutil.py", line 157, in _copyxattr names = os.listxattr(src, follow_symlinks=follow_symlinks) OSError: [Errno 38] Function not implemented: 'orig.pdf' >>> shutil.py#164ff: if hasattr(os, 'listxattr'): def _copyxattr(src, dst, *, follow_symlinks=True): try: names = os.listxattr(src, follow_symlinks=follow_symlinks) except OSError as e: if e.errno not in (errno.ENOTSUP, errno.ENODATA): raise return => This is true inside the docker container. However, calling os.listxattr fails with errno.ENOSYS (Error 38). The documentation states that "copystat() never returns failure." StackOverflow link: https://stackoverflow.com/questions/51616058/shutil-copystat-fails-inside-docker-on-azure#51635427 I can provide a pull request, if it is OK to add errno.ENOSYS to the list of ignored errors. (Would be a similar fix to the one provided for https://bugs.python.org/issue24564 (https://github.com/python/cpython/pull/8601).) ---------- components: Library (Lib) messages: 322866 nosy: nuarhu priority: normal severity: normal status: open title: shutil.copystat fails in dockered Linux (Debian) on Azure (Windows) type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 10:56:44 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 14:56:44 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533135404.64.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 11:28:03 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 Aug 2018 15:28:03 +0000 Subject: [issue34286] lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0) In-Reply-To: <1533007091.73.0.56676864532.issue34286@psf.upfronthosting.co.za> Message-ID: <1533137283.04.0.56676864532.issue34286@psf.upfronthosting.co.za> Berker Peksag added the comment: I'm not able to reproduce this: ./configure make -s -j sudo make install python3.7 -m test test_lib2to3 Run tests sequentially 0:00:00 load avg: 0.86 [1/1] test_lib2to3 == Tests result: SUCCESS == 1 test OK. Total duration: 13 sec 456 ms Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 11:56:19 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 15:56:19 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533138979.28.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6c785c0ebdadc84d80a53d896c38fd7ada8ae1f6 by Victor Stinner in branch 'master': bpo-34170: Add Python/coreconfig.c for _PyCoreConfig (GH-8607) https://github.com/python/cpython/commit/6c785c0ebdadc84d80a53d896c38fd7ada8ae1f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:04:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 16:04:12 +0000 Subject: [issue31650] implement PEP 552 In-Reply-To: <1506801596.1.0.213398074469.issue31650@psf.upfronthosting.co.za> Message-ID: <1533139452.03.0.56676864532.issue31650@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:04:12 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 16:04:12 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533139452.16.0.665841612001.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:18:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 16:18:10 +0000 Subject: [issue31650] implement PEP 552 In-Reply-To: <1506801596.1.0.213398074469.issue31650@psf.upfronthosting.co.za> Message-ID: <1533140290.75.0.56676864532.issue31650@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 80b762f010097ab8137782e5fbdc89c5c620ed4e by Victor Stinner in branch 'master': bpo-31650: Remove _Py_CheckHashBasedPycsMode global config var (GH-8608) https://github.com/python/cpython/commit/80b762f010097ab8137782e5fbdc89c5c620ed4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:18:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 16:18:10 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533140290.92.0.902498594338.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 80b762f010097ab8137782e5fbdc89c5c620ed4e by Victor Stinner in branch 'master': bpo-31650: Remove _Py_CheckHashBasedPycsMode global config var (GH-8608) https://github.com/python/cpython/commit/80b762f010097ab8137782e5fbdc89c5c620ed4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:18:51 2018 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2018 16:18:51 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533140331.75.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: """ TODO list, open questions: * Should isolated=1 always imply config->ignore_environment=1 and config->user_site_directory = 0? * Should we rename debug to parser_debug? "debug" is a very generic term, whereas this flag is really specific to the parser * Remove _Py_CheckHashBasedPycsMode: replace it with config._check_hash_pycs_mode? """ => DONE! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:20:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Aug 2018 16:20:44 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1533140444.07.0.56676864532.issue33695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not convinced that this change should be merged. The benefit is small, and 1) it is only for an artificial set of tiny files, 2) the benchmarking ignores the real IO, it measures the work with a cache. When copy real files (/usr/include or Lib/) with dropped caches the difference is insignificant. On other hand, this optimization makes the code more complex. It can make the case with specifying the ignore argument slower. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:24:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Aug 2018 16:24:07 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1533140647.18.0.56676864532.issue33695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For dropping disc caches on Linux run with open('/proc/sys/vm/drop_caches', 'ab') as f: f.write(b'3\n') before every test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 13:16:31 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Wed, 01 Aug 2018 17:16:31 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533143791.63.0.56676864532.issue34120@psf.upfronthosting.co.za> Vlad Tudorache added the comment: I can confirm that removing the grab_set() calls fixes the locking. But am I the only one to notice that the dialogs aren't modal any more? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 13:33:36 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Wed, 01 Aug 2018 17:33:36 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533144816.28.0.56676864532.issue34120@psf.upfronthosting.co.za> Vlad Tudorache added the comment: Adding self.grab_release() in the ok() method for the dialogs BEFORE destroy() solved the problem for me, keeping the grab_set() methods in place (uncommented, actives). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 13:36:13 2018 From: report at bugs.python.org (chris) Date: Wed, 01 Aug 2018 17:36:13 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles Message-ID: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> New submission from chris : I'm linking an issue from numpy here: https://github.com/numpy/numpy/issues/8097 Embedding python suffers from a possibility to reliably reset the state of the python interpreter. For my use case, I noticed that when using numpy with Py_Initialize() and Py_Finalize(): Py_Initialize() // call code importing numpy Py_Finalize() Py_Initialize() // call same code again The above code will result in a crash. One of the comments in the referenced issue is that Py_Finalize doesn't unload loaded DLL's or shared objects. Doing that would probably fix the issues. As of now, embedding python is fundamentally broken for applications which want to embed non-trivial scientific python scripts involving user-adapted python code, because a) Py_Finalize cannot be used reliably b) There is no possibility to reliably reset the python interpreter otherwise (because the sub-interpreters are also not working reliably, which is stated in the documentation) c) manually reloading changed modules via importlib.reload is not a feasible solution The possibility to reset an embedded python interpreter to an initial state is a strong requirement for such applications. ---------- components: Extension Modules, Interpreter Core messages: 322876 nosy: christoph.wiedemann at hs-weingarten.de priority: normal severity: normal status: open title: Embedding Python; Py_Initialize / Py_Finalize cycles type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 13:38:45 2018 From: report at bugs.python.org (Wu Yu) Date: Wed, 01 Aug 2018 17:38:45 +0000 Subject: [issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6 Message-ID: <1533145125.37.0.56676864532.issue34310@psf.upfronthosting.co.za> New submission from Wu Yu : I'm encountering a build error from the master branch of CPython (heads/master-dirty:d17fe275a3) on Mac OS 10.13.6, with "--with-pydebug" turned on. The error message: ./python.exe -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi Assertion failed: (TYPE(ch) == test || TYPE(ch) == test_nocond || TYPE(ch) == star_expr), function seq_for_testlist, file Python/ast.c, line 1205. /bin/sh: line 1: 34527 Abort trap: 6 ./python.exe -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: *** [pybuilddir.txt] Error 1 ---------- components: Build messages: 322877 nosy: wuyu priority: normal severity: normal status: open title: Build error with option "--with-pydebug" on Mac OS 10.13.6 type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 13:50:25 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 01 Aug 2018 17:50:25 +0000 Subject: [issue34307] NullHandler init refusing arguments In-Reply-To: <1533130455.97.0.56676864532.issue34307@psf.upfronthosting.co.za> Message-ID: <1533145825.91.0.56676864532.issue34307@psf.upfronthosting.co.za> Vinay Sajip added the comment: > I expected it to be a "dummy" handler that might accept any argument I don't know why you expected that, but your expectation wasn't valid. You will need to define your own BaseHandler which handles any arguments passed by your logging configuration. NullHandler's __init__ is inherited from logging.Handler. There are no plans to change that. The documentation for it states: "The NullHandler class, located in the core logging package, does not do any formatting or output. It is essentially a ?no-op? handler for use by library developers." This does not indicate that it is suitable for use as a base class. If you want to use a base class for your handler, use logging.Handler. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 14:42:13 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 Aug 2018 18:42:13 +0000 Subject: [issue9372] pulldom.DOMEventStream.__getitem__ is broken In-Reply-To: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> Message-ID: <1533148933.75.0.56676864532.issue9372@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 14:44:44 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 Aug 2018 18:44:44 +0000 Subject: [issue9372] pulldom.DOMEventStream.__getitem__ is broken In-Reply-To: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> Message-ID: <1533149084.32.0.56676864532.issue9372@psf.upfronthosting.co.za> Berker Peksag added the comment: I've fixed a bug that uses DOMEventStream.__getitem__ at work today. I've opened PR 8609 to deprecate __getitem__ methods of DOMEventStream, FileInput and FileWrapper classes. ---------- components: +Library (Lib) nosy: +berker.peksag versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 15:11:09 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Wed, 01 Aug 2018 19:11:09 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533150669.33.0.56676864532.issue34120@psf.upfronthosting.co.za> Vlad Tudorache added the comment: I've checked again the source code in config_key.py, configdialog.py, help_about.py, query.py, searchbase.py, textview.py and added a self.grab_release() in functions like ok() and cancel() before the call to self.destroy() and I see no more lock/focus issues. Maybe the grab was kept in the non-existent (destroyed) dialog window, so the click events could not be transferred to the pyshell or editor, but, because of a local (not global) grab, clicking on another application's window, by losing focus and grab, completely freed the event-chain, then clicks in IDLE were correctly received. Can you confirm if adding the grab_release() calls works for you too (do not remove the grab_set() calls!)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 15:32:57 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Aug 2018 19:32:57 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533151977.48.0.56676864532.issue34309@psf.upfronthosting.co.za> Eric Snow added the comment: The matter of unloading extension modules is partly covered in bpo-401713. However, note that a few things have changed in the last 18 years. :) I think it would be worth revisiting the decision in that issue at this point. If that were sorted out would there be other issues to address? Regardless, If I understood right, your only objective here is to completely reset Python in the current process to the initial state. You mention "embedded python interpreter", but it sounds more like you mean "embedded python runtime" (particularly since you are using Py_Initialize and Py_Finalize). Why is completely resetting Python "a strong requirement"? ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 15:43:01 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Aug 2018 19:43:01 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533152581.64.0.56676864532.issue34309@psf.upfronthosting.co.za> Eric Snow added the comment: Regarding your 3 points: > a) Py_Finalize cannot be used reliably Note that unloading extension modules is not the only thing that Py_Finalize isn't doing that it probably should be. I expect that you would find a number of memory leaks and potentially cases that crash the process when calling Py_Initialize() after Py_Finalize(). As bpo-401713 indicates, calling Py_Initialize/Py_Finalize multiple times isn't a well supported pattern. The docs indicate likewise (see https://docs.python.org/3/c-api/init.html#c.Py_FinalizeEx). That said, I'm sure everyone agrees that it *should* work and that we should fix issues there when we can. It's mostly a matter of finding folks motivated enough to work on it. :) > b) There is no possibility to reliably reset the python interpreter otherwise At the level of the interpreter (main or otherwise), the C-API doesn't really provide anything like that, though I suppose it could. However, it's mostly simpler to just make a new interpreter. So I doubt we'd introduce an explicit concept of resetting an interpreter. What would be the advantage? At the level of the *runtime* the C-API likewise doesn't offer anything for reset, other than what you've already tried. It would really help to understand why resetting is needed. > (because the sub-interpreters are also not working reliably, > which is stated in the documentation) This is something I'm actively working on, including improving isolation between interpreters (minimizing global state) and improving the extension module experience when using subinterpreters. The latter is tricky, particularly with extension modules that use libraries that have their own C globals. Note that isolation between interpreters will never be perfect. If you need perfect isolation then use multiple processes. All interpreters in the same process will always share the runtime state, as well as process-wide data. FWIW, even if we were to completely isolate the Python runtime, allowing more than one runtime in a process, the runtimes would still share the process-wide data. > c) manually reloading changed modules via importlib.reload is not a > feasible solution Yeah, while I suppose it could work for some extensions, I expect it would not work for many. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:10:01 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Aug 2018 20:10:01 +0000 Subject: [issue34302] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533090665.19.0.56676864532.issue34302@psf.upfronthosting.co.za> Message-ID: <1533154201.08.0.56676864532.issue34302@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Why are we getting multiple tracker items opening and closing for this at the same time? Something odd is happening. Please don't close the tracker and change user ids in the middle of a conversation: https://bugs.python.org/issue34298 https://bugs.python.org/issue34295 ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:20:27 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 20:20:27 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533154827.51.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: Adding grab_release() calls also resolves the issue. Tested on mac and win. PR updated with this approach, IMO ready for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:21:26 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 20:21:26 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533154886.54.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by Tal Einat : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:21:45 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 20:21:45 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533154905.36.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by Tal Einat : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:22:51 2018 From: report at bugs.python.org (James Emerton) Date: Wed, 01 Aug 2018 20:22:51 +0000 Subject: [issue34311] locale.format() and locale.format_string() cast Decimals to float Message-ID: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> New submission from James Emerton : We use locale.format('%.2f', x, True) to convert Decimal values to strings for display. Unfortunately, the locale module is using %-formatting to generate the initial string before applying locale specific formatting. As a result, any value which cannot be accurately represented as a float will produce incorrect results. I've built some formatting that uses new-style string formatting (and some internal locale functions) which corrects the problem. Unfortunately, making this change in the locale module would require converting the input format string to the new syntax, so '%.2f' would become '{:.2f}'. See also #33731 ---------- components: Library (Lib) messages: 322885 nosy: jemerton priority: normal severity: normal status: open title: locale.format() and locale.format_string() cast Decimals to float versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:37:02 2018 From: report at bugs.python.org (chris) Date: Wed, 01 Aug 2018 20:37:02 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533155822.09.0.56676864532.issue34309@psf.upfronthosting.co.za> chris added the comment: Thanks for your comments and the link to the issue from the year 2000. > You mention "embedded python interpreter", but it sounds more like you mean "embedded python runtime" Yes that's right. Sorry for imprecise wording. > Why is completely resetting Python "a strong requirement"? Because otherwise, if this is not an option, we need to restart the embedding C/C++ application whenever a python module is changed and need to be reloaded. This is occurring frequently in our use case and it is the main reason we want to embed python for rapid development purposes. (The application itself is a development environment for computer vision algorithms, where python is only one of multiple interacting, configurable plugins.) Being forced to restart the whole application on code changes compromises the advantage of using a scripting language without edit/compile/link steps to a degree which questions the whole idea. I'm not very confident in hacking reload(...) stuff in the modules. Interestingly enough, our use case matches exactly the one which has been described as unlikely in the original issue (https://bugs.python.org/issue401713#msg34524): the python runtime is dynamically loaded at runtime as a plugin :) I haven't tried it, but I suppose that we get the very same issues when we reload the plugin, because the dynamic libraries of extension modules are still loaded with an invalid state. Maybe using processes and some kind of socket / shared memory communication would suit our needs better, but this is also much more complicated and error-prone to implement than simply embedding python into the main process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:47:42 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Aug 2018 20:47:42 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable Message-ID: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> New submission from Brett Cannon : str.endswith() and str.startswith() only takes str or a tuple of str. It might be nice to make this str or an iterable of str (and that order must be kept so that a string isn't treated as an iterable of length-1 str). ---------- components: Interpreter Core messages: 322887 nosy: brett.cannon priority: low severity: normal status: open title: Allow str.endswith and str.startswith to accept an iterable type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:49:42 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 20:49:42 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 Message-ID: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> New submission from Tal Einat : On macOS 10.13.5 (the latest available) with ActiveTcl 8.6.7 (the latest available), I'm building Python from latest master (to be 3.8.0). I'm consistently having IDLE crash almost immediately, just by opening any file for editing. The crash results in the following error: $ root/bin/python3 -m idlelib objc[50759]: Invalid or prematurely-freed autorelease pool 0x7fb74091f050. [1] 50759 abort root/bin/python3 -m idlelib In issue34120, @vtudorache reported a similar issue (also on macOS). With Python 3.7.0 from python.org, everything works fine. Strangely, replacing ActiveTcl with version 8.5.18.0 resolves this issue. I'm not sure whether this is specific to IDLE; I'll try to provide a minimal way to reproduce. ---------- assignee: terry.reedy components: IDLE, Tkinter messages: 322888 nosy: gpolo, serhiy.storchaka, taleinat, terry.reedy, vtudorache priority: normal severity: normal status: open title: IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:55:24 2018 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 01 Aug 2018 20:55:24 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533156924.56.0.56676864532.issue34309@psf.upfronthosting.co.za> Change by Stefan Behnel : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 17:41:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 01 Aug 2018 21:41:47 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533159707.83.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I wrote the following justification for adding grab_release while Tal was revising his PR to make the change. I will look at the PR now and test on Windows. --- Vlad, I was wondering about modality. Properly de-modalizing a dialog requires more than just removing grab_set. The parent of a modal dialog is a window with a menu, an instance of idlelib. If a dialog were not modal, its parent could be deleted, which would also delete the dialog and any un-saved and un-acted-upon data. This is true of Debugger, whose parent is Shell. Duplicate dialogs would also be possible, as is true of IDLE Help, whose parent is root, unless explicitly prevented, as is true of Debugger (Shell knows if there is a Debugger instance). Removing modality has been discussed in various places, such as in #24760, which focuses on Settings. If it were de-modalized, its parent should be root and only one copy allowed. Mark Roseman noted on the issue that "because modal doesn't fully work on the Mac, you can actually create multiple copies of the config dialog!". So my preferred short-term fix, once confirmed, for 3.7.1, would be the addition of grab_release. Merely removing grab would have to be Mac-specific, and I would expect new problems and complaints. Properly de-modalizing on all platforms, where sensible, is a longer-term project. Notepad++ on Windows, for instance, has a non-modal singleton Find dialog (with Replace and Find in Files on separate tabs), designed as such, that operates on the 'current' editor tab, unless one selects 'Find All in All Open Documents' to work on all of them. PS: Tal Einat also get 'autorelease pool' errors when trying to run IDLE on locally built 3.7.0. ---------- dependencies: -Problems with tkinter and tk8.6 on MacOS versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 17:47:28 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Aug 2018 21:47:28 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533160048.48.0.56676864532.issue34309@psf.upfronthosting.co.za> Eric Snow added the comment: Ah, thanks for clarifying. So which of these is the main thing you really want: 1. reload extension modules 2. completely restart Python It sounds like #1. If that's the case then there are a number of issues to resolve to make it work. However, there are some serious technical challenges to overcome. :/ So if it's #1 the problem space is relatively focused so a solution (if possible) would be tractable in the "short" term, so it *could* happen. :) However, if it's #2 then a lot of things will have to fixed and so realistically it might never happen. FYI, either way none of it will be backported, so the functionality would not be available on Python 3.7 or earlier. --------------- FWIW, in VS Code they run their plugins (extensions) in a separate process. Their docs give some insight into plugin system design. :) https://code.visualstudio.com/docs/extensionAPI/patterns-and-principles#_stability-extension-isolation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 17:49:38 2018 From: report at bugs.python.org (Tal Einat) Date: Wed, 01 Aug 2018 21:49:38 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533160178.65.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: Why remove the 2.7 version? This bug occurs with 2.7.15 on macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 17:56:50 2018 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Wed, 01 Aug 2018 21:56:50 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1533160610.03.0.56676864532.issue1230540@psf.upfronthosting.co.za> Change by Andrey Vlasovskikh : ---------- keywords: +patch pull_requests: +8116 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 18:08:24 2018 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Wed, 01 Aug 2018 22:08:24 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1533161304.27.0.56676864532.issue1230540@psf.upfronthosting.co.za> Andrey Vlasovskikh added the comment: I've added a PR with a patch I developed during the EuroPython 2018 sprint. I've fixed this issue in a way that is more or less consistent with how '_thread' threads interact with sys.excepthook, but I haven't added the log line they print to sys.stderr about an unhandled exception in a thread: Unhandled exception in thread started by at 0x108c840d0> I can add these messages if they are needed. I'd like to mention the issue I discussed with Victor Stinner at the sprints (adding Victor to the nosy list as he requested). The fix could possibly break the de facto contract that has been there for ages that 'theading' threads don't invoke sys.excepthook on uncaught exceptions. If the fact that sys.execepthook doesn't work with threading is considered a feature, then an alternative solution could be a new threading-specific hook: threading.excepthook. ---------- nosy: +vlasovskikh, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 18:08:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 01 Aug 2018 22:08:42 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533161322.4.0.56676864532.issue34120@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Removing 2.7 was unintended, from simultaneous editing. This is one of the exceptional cases where a backport is worth the risk (which seems here extremely low). I will remove it from the PR because auto backport will fail because of file renames, in addition to internal changes. Here are the new name to old name translations, where not a just a case change, needed to prepare a 2.7 patch. config_key keybindingDialog help_about aboutDialog query . # New in 3.6. Grep 2.7 code for 'grab_set' to find any usages in deleted code that query replaced. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 18:10:52 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Aug 2018 22:10:52 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533161452.59.0.56676864532.issue34309@psf.upfronthosting.co.za> Eric Snow added the comment: Also, part of the motivation for PEP 489 (extension module initialization) was to help with reloading extension modules. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 18:12:50 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Aug 2018 22:12:50 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1533161570.49.0.56676864532.issue1230540@psf.upfronthosting.co.za> Antoine Pitrou added the comment: No, I think this is a bug that deserves fixing, at least in 3.8. ---------- versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 18:15:22 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 01 Aug 2018 22:15:22 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533161722.12.0.56676864532.issue34309@psf.upfronthosting.co.za> Eric Snow added the comment: Also, PEP 3121 provides a good summary of some of the issues at hand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 19:16:22 2018 From: report at bugs.python.org (Conrad Ho) Date: Wed, 01 Aug 2018 23:16:22 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533165382.09.0.56676864532.issue24255@psf.upfronthosting.co.za> Conrad Ho added the comment: Hi, I have referenced the original patch and created an updated patch that uses the logging module + f-strings in place of the print statements in the http.client module. Also updated the relevant tests for print/logging in test_httplib to reflect these changes. The HTTPHandlerTest testcase from test_logging was also affected. In the testcase, it gets a logger with name 'http' and adds a logging.HTTPHandler to it. In our patch, we create a http.client logger, which happens to be considered a child of this testcase logger under the logger naming hierarchy. This causes http.client logging events to propagate up to the 'http' logger and for the testcase to loop infinitely (ie. the HTTPHandler calls http.client functions internally. These functions log events using the http.client logger, which propagate up to the testcase http logger which calls HttpHandler again). I have simply changed the testcase getLogger name to not be 'http' and clash with that http.client module logger. ---------- nosy: +Conrad Ho Added file: https://bugs.python.org/file47727/http-client-logging-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 19:49:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 01 Aug 2018 23:49:55 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1533167395.78.0.56676864532.issue34313@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume then that you tested PR8603 without opening an editor (which is certainly possible). 10.13.6 was released in the last month. PCBuild/build.bat -e downloads missing external dependency source code into externals/ and then compiles it into compatible .dlls. This includes doing updates as appropriate. I presume that the source and compilation flags are the same as used to make a release. AFAIK, Zach Ware is mainly responsible for the current easy-to-use, easy-to-get-right status. For a stripped-down reporducer, you might start with the files I attached to #34047. ---------- assignee: terry.reedy -> components: +macOS nosy: +ned.deily, ronaldoussoren -gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:03:09 2018 From: report at bugs.python.org (Matthias Klose) Date: Thu, 02 Aug 2018 00:03:09 +0000 Subject: [issue34286] lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0) In-Reply-To: <1533007091.73.0.56676864532.issue34286@psf.upfronthosting.co.za> Message-ID: <1533168189.22.0.56676864532.issue34286@psf.upfronthosting.co.za> Matthias Klose added the comment: strange. I see it succeeding in the build location, not the install location. Did you make sure to cd /tmp before running the test? I still can reproduce it: $ python3.7 -m test test_lib2to3 Run tests sequentially 0:00:00 load avg: 0.24 [1/1] test_lib2to3 test test_lib2to3 failed -- multiple errors occurred; run in verbose mode for details test_lib2to3 failed == Tests result: FAILURE == 1 test failed: test_lib2to3 Total duration: 5 sec 211 ms Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:07:21 2018 From: report at bugs.python.org (ksg97031) Date: Thu, 02 Aug 2018 00:07:21 +0000 Subject: [issue34302] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533090665.19.0.56676864532.issue34302@psf.upfronthosting.co.za> Message-ID: <1533168441.97.0.56676864532.issue34302@psf.upfronthosting.co.za> Change by ksg97031 : ---------- keywords: +patch pull_requests: +8117 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:10:08 2018 From: report at bugs.python.org (Seonggi Kim) Date: Thu, 02 Aug 2018 00:10:08 +0000 Subject: [issue34302] Avoid inefficient way to find start point in deque.index In-Reply-To: <1533090665.19.0.56676864532.issue34302@psf.upfronthosting.co.za> Message-ID: <1533168608.42.0.56676864532.issue34302@psf.upfronthosting.co.za> Seonggi Kim added the comment: I thing so too, it's my fault. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:16:31 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 02 Aug 2018 00:16:31 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1533168991.89.0.56676864532.issue33695@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I agree the provided benchmark on Linux should be more refined. And I'm not sure if "echo 3 | sudo tee /proc/sys/vm/drop_caches" before running it is enough honestly. The main point here is the reduction of stat() syscalls (-38%) and that can make a considerable difference, especially with network filesystems. That's basically the reason why scandir() was introduced in the first place and used in os.walk() glob.glob() and shutil.rmtree(), so I'm not sure why we should use a different rationale for shutil.copytree(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:29:02 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 Aug 2018 00:29:02 +0000 Subject: [issue34311] locale.format() and locale.format_string() cast Decimals to float In-Reply-To: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> Message-ID: <1533169742.76.0.56676864532.issue34311@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:32:19 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 00:32:19 +0000 Subject: [issue34286] lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0) In-Reply-To: <1533007091.73.0.56676864532.issue34286@psf.upfronthosting.co.za> Message-ID: <1533169939.14.0.56676864532.issue34286@psf.upfronthosting.co.za> Berker Peksag added the comment: I ran "python3.7 -m test test_lib2to3" in a separate terminal. I don't remember the exact location, but I'm sure it wasn't the build location (it was probably my home directory) Is it possible to add some debug print()s inside https://github.com/python/cpython/blob/3.7/Lib/lib2to3/tests/support.py#L37 ? My only guess is that the test code somehow finds the wrong refactorer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:40:06 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 Aug 2018 00:40:06 +0000 Subject: [issue34311] locale.format() and locale.format_string() cast Decimals to float In-Reply-To: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> Message-ID: <1533170406.14.0.56676864532.issue34311@psf.upfronthosting.co.za> Eric V. Smith added the comment: Would my suggestion in #33731 of adding another letter in the format spec for float and decimal.Decimal solve your problem? I guess if you're using monetary=True you'd need two additional letters: like 'f' but locale aware, and like 'f' but locale aware and monetary=True. Maybe 'l' and 'L' for these? In this case, there would be no changes to the locale module. I don't see any good way of using new-style formatting without changing float.__format__ and decimal.Decimal.__format__. ---------- components: +Interpreter Core type: -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:48:39 2018 From: report at bugs.python.org (James Emerton) Date: Thu, 02 Aug 2018 00:48:39 +0000 Subject: [issue34311] locale.format() and locale.format_string() cast Decimals to float In-Reply-To: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> Message-ID: <1533170919.18.0.56676864532.issue34311@psf.upfronthosting.co.za> James Emerton added the comment: Certainly adding another letter to the format spec would solve my issue and would in fact be somewhat preferable to using local.format directly. I think this could be fixed in the locale module by transforming the format spec and using new-style formatting, but I'm not familiar enough with the corner cases to know if its practical to cover all the possible cases; particularly those coming from format_string(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:48:53 2018 From: report at bugs.python.org (James Emerton) Date: Thu, 02 Aug 2018 00:48:53 +0000 Subject: [issue33731] string formatting that produces floats with preset precision while respecting locale In-Reply-To: <1527856953.25.0.682650639539.issue33731@psf.upfronthosting.co.za> Message-ID: <1533170933.45.0.56676864532.issue33731@psf.upfronthosting.co.za> Change by James Emerton : ---------- nosy: +jemerton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 21:44:28 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 02 Aug 2018 01:44:28 +0000 Subject: [issue34259] Improve docstring of list.sort In-Reply-To: <1532778727.04.0.56676864532.issue34259@psf.upfronthosting.co.za> Message-ID: <1533174267.99.0.56676864532.issue34259@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Copying from the sorted built-in's docstring would make sense here, given that sorted is implemented in terms of list.sort in the first place. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 22:37:03 2018 From: report at bugs.python.org (ppperry) Date: Thu, 02 Aug 2018 02:37:03 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1533177423.2.0.56676864532.issue34279@psf.upfronthosting.co.za> Change by ppperry : ---------- title: RFC: issue a warning in regrtest when no test have been executed? -> RFC: issue a warning in regrtest when no tests have been executed? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 22:54:24 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Aug 2018 02:54:24 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533178464.44.0.56676864532.issue34312@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ISTM that this would encourage silently inefficient coding patterns like: url.endswith({'.html', '.txt', '.php'}) # The set object gets rebuilt on every call # and a new set iterator object gets built on every call. # Looping over the contents uses the slower iterator protocol # rather than the existing superfast PyTuple_GET_SIZE() and # PyTuple_GET_ITEM() macros which are entirely in-lined. Do we have any known use cases or user requests where the existing API doesn't suffice? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 22:57:59 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Aug 2018 02:57:59 +0000 Subject: [issue34259] Improve docstring of list.sort In-Reply-To: <1532778727.04.0.56676864532.issue34259@psf.upfronthosting.co.za> Message-ID: <1533178679.36.0.56676864532.issue34259@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 23:02:06 2018 From: report at bugs.python.org (Dan Snider) Date: Thu, 02 Aug 2018 03:02:06 +0000 Subject: [issue34314] Like __hash__, allow setting MyClass.__init__ to None to prevent it being called by type.__call__ Message-ID: <1533178926.29.0.56676864532.issue34314@psf.upfronthosting.co.za> New submission from Dan Snider : Right now, you really gotta jump through hoops in some cases if you only want to use __new__ and don't care about __init__ (is there ever a time where you'd use both?). The problem originates in type.__call__. I'm attaching a full Python implementation of type_call/object_init at the end, but here's a tl;dr representation of the issue i type_call (where the whole thing can be basically summarized as this): def type_call(type, *args, **kws): r = type.__new__(type, *args, **kws) if not issubclass(r, type): type(r).__init__(r, *args, **kws) return r So if type(r).__init__ is object.__init__ or some other method with an incompatible signature to the metaclass's, errors are raised, which leads to having to implement really annoying workarounds. The annoyingness is compounded further by the fact that all object_init does is make sure it didn't receive any arguments. All of that can be avoided by setting __init__ in the class to None, which would have the same effect as setting tp_init to NULL on an extension type. Perhaps with a caveat that the only current reachable __init__ is object.__init__? I don't really find myself in situations involving the need for __new__ too often, but wouldn't this have a profoundly positive impact on pickle as well? One thing I can think of is there can be a universal pickle implementation for extension types with Py_TPFLAGS_BASETYPE set and a nonzero dict offset since if it detected a NULL init all it has to do is memcpy the base struct and pickle the instance dict. Anyway, the C code is pretty easy to understand but here's a Python implementation almost exactly equivalent that shows a case where a metaclass can be used as a callable that accepts an arbitrary number of arguments instead of a forced three and returns a class: PyType_Type = type Py_TYPE = type PyType_IsSubtype = issubclass PyTuple_Check = tuple.__instancecheck__ PyDict_Check = dict.__instancecheck__ PyDict_GET_SIZE = dict.__len__ PyTUple_GET_SIZE = tuple.__len__ NULL = 0 ALLOW_NULL_INIT = False def excess_args(args, kws): return args or kws class Object: def __init__(self, *args, **kws): # object_init literally does nothing but check for zero len args/kws # (bit of a tangent but why is excess_args not a macro...?) if ALLOW_NULL_INIT: return tp = Py_TYPE(self) print('Object.__init__, type is:', tp.__name__) if excess_args(args, kws): if tp.__init__ is object.__init__: raise TypeError("object.__init__() takes no arguments") raise TypeError(f'{tp.__name__}.__init__() takes no arguments') def fake_init(*args, **kws): pass class Type(type): def __getattribute__(self, attr): value = type.__getattribute__(self, attr) if attr == '__init__': if ALLOW_NULL_INIT and value is None: return fake_init return super(type(self).__mro__[1], self).__init__ return value def __call__(tp, *args, **kws): if getattr(tp, '__new__', 0) == NULL: raise TypeError(f"cannot create {tp.__name__} instances") obj = tp.__new__(tp, *args, **kws) if (tp is type and PyTuple_Check(args) and PyTuple_GET_SIZE(args)== 1 and (kws == NULL or (PyDict_Check(kws) and PyDict_GET_SIZE(kws)==0))): return obj if not PyType_IsSubtype(Py_TYPE(obj), tp): return obj tp = Py_TYPE(obj) # Here's where the problem is. What could possibly be negatively # affected by this? if getattr(tp, '__init__', 0): res = tp.__init__(obj, *args, **kws) return obj def autoname(arg): return '_'.join(arg.split()) def autobase(opt): return () if not opt else (opt,) class MetaBase(Object, type): pass class Mixin1: pass class Meta(MetaBase, metaclass=Type): __init__ = None def __new__(metacls, name, opt=None): return super().__new__(metacls, autoname(name), autobase(opt), {}) if __name__ == '__main__': try: foobar = Meta('foo bar', Mixin1) except TypeError as er: print(f'could not make foobar because: {er}') print('setting ALLOW_NULL_INIT to True;') ALLOW_NULL_INIT = True foobar = Meta('foo bar', Mixin1) print('foobar.__name__ is:', foobar.__name__) print('foobar__mro__ is:', foobar.__mro__) ---------- components: Interpreter Core messages: 322907 nosy: bup priority: normal severity: normal status: open title: Like __hash__, allow setting MyClass.__init__ to None to prevent it being called by type.__call__ type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 23:17:08 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Aug 2018 03:17:08 +0000 Subject: [issue34314] Like __hash__, allow setting MyClass.__init__ to None to prevent it being called by type.__call__ In-Reply-To: <1533178926.29.0.56676864532.issue34314@psf.upfronthosting.co.za> Message-ID: <1533179828.95.0.56676864532.issue34314@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Right now, you really gotta jump through hoops > in some cases if you only want to use __new__ > and don't care about __init__ I'm now sure I see the difficulty. It is easy to define a classes with __new__ and without __init__: >>> class A: def __new__(cls, *args): print('New called with', cls, 'and', args) return object.__new__(cls) >>> a = A(10, 20, 30) New called with and (10, 20, 30) >>> isinstance(a, A) True > Like __hash__, allow setting MyClass.__init__ to None FWIW, the API for hashing being set-to-None wasn't done because we like it (there a numerous downsides). It was done because we needed hashing to be on by default and there needed to be a way to turn it off. The downsides are that it confuses users, it is hard to teach and remember, and it adds a branch to various APIs which would then need to test for None. Instead, we prefer the pattern of having object() provide a default dummy method that either does nothing or gives up (like object.__init__ or the various rich comparison methods for object). This simplifies downstream code than doesn't have to check for a rare special case. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 23:34:56 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 02 Aug 2018 03:34:56 +0000 Subject: [issue33731] string formatting that produces floats with preset precision while respecting locale In-Reply-To: <1527856953.25.0.682650639539.issue33731@psf.upfronthosting.co.za> Message-ID: <1533180896.27.0.56676864532.issue33731@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8118 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 23:37:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 03:37:07 +0000 Subject: [issue34314] Like __hash__, allow setting MyClass.__init__ to None to prevent it being called by type.__call__ In-Reply-To: <1533178926.29.0.56676864532.issue34314@psf.upfronthosting.co.za> Message-ID: <1533181027.61.0.56676864532.issue34314@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Setting __hash__ to None doesn't do what you think. It doesn't prevent __hash__ from being called by hash(), instead it produces a TypeError. >>> class A: __hash__ = None ... >>> hash(A()) Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'A' Actually the effect of special casing __hash__ is not raising a TypeError, but raising a TypeError with better error message. A TypeError was already raised before if set __hash__ to a non-callable. In 2.7: >>> class A: __hash__ = None ... >>> hash(A()) Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not callable If you want to prevent an inherited __init__ from being called by types's __call__, you can define an __init__ with an empty body. def __init__(self, *args, **kwargs): pass ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 23:38:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 03:38:09 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533181089.89.0.56676864532.issue34312@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have same concerns as Raymond. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 23:42:26 2018 From: report at bugs.python.org (James Emerton) Date: Thu, 02 Aug 2018 03:42:26 +0000 Subject: [issue33731] string formatting that produces floats with preset precision while respecting locale In-Reply-To: <1527856953.25.0.682650639539.issue33731@psf.upfronthosting.co.za> Message-ID: <1533181346.48.0.56676864532.issue33731@psf.upfronthosting.co.za> James Emerton added the comment: So far, I've implemented this for Decimal ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 23:52:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 03:52:46 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1533181966.95.0.56676864532.issue33695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: os.walk() and glob.glob() used *only* stat(), opendir() and readdir() syscalls (and stat() syscalls dominated). The effect of reducing the number of the stat() syscalls is significant. shutil.rmtree() uses also the unlink() syscall. Since it is usually cheap (but see issue32453), the benefit still is good, but not such large. Actually I had concerns about using scandir() in shutil.rmtree(). shutil.copytree() needs to open, read, and write files. This is not so cheap, and the benefit of reducing the number of the stat() syscalls is hardly noticed in real cases. shutil.copytree() was not converted to using scandir() intentionally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 00:26:08 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Aug 2018 04:26:08 +0000 Subject: [issue33731] string formatting that produces floats with preset precision while respecting locale In-Reply-To: <1527856953.25.0.682650639539.issue33731@psf.upfronthosting.co.za> Message-ID: <1533183968.48.0.56676864532.issue33731@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would like to see locale() remain somewhat decoupled from the rest of string formatting. IIRC locale() is finicky especially when concurrency is involved. I think a best practice is for an app to address locale issues explicitly rather than inside string formatting. I'll defer to those with more experience using locale -- I just have a vague recollection of this being an area fraught with landmines. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 00:31:21 2018 From: report at bugs.python.org (James Emerton) Date: Thu, 02 Aug 2018 04:31:21 +0000 Subject: [issue33731] string formatting that produces floats with preset precision while respecting locale In-Reply-To: <1527856953.25.0.682650639539.issue33731@psf.upfronthosting.co.za> Message-ID: <1533184281.81.0.56676864532.issue33731@psf.upfronthosting.co.za> James Emerton added the comment: @rhettinger See #34311 about formatting Decimals using locale.format(). I'd like to see the problem fixed in one place or the other. Also, this is seems relatively straightforward to implement as it's really just a combination of the fixed precision 'f' and the locale specific 'n' format types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 00:35:20 2018 From: report at bugs.python.org (chipstuff) Date: Thu, 02 Aug 2018 04:35:20 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1533184520.48.0.56676864532.issue32545@psf.upfronthosting.co.za> chipstuff added the comment: Experienced the same issue, this is either Permissions or Antivirus blocking Python from being installed. After uninstall third party AV (avast) and running the following commands to update Defender's signature files the installation was completed. ?%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe? -RemoveDefinitions -All ?%PROGRAMFILES%\Windows Defender\MPCMDRUN.exe? -SignatureUpdate Source: https://appuals.com/ ---------- nosy: +chipstuff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 01:52:59 2018 From: report at bugs.python.org (Raman) Date: Thu, 02 Aug 2018 05:52:59 +0000 Subject: [issue34315] Regex not evalauated correctly Message-ID: <1533189179.81.0.56676864532.issue34315@psf.upfronthosting.co.za> New submission from Raman : Sample code below import re regex = r'DELETE\s*(?P[a-zA-z_0-9]*)\s*FROM\s*(?P[a-zA-z_0-9]+)\s*([a-zA-Z0-9_]*)\s*(?PWHERE){0,1}(\s.)*?' test_str = 'DELETE FROM my_table1 t_ WHERE id in (1,2,3)' matches = re.finditer(regex, test_str, re.MULTILINE) print([m.groupdict() for m in matches]) Below is the expected output. [{'table_alias': '', 'table_name': 'my_table1', 'where_statement': 'WHERE'}] But in Win Server 2012 R2, the output is [{'table_alias': '', 'table_name': 'mytable1', 'where_statement': None}] Using 3.7 in Win Server 2012 R2 also the output is not as expected. But in Win 10 and other linux variants, expected output is obtained. ---------- components: Regular Expressions messages: 322916 nosy: ezio.melotti, mrabarnett, ram, serhiy.storchaka priority: normal severity: normal status: open title: Regex not evalauated correctly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:18:34 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 06:18:34 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533190714.28.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 10ea9409ceb5da83cb380b610750551e26561044 by Tal Einat in branch 'master': bpo-34120: fix IDLE freezing after closing dialogs (GH-8603) https://github.com/python/cpython/commit/10ea9409ceb5da83cb380b610750551e26561044 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:19:18 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 06:19:18 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533190758.1.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:34:15 2018 From: report at bugs.python.org (Eric Wieser) Date: Thu, 02 Aug 2018 06:34:15 +0000 Subject: [issue1764286] inspect.getsource does not work with decorated functions Message-ID: <1533191655.08.0.56676864532.issue1764286@psf.upfronthosting.co.za> Eric Wieser added the comment: New issue opened at https://bugs.python.org/issue34305, along with a PR linked there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:34:30 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 06:34:30 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533191670.26.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +8120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:37:53 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 06:37:53 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533191873.41.0.56676864532.issue34120@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d9fc795487f74531ea43760469cc215858d0d908 by Miss Islington (bot) in branch '3.7': bpo-34120: fix IDLE freezing after closing dialogs (GH-8603) https://github.com/python/cpython/commit/d9fc795487f74531ea43760469cc215858d0d908 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:42:34 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 Aug 2018 06:42:34 +0000 Subject: [issue34315] Regex not evalauated correctly In-Reply-To: <1533189179.81.0.56676864532.issue34315@psf.upfronthosting.co.za> Message-ID: <1533192154.6.0.56676864532.issue34315@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:46:31 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 06:46:31 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1533192391.03.0.56676864532.issue32545@psf.upfronthosting.co.za> Tal Einat added the comment: After reading everything here, I'm not sure there's anything wrong or to be improved with Python's Windows installers in this regard. All of the installation errors reported here appear to be caused by external circumstances breaking MSI installation in general. IMO this should be resolved as "not a bug". ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:49:34 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 06:49:34 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533192574.15.0.56676864532.issue34312@psf.upfronthosting.co.za> Change by Tal Einat : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:55:58 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 06:55:58 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533192958.82.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8121 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:58:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 Aug 2018 06:58:02 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1533193082.51.0.56676864532.issue32545@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Given that Steve has not found anything useful in the logs, I agree. In any case, the 3.7.0a4 installer has be superceded by multiple installers, including finally, 3.7.0. Anyone wanting 3.7 now should use that (and report problems with the same). By the way, we appreciate people following up and given feedback on our responses, so we can learn too. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:14:20 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 07:14:20 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533194060.35.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by Tal Einat : ---------- pull_requests: +8122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:14:27 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 07:14:27 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533194067.28.0.56676864532.issue34120@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9fcfb7b010bd41d4ebaeed372df92b6962253fed by Miss Islington (bot) in branch '3.6': bpo-34120: fix IDLE freezing after closing dialogs (GH-8603) https://github.com/python/cpython/commit/9fcfb7b010bd41d4ebaeed372df92b6962253fed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:21:52 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 07:21:52 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533194512.53.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 894940b1099677c1ca0aa527dbb935e47d3d591a by Tal Einat in branch '2.7': [2.7] bpo-34120: fix IDLE freezing after closing dialogs (GH-8603) https://github.com/python/cpython/commit/894940b1099677c1ca0aa527dbb935e47d3d591a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:30:10 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 07:30:10 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533195010.24.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset dd74369cb7b230b07ac3a031563406c8f2aae17f by Tal Einat in branch 'master': bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616) https://github.com/python/cpython/commit/dd74369cb7b230b07ac3a031563406c8f2aae17f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:30:31 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 07:30:31 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533195031.03.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:31:18 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 07:31:18 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533195078.61.0.56676864532.issue34120@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8124 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:52:08 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 02 Aug 2018 07:52:08 +0000 Subject: [issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro? In-Reply-To: <1486568378.9.0.904847418882.issue29502@psf.upfronthosting.co.za> Message-ID: <1533196328.74.0.56676864532.issue29502@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I would prefer to wait with this issue until PEP 580 has been decided. If it's accepted, it will change function calling code a lot. As I wrote in PEP 580, I was planning to have a PEP on profiling anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:52:28 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 07:52:28 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533196348.24.0.56676864532.issue34120@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 60586de02de074a33c015e5a013d85d0b17e7e61 by Miss Islington (bot) in branch '3.7': bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616) https://github.com/python/cpython/commit/60586de02de074a33c015e5a013d85d0b17e7e61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 03:53:00 2018 From: report at bugs.python.org (Christopher Schramm) Date: Thu, 02 Aug 2018 07:53:00 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533196380.06.0.56676864532.issue34309@psf.upfronthosting.co.za> Change by Christopher Schramm : ---------- nosy: +cschramm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 04:29:31 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Thu, 02 Aug 2018 08:29:31 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1533198571.13.0.56676864532.issue34313@psf.upfronthosting.co.za> Vlad Tudorache added the comment: I confirm the crashes. I've tried with personal builds of python 3.5, 3.6, 3.7, with ActiveTcl and personal builds of Tcl 8.6.x, the problem does not appear with 8.5.18, but shows itself with 8.5.19 (strange, API changes?). I'll try to investigate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 04:31:24 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 08:31:24 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533198684.92.0.56676864532.issue34120@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8c4a0059accb5cb33e90ec5b2f3e9dc08e2f3048 by Miss Islington (bot) in branch '3.6': bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616) https://github.com/python/cpython/commit/8c4a0059accb5cb33e90ec5b2f3e9dc08e2f3048 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 04:33:46 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 02 Aug 2018 08:33:46 +0000 Subject: [issue34120] IDLE: Freeze when closing Settings (& About) dialog on MacOS In-Reply-To: <1531648409.88.0.56676864532.issue34120@psf.upfronthosting.co.za> Message-ID: <1533198826.59.0.56676864532.issue34120@psf.upfronthosting.co.za> Tal Einat added the comment: Many thanks for the report and follow through, Vlad! Thank you too, Kevin, for your help in resolving this. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 04:51:30 2018 From: report at bugs.python.org (Fantix King) Date: Thu, 02 Aug 2018 08:51:30 +0000 Subject: [issue33062] ssl_renegotiate() doesn't seem to be exposed In-Reply-To: <1520893582.26.0.467229070634.issue33062@psf.upfronthosting.co.za> Message-ID: <1533199890.52.0.56676864532.issue33062@psf.upfronthosting.co.za> Change by Fantix King : ---------- keywords: +patch pull_requests: +8125 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 04:57:41 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Thu, 02 Aug 2018 08:57:41 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1533200261.49.0.56676864532.issue34313@psf.upfronthosting.co.za> Vlad Tudorache added the comment: The problem shows itself on macOS High Sierra in some Tk Demos, independently of Python's IDLE. So there is something completely different, to report to the Tcl/Tk community. Strangely, I didn't notice the issues on Sierra, but I have no Sierra Mac right now to check it again. Even in Tk 8.5.18 (ActiveState or self-compiled) there are issues (notably the cascade menus demo, the button menus demo, others to) in rendering some UI elements. Sometimes bad indexes are reported (sort of [lindex {A LIST} index $N] gives $N not found even when in range)... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 05:01:36 2018 From: report at bugs.python.org (chris) Date: Thu, 02 Aug 2018 09:01:36 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533200496.75.0.56676864532.issue34309@psf.upfronthosting.co.za> chris added the comment: Okay, completely restarting python is not really necessary. Being able to reliably unload and later on re-import python modules (extension modules as well as pure python modules) in an embedded python runtime would solve my problems. One way to achieve that is currently Py_Initialize / Py_Finalize, but there are the drawbacks already mentioned. Another possibility is using sub-interpreters. If either of these could be fixed for extension modules (possibly with unloading the shared objects / DLL's :) ) I'd be fine. I completely understand your point about backporting and it is not an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 05:21:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 09:21:28 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1533201688.59.0.56676864532.issue1230540@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it be possible to modify the default implementation of sys.excepthook to have a different output when it's not called from the main thread? Mimick the current traceback from threads. Would it be possible to call threading.current_thread() from the default sys.excepthook? The problem is to get the threading module and to decide how to handle error on getting the current thread. An alternative would be to introduce a new hook to log exceptions in threads, ex: sys.threadexcepthook. That hoook would take a 4th parameter. But Andrey Vlasovskikh didn't like this idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 05:24:17 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 09:24:17 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1533201857.72.0.56676864532.issue33695@psf.upfronthosting.co.za> STINNER Victor added the comment: When I worked on the os.scandir() implementation, I recall that an interesting test was NFS. Depending on the configuration, stat() in a network filesystem can be between very slow and slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 05:46:59 2018 From: report at bugs.python.org (Nikolaus Rath) Date: Thu, 02 Aug 2018 09:46:59 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1533203219.2.0.56676864532.issue1230540@psf.upfronthosting.co.za> Change by Nikolaus Rath : ---------- nosy: -nikratio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:02:33 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:02:33 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533204153.25.0.56676864532.issue30317@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New failure on x86 Windows7 3.x: https://buildbot.python.org/all/#/builders/58/builds/1174 test_timeout (test.test_multiprocessing_spawn.WithThreadsTestSemaphore) ... skipped 'test not appropriate for threads' test test_multiprocessing_spawn failed test_import (test.test_multiprocessing_spawn._TestImportStar) ... ok ====================================================================== FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1044, in test_timeout self.assertGreaterEqual(delta, 0.150) AssertionError: 0.13579845428466797 not greater than or equal to 0.15 ---------------------------------------------------------------------- Ran 311 tests in 495.714s FAILED (failures=1, skipped=37) 1 test failed again: test_multiprocessing_spawn == Tests result: FAILURE then FAILURE == ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:03:37 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:03:37 +0000 Subject: [issue34292] test_compile hangs in AMD Ubuntu buildbots In-Reply-To: <1533041303.96.0.56676864532.issue34292@psf.upfronthosting.co.za> Message-ID: <1533204217.46.0.56676864532.issue34292@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New failure on AMD64 Ubuntu 3.x: https://buildbot.python.org/all/#/builders/154/builds/100 test_single_statement (test.test_compile.TestSpecifics) ... ok Timeout (0:15:00)! Thread 0x00007f30435d3080 (most recent call first): File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/test_compile.py", line 671 in test_stack_overflow File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/case.py", line 615 in run File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/case.py", line 663 in __call__ File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/suite.py", line 122 in run File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/suite.py", line 122 in run File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/suite.py", line 122 in run File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/unittest/runner.py", line 176 in run File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/support/__init__.py", line 1883 in _run_suite File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/support/__init__.py", line 1973 in run_unittest File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest.py", line 175 in test_runner File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest.py", line 179 in runtest_inner File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 286 in rerun_failed_tests File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 570 in _main File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 531 in main File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 584 in main File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/__main__.py", line 2 in File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/runpy.py", line 85 in _run_code File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/runpy.py", line 193 in _run_module_as_main make: *** [buildbottest] Error 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:06:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:06:12 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch In-Reply-To: <1532158324.8.0.56676864532.issue34177@psf.upfronthosting.co.za> Message-ID: <1533204372.15.0.56676864532.issue34177@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: This error is happening in the x86-64 High Sierra 3.7 buildbot: https://buildbot.python.org/all/#/builders/147/builds/174 ====================================================================== FAIL: test_startup_imports (test.test_site.StartupImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.7.billenstein-sierra/build/Lib/test/test_site.py", line 487, in test_startup_imports self.assertFalse(modules.intersection(collection_mods), stderr) AssertionError: {'collections', 'heapq', 'types', 'functools', 'keyword', 'reprlib', 'operator'} is not false : import _frozen_importlib # frozen ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:06:56 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:06:56 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch In-Reply-To: <1532158324.8.0.56676864532.issue34177@psf.upfronthosting.co.za> Message-ID: <1533204416.82.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:11:39 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:11:39 +0000 Subject: [issue34316] test_socket timeouts in AMD64 Windows10 3.x buildbots Message-ID: <1533204699.35.0.56676864532.issue34316@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : Some tests in test_socket and test_asyncio are receiving timeouts in AMD64 Windows10 3.x buildbots: test_asyncio: https://buildbot.python.org/all/#/builders/3/builds/1192 test_socket: https://buildbot.python.org/all/#/builders/3/builds/1191 Sample error messages: test_not_implemented (test.test_asyncio.test_events.AbstractEventLoopTests) ... ok Timeout (0:15:00)! Thread 0x00001a74 (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\socket.py", line 212 in accept File "D:\buildarea\3.x.bolen-windows10\build\lib\socket.py", line 528 in socketpair File "D:\buildarea\3.x.bolen-windows10\build\lib\asyncio\selector_events.py", line 113 in _make_self_pipe File "D:\buildarea\3.x.bolen-windows10\build\lib\asyncio\selector_events.py", line 66 in __init__ File "D:\buildarea\3.x.bolen-windows10\build\lib\asyncio\events.py", line 660 in new_event_loop File "D:\buildarea\3.x.bolen-windows10\build\lib\asyncio\events.py", line 762 in new_event_loop File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_asyncio\test_events.py", line 3061 in test_not_implemented_async File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 615 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 663 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\runner.py", line 176 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1883 in _run_suite File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1973 in run_unittest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 175 in test_runner File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 179 in runtest_inner File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 140 in runtest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 286 in rerun_failed_tests File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 570 in _main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 531 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 584 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\__main__.py", line 2 in File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 85 in _run_code File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 193 in _run_module_as_main program finished with exit code 1 elapsedTime=5350.801000 test_not_implemented_async (test.test_asyncio.test_events.AbstractEventLoopTests) ... and testTimeoutDefault (test.test_socket.NetworkConnectionAttributesTest) ... ok Unhandled exception in thread started by > Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_socket.py", line 336, in clientRun self.clientTearDown() File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_socket.py", line 4752, in clientTearDown self.cli.close() AttributeError: 'NetworkConnectionAttributesTest' object has no attribute 'cli' Timeout (0:15:00)! Thread 0x0000184c (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\socket.py", line 212 in accept File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_socket.py", line 4757 in _justAccept File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 615 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\case.py", line 663 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 122 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\suite.py", line 84 in __call__ File "D:\buildarea\3.x.bolen-windows10\build\lib\unittest\runner.py", line 176 in run File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1883 in _run_suite File "D:\buildarea\3.x.bolen-windows10\build\lib\test\support\__init__.py", line 1973 in run_unittest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_socket.py", line 6032 in test_main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 179 in runtest_inner File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\runtest.py", line 140 in runtest File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 286 in rerun_failed_tests File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 570 in _main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 531 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\libregrtest\main.py", line 584 in main File "D:\buildarea\3.x.bolen-windows10\build\lib\test\__main__.py", line 2 in File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 85 in _run_code File "D:\buildarea\3.x.bolen-windows10\build\lib\runpy.py", line 193 in _run_module_as_main program finished with exit code 1 elapsedTime=4059.474000 ---------- components: Tests messages: 322937 nosy: pablogsal priority: normal severity: normal status: open title: test_socket timeouts in AMD64 Windows10 3.x buildbots type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:11:55 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:11:55 +0000 Subject: [issue34316] test_socket and test_asyncio timeouts in AMD64 Windows10 3.x buildbots In-Reply-To: <1533204699.35.0.56676864532.issue34316@psf.upfronthosting.co.za> Message-ID: <1533204715.31.0.56676864532.issue34316@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- title: test_socket timeouts in AMD64 Windows10 3.x buildbots -> test_socket and test_asyncio timeouts in AMD64 Windows10 3.x buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:13:50 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:13:50 +0000 Subject: [issue34316] test_socket and test_asyncio timeouts in AMD64 Windows10 3.x buildbots In-Reply-To: <1533204699.35.0.56676864532.issue34316@psf.upfronthosting.co.za> Message-ID: <1533204830.06.0.56676864532.issue34316@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Is possible that this are two separate issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:14:37 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 10:14:37 +0000 Subject: [issue34292] test_compile hangs in AMD Ubuntu buildbots In-Reply-To: <1533041303.96.0.56676864532.issue34292@psf.upfronthosting.co.za> Message-ID: <1533204877.12.0.56676864532.issue34292@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New failure on AMD64 Ubuntu 3.7: test_single_statement (test.test_compile.TestSpecifics) ... ok Timeout (0:15:00)! Thread 0x00007f5f41d9e080 (most recent call first): File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/test_compile.py", line 671 in test_stack_overflow File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/case.py", line 615 in run File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/case.py", line 663 in __call__ File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/suite.py", line 122 in run File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/suite.py", line 122 in run File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/suite.py", line 122 in run File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/suite.py", line 84 in __call__ File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/unittest/runner.py", line 176 in run File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/support/__init__.py", line 1882 in _run_suite File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/support/__init__.py", line 1972 in run_unittest File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/runtest.py", line 175 in test_runner File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/runtest.py", line 179 in runtest_inner File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 286 in rerun_failed_tests File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 570 in _main File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 531 in main File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/libregrtest/main.py", line 584 in main File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/test/__main__.py", line 2 in File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/runpy.py", line 85 in _run_code File "/home/buildbot/buildarea/3.7.einat-ubuntu/build/Lib/runpy.py", line 193 in _run_module_as_main make: *** [buildbottest] Error 1 test_stack_overflow (test.test_compile.TestSpecifics) ... Makefile:1096: recipe for target 'buildbottest' failed program finished with exit code 2 elapsedTime=6544.321095 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:15:21 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 02 Aug 2018 10:15:21 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch In-Reply-To: <1532158324.8.0.56676864532.issue34177@psf.upfronthosting.co.za> Message-ID: <1533204921.24.0.56676864532.issue34177@psf.upfronthosting.co.za> INADA Naoki added the comment: Same fix can be applied to buildbot. This is caused by (a) Homebrew installs Python to /usr/local with (hacky) sitecustomize, and (b) Python's default prefix is /usr/local. I think test should be run without conflicting with another installation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:18:32 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 10:18:32 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533205112.2.0.56676864532.issue30317@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:37:28 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 10:37:28 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch In-Reply-To: <1532158324.8.0.56676864532.issue34177@psf.upfronthosting.co.za> Message-ID: <1533206248.38.0.56676864532.issue34177@psf.upfronthosting.co.za> STINNER Victor added the comment: > Same fix can be applied to buildbot. Sure. Go ahead :-) The buildbot configuration can be found at: https://github.com/python/buildmaster-config/ Send a pull request, and Zachary Ware (or me) will review it. Zach is the expert here ;-) ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:51:22 2018 From: report at bugs.python.org (desbma) Date: Thu, 02 Aug 2018 10:51:22 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1533207082.75.0.56676864532.issue24564@psf.upfronthosting.co.za> desbma added the comment: > Since the `copy_function` is customizable to switch between `copy` and `copy2`, making copystat optional on files, perhaps the `copystat` should be optional on directories, as well. Related: https://bugs.python.org/issue32073 ---------- nosy: +desbma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:53:05 2018 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 02 Aug 2018 10:53:05 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533207185.58.0.56676864532.issue34309@psf.upfronthosting.co.za> Petr Viktorin added the comment: PEP 489 (Multi-phase extension module initialization) makes it possible/easy to unload/reimport extension modules, in the sense of destroying/recreating the module object. The problem is that the modules needs to opt-in to supporting this, which is not always easy (e.g. the module needs to not use C globals, or use them carefully), and sometimes it's still nearly impossible (see the in-progress PEP 573). Unloading the actual shared library is another matter, though. That's not currently planned. There's no good way to ensure that there no remaining objects that could reference the shared library's code. Instead, your best bet is probably to name the new .so/DLL differently, and load an extra copy. (PEP 489 makes it possible to make the .so/DLL contain a module with a different name.) If you do go this way, I'd welcome feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 06:53:50 2018 From: report at bugs.python.org (sakamoto aya) Date: Thu, 02 Aug 2018 10:53:50 +0000 Subject: [issue34317] Improve docstring Environment variables in Windows NT Message-ID: <1533207230.71.0.56676864532.issue34317@psf.upfronthosting.co.za> New submission from sakamoto aya : Expired link in windows.rst: https://support.microsoft.com/en-us/help/100843/environment-variables-in-windows-nt May I make a suggestion? The new link:https://www.microsoft.com/en-us/wdsi/help/folder-variables ---------- assignee: docs at python components: Documentation messages: 322944 nosy: HiyashiChuka, docs at python priority: normal severity: normal status: open title: Improve docstring Environment variables in Windows NT type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:00:07 2018 From: report at bugs.python.org (Roundup Robot) Date: Thu, 02 Aug 2018 11:00:07 +0000 Subject: [issue34317] Improve docstring Environment variables in Windows NT In-Reply-To: <1533207230.71.0.56676864532.issue34317@psf.upfronthosting.co.za> Message-ID: <1533207607.16.0.56676864532.issue34317@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8127 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:14:57 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 02 Aug 2018 11:14:57 +0000 Subject: [issue34287] bufferedio.c uses unused argument of METH_NOARGS functions In-Reply-To: <1533020863.81.0.56676864532.issue34287@psf.upfronthosting.co.za> Message-ID: <1533208497.45.0.56676864532.issue34287@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset fc512e3e0663f7f325862fcd42aef765fd34a453 by INADA Naoki (jdemeyer) in branch 'master': bpo-34287: Do not use second argument of METH_NOARGS functions (GH-8582) https://github.com/python/cpython/commit/fc512e3e0663f7f325862fcd42aef765fd34a453 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:15:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 02 Aug 2018 11:15:25 +0000 Subject: [issue34287] bufferedio.c uses unused argument of METH_NOARGS functions In-Reply-To: <1533020863.81.0.56676864532.issue34287@psf.upfronthosting.co.za> Message-ID: <1533208525.93.0.56676864532.issue34287@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:39:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 11:39:54 +0000 Subject: [issue34318] Convert deprecated behavior of assertRaises() etc into errors Message-ID: <1533209994.63.0.56676864532.issue34318@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Currently assertRaises(), assertRaisesRegex(), assertWarns() and assertWarnsRegex() have some weird behavior. # always success if the callable is None self.assertRaises(SomeException, None) # keyword arguments except "msg" are ignored with self.assertRaises(SomeException, foobar=123): ... # always success because keyword arguments are ignored self.assertRaises(SomeException, callable=func) Hardly any user code uses these "features" intentionally. More likely such examples are hidden bugs (see for example [1]). A DeprecationWarning is raised in these cases since 3.5 (issue24134), and it is time to make them errors. [1] https://mail.python.org/pipermail/python-list/2018-July/736363.html ---------- components: Tests messages: 322946 nosy: ezio.melotti, michael.foord, rbcollins, serhiy.storchaka priority: normal severity: normal status: open title: Convert deprecated behavior of assertRaises() etc into errors type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:40:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 11:40:18 +0000 Subject: [issue34318] Convert deprecated behavior of assertRaises() etc into errors In-Reply-To: <1533209994.63.0.56676864532.issue34318@psf.upfronthosting.co.za> Message-ID: <1533210018.09.0.56676864532.issue34318@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:48:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 11:48:50 +0000 Subject: [issue34318] Convert deprecated behavior of assertRaises() etc into errors In-Reply-To: <1533209994.63.0.56676864532.issue34318@psf.upfronthosting.co.za> Message-ID: <1533210530.47.0.56676864532.issue34318@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +8128 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:52:33 2018 From: report at bugs.python.org (Thomas Nyberg) Date: Thu, 02 Aug 2018 11:52:33 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() Message-ID: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> New submission from Thomas Nyberg : This came out of the following posts: https://mail.python.org/pipermail/python-ideas/2018-August/052549.html https://mail.python.org/pipermail/python-ideas/2018-August/052553.html Basically my request would be to change the documentation here: https://docs.python.org/3.7/library/pathlib.html#pathlib.Path.read_text I would like to add a note that the underlying file object itself is closed after the read_text() method is called. Maybe I'm just a little dense and it should be obvious that the functionality here would be different than open("filepath").read(), but given that thread I linked, I don't believe I'm the only one. ---------- assignee: docs at python components: Documentation messages: 322947 nosy: docs at python, thomas.nyberg priority: normal severity: normal status: open title: Clarify pathlib.Path("filepath").read_text() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 08:09:57 2018 From: report at bugs.python.org (Fantix King) Date: Thu, 02 Aug 2018 12:09:57 +0000 Subject: [issue33062] ssl_renegotiate() doesn't seem to be exposed In-Reply-To: <1520893582.26.0.467229070634.issue33062@psf.upfronthosting.co.za> Message-ID: <1533211797.86.0.56676864532.issue33062@psf.upfronthosting.co.za> Change by Fantix King : ---------- nosy: +fantix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 08:28:44 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 02 Aug 2018 12:28:44 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533212924.15.0.56676864532.issue34319@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 08:49:52 2018 From: report at bugs.python.org (Roy Belio) Date: Thu, 02 Aug 2018 12:49:52 +0000 Subject: [issue31710] setup.py: _ctypes won't getbuilt when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1533214192.78.0.56676864532.issue31710@psf.upfronthosting.co.za> Roy Belio added the comment: Also happens on suse 11 x86_64 with python 3.7 Same issue exactly building locally (but with cross compiling flag for system independency) Building our own libffi 3.2.1 and adding it in the CPPFLAGS includes. ---------- nosy: +rbelio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:04:56 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 13:04:56 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533215096.55.0.56676864532.issue34097@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a2fe1e52eb94c41d9ebce1ab284180d7b1faa2a4 by Victor Stinner (Marcel Plch) in branch 'master': bpo-34097: Add support for zipping files older than 1980-01-01 (GH-8270) https://github.com/python/cpython/commit/a2fe1e52eb94c41d9ebce1ab284180d7b1faa2a4 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:05:41 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 13:05:41 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533215141.36.0.56676864532.issue34097@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Petr Viktorin for the bug report and thanks to Marcel Plch for the implementation of the new strict_timestamps keyword-only parameter! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:12:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 13:12:23 +0000 Subject: [issue34320] Creating dict from OrderedDict doesn't preserve order Message-ID: <1533215543.91.0.56676864532.issue34320@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : >>> from collections import OrderedDict >>> od = OrderedDict([('a', 1), ('b', 2)]) >>> od.move_to_end('a') >>> od OrderedDict([('b', 2), ('a', 1)]) >>> dict(od) {'a': 1, 'b': 2} This affects also PEP 468. >>> def f(**kwargs): return kwargs ... >>> f(**od) {'a': 1, 'b': 2} And PEP 520. >>> type('A', (), od).__dict__ mappingproxy({'a': 1, 'b': 2, '__module__': '__main__', '__dict__': , '__weakref__': , '__doc__': None}) ---------- components: Interpreter Core messages: 322951 nosy: Rosuav, eric.snow, inada.naoki, rhettinger, serhiy.storchaka, steve.dower priority: normal severity: normal status: open title: Creating dict from OrderedDict doesn't preserve order type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:19:23 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 02 Aug 2018 13:19:23 +0000 Subject: [issue31710] setup.py: _ctypes won't getbuilt when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1533215963.34.0.56676864532.issue31710@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: Hi Roy, mind sharing the complete build log? Either attaching the log to this issue or pasting a link is fine. ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:22:03 2018 From: report at bugs.python.org (Manuel) Date: Thu, 02 Aug 2018 13:22:03 +0000 Subject: [issue34321] mmap.mmap() should not necessarily clone the file descriptor Message-ID: <1533216123.68.0.56676864532.issue34321@psf.upfronthosting.co.za> New submission from Manuel : mmap.mmap(fileno, length, flags, prot, access, offset) always clones the file descriptor that should be used [1]. The cloning of the file descriptor seems to be done to ensure that the file cannot be closed behind mmap's back, but if you are mmap()'ing a lot of memory regions of a file this can cause a 'Too many open files' error. I would suggest to add an option to mmap.mmap() that tells it not to clone the file descriptor. This can cause an issue if the file is closed before accessing the mmapped region, so this fact should also be pointed out in the documentation. [1] https://github.com/python/cpython/blob/master/Modules/mmapmodule.c#L1159 ---------- components: Library (Lib) messages: 322953 nosy: manuels priority: normal severity: normal status: open title: mmap.mmap() should not necessarily clone the file descriptor type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:23:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 13:23:00 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533216180.11.0.56676864532.issue34097@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If add a new option, I prefer to add it to the ZipFile constructor, similarly to allowZip64. Initially allowZip64 was False by default, because not all third-party tools supported ZIP64 extension. Later the default was changed to True, but you still can force raising an error if the archive is not compatible with old tools. I think the same policy should be applied here. Add the ability of writing date before 1980, and add an option for raising an error for date before 1980. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:28:47 2018 From: report at bugs.python.org (ppperry) Date: Thu, 02 Aug 2018 13:28:47 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1533216527.24.0.56676864532.issue31710@psf.upfronthosting.co.za> Change by ppperry : ---------- title: setup.py: _ctypes won't getbuilt when system ffi is only in $PREFIX -> setup.py: _ctypes won't get built when system ffi is only in $PREFIX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:36:05 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 02 Aug 2018 13:36:05 +0000 Subject: [issue34320] Creating dict from OrderedDict doesn't preserve order In-Reply-To: <1533215543.91.0.56676864532.issue34320@psf.upfronthosting.co.za> Message-ID: <1533216965.44.0.56676864532.issue34320@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +8129 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:51:46 2018 From: report at bugs.python.org (Roy Belio) Date: Thu, 02 Aug 2018 13:51:46 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1533217906.55.0.56676864532.issue31710@psf.upfronthosting.co.za> Roy Belio added the comment: Sure, I'll attach it. one more thing to mention is that during configure it printed: configure: WARNING: --with(out)-system-ffi is ignored on this platform We are also providing all the dependency libraries ourselves (building, linking, h files and what not) so that should tkae into consideration. on Suse 11 x86 build is working fine. and we are using gcc 4.3.4 configure arguments passed: --prefix=/root/rc3/dist --enable-shared --enable-ipv6 --with-dbmliborder=gdbm --with-gcc --with-system-ffi --with-openssl=/root/rc3/dist ---------- Added file: https://bugs.python.org/file47728/build.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:02:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:02:57 +0000 Subject: [issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1487152114.39.0.2484958241.issue29565@psf.upfronthosting.co.za> Message-ID: <1533218577.42.0.56676864532.issue29565@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:02:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:02:57 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1533218577.66.0.665841612001.issue20160@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:05:54 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:05:54 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1533218754.27.0.56676864532.issue29804@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is mentioned from https://bugzilla.redhat.com/show_bug.cgi?id=1336557 but it seems like the bug has not been fixed in Python 2.7. I created PR 8625 to backport the fix to Python 2.7. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:23:24 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:23:24 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533219804.03.0.56676864532.issue34097@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: > If add a new option, I prefer to add it to the ZipFile constructor, similarly to allowZip64. Aha, that would make sense. I'm not sure that it's useful to control the parameter per added file, it's enough to control the parameter per ZIP archive. Marcel: would you mind to try to move the strict_timestamps parameter from ZipFile.write() to ZipFile constructor? ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:28:26 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Aug 2018 14:28:26 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533220106.95.0.56676864532.issue24255@psf.upfronthosting.co.za> R. David Murray added the comment: Conrad: thanks for the effort, but using f-strings with logging is counterproductive. The idea behind logging is that the logged strings are not materialized unless something actually wants to output them. Using fstrings means you are doing all the work of formatting the string regardless of whether or not the string is actually going to get written anywhere. The original patch also retains the debug guards that minimize overhead when debugging is not turned on, which it doesn't look like your patch does. Regardless, what we need at this stage is a github PR, not a patch :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:31:18 2018 From: report at bugs.python.org (Michael Schnaitter) Date: Thu, 02 Aug 2018 14:31:18 +0000 Subject: [issue34322] modification to Lib/distutils/ccompiler.py to simplify handling of compile arguments by subclasses Message-ID: <1533220278.22.0.56676864532.issue34322@psf.upfronthosting.co.za> New submission from Michael Schnaitter : Discussion on details in the referenced PR is needed. ---------- components: Library (Lib) messages: 322959 nosy: schnaitterm priority: normal pull_requests: 8132 severity: normal status: open title: modification to Lib/distutils/ccompiler.py to simplify handling of compile arguments by subclasses type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:31:42 2018 From: report at bugs.python.org (Marcel Plch) Date: Thu, 02 Aug 2018 14:31:42 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533220302.17.0.56676864532.issue34097@psf.upfronthosting.co.za> Marcel Plch added the comment: It seems reasonable, I'll have a look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:35:40 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 02 Aug 2018 14:35:40 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1533220540.41.0.56676864532.issue31710@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: A possible case might be that pkg-config on your build machine is not properly configured. Could you check the value of LIBFFI_INCLUDEDIR in config.log? It shuold either be an empty string or /root/rc3/dist/lib/libffi-3.2.1/include. As a reference, the following command is used to compute LIBFFI_INCLUDEDIR: https://github.com/python/cpython/blob/v3.7.0/configure.ac#L2936 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:35:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 14:35:55 +0000 Subject: [issue34322] modification to Lib/distutils/ccompiler.py to simplify handling of compile arguments by subclasses In-Reply-To: <1533220278.22.0.56676864532.issue34322@psf.upfronthosting.co.za> Message-ID: <1533220555.46.0.56676864532.issue34322@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +dstufft, eric.araujo stage: -> patch review versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:36:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Aug 2018 14:36:11 +0000 Subject: [issue34322] modification to Lib/distutils/ccompiler.py to simplify handling of compile arguments by subclasses In-Reply-To: <1533220278.22.0.56676864532.issue34322@psf.upfronthosting.co.za> Message-ID: <1533220571.23.0.56676864532.issue34322@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:47:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:47:30 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1533221250.54.0.56676864532.issue20160@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3243f8c1fb16b6de73f1d7a30f5d09047553bce3 by Victor Stinner in branch '2.7': bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64 (GH-168) (GH-8625) https://github.com/python/cpython/commit/3243f8c1fb16b6de73f1d7a30f5d09047553bce3 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:47:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:47:31 +0000 Subject: [issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1487152114.39.0.2484958241.issue29565@psf.upfronthosting.co.za> Message-ID: <1533221251.04.0.902498594338.issue29565@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3243f8c1fb16b6de73f1d7a30f5d09047553bce3 by Victor Stinner in branch '2.7': bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64 (GH-168) (GH-8625) https://github.com/python/cpython/commit/3243f8c1fb16b6de73f1d7a30f5d09047553bce3 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:48:27 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:48:27 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1533221307.62.0.56676864532.issue29804@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3243f8c1fb16b6de73f1d7a30f5d09047553bce3 by Victor Stinner in branch '2.7': bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64 (GH-168) (GH-8625) https://github.com/python/cpython/commit/3243f8c1fb16b6de73f1d7a30f5d09047553bce3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:49:24 2018 From: report at bugs.python.org (Roy Belio) Date: Thu, 02 Aug 2018 14:49:24 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1533221364.69.0.56676864532.issue31710@psf.upfronthosting.co.za> Roy Belio added the comment: as seen in the config.log: LIBFFI_INCLUDEDIR='/root/rc3/dist/lib/libffi-3.2.1/include' I'm attaching the config.log just in case ---------- Added file: https://bugs.python.org/file47729/config.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 10:49:59 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 14:49:59 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1533221399.57.0.56676864532.issue29804@psf.upfronthosting.co.za> STINNER Victor added the comment: I backported commit a86339b83fbd0932e0529a3c91935e997a234582 from master: commit 3243f8c1fb16b6de73f1d7a30f5d09047553bce3, but I don't have access to arm64, so I cannot test if the backport fixes test_ctypes on arm64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:08:05 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 02 Aug 2018 15:08:05 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1533222485.17.0.56676864532.issue31710@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: Thanks for providing the info. However, I'm sorry as the case is beyond my knowledge. Here's the relevant section in CPython that handles LIBFFI path searching: https://github.com/python/cpython/blob/v3.7.0/setup.py#L1984-L2002. You may want to examine variables there to see if there's something unusual. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:12:59 2018 From: report at bugs.python.org (Eryn Wells) Date: Thu, 02 Aug 2018 15:12:59 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533222779.67.0.56676864532.issue24255@psf.upfronthosting.co.za> Eryn Wells added the comment: Hi, it sounds like my original patch is the preferred approach. I can put up a GitHub PR for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:20:21 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 15:20:21 +0000 Subject: [issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1487152114.39.0.2484958241.issue29565@psf.upfronthosting.co.za> Message-ID: <1533223221.86.0.56676864532.issue29565@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:25:31 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 15:25:31 +0000 Subject: [issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1487152114.39.0.2484958241.issue29565@psf.upfronthosting.co.za> Message-ID: <1533223531.73.0.56676864532.issue29565@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, the compilation succeeded on AppVeyor: https://ci.appveyor.com/project/python/cpython/build/2.7build20258 But it fails on AMD64 Windows8 2.7: https://buildbot.python.org/all/#/builders/74/builds/194 It seems like this buildbot uses Visual Studio 2008 ("VS 9.0")... but it seems like AppVeyor also uses Visual Studio 2008. No idea why AppVeyor missed the compilation error :-( Anyway, I proposed PR 8626 to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:38:11 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 02 Aug 2018 15:38:11 +0000 Subject: [issue34309] Embedding Python; Py_Initialize / Py_Finalize cycles In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533224291.69.0.56676864532.issue34309@psf.upfronthosting.co.za> Eric Snow added the comment: @chris, I can't promise that anything will happen right away, but I'll be sure to look into this further when I work on improving extension module usage in subinterpreters in the next few months. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:40:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 15:40:23 +0000 Subject: [issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1487152114.39.0.2484958241.issue29565@psf.upfronthosting.co.za> Message-ID: <1533224423.06.0.56676864532.issue29565@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6a6b2483479a1ad0ab82300452f0ce71fa90b2d7 by Victor Stinner in branch '2.7': bpo-29565: Fix compilation for C89 (GH-8626) https://github.com/python/cpython/commit/6a6b2483479a1ad0ab82300452f0ce71fa90b2d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:56:19 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 02 Aug 2018 15:56:19 +0000 Subject: [issue34309] Trouble when reloading extension modules. In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533225379.33.0.56676864532.issue34309@psf.upfronthosting.co.za> Eric Snow added the comment: I've changed the issue title to reflect where things stand. Hmm, doing so reminded me of an important consideration here. A module object is effectively a fairly light wrapper around a dict. When you call importlib.reload() the loader from the module's spec is used to re-execute the module's existing dict. [1][2] A new module is not created and the existing module namespace is not reset. So during reload the module is responsible for deleting anything in its namespace that wouldn't get replaced when re-executed (including attributes that were added to the namespace externally). For most modules this isn't an issue. However, it's something to consider when reloading a module. See the docs for more explanation and caveats. [3] [1] https://github.com/python/cpython/blob/master/Lib/importlib/__init__.py#L169 [2] https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap.py#L610 [3] https://docs.python.org/3/library/importlib.html#importlib.reload ---------- title: Embedding Python; Py_Initialize / Py_Finalize cycles -> Trouble when reloading extension modules. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 11:57:41 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 15:57:41 +0000 Subject: [issue30984] traceback.print_exc return value documentation In-Reply-To: <1500651170.07.0.787106480078.issue30984@psf.upfronthosting.co.za> Message-ID: <1533225461.33.0.56676864532.issue30984@psf.upfronthosting.co.za> Berker Peksag added the comment: The documentation you've quoted is for traceback.extract_tb(). traceback.format_tb() documentation only says: A shorthand for ``format_list(extract_tb(tb, limit))``. Issue 27910 is about updating the documentation of extract_tb(), format_list(), and StackSummary.from_list(). I'm closing this as a duplicate of issue 27910. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Doc/library/traceback.rst ? references to tuples should be replaced with new FrameSummary object type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:09:02 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 16:09:02 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1533226142.61.0.56676864532.issue27910@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset f394ee5eaf6d6d8f45e0478e77d4dbff25c6bea7 by Berker Peksag (torsava) in branch 'master': bpo-27910: Update documentation of traceback module (GH-6116) https://github.com/python/cpython/commit/f394ee5eaf6d6d8f45e0478e77d4dbff25c6bea7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:09:24 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 16:09:24 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1533226164.81.0.56676864532.issue27910@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:10:20 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 02 Aug 2018 16:10:20 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1533226220.0.0.56676864532.issue33695@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yes, file copy (open() + read() + write()) is of course more expensive than just "reading" a tree (os.walk(), glob()) or deleting it (rmtree()) and the "pure file copy" time adds up to the benchmark. And indeed it's not an coincidence that #33671 (which replaced read() + write() with sendfile()) shaved off a 5% gain from the benchmark I posted initially for Linux. Still, in a 8k small-files-tree scenario we're seeing ~9% gain on Linux, 20% on Windows and 30% on a SMB share on localhost vs. VirtualBox. I do not consider this a "hardly noticeable gain" as you imply: it is noticeable, exponential and measurable, even with cache being involved (as it is). Note that the number of stat() syscalls per file is being reduced from 6 to 1 (or more if follow_symlinks=False), and that is the real gist here. That *does* make a difference on a regular Windows fs and makes a huge difference with network filesystems in general, as a simple stat() call implies access to the network, not the disk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:10:20 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 02 Aug 2018 16:10:20 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1533226220.35.0.56676864532.issue27910@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:15:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 Aug 2018 16:15:46 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1533226546.17.0.56676864532.issue34313@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Kevin, more tk mac issues. ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:16:06 2018 From: report at bugs.python.org (Eryn Wells) Date: Thu, 02 Aug 2018 16:16:06 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533226566.03.0.56676864532.issue24255@psf.upfronthosting.co.za> Eryn Wells added the comment: Actually, I spoke too soon. My current employer isn't too keen on us contributing to open source, so I can't do this. Sorry! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:22:14 2018 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 02 Aug 2018 16:22:14 +0000 Subject: [issue34309] Trouble when reloading extension modules. In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533226934.05.0.56676864532.issue34309@psf.upfronthosting.co.za> Stefan Behnel added the comment: a) Probably not something to fix in released versions any more, so increasing version from 3.5 to 3.8. b) Regarding shared library unloading and the problems mentioned, I'm also not sure if there is a way to safely unload transitively imported libraries, e.g. if the extension module is a wrapper for an external C library (which then might come with its own dependencies again, which might still be in use by other extension modules, etc.). ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:25:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 Aug 2018 16:25:22 +0000 Subject: [issue33782] VSTS Windows-PR: internal error In-Reply-To: <1528283564.84.0.592728768989.issue33782@psf.upfronthosting.co.za> Message-ID: <1533227122.13.0.56676864532.issue33782@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A quick follow-up commit can happen if one uses the web editor to edit more than one file. Editing a news file in Misc/News/next should not trigger any of the normal tests, only a blurb check if there is such. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 12:51:51 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 16:51:51 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1533228711.89.0.56676864532.issue27910@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 0f9df886d6d1c6b239a2861a0ad0d56bb59e3922 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-27910: Update documentation of traceback module (GH-6116) https://github.com/python/cpython/commit/0f9df886d6d1c6b239a2861a0ad0d56bb59e3922 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 13:01:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 17:01:00 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1533229260.77.0.56676864532.issue27910@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 295342adbfd905d5b4a77f960ea39649df7d9997 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-27910: Update documentation of traceback module (GH-6116) https://github.com/python/cpython/commit/295342adbfd905d5b4a77f960ea39649df7d9997 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 13:01:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 17:01:18 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533229278.55.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 13:01:28 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 17:01:28 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1533229287.99.0.56676864532.issue27910@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 13:34:23 2018 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Aug 2018 17:34:23 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533231263.16.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 72ec3193b5118a2ccc8be8bf03d7b74691c6a264 by Victor Stinner in branch 'master': bpo-34170: Cleanup pymain_run_filename() (GH-8631) https://github.com/python/cpython/commit/72ec3193b5118a2ccc8be8bf03d7b74691c6a264 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 13:46:01 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Thu, 02 Aug 2018 17:46:01 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533231961.43.0.56676864532.issue24255@psf.upfronthosting.co.za> Sanyam Khurana added the comment: That's okay Eryn. We really appreciate all your help. I will take this patch forward :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 13:46:45 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 17:46:45 +0000 Subject: [issue26502] traceback.extract_tb breaks compatibility by returning FrameSummary In-Reply-To: <1457349348.27.0.253072992901.issue26502@psf.upfronthosting.co.za> Message-ID: <1533232005.17.0.56676864532.issue26502@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8137 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 13:54:06 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 17:54:06 +0000 Subject: [issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module In-Reply-To: <1446845666.11.0.0803768990935.issue25573@psf.upfronthosting.co.za> Message-ID: <1533232446.34.0.56676864532.issue25573@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 14:02:38 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Aug 2018 18:02:38 +0000 Subject: [issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s In-Reply-To: <1527682955.69.0.682650639539.issue33695@psf.upfronthosting.co.za> Message-ID: <1533232958.07.0.56676864532.issue33695@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Depending on the configuration, stat() in a network filesystem can be between very slow and slow. +1. I also quickly glanced over the patch and I think it looks like a clear win. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 14:08:18 2018 From: report at bugs.python.org (Conrad Ho) Date: Thu, 02 Aug 2018 18:08:18 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533233298.46.0.56676864532.issue24255@psf.upfronthosting.co.za> Conrad Ho added the comment: Thanks Eryn! @Sanyam if you apply the original patch directly that will currently result in some merge failures, and there are test fixes etc that I did on the second patch. Think we should combine them. I just made the chgs suggested by David on my own forked repo. Do you want me to submit a PR directly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 14:15:11 2018 From: report at bugs.python.org (Conrad Ho) Date: Thu, 02 Aug 2018 18:15:11 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533233711.57.0.56676864532.issue24255@psf.upfronthosting.co.za> Conrad Ho added the comment: @Eryn in the news blurb thing I'm going to say "original patch done by Eryn Wells." Your employer should be okay with that right? :D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 14:25:13 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Thu, 02 Aug 2018 18:25:13 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533234313.28.0.56676864532.issue24255@psf.upfronthosting.co.za> Change by Sanyam Khurana : ---------- pull_requests: +8138 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 14:34:18 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 02 Aug 2018 18:34:18 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1533234858.64.0.56676864532.issue34105@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: Is this expected behaviour, should the tests be changes, or is it a bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 14:37:19 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 18:37:19 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1533235039.42.0.56676864532.issue18540@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 14:50:45 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 18:50:45 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1533235845.06.0.56676864532.issue34105@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 15:00:20 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 02 Aug 2018 19:00:20 +0000 Subject: [issue28940] __length_hint__ isn't a hint for list() In-Reply-To: <1481489596.88.0.223371500433.issue28940@psf.upfronthosting.co.za> Message-ID: <1533236420.26.0.56676864532.issue28940@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +8140 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 15:01:33 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Aug 2018 19:01:33 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533236493.27.0.56676864532.issue34312@psf.upfronthosting.co.za> Brett Cannon added the comment: Teammate of mine tripped up against this because he tried to use a list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 15:04:22 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Thu, 02 Aug 2018 19:04:22 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533236662.14.0.56676864532.issue24255@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Sure Conrad, Yeah, indeed. The patch didn't apply cleanly, so I"ve done it manually. I've raised the PR here: https://github.com/python/cpython/pull/8633 I'll check your patch and merge :) Thanks for your help too! I'm adding Python 3.7 and Python 3.8 for this patch. ---------- stage: patch review -> needs patch versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 16:08:49 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 02 Aug 2018 20:08:49 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1533240529.39.0.56676864532.issue34105@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is not expected, but I don't know where the problem is. On my machine I get: >>> socket.gethostbyname('0.1.1.~1') Traceback (most recent call last): File "", line 1, in socket.gaierror: [Errno 8] nodename nor servname provided, or not known This is on a machine running 10.13.6: $ sw_vers ProductName: Mac OS X ProductVersion: 10.13.6 BuildVersion: 17G65 I'm using a checkout of master of about a week all, and get the same exception with 3.7.0. I also get the same exception on the current beta of macOS 10.14 (With python 3.7.0) I'm currently building the current master to check if that changes anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 16:11:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 Aug 2018 20:11:08 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533240668.18.0.56676864532.issue34319@psf.upfronthosting.co.za> Terry J. Reedy added the comment: How about if we add "The file is opened and then closed." before "The optional parameters have the same meaning as in open()." ---------- nosy: +terry.reedy stage: -> needs patch versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 16:12:26 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 02 Aug 2018 20:12:26 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1533240746.56.0.56676864532.issue34105@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Note that the test itself has the following comment: def test_host_resolution_bad_address(self): # These are all malformed IP addresses and expected not to resolve to # any result. But some ISPs, e.g. AWS, may successfully resolve these # IPs. Does the following shell command give an error? : host '0.1.1.~1' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 16:12:46 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 02 Aug 2018 20:12:46 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1533240766.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Change by Ronald Oussoren : ---------- assignee: -> ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 16:29:46 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 20:29:46 +0000 Subject: [issue27419] Bugs in PyImport_ImportModuleLevelObject In-Reply-To: <1467275301.6.0.860119433525.issue27419@psf.upfronthosting.co.za> Message-ID: <1533241786.39.0.56676864532.issue27419@psf.upfronthosting.co.za> Berker Peksag added the comment: The workaround was removed in https://github.com/berkerpeksag/cpython/commit/133138a284be1985ebd9ec9014f1306b9a425d98 Can this issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 18:50:13 2018 From: report at bugs.python.org (John Nelson) Date: Thu, 02 Aug 2018 22:50:13 +0000 Subject: [issue34323] False timeout log message on proactor close Message-ID: <1533250213.71.0.56676864532.issue34323@psf.upfronthosting.co.za> New submission from John Nelson : Repro: 1. Run the attached script ('repro.py') Expected output: 2018-07-31 16:39:57,069 - asyncio - DEBUG - Using proactor: IocpProactor 2018-07-31 16:39:57,084 - root - INFO - Starting 2018-07-31 16:39:58,100 - root - INFO - Sleep done 2018-07-31 16:39:58,100 - root - INFO - Loop closed Actual output: 2018-07-31 16:37:58,583 - asyncio - DEBUG - Using proactor: IocpProactor 2018-07-31 16:37:58,599 - root - INFO - Starting 2018-07-31 16:37:59,614 - root - INFO - Sleep done 2018-07-31 16:37:59,614 - asyncio - DEBUG - taking long time to close proactor 2018-07-31 16:37:59,614 - root - INFO - Loop closed ---------- components: asyncio files: repro.py messages: 322994 nosy: asvetlov, johnboy2, yselivanov priority: normal severity: normal status: open title: False timeout log message on proactor close type: behavior versions: Python 3.5 Added file: https://bugs.python.org/file47730/repro.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 18:55:55 2018 From: report at bugs.python.org (John Nelson) Date: Thu, 02 Aug 2018 22:55:55 +0000 Subject: [issue34323] False timeout log message on proactor close In-Reply-To: <1533250213.71.0.56676864532.issue34323@psf.upfronthosting.co.za> Message-ID: <1533250555.31.0.56676864532.issue34323@psf.upfronthosting.co.za> John Nelson added the comment: I *suspect* the issue is down to a discrepancy between: - IocpProactor.close(), and - IocpProactor._poll() When the former calls the latter, it seems to be expecting a truth value response from _poll() to indicate that no timeout occurred. However, the latter only ever returns None. Of note is that `ms != 0` whenever a timeout occurs, potentially giving a simple test point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 18:59:21 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 02 Aug 2018 22:59:21 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1533250761.93.0.56676864532.issue34105@psf.upfronthosting.co.za> Lysandros Nikolaou added the comment: When running the terminal command host '0.1.1.~1' I get the following output: 0.1.1.~1 has address 62.138.239.45 0.1.1.~1 has address 62.138.238.45 Host 0.1.1.~1 not found: 3(NXDOMAIN) Host 0.1.1.~1 not found: 3(NXDOMAIN) If I ping the above IP address 62.138.239.45, it does not respond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 19:19:01 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 02 Aug 2018 23:19:01 +0000 Subject: [issue34324] Doc README wrong directory name for vent Message-ID: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> New submission from Lysandros Nikolaou : In the Doc README there is the following sentence after the make venv command: Assuming the virtual environment was created in the env directory (the default; configurable with the VENVDIR variable) Should't it be venv directory instead? In the makefile the VENVDIR variable is set to venv by default. ---------- assignee: docs at python components: Documentation messages: 322997 nosy: docs at python, lys.nikolaou priority: normal severity: normal status: open title: Doc README wrong directory name for vent versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 19:19:47 2018 From: report at bugs.python.org (Lysandros Nikolaou) Date: Thu, 02 Aug 2018 23:19:47 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533251987.85.0.56676864532.issue34324@psf.upfronthosting.co.za> Change by Lysandros Nikolaou : ---------- title: Doc README wrong directory name for vent -> Doc README wrong directory name for venv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 19:52:19 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 02 Aug 2018 23:52:19 +0000 Subject: [issue32046] 2to3 fix for operator.isCallable() In-Reply-To: <1510823372.85.0.213398074469.issue32046@psf.upfronthosting.co.za> Message-ID: <1533253939.28.0.56676864532.issue32046@psf.upfronthosting.co.za> Berker Peksag added the comment: > I suppose stable branches should be left alone? We do backport lib2to3 PRs to maintenance branches, but since this is already in 3.7 and 3.6 is four months away from being in security-fix-only mode, I think we can close this as 'fixed' now. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 19:52:26 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 23:52:26 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots Message-ID: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : test_zipfile gets OverflowError in multiple buildbots: https://buildbot.python.org/all/#/builders/106/builds/1374 https://buildbot.python.org/all/#/builders/106/builds/1375 https://buildbot.python.org/all/#/builders/106/builds/1376 Example error log: ====================================================================== ERROR: test_add_file_after_2107 (test.test_zipfile.StoredTestsWithSourceFile) ---------------------------------------------------------------------- Traceback (most recent call last): File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_zipfile.py", line 559, in test_add_file_after_2107 os.utime(TESTFN, (4386268800, 4386268800)) OverflowError: timestamp out of range for platform time_t ---------------------------------------------------------------------- Ran 208 tests in 39.261s FAILED (errors=1, skipped=1) 1 test failed again: ---------- components: Tests messages: 322999 nosy: pablogsal priority: normal severity: normal status: open title: test_zipfile gets OverflowError in multiple buildbots type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 19:53:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 23:53:47 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533254027.66.0.56676864532.issue34325@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: More failures on x86 Gentoo Installed with X 3.x: https://buildbot.python.org/all/#/builders/103/builds/1240 https://buildbot.python.org/all/#/builders/103/builds/1241 https://buildbot.python.org/all/#/builders/103/builds/1242 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 19:57:08 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 02 Aug 2018 23:57:08 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x Message-ID: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x buildbots: https://buildbot.python.org/all/#/builders/154/builds/104 It seems that it has some problems with (unclosed?) file descriptors: test_terminate_dead (test.test_subprocess.Win32ProcessTestCase) ... skipped 'Windows specific tests' ====================================================================== FAIL: test_close_fds (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/test_subprocess.py", line 2378, in test_close_fds "Some fds were left open") AssertionError: {3} is not false : Some fds were left open ====================================================================== FAIL: test_close_fds_after_preexec (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/test_subprocess.py", line 2653, in test_close_fds_after_preexec self.assertNotIn(fd, remaining_fds) AssertionError: 3 unexpectedly found in {0, 1, 2, 3} ====================================================================== FAIL: test_pass_fds (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/support/__init__.py", line 615, in wrapper return func(*args, **kw) File "/home/buildbot/buildarea/3.x.einat-ubuntu/build/Lib/test/test_subprocess.py", line 2503, in test_pass_fds "fd to be closed passed") AssertionError: {4} is not false : fd to be closed passed ---------------------------------------------------------------------- Ran 285 tests in 68.129s FAILED (failures=3, skipped=28) 1 test failed again: test_subprocess ---------- components: Tests messages: 323001 nosy: pablogsal priority: normal severity: normal status: open title: test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:02:22 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 03 Aug 2018 00:02:22 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533254542.52.0.56676864532.issue34326@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: This also happens on x86-64 High Sierra 3.x buildbot: https://buildbot.python.org/all/#/builders/145/builds/265 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:04:10 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 03 Aug 2018 00:04:10 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533254650.63.0.56676864532.issue30317@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Seems the same issue as in: https://buildbot.python.org/all/#/builders/58/builds/1181 test_fd_transfer (test.test_multiprocessing_spawn.WithThreadsTestConnection) ... skipped 'only makes sense with processes' Timeout (0:15:00)! Thread 0x000008d4 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\runner.py", line 56 in startTest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 588 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 663 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__ File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\runner.py", line 176 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1883 in _run_suite File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1973 in run_unittest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 175 in test_runner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 179 in runtest_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 140 in runtest File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 286 in rerun_failed_tests File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 570 in _main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 531 in main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 584 in main File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\__main__.py", line 2 in File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 85 in _run_code File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 193 in _run_module_as_main program finished with exit code 1 elapsedTime=5998.222000 test_large_fd_transfer (test.test_multiprocessing_spawn.WithThreadsTestConnection) ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:05:10 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 03 Aug 2018 00:05:10 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533254710.85.0.56676864532.issue34326@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: More failures on AMD64 Debian PGO 3.x: https://buildbot.python.org/all/#/builders/47/builds/1362 test_terminate (test.test_subprocess.Win32ProcessTestCase) ... skipped 'Windows specific tests' test test_subprocess failed test_terminate_dead (test.test_subprocess.Win32ProcessTestCase) ... skipped 'Windows specific tests' ====================================================================== FAIL: test_close_fds (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_subprocess.py", line 2378, in test_close_fds "Some fds were left open") AssertionError: {3} is not false : Some fds were left open ====================================================================== FAIL: test_close_fds_after_preexec (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_subprocess.py", line 2653, in test_close_fds_after_preexec self.assertNotIn(fd, remaining_fds) AssertionError: 3 unexpectedly found in {0, 1, 2, 3} ====================================================================== FAIL: test_pass_fds (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/support/__init__.py", line 615, in wrapper return func(*args, **kw) File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.x.gps-debian-profile-opt.nondebug/build/Lib/test/test_subprocess.py", line 2503, in test_pass_fds "fd to be closed passed") AssertionError: {4} is not false : fd to be closed passed ---------------------------------------------------------------------- Ran 285 tests in 27.876s FAILED (failures=3, skipped=28) 1 test failed again: test_subprocess ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:09:05 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 03 Aug 2018 00:09:05 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533254945.04.0.56676864532.issue30317@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset 5640d030e100aade54210034828b711c3b506b18 by Pablo Galindo (Victor Stinner) in branch 'master': bpo-30317: Fix multiprocessing test_timeout() (GH-8621) https://github.com/python/cpython/commit/5640d030e100aade54210034828b711c3b506b18 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:09:40 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 00:09:40 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533254980.0.0.56676864532.issue30317@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:11:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 03 Aug 2018 00:11:47 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533255107.54.0.56676864532.issue30317@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- pull_requests: +8142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:27:01 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 00:27:01 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533256021.83.0.56676864532.issue30317@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 50d78677899d315c17dc9a14d2f94a013046c71a by Miss Islington (bot) in branch '3.7': bpo-30317: Fix multiprocessing test_timeout() (GH-8621) https://github.com/python/cpython/commit/50d78677899d315c17dc9a14d2f94a013046c71a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:55:31 2018 From: report at bugs.python.org (Asher Mancinelli) Date: Fri, 03 Aug 2018 00:55:31 +0000 Subject: [issue34327] CPython make test crash Message-ID: <1533257731.89.0.56676864532.issue34327@psf.upfronthosting.co.za> New submission from Asher Mancinelli : Cloned master (v3.8) from github. os: Arch x86_64, kernel: 4.14.56-1-lts. successfully ran `./configure --enable-optimizations` and `make`, but failed with this error message when running `make test` ``` ====================================================================== FAIL: test_close_fds (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/asher/sources/cpython3.8/Lib/test/test_subprocess.py", line 2378, in test_close_fds "Some fds were left open") AssertionError: {3} is not false : Some fds were left open ====================================================================== FAIL: test_close_fds_after_preexec (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/asher/sources/cpython3.8/Lib/test/test_subprocess.py", line 2653, in test_close_fds_after_preexec self.assertNotIn(fd, remaining_fds) AssertionError: 3 unexpectedly found in {0, 1, 2, 3} ====================================================================== FAIL: test_pass_fds (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/asher/sources/cpython3.8/Lib/test/support/__init__.py", line 615, in wrapper return func(*args, **kw) File "/home/asher/sources/cpython3.8/Lib/test/test_subprocess.py", line 2503, in test_pass_fds "fd to be closed passed") AssertionError: {4} is not false : fd to be closed passed ---------------------------------------------------------------------- Ran 285 tests in 23.861s FAILED (failures=3, skipped=28) test test_subprocess failed 1 test failed again: test_subprocess == Tests result: FAILURE then FAILURE == 404 tests OK. 1 test failed: test_subprocess 13 tests skipped: test_devpoll test_gdb test_kqueue test_msilib test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg test_winsound test_zipfile64 1 re-run test: test_subprocess Total duration: 3 min 59 sec Tests result: FAILURE then FAILURE make: *** [Makefile:1058: test] Error 2 ``` ---------- components: Build messages: 323007 nosy: ashermancinelli priority: normal severity: normal status: open title: CPython make test crash type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 20:57:47 2018 From: report at bugs.python.org (ppperry) Date: Fri, 03 Aug 2018 00:57:47 +0000 Subject: [issue34327] test_subprocess fails In-Reply-To: <1533257731.89.0.56676864532.issue34327@psf.upfronthosting.co.za> Message-ID: <1533257867.92.0.56676864532.issue34327@psf.upfronthosting.co.za> Change by ppperry : ---------- components: +Tests -Build title: CPython make test crash -> test_subprocess fails type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 21:08:11 2018 From: report at bugs.python.org (paul j3) Date: Fri, 03 Aug 2018 01:08:11 +0000 Subject: [issue34299] argparse description formatting In-Reply-To: <1533065087.6.0.56676864532.issue34299@psf.upfronthosting.co.za> Message-ID: <1533258491.19.0.56676864532.issue34299@psf.upfronthosting.co.za> Change by paul j3 : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:00:18 2018 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 03 Aug 2018 02:00:18 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1533261618.45.0.56676864532.issue34313@psf.upfronthosting.co.za> Kevin Walzer added the comment: The crash reported by the OP did show up at times in recent releases of Tk 8.6.x, but a lot of work went into refactoring memory management in 8.6.8 and those problems do not seem present in the current release (8.6.7 is a year old). I'd try updating to 8.6.8 and seeing if that fixes things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:13:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 02:13:42 +0000 Subject: [issue34275] Problems with tkinter and tk8.6 on MacOS In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533262422.19.0.56676864532.issue34275@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified for my machine also that adding .update_idletasks(), as in calltips_2-2.diff works for my 3.7.0 installation. I will assume until someone says otherwise that this is generally sufficient. I am preparing a PR with the patch and will separately deal with the merge conflict I expect for PR7683. ---------- assignee: -> terry.reedy stage: needs patch -> patch review versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:21:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 02:21:31 +0000 Subject: [issue34275] Problems with tkinter and tk8.6 on MacOS In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533262891.63.0.56676864532.issue34275@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +8143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:27:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 02:27:35 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533263255.75.0.56676864532.issue34275@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- components: -Tkinter title: Problems with tkinter and tk8.6 on MacOS -> IDLE: no calltips on MacOS with tk 8.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:44:08 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Aug 2018 02:44:08 +0000 Subject: [issue34317] Improve docstring Environment variables in Windows NT In-Reply-To: <1533207230.71.0.56676864532.issue34317@psf.upfronthosting.co.za> Message-ID: <1533264248.78.0.56676864532.issue34317@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 46ebe61c7f3511b97268b44d5373a9e9cf0b5cc7 by Mariatta (HiyashiChuka) in branch 'master': bpo-34317: Fix a dead url to Windows documentation (GH-8622) https://github.com/python/cpython/commit/46ebe61c7f3511b97268b44d5373a9e9cf0b5cc7 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:44:32 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 02:44:32 +0000 Subject: [issue34317] Improve docstring Environment variables in Windows NT In-Reply-To: <1533207230.71.0.56676864532.issue34317@psf.upfronthosting.co.za> Message-ID: <1533264272.81.0.56676864532.issue34317@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:50:11 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 02:50:11 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533264611.12.0.56676864532.issue34275@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 22:50:19 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 02:50:19 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533264619.84.0.56676864532.issue34275@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 23:01:17 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Aug 2018 03:01:17 +0000 Subject: [issue34317] Improve docstring Environment variables in Windows NT In-Reply-To: <1533207230.71.0.56676864532.issue34317@psf.upfronthosting.co.za> Message-ID: <1533265277.58.0.56676864532.issue34317@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 23:07:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 03:07:35 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533265655.57.0.56676864532.issue34275@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +8147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 23:29:43 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 03:29:43 +0000 Subject: [issue34317] Improve docstring Environment variables in Windows NT In-Reply-To: <1533207230.71.0.56676864532.issue34317@psf.upfronthosting.co.za> Message-ID: <1533266983.5.0.56676864532.issue34317@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 34f59a7a7843d8e2c1922c830a99b5b7a022f4be by Miss Islington (bot) in branch '3.7': bpo-34317: Fix a dead url to Windows documentation (GH-8622) https://github.com/python/cpython/commit/34f59a7a7843d8e2c1922c830a99b5b7a022f4be ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 23:33:50 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 03:33:50 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533267230.21.0.56676864532.issue34275@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 363105e546709339e3419ada9daf5efa0b3b1e18 by Miss Islington (bot) in branch '3.6': bpo-34275: Make IDLE calltips always visible on Mac. (GH-8639) https://github.com/python/cpython/commit/363105e546709339e3419ada9daf5efa0b3b1e18 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 23:39:40 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 03:39:40 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533267580.92.0.56676864532.issue34275@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ffd6364745dbeb7269c0e4376b63bf76bc44bcc6 by Miss Islington (bot) in branch '3.7': bpo-34275: Make IDLE calltips always visible on Mac. (GH-8639) https://github.com/python/cpython/commit/ffd6364745dbeb7269c0e4376b63bf76bc44bcc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 23:40:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 03:40:23 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533267623.73.0.56676864532.issue34275@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 24a54da9452efb21d30dc56c6b9d0977d08ae452 by Terry Jan Reedy in branch '2.7': [2.7] bpo-34275: Make IDLE calltips always visible on Mac. (GH-8639) (GH-8644) https://github.com/python/cpython/commit/24a54da9452efb21d30dc56c6b9d0977d08ae452 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 23:50:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 03:50:43 +0000 Subject: [issue34275] IDLE: no calltips on MacOS with tk 8.6 In-Reply-To: <1532917001.14.0.56676864532.issue34275@psf.upfronthosting.co.za> Message-ID: <1533268243.8.0.56676864532.issue34275@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you again, Kevin. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 00:30:00 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 Aug 2018 04:30:00 +0000 Subject: [issue34327] test_subprocess fails In-Reply-To: <1533257731.89.0.56676864532.issue34327@psf.upfronthosting.co.za> Message-ID: <1533270600.4.0.56676864532.issue34327@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Related issue : https://bugs.python.org/issue34326 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 00:35:48 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 03 Aug 2018 04:35:48 +0000 Subject: [issue33782] VSTS Windows-PR: internal error In-Reply-To: <1528283564.84.0.592728768989.issue33782@psf.upfronthosting.co.za> Message-ID: <1533270948.34.0.56676864532.issue33782@psf.upfronthosting.co.za> Steve Dower added the comment: > A quick follow-up commit can happen if one uses the web editor to edit more than one file I hadn't thought of that one. Hopefully they'll just fix their bug though :) I spent a bit of time at the EuroPython sprints making the changes to quickly finish the build if nothing relevant has changed, but ironically it was so backed up with testing doc changes that I couldn't check it! Hopefully sometime next week I can finish that off. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 00:44:52 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 Aug 2018 04:44:52 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533271492.84.0.56676864532.issue34326@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Some of VSTS Mac OS and Linux builds also have the same failure Sample Linux : https://python.visualstudio.com/cpython/_build/results?buildId=21154&view=logs Sample Mac OS : https://python.visualstudio.com/cpython/_build/results?buildId=21155&view=logs Test case failure reported in Arch : https://bugs.python.org/issue34327 Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 00:52:37 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 Aug 2018 04:52:37 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533271957.16.0.56676864532.issue34319@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +8148 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:12:47 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Aug 2018 05:12:47 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533273167.78.0.56676864532.issue34312@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Teammate of mine tripped up against this because he tried to use a list. Then, I recommend we close this. Accepting a list would have encouraged inefficient code (a tuple of constants can be peephole optimized but a list of constants is rebuilt on every call). Also, the error message is very clear, so it is unlikely he was "tripped-up" for more than a few seconds. >>> 'hello'.startswith(['he', 'go']) Traceback (most recent call last): File "", line 1, in 'hello'.startswith(['he', 'go']) TypeError: startswith first arg must be str or a tuple of str, not list ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:16:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Aug 2018 05:16:26 +0000 Subject: [issue27419] Bugs in PyImport_ImportModuleLevelObject In-Reply-To: <1467275301.6.0.860119433525.issue27419@psf.upfronthosting.co.za> Message-ID: <1533273386.86.0.56676864532.issue27419@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it can. Thanks Berker for reminder. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:19:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Aug 2018 05:19:45 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533273585.36.0.56676864532.issue34325@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is the result of issue34097. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:20:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Aug 2018 05:20:43 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533273643.69.0.56676864532.issue34097@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are failed on some buildbots. See issue34325. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:21:37 2018 From: report at bugs.python.org (sakamotoaya) Date: Fri, 03 Aug 2018 05:21:37 +0000 Subject: [issue34328] Question Incorrect URL for the Visual C++ Build Tools Message-ID: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> New submission from sakamotoaya : I try "python setup.py". The following issue has occurred. Excerpt from Error ????????????????????? reading manifest template 'MANIFEST.in' writing manifest file 'scikit_learn.egg-info\SOURCES.txt' running build_ext No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils customize MSVCCompiler Missing compiler_cxx fix for MSVCCompiler customize MSVCCompiler using build_clib building 'libsvm-skl' library compiling C sources error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools ????????????????????? Expired link: http://landinghub.visualstudio.com/visual-cpp-build-tools I think The new link: https://download.microsoft.com/download/5/F/7/5F7ACAEB-8363-451F-9425-68A90F98B238/visualcppbuildtools_full.exe Please give me advice on how I should correct those error message. ---------- components: Windows messages: 323024 nosy: HiyashiChuka, docs at python, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Question Incorrect URL for the Visual C++ Build Tools type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:22:38 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 Aug 2018 05:22:38 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533273758.96.0.56676864532.issue34325@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:22:39 2018 From: report at bugs.python.org (sakamotoaya) Date: Fri, 03 Aug 2018 05:22:39 +0000 Subject: [issue34328] Incorrect URL for the Visual C++ Build Tools In-Reply-To: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> Message-ID: <1533273759.88.0.56676864532.issue34328@psf.upfronthosting.co.za> Change by sakamotoaya : ---------- title: Question Incorrect URL for the Visual C++ Build Tools -> Incorrect URL for the Visual C++ Build Tools _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:45:10 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 03 Aug 2018 05:45:10 +0000 Subject: [issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6 In-Reply-To: <1531421390.98.0.56676864532.issue34105@psf.upfronthosting.co.za> Message-ID: <1533275110.9.0.56676864532.issue34105@psf.upfronthosting.co.za> Ronald Oussoren added the comment: For some reason your system resolves invalid names, likely due to some upstream nameserver misbehaving. Is your Internet provider T-Online in Germany? The address 62.138.239.45 is registered to that company, the IP address also appears to host some kind of search page. This is sadly behaviour of some Internet provider: provide a DNS server to customers that won't return "domain not found", but returns a search page with advertising instead. All in all I think this is not a bug in Python. ---------- resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:56:29 2018 From: report at bugs.python.org (sakamotoaya) Date: Fri, 03 Aug 2018 05:56:29 +0000 Subject: [issue34328] Incorrect URL for the Visual C++ Build Tools In-Reply-To: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> Message-ID: <1533275789.13.0.56676864532.issue34328@psf.upfronthosting.co.za> Change by sakamotoaya : ---------- nosy: +CuriousLearner, ncoghlan, serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 01:57:15 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 03 Aug 2018 05:57:15 +0000 Subject: [issue34328] Incorrect URL for the Visual C++ Build Tools In-Reply-To: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> Message-ID: <1533275835.76.0.56676864532.issue34328@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This message is generated by setuptools (in module setuptools.msvc). The GitHub repository for setuptools is at , please contact the developers there. ---------- nosy: +ronaldoussoren resolution: -> third party stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:00:30 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 Aug 2018 06:00:30 +0000 Subject: [issue34328] Incorrect URL for the Visual C++ Build Tools In-Reply-To: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> Message-ID: <1533276030.02.0.56676864532.issue34328@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Upstream issue was resolved : https://github.com/pypa/setuptools/issues/1394 Thanks ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:01:54 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 Aug 2018 06:01:54 +0000 Subject: [issue34328] Incorrect URL for the Visual C++ Build Tools In-Reply-To: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> Message-ID: <1533276114.92.0.56676864532.issue34328@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Ah sorry, I don't know why it opened this bug while adding a comment. Feel free to change the status. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:05:02 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 03 Aug 2018 06:05:02 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533276302.33.0.56676864532.issue34312@psf.upfronthosting.co.za> Tal Einat added the comment: I tend to agree. ISTM that for users, understanding the error message and passing a tuple is trivial, while realizing the performance benefit of using a tuple rather than a list or set here is certainly non-trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:10:33 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 06:10:33 +0000 Subject: [issue34327] test_subprocess fails In-Reply-To: <1533257731.89.0.56676864532.issue34327@psf.upfronthosting.co.za> Message-ID: <1533276633.42.0.56676864532.issue34327@psf.upfronthosting.co.za> St?phane Wirtel added the comment: It's a duplicate of this issue: https://bugs.python.org/issue34326 I close this issue. Thank you for your feedback. ---------- nosy: +matrixise resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:14:15 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 06:14:15 +0000 Subject: [issue34328] Incorrect URL for the Visual C++ Build Tools In-Reply-To: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> Message-ID: <1533276855.37.0.56676864532.issue34328@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:39:42 2018 From: report at bugs.python.org (sakamotoaya) Date: Fri, 03 Aug 2018 06:39:42 +0000 Subject: [issue34328] Incorrect URL for the Visual C++ Build Tools In-Reply-To: <1533273697.75.0.56676864532.issue34328@psf.upfronthosting.co.za> Message-ID: <1533278382.03.0.56676864532.issue34328@psf.upfronthosting.co.za> sakamotoaya added the comment: Everyone Thank you. That was really helpful. Problem already been resolved. I change status?Pending to close. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:45:26 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 06:45:26 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533278726.64.0.56676864532.issue34312@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I also agree with the problem of performance, tuple and str are immutables and from that, we can optimize the generation of the bytecode. Raymond, @Brett & @Serhiy, Can we close this issue? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:51:45 2018 From: report at bugs.python.org (Thomas Nyberg) Date: Fri, 03 Aug 2018 06:51:45 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533279105.89.0.56676864532.issue34319@psf.upfronthosting.co.za> Thomas Nyberg added the comment: For what it's worth as the original opener of the bug report, I think Terry's recommendation clarifies things quite well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:53:02 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Aug 2018 06:53:02 +0000 Subject: [issue34314] Like __hash__, allow setting MyClass.__init__ to None to prevent it being called by type.__call__ In-Reply-To: <1533178926.29.0.56676864532.issue34314@psf.upfronthosting.co.za> Message-ID: <1533279182.11.0.56676864532.issue34314@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:54:22 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 06:54:22 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533279262.92.0.56676864532.issue34324@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +8149 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:54:54 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 06:54:54 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533279294.58.0.56676864532.issue34324@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I just pushed a PR. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:59:20 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 03 Aug 2018 06:59:20 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533279560.91.0.56676864532.issue34325@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 03:00:40 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 03 Aug 2018 07:00:40 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533279640.71.0.56676864532.issue34325@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- nosy: +Dormouse759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 03:08:00 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 07:08:00 +0000 Subject: [issue34323] False timeout log message on proactor close In-Reply-To: <1533250213.71.0.56676864532.issue34323@psf.upfronthosting.co.za> Message-ID: <1533280080.61.0.56676864532.issue34323@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi johnboy2, thank you for your issue, but could you send us more information about your platform? thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 03:12:12 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 03 Aug 2018 07:12:12 +0000 Subject: [issue34207] test_cmd_line test_utf8_mode test_warnings fail in all FreeBSD 3.x (3.8) buildbots In-Reply-To: <1532441315.45.0.56676864532.issue34207@psf.upfronthosting.co.za> Message-ID: <1533280332.46.0.56676864532.issue34207@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I tried the tests on FreeBSD 11.x and FreeBSD 10.x digitalocean droplets with master branch and the tests pass. Adding information that might be helpful. # FreeBSD 11.2-RELEASE root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # uname -a FreeBSD freebsd-s-1vcpu-1gb-blr1-01 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018 root at releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # ./python Python 3.8.0a0 (heads/master:b6efc2c, Aug 3 2018, 06:26:53) [Clang 6.0.0 (tags/RELEASE_600/final 326565)] on freebsd11 Type "help", "copyright", "credits" or "license" for more information. >>> root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # setenv PYTHONIOENCODING utf-8 root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # setenv PYTHONWARNINGS ignore:Deprecaci?nWarning root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # setenv PYTHONDEVMODE "" root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # ./python -c "import sys; sys.stdout.write(str(sys.warnoptions))" ['ignore:Deprecaci?nWarning'] root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # ./python -m unittest -v test.test_warnings test.test_cmd_line test.test_utf8_mode test_issue_8766 (test.test_warnings.BootstrapTest) ... ok test_catch_warnings_defaults (test.test_warnings.CCatchWarningTests) ... ok test_catch_warnings_recording (test.test_warnings.CCatchWarningTests) ... ok test_catch_warnings_reentry_guard (test.test_warnings.CCatchWarningTests) ... ok test_catch_warnings_restore (test.test_warnings.CCatchWarningTests) ... ok test_check_warnings (test.test_warnings.CCatchWarningTests) ... ok test_record_override_showwarning_before (test.test_warnings.CCatchWarningTests) ... ok test_record_override_showwarning_inside (test.test_warnings.CCatchWarningTests) ... ok test_comma_separated_warnings (test.test_warnings.CEnvironmentVariableTests) ... ok test_conflicting_envvar_and_command_line (test.test_warnings.CEnvironmentVariableTests) ... ok test_default_filter_configuration (test.test_warnings.CEnvironmentVariableTests) ... ok test_envvar_and_command_line (test.test_warnings.CEnvironmentVariableTests) ... ok test_nonascii (test.test_warnings.CEnvironmentVariableTests) ... ok test_single_warning (test.test_warnings.CEnvironmentVariableTests) ... ok test_always (test.test_warnings.CFilterTests) ... ok test_always_after_default (test.test_warnings.CFilterTests) ... ok test_append_duplicate (test.test_warnings.CFilterTests) ... ok test_default (test.test_warnings.CFilterTests) ... ok test_error (test.test_warnings.CFilterTests) ... ok test_error_after_default (test.test_warnings.CFilterTests) ... ok test_filterwarnings (test.test_warnings.CFilterTests) ... ok test_filterwarnings_duplicate_filters (test.test_warnings.CFilterTests) ... ok test_ignore (test.test_warnings.CFilterTests) ... ok test_ignore_after_default (test.test_warnings.CFilterTests) ... ok test_inheritance (test.test_warnings.CFilterTests) ... ok test_message_matching (test.test_warnings.CFilterTests) ... ok test_module (test.test_warnings.CFilterTests) ... ok test_module_globals (test.test_warnings.CFilterTests) ... ok test_mutate_filter_list (test.test_warnings.CFilterTests) ... ok test_once (test.test_warnings.CFilterTests) ... ok test_ordering (test.test_warnings.CFilterTests) ... ok test_simplefilter_duplicate_filters (test.test_warnings.CFilterTests) ... ok test_module_all_attribute (test.test_warnings.CPublicAPITests) ... ok test_improper_input (test.test_warnings.CWCmdLineTests) ... ok test_accelerated (test.test_warnings.CWarnTests) ... ok test_bad_str (test.test_warnings.CWarnTests) ... ok test_exec_filename (test.test_warnings.CWarnTests) ... ok test_filename (test.test_warnings.CWarnTests) ... ok test_message (test.test_warnings.CWarnTests) ... ok test_stacklevel (test.test_warnings.CWarnTests) ... ok test_stacklevel_import (test.test_warnings.CWarnTests) ... ok test_warn_explicit_non_ascii_filename (test.test_warnings.CWarnTests) ... ok test_warn_explicit_type_errors (test.test_warnings.CWarnTests) ... ok test_warn_nonstandard_types (test.test_warnings.CWarnTests) ... ok test_warning_classes (test.test_warnings.CWarnTests) ... ok test_formatwarning (test.test_warnings.CWarningsDisplayTests) ... ok test_showwarning (test.test_warnings.CWarningsDisplayTests) ... ok test_finalization (test.test_warnings.FinalizationTest) ... ok test_late_resource_warning (test.test_warnings.FinalizationTest) ... ok test_catch_warnings_defaults (test.test_warnings.PyCatchWarningTests) ... ok test_catch_warnings_recording (test.test_warnings.PyCatchWarningTests) ... ok test_catch_warnings_reentry_guard (test.test_warnings.PyCatchWarningTests) ... ok test_catch_warnings_restore (test.test_warnings.PyCatchWarningTests) ... ok test_check_warnings (test.test_warnings.PyCatchWarningTests) ... ok test_record_override_showwarning_before (test.test_warnings.PyCatchWarningTests) ... ok test_record_override_showwarning_inside (test.test_warnings.PyCatchWarningTests) ... ok test_comma_separated_warnings (test.test_warnings.PyEnvironmentVariableTests) ... ok test_conflicting_envvar_and_command_line (test.test_warnings.PyEnvironmentVariableTests) ... ok test_default_filter_configuration (test.test_warnings.PyEnvironmentVariableTests) ... ok test_envvar_and_command_line (test.test_warnings.PyEnvironmentVariableTests) ... ok test_nonascii (test.test_warnings.PyEnvironmentVariableTests) ... ok test_single_warning (test.test_warnings.PyEnvironmentVariableTests) ... ok test_always (test.test_warnings.PyFilterTests) ... ok test_always_after_default (test.test_warnings.PyFilterTests) ... ok test_append_duplicate (test.test_warnings.PyFilterTests) ... ok test_default (test.test_warnings.PyFilterTests) ... ok test_error (test.test_warnings.PyFilterTests) ... ok test_error_after_default (test.test_warnings.PyFilterTests) ... ok test_filterwarnings (test.test_warnings.PyFilterTests) ... ok test_filterwarnings_duplicate_filters (test.test_warnings.PyFilterTests) ... ok test_ignore (test.test_warnings.PyFilterTests) ... ok test_ignore_after_default (test.test_warnings.PyFilterTests) ... ok test_inheritance (test.test_warnings.PyFilterTests) ... ok test_message_matching (test.test_warnings.PyFilterTests) ... ok test_module (test.test_warnings.PyFilterTests) ... ok test_module_globals (test.test_warnings.PyFilterTests) ... ok test_mutate_filter_list (test.test_warnings.PyFilterTests) ... ok test_once (test.test_warnings.PyFilterTests) ... ok test_ordering (test.test_warnings.PyFilterTests) ... ok test_simplefilter_duplicate_filters (test.test_warnings.PyFilterTests) ... ok test_module_all_attribute (test.test_warnings.PyPublicAPITests) ... ok test_improper_input (test.test_warnings.PyWCmdLineTests) ... ok test_improper_option (test.test_warnings.PyWCmdLineTests) ... ok test_warnings_bootstrap (test.test_warnings.PyWCmdLineTests) ... ok test_bad_str (test.test_warnings.PyWarnTests) ... ok test_exec_filename (test.test_warnings.PyWarnTests) ... ok test_filename (test.test_warnings.PyWarnTests) ... ok test_message (test.test_warnings.PyWarnTests) ... ok test_pure_python (test.test_warnings.PyWarnTests) ... ok test_stacklevel (test.test_warnings.PyWarnTests) ... ok test_stacklevel_import (test.test_warnings.PyWarnTests) ... ok test_warn_explicit_non_ascii_filename (test.test_warnings.PyWarnTests) ... ok test_warn_explicit_type_errors (test.test_warnings.PyWarnTests) ... ok test_warn_nonstandard_types (test.test_warnings.PyWarnTests) ... ok test_warning_classes (test.test_warnings.PyWarnTests) ... ok test_formatwarning (test.test_warnings.PyWarningsDisplayTests) ... ok test_showwarning (test.test_warnings.PyWarningsDisplayTests) ... ok test_tracemalloc (test.test_warnings.PyWarningsDisplayTests) ... ok test_default_action (test.test_warnings._WarningsTests) ... ok test_filename_none (test.test_warnings._WarningsTests) ... ok test_filter (test.test_warnings._WarningsTests) ... ok test_issue31285 (test.test_warnings._WarningsTests) ... ok test_issue31411 (test.test_warnings._WarningsTests) ... ok test_issue31416 (test.test_warnings._WarningsTests) ... ok test_issue31566 (test.test_warnings._WarningsTests) ... ok test_onceregistry (test.test_warnings._WarningsTests) ... ok test_show_warning_output (test.test_warnings._WarningsTests) ... ok test_showwarning_missing (test.test_warnings._WarningsTests) ... ok test_showwarning_not_callable (test.test_warnings._WarningsTests) ... ok test_showwarnmsg_missing (test.test_warnings._WarningsTests) ... ok test_stderr_none (test.test_warnings._WarningsTests) ... ok test_argv0_normalization (test.test_cmd_line.CmdLineTest) ... skipped 'bpo-32457 only applies on Windows' test_builtin_input (test.test_cmd_line.CmdLineTest) ... ok test_closed_stdout (test.test_cmd_line.CmdLineTest) ... ok test_del___main__ (test.test_cmd_line.CmdLineTest) ... ok test_directories (test.test_cmd_line.CmdLineTest) ... ok test_displayhook_unencodable (test.test_cmd_line.CmdLineTest) ... ok test_empty_PYTHONPATH_issue16309 (test.test_cmd_line.CmdLineTest) ... ok test_hash_randomization (test.test_cmd_line.CmdLineTest) ... ok test_isolatedmode (test.test_cmd_line.CmdLineTest) ... ok test_large_PYTHONPATH (test.test_cmd_line.CmdLineTest) ... ok test_no_std_streams (test.test_cmd_line.CmdLineTest) ... ok test_no_stderr (test.test_cmd_line.CmdLineTest) ... ok test_no_stdin (test.test_cmd_line.CmdLineTest) ... ok test_no_stdout (test.test_cmd_line.CmdLineTest) ... ok test_non_ascii (test.test_cmd_line.CmdLineTest) ... ok test_optimize (test.test_cmd_line.CmdLineTest) ... ok test_osx_android_utf8 (test.test_cmd_line.CmdLineTest) ... skipped 'test specific to Mac OS X and Android' test_output_newline (test.test_cmd_line.CmdLineTest) ... ok test_pythondevmode_env (test.test_cmd_line.CmdLineTest) ... ok test_pythonmalloc (test.test_cmd_line.CmdLineTest) ... ok test_run_code (test.test_cmd_line.CmdLineTest) ... ok test_run_module (test.test_cmd_line.CmdLineTest) ... ok test_run_module_bug1764407 (test.test_cmd_line.CmdLineTest) ... ok test_set_pycache_prefix (test.test_cmd_line.CmdLineTest) ... ok test_showrefcount (test.test_cmd_line.CmdLineTest) ... ok test_site_flag (test.test_cmd_line.CmdLineTest) ... ok test_stdin_readline (test.test_cmd_line.CmdLineTest) ... ok test_stdout_flush_at_shutdown (test.test_cmd_line.CmdLineTest) ... ok test_sys_flags_set (test.test_cmd_line.CmdLineTest) ... ok test_unbuffered_input (test.test_cmd_line.CmdLineTest) ... ok test_unbuffered_output (test.test_cmd_line.CmdLineTest) ... ok test_undecodable_code (test.test_cmd_line.CmdLineTest) ... ok test_unknown_options (test.test_cmd_line.CmdLineTest) ... ok test_unmached_quote (test.test_cmd_line.CmdLineTest) ... ok test_usage (test.test_cmd_line.CmdLineTest) ... ok test_verbose (test.test_cmd_line.CmdLineTest) ... ok test_version (test.test_cmd_line.CmdLineTest) ... ok test_warnings_filter_precedence (test.test_cmd_line.CmdLineTest) ... ok test_xdev (test.test_cmd_line.CmdLineTest) ... ok test_xoptions (test.test_cmd_line.CmdLineTest) ... ok test_ignore_PYTHONHASHSEED (test.test_cmd_line.IgnoreEnvironmentTest) ... ok test_ignore_PYTHONPATH (test.test_cmd_line.IgnoreEnvironmentTest) ... ok test_sys_flags_not_set (test.test_cmd_line.IgnoreEnvironmentTest) ... ok test_cmd_line (test.test_utf8_mode.UTF8ModeTests) ... ok test_env_var (test.test_utf8_mode.UTF8ModeTests) ... ok test_filesystemencoding (test.test_utf8_mode.UTF8ModeTests) ... ok test_io (test.test_utf8_mode.UTF8ModeTests) ... ok test_io_encoding (test.test_utf8_mode.UTF8ModeTests) ... ok test_locale_getpreferredencoding (test.test_utf8_mode.UTF8ModeTests) ... ok test_optim_level (test.test_utf8_mode.UTF8ModeTests) ... ok test_posix_locale (test.test_utf8_mode.UTF8ModeTests) ... ok test_stdio (test.test_utf8_mode.UTF8ModeTests) ... ok test_xoption (test.test_utf8_mode.UTF8ModeTests) ... ok ---------------------------------------------------------------------- Ran 164 tests in 6.439s # FreeBSD 10.4-RELEASE root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # uname -a FreeBSD freebsd-s-1vcpu-1gb-blr1-01 10.4-RELEASE FreeBSD 10.4-RELEASE #0 r324094: Fri Sep 29 01:45:44 UTC 2017 root at releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd6 root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # ./python Python 3.8.0a0 (heads/master:b6efc2c, Aug 3 2018, 06:58:22) [Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10 Type "help", "copyright", "credits" or "license" for more information. >>> root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # setenv PYTHONIOENCODING utf-8 root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # setenv PYTHONWARNINGS ignore:Deprecaci?nWarning root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # setenv PYTHONDEVMODE "" root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # ./python -c "import sys; sys.stdout.write(str(sys.warnoptions))" ['ignore:Deprecaci?nWarning'] # Ran as a separate session on the same machine to ignore environment variables root at freebsd-s-1vcpu-1gb-blr1-01:~/cpython # ./python -m unittest -v test.test_warnings test.test_cmd_line test.test_utf8_mode test_issue_8766 (test.test_warnings.BootstrapTest) ... ok test_catch_warnings_defaults (test.test_warnings.CCatchWarningTests) ... ok test_catch_warnings_recording (test.test_warnings.CCatchWarningTests) ... ok test_catch_warnings_reentry_guard (test.test_warnings.CCatchWarningTests) ... ok test_catch_warnings_restore (test.test_warnings.CCatchWarningTests) ... ok test_check_warnings (test.test_warnings.CCatchWarningTests) ... ok test_record_override_showwarning_before (test.test_warnings.CCatchWarningTests) ... ok test_record_override_showwarning_inside (test.test_warnings.CCatchWarningTests) ... ok test_comma_separated_warnings (test.test_warnings.CEnvironmentVariableTests) ... ok test_conflicting_envvar_and_command_line (test.test_warnings.CEnvironmentVariableTests) ... ok test_default_filter_configuration (test.test_warnings.CEnvironmentVariableTests) ... ok test_envvar_and_command_line (test.test_warnings.CEnvironmentVariableTests) ... ok test_nonascii (test.test_warnings.CEnvironmentVariableTests) ... ok test_single_warning (test.test_warnings.CEnvironmentVariableTests) ... ok test_always (test.test_warnings.CFilterTests) ... ok test_always_after_default (test.test_warnings.CFilterTests) ... ok test_append_duplicate (test.test_warnings.CFilterTests) ... ok test_default (test.test_warnings.CFilterTests) ... ok test_error (test.test_warnings.CFilterTests) ... ok test_error_after_default (test.test_warnings.CFilterTests) ... ok test_filterwarnings (test.test_warnings.CFilterTests) ... ok test_filterwarnings_duplicate_filters (test.test_warnings.CFilterTests) ... ok test_ignore (test.test_warnings.CFilterTests) ... ok test_ignore_after_default (test.test_warnings.CFilterTests) ... ok test_inheritance (test.test_warnings.CFilterTests) ... ok test_message_matching (test.test_warnings.CFilterTests) ... ok test_module (test.test_warnings.CFilterTests) ... ok test_module_globals (test.test_warnings.CFilterTests) ... ok test_mutate_filter_list (test.test_warnings.CFilterTests) ... ok test_once (test.test_warnings.CFilterTests) ... ok test_ordering (test.test_warnings.CFilterTests) ... ok test_simplefilter_duplicate_filters (test.test_warnings.CFilterTests) ... ok test_module_all_attribute (test.test_warnings.CPublicAPITests) ... ok test_improper_input (test.test_warnings.CWCmdLineTests) ... ok test_accelerated (test.test_warnings.CWarnTests) ... ok test_bad_str (test.test_warnings.CWarnTests) ... ok test_exec_filename (test.test_warnings.CWarnTests) ... ok test_filename (test.test_warnings.CWarnTests) ... ok test_message (test.test_warnings.CWarnTests) ... ok test_stacklevel (test.test_warnings.CWarnTests) ... ok test_stacklevel_import (test.test_warnings.CWarnTests) ... ok test_warn_explicit_non_ascii_filename (test.test_warnings.CWarnTests) ... ok test_warn_explicit_type_errors (test.test_warnings.CWarnTests) ... ok test_warn_nonstandard_types (test.test_warnings.CWarnTests) ... ok test_warning_classes (test.test_warnings.CWarnTests) ... ok test_formatwarning (test.test_warnings.CWarningsDisplayTests) ... ok test_showwarning (test.test_warnings.CWarningsDisplayTests) ... ok test_finalization (test.test_warnings.FinalizationTest) ... ok test_late_resource_warning (test.test_warnings.FinalizationTest) ... ok test_catch_warnings_defaults (test.test_warnings.PyCatchWarningTests) ... ok test_catch_warnings_recording (test.test_warnings.PyCatchWarningTests) ... ok test_catch_warnings_reentry_guard (test.test_warnings.PyCatchWarningTests) ... ok test_catch_warnings_restore (test.test_warnings.PyCatchWarningTests) ... ok test_check_warnings (test.test_warnings.PyCatchWarningTests) ... ok test_record_override_showwarning_before (test.test_warnings.PyCatchWarningTests) ... ok test_record_override_showwarning_inside (test.test_warnings.PyCatchWarningTests) ... ok test_comma_separated_warnings (test.test_warnings.PyEnvironmentVariableTests) ... ok test_conflicting_envvar_and_command_line (test.test_warnings.PyEnvironmentVariableTests) ... ok test_default_filter_configuration (test.test_warnings.PyEnvironmentVariableTests) ... ok test_envvar_and_command_line (test.test_warnings.PyEnvironmentVariableTests) ... ok test_nonascii (test.test_warnings.PyEnvironmentVariableTests) ... ok test_single_warning (test.test_warnings.PyEnvironmentVariableTests) ... ok test_always (test.test_warnings.PyFilterTests) ... ok test_always_after_default (test.test_warnings.PyFilterTests) ... ok test_append_duplicate (test.test_warnings.PyFilterTests) ... ok test_default (test.test_warnings.PyFilterTests) ... ok test_error (test.test_warnings.PyFilterTests) ... ok test_error_after_default (test.test_warnings.PyFilterTests) ... ok test_filterwarnings (test.test_warnings.PyFilterTests) ... ok test_filterwarnings_duplicate_filters (test.test_warnings.PyFilterTests) ... ok test_ignore (test.test_warnings.PyFilterTests) ... ok test_ignore_after_default (test.test_warnings.PyFilterTests) ... ok test_inheritance (test.test_warnings.PyFilterTests) ... ok test_message_matching (test.test_warnings.PyFilterTests) ... ok test_module (test.test_warnings.PyFilterTests) ... ok test_module_globals (test.test_warnings.PyFilterTests) ... ok test_mutate_filter_list (test.test_warnings.PyFilterTests) ... ok test_once (test.test_warnings.PyFilterTests) ... ok test_ordering (test.test_warnings.PyFilterTests) ... ok test_simplefilter_duplicate_filters (test.test_warnings.PyFilterTests) ... ok test_module_all_attribute (test.test_warnings.PyPublicAPITests) ... ok test_improper_input (test.test_warnings.PyWCmdLineTests) ... ok test_improper_option (test.test_warnings.PyWCmdLineTests) ... ok test_warnings_bootstrap (test.test_warnings.PyWCmdLineTests) ... ok test_bad_str (test.test_warnings.PyWarnTests) ... ok test_exec_filename (test.test_warnings.PyWarnTests) ... ok test_filename (test.test_warnings.PyWarnTests) ... ok test_message (test.test_warnings.PyWarnTests) ... ok test_pure_python (test.test_warnings.PyWarnTests) ... ok test_stacklevel (test.test_warnings.PyWarnTests) ... ok test_stacklevel_import (test.test_warnings.PyWarnTests) ... ok test_warn_explicit_non_ascii_filename (test.test_warnings.PyWarnTests) ... ok test_warn_explicit_type_errors (test.test_warnings.PyWarnTests) ... ok test_warn_nonstandard_types (test.test_warnings.PyWarnTests) ... ok test_warning_classes (test.test_warnings.PyWarnTests) ... ok test_formatwarning (test.test_warnings.PyWarningsDisplayTests) ... ok test_showwarning (test.test_warnings.PyWarningsDisplayTests) ... ok test_tracemalloc (test.test_warnings.PyWarningsDisplayTests) ... ok test_default_action (test.test_warnings._WarningsTests) ... ok test_filename_none (test.test_warnings._WarningsTests) ... ok test_filter (test.test_warnings._WarningsTests) ... ok test_issue31285 (test.test_warnings._WarningsTests) ... ok test_issue31411 (test.test_warnings._WarningsTests) ... ok test_issue31416 (test.test_warnings._WarningsTests) ... ok test_issue31566 (test.test_warnings._WarningsTests) ... ok test_onceregistry (test.test_warnings._WarningsTests) ... ok test_show_warning_output (test.test_warnings._WarningsTests) ... ok test_showwarning_missing (test.test_warnings._WarningsTests) ... ok test_showwarning_not_callable (test.test_warnings._WarningsTests) ... ok test_showwarnmsg_missing (test.test_warnings._WarningsTests) ... ok test_stderr_none (test.test_warnings._WarningsTests) ... ok test_argv0_normalization (test.test_cmd_line.CmdLineTest) ... skipped 'bpo-32457 only applies on Windows' test_builtin_input (test.test_cmd_line.CmdLineTest) ... ok test_closed_stdout (test.test_cmd_line.CmdLineTest) ... ok test_del___main__ (test.test_cmd_line.CmdLineTest) ... ok test_directories (test.test_cmd_line.CmdLineTest) ... ok test_displayhook_unencodable (test.test_cmd_line.CmdLineTest) ... ok test_empty_PYTHONPATH_issue16309 (test.test_cmd_line.CmdLineTest) ... ok test_hash_randomization (test.test_cmd_line.CmdLineTest) ... ok test_isolatedmode (test.test_cmd_line.CmdLineTest) ... ok test_large_PYTHONPATH (test.test_cmd_line.CmdLineTest) ... ok test_no_std_streams (test.test_cmd_line.CmdLineTest) ... ok test_no_stderr (test.test_cmd_line.CmdLineTest) ... ok test_no_stdin (test.test_cmd_line.CmdLineTest) ... ok test_no_stdout (test.test_cmd_line.CmdLineTest) ... ok test_non_ascii (test.test_cmd_line.CmdLineTest) ... ok test_optimize (test.test_cmd_line.CmdLineTest) ... ok test_osx_android_utf8 (test.test_cmd_line.CmdLineTest) ... skipped 'test specific to Mac OS X and Android' test_output_newline (test.test_cmd_line.CmdLineTest) ... ok test_pythondevmode_env (test.test_cmd_line.CmdLineTest) ... ok test_pythonmalloc (test.test_cmd_line.CmdLineTest) ... ok test_run_code (test.test_cmd_line.CmdLineTest) ... ok test_run_module (test.test_cmd_line.CmdLineTest) ... ok test_run_module_bug1764407 (test.test_cmd_line.CmdLineTest) ... ok test_set_pycache_prefix (test.test_cmd_line.CmdLineTest) ... ok test_showrefcount (test.test_cmd_line.CmdLineTest) ... ok test_site_flag (test.test_cmd_line.CmdLineTest) ... ok test_stdin_readline (test.test_cmd_line.CmdLineTest) ... ok test_stdout_flush_at_shutdown (test.test_cmd_line.CmdLineTest) ... ok test_sys_flags_set (test.test_cmd_line.CmdLineTest) ... ok test_unbuffered_input (test.test_cmd_line.CmdLineTest) ... ok test_unbuffered_output (test.test_cmd_line.CmdLineTest) ... ok test_undecodable_code (test.test_cmd_line.CmdLineTest) ... ok test_unknown_options (test.test_cmd_line.CmdLineTest) ... ok test_unmached_quote (test.test_cmd_line.CmdLineTest) ... ok test_usage (test.test_cmd_line.CmdLineTest) ... ok test_verbose (test.test_cmd_line.CmdLineTest) ... ok test_version (test.test_cmd_line.CmdLineTest) ... ok test_warnings_filter_precedence (test.test_cmd_line.CmdLineTest) ... ok test_xdev (test.test_cmd_line.CmdLineTest) ... ok test_xoptions (test.test_cmd_line.CmdLineTest) ... ok test_ignore_PYTHONHASHSEED (test.test_cmd_line.IgnoreEnvironmentTest) ... ok test_ignore_PYTHONPATH (test.test_cmd_line.IgnoreEnvironmentTest) ... ok test_sys_flags_not_set (test.test_cmd_line.IgnoreEnvironmentTest) ... ok test_cmd_line (test.test_utf8_mode.UTF8ModeTests) ... ok test_env_var (test.test_utf8_mode.UTF8ModeTests) ... ok test_filesystemencoding (test.test_utf8_mode.UTF8ModeTests) ... ok test_io (test.test_utf8_mode.UTF8ModeTests) ... ok test_io_encoding (test.test_utf8_mode.UTF8ModeTests) ... ok test_locale_getpreferredencoding (test.test_utf8_mode.UTF8ModeTests) ... ok test_optim_level (test.test_utf8_mode.UTF8ModeTests) ... ok test_posix_locale (test.test_utf8_mode.UTF8ModeTests) ... ok test_stdio (test.test_utf8_mode.UTF8ModeTests) ... ok test_xoption (test.test_utf8_mode.UTF8ModeTests) ... ok ---------------------------------------------------------------------- Ran 164 tests in 15.137s OK (skipped=2) Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 03:18:43 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 07:18:43 +0000 Subject: [issue34207] test_cmd_line test_utf8_mode test_warnings fail in all FreeBSD 3.x (3.8) buildbots In-Reply-To: <1532441315.45.0.56676864532.issue34207@psf.upfronthosting.co.za> Message-ID: <1533280723.57.0.56676864532.issue34207@psf.upfronthosting.co.za> St?phane Wirtel added the comment: xtreak in this case, it's an issue on the buildbot cluster, we have to be sure that we don't have this error again. and for that, we have to find the origin of the crash on buildbot. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 03:20:34 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 07:20:34 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533280834.25.0.56676864532.issue34326@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Same issue with my builds : * Linux -> https://python.visualstudio.com/cpython/_build/results?buildId=21273&view=logs * macOS -> https://python.visualstudio.com/cpython/_build/results?buildId=21274&view=logs ---------- nosy: +matrixise, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 03:33:47 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Fri, 03 Aug 2018 07:33:47 +0000 Subject: [issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var In-Reply-To: <1530533915.92.0.56676864532.issue34022@psf.upfronthosting.co.za> Message-ID: <1533281627.53.0.56676864532.issue34022@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 03:36:22 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 07:36:22 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533281782.21.0.56676864532.issue34326@psf.upfronthosting.co.za> St?phane Wirtel added the comment: same problem here: linux: https://python.visualstudio.com/8e426817-76c0-4b99-ba9e-a48a1e4bd5db/_build/index?buildId=21241 macOS: https://python.visualstudio.com/8e426817-76c0-4b99-ba9e-a48a1e4bd5db/_build/index?buildId=21242 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 04:27:26 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Fri, 03 Aug 2018 08:27:26 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1533284846.03.0.56676864532.issue34313@psf.upfronthosting.co.za> Vlad Tudorache added the comment: I was telling only that I've seen myself the issues with some Tcl/Tk versions. As I often build Tcl/Tk on macOS, I can confirm that on 8.6.8 I didn't see issues (those were effectively present in (ActiveState or not) Tcl 8.5.18, 8.5.19, 8.6.6, 8.6.7. The only issue I had was an @autoreleasepool after several open/close of the Preferences dialog in IDLE (see the 34120 issue), related probably to a partial release of resources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 04:29:59 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 08:29:59 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533284999.54.0.56676864532.issue34326@psf.upfronthosting.co.za> St?phane Wirtel added the comment: When I try to find the issue with git bisect, I have one commit. 72ec3193b5118a2ccc8be8bf03d7b74691c6a264 is the first bad commit commit 72ec3193b5118a2ccc8be8bf03d7b74691c6a264 Author: Victor Stinner Date: Thu Aug 2 19:34:20 2018 +0200 bpo-34170: Cleanup pymain_run_filename() (GH-8631) * Inline pymain_run_file() and pymain_open_filename() into pymain_run_filename() * Created pymain_run_stdin() which is pymain_run_filename() with filename=NULL * Rename pymain_run_filename() to pymain_run_file() :040000 040000 6e49f5791bc63c3bf67a3674ccc00a412b5f089a 1b93e169af3afb07daaf06e2247a3eae6a88cac5 M Modules with ./python -m test test_subprocess -v ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 05:58:05 2018 From: report at bugs.python.org (Stefan Otte) Date: Fri, 03 Aug 2018 09:58:05 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix Message-ID: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> New submission from Stefan Otte : Hello folks! I didn't realize that you can remove a suffix with the `with_suffix` function of the `Path` class of `pathlib` and I always used a little utility function that I wrote. I wanted to add that functionality (removing of a suffix) and submit a PR but then I saw that `with_suffix` has you covered already. I'm just documenting this feature with the PR I'll submit. ---------- assignee: docs at python components: Documentation messages: 323042 nosy: docs at python, sotte priority: normal severity: normal status: open title: Document how to remove a suffix with pathlib.Path.with_suffix type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 06:01:13 2018 From: report at bugs.python.org (Stefan Otte) Date: Fri, 03 Aug 2018 10:01:13 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533290473.37.0.56676864532.issue34329@psf.upfronthosting.co.za> Change by Stefan Otte : ---------- keywords: +patch pull_requests: +8150 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 06:01:47 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 10:01:47 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533290507.5.0.56676864532.issue34326@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I continue to work on this issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 06:54:08 2018 From: report at bugs.python.org (Jens Troeger) Date: Fri, 03 Aug 2018 10:54:08 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1431879719.97.0.835565097524.issue24218@psf.upfronthosting.co.za> Message-ID: <1533293648.54.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: So that?s interesting. I thought that setting `international = True` (see line https://github.com/python/cpython/blob/master/Lib/smtplib.py#L947) would be a neat workaround, but the opposite. When delivering those emails to Gmail I started seeing Failed to send email: (555, b'5.5.2 Syntax error, goodbye. s53-v6sm1864855qts.5 - gsmtp', 'foo at bar.com') and it turns out (according to the IETF message linter, https://tools.ietf.org/tools/msglint/) that: ----------- UNKNOWN: unknown header 'User-Agent' at line 4 ERROR: missing mandatory header 'date' lines 1-7 ERROR: missing mandatory header 'return-path' lines 1-7 OK: found part text/plain line 9 WARNING: line 13 too long (109 chars); text/plain shouldn't need folding (RFC 2046-4.1.1) WARNING: line 15 too long (124 chars); text/plain shouldn't need folding (RFC 2046-4.1.1) WARNING: Character set mislabelled as 'utf-8' when 'us-ascii' suffices, body part ending line 22 ----------- It seems that now ?Date? and ?Return-Path? header entries are missing when the email is generated. I reverted the initial change. Any updates on the multiple CR problem when flattening? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 08:11:17 2018 From: report at bugs.python.org (Marcel Plch) Date: Fri, 03 Aug 2018 12:11:17 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533298277.7.0.56676864532.issue34325@psf.upfronthosting.co.za> Change by Marcel Plch : ---------- keywords: +patch pull_requests: +8151 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 08:39:35 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 12:39:35 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533299975.0.0.56676864532.issue34326@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I think there is an issue with pymain_run_file, in the new code of Victor, a file descriptor is not closed but I don't know why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 08:56:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 03 Aug 2018 12:56:12 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533300972.75.0.56676864532.issue34326@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Maybe we can strace a failing test and cross check the opens and the closes to see which one is not being closed. Or monitor /proc/PID/fd while the test runs. I can investigate later today myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 09:02:16 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 13:02:16 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533301336.57.0.56676864532.issue34326@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Pablo, the main issue comes after this commit, you can strace the call for example ./python -m unittest test.test_subprocess.POSIXProcessTestCase.test_pass_fds on this test function and you will see than there is a opened file descriptor. I tried to rewrite the patch of victor and see what was the difference, and there is no issue with pymain_run_stdin but I have the issue with pymain_run_file. after that, I don't know how to find the leaked file. Any idea? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 09:12:55 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 13:12:55 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533301975.04.0.56676864532.issue34329@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Good catch, thank you. Could you sign the CLA, without the CLA, we can't process your PR. Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 09:33:57 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 13:33:57 +0000 Subject: [issue34301] Add _PyInterpreterState_Get() helper function In-Reply-To: <1533081199.4.0.56676864532.issue34301@psf.upfronthosting.co.za> Message-ID: <1533303237.05.0.56676864532.issue34301@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset caba55b3b735405b280273f7d99866a046c18281 by Victor Stinner in branch 'master': bpo-34301: Add _PyInterpreterState_Get() helper function (GH-8592) https://github.com/python/cpython/commit/caba55b3b735405b280273f7d99866a046c18281 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 09:35:06 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 13:35:06 +0000 Subject: [issue34301] Add _PyInterpreterState_Get() helper function In-Reply-To: <1533081199.4.0.56676864532.issue34301@psf.upfronthosting.co.za> Message-ID: <1533303306.88.0.56676864532.issue34301@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 09:59:56 2018 From: report at bugs.python.org (Stefan Otte) Date: Fri, 03 Aug 2018 13:59:56 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533304796.68.0.56676864532.issue34329@psf.upfronthosting.co.za> Stefan Otte added the comment: I'm waiting for the CLA to be accepted. I'll get back to you ASAP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:01:47 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 14:01:47 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533304907.79.0.56676864532.issue34329@psf.upfronthosting.co.za> St?phane Wirtel added the comment: yep, it's a manual modification in b.p.o but after that, we can check your PR. thank you for your patience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:04:13 2018 From: report at bugs.python.org (Stefan Otte) Date: Fri, 03 Aug 2018 14:04:13 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533305053.69.0.56676864532.issue34329@psf.upfronthosting.co.za> Stefan Otte added the comment: No problem, I'm just excited to contribute to python (as small as the contribution might be) :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:12:18 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 14:12:18 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533305538.95.0.56676864532.issue34329@psf.upfronthosting.co.za> St?phane Wirtel added the comment: It's the same thing for everything, for example, in Karate, you will start with the white belt and with practice, you will get the black belt. Thank you again for your contribution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:25:01 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 14:25:01 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533306301.18.0.56676864532.issue34329@psf.upfronthosting.co.za> Berker Peksag added the comment: This seems like a reasonable request. The feature was added in https://github.com/python/cpython/commit/e50dafcd636ba32db890600164698bb070d40d97 (issue 20639) in Python 3.4. I'd normally suggest adding a ".. versionchanged:: 3.4" marker, but since the change is quite old and it's already in all of the current maintenance releases, I think we don't need to add it. ---------- nosy: +berker.peksag versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:36:57 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 03 Aug 2018 14:36:57 +0000 Subject: [issue32073] Add copy_directory_metadata parameter to shutil.copytree In-Reply-To: <1511032407.02.0.213398074469.issue32073@psf.upfronthosting.co.za> Message-ID: <1533307017.31.0.56676864532.issue32073@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: What function raises ENOTSUPP exactly (traceback would be welcome)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:40:05 2018 From: report at bugs.python.org (=?utf-8?b?0JLQu9Cw0LQg0Jo=?=) Date: Fri, 03 Aug 2018 14:40:05 +0000 Subject: [issue34330] The decode_header function does not always work correctly. Message-ID: <1533307205.91.0.56676864532.issue34330@psf.upfronthosting.co.za> New submission from ???? ? : The decode_header function does not always work correctly. me at Serv:~$ python3 Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from email.header import decode_header >>> s = '=?windows-1251?B?zeDp5Oj46ujtINDu7ODtIMLr4OTo7Ojw7uLo9w==?=\r\n\t' >>> decode_header(s) [(b'\xcd\xe0\xe9\xe4\xe8\xf8\xea\xe8\xed \xd0\xee\xec\xe0\xed \xc2\xeb\xe0\xe4\xe8\xec\xe8\xf0\xee\xe2\xe8\xf7', 'windows -1251'), (b'', None)] >>> exit() me at Serv:~$ python Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from email.header import decode_header >>> s = '=?windows-1251?B?zeDp5Oj46ujtINDu7ODtIMLr4OTo7Ojw7uLo9w==?=\r\n\t' >>> decode_header(s) [('=?windows-1251?B?zeDp5Oj46ujtINDu7ODtIMLr4OTo7Ojw7uLo9w==?=\r\n\t', None)] >>> exit() ---------- components: email messages: 323056 nosy: barry, r.david.murray, ???? ?2 priority: normal severity: normal status: open title: The decode_header function does not always work correctly. versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:52:06 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 03 Aug 2018 14:52:06 +0000 Subject: [issue34171] Lib/trace.cover not removed by the clean target In-Reply-To: <1532102937.62.0.56676864532.issue34171@psf.upfronthosting.co.za> Message-ID: <1533307926.05.0.56676864532.issue34171@psf.upfronthosting.co.za> Zackery Spytz added the comment: It seems that this file is left by test_trace after commit 47ab15470d72367694d7758004067313ae022f0e. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:57:10 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 03 Aug 2018 14:57:10 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1533308230.94.0.56676864532.issue31908@psf.upfronthosting.co.za> Zackery Spytz added the comment: This change causes test_trace to leave a trace.cover file in the Lib directory (see #34171). ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 11:56:31 2018 From: report at bugs.python.org (ppperry) Date: Fri, 03 Aug 2018 15:56:31 +0000 Subject: [issue34331] Incorrectly pluralized abstract class error message Message-ID: <1533311791.76.0.56676864532.issue34331@psf.upfronthosting.co.za> New submission from ppperry : >>> class abstract(abc.ABC): ... @abc.abstractmethod ... def meth(): ... pass ... >>> x() Traceback (most recent call last): File "", line 1, in TypeError: Can't instantiate abstract class x with abstract methods meth Error should be "Can't instantiate abstract class abstract with abstract method meth" in the singular, because there is only one abstract method. ---------- components: Interpreter Core, Library (Lib) messages: 323059 nosy: Anjali Bansal, ppperry, rhettinger, serhiy.storchaka, terry.reedy, xtreak priority: normal severity: normal status: open title: Incorrectly pluralized abstract class error message versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 11:59:23 2018 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 03 Aug 2018 15:59:23 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533311963.51.0.56676864532.issue34325@psf.upfronthosting.co.za> Petr Viktorin added the comment: New changeset 7b41dbad78c6b03ca2f98800a92a1977d3946643 by Petr Viktorin (Marcel Plch) in branch 'master': bpo-34325: Skip zipfile test for large timestamps when filesystem don't support them. (GH-8656) https://github.com/python/cpython/commit/7b41dbad78c6b03ca2f98800a92a1977d3946643 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 12:39:27 2018 From: report at bugs.python.org (Eric Fahlgren) Date: Fri, 03 Aug 2018 16:39:27 +0000 Subject: [issue34252] Bunch of path leaks on Python 3.7 on Release In-Reply-To: <1532721942.43.0.56676864532.issue34252@psf.upfronthosting.co.za> Message-ID: <1533314367.92.0.56676864532.issue34252@psf.upfronthosting.co.za> Eric Fahlgren added the comment: I believe that the CL command line switch is /FC, not /FP: https://msdn.microsoft.com/en-us/library/027c4t2s.aspx ---------- nosy: +eric.fahlgren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 13:07:54 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Aug 2018 17:07:54 +0000 Subject: [issue34312] Allow str.endswith and str.startswith to accept an iterable In-Reply-To: <1533156462.08.0.56676864532.issue34312@psf.upfronthosting.co.za> Message-ID: <1533316074.48.0.56676864532.issue34312@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 13:08:39 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Aug 2018 17:08:39 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533316119.18.0.56676864532.issue32797@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +brett.cannon, eric.snow, ncoghlan, petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 13:33:47 2018 From: report at bugs.python.org (Erik Bray) Date: Fri, 03 Aug 2018 17:33:47 +0000 Subject: [issue34211] Cygwin build broken due to use of &PyType_Type in static declaration in _abc module In-Reply-To: <1532451616.3.0.56676864532.issue34211@psf.upfronthosting.co.za> Message-ID: <1533317627.92.0.56676864532.issue34211@psf.upfronthosting.co.za> Erik Bray added the comment: > What makes functions different from variables? Aren't they essentially just pointers? You're on the right track by noting a difference between functions and data variables. I can tell you off the bat that when it comes to data imported from DLLs, non-functions are handled (somewhat by necessity) quite differently from functions. That said, since you asked, I struggled to articulate *exactly* why this exact problem occurs on Cygwin (actually on Windows in general), so I thought about it for a while and wrote up an explanation in a blog post: http://iguananaut.net/blog/programming/windows-data-import.html The TL;DR though is that limitations of how the runtime dynamic loader on Windows works are such that it's impossible to initialize static data with a pointer to some data in an external library. The compiler knows this and prevents you from doing it. The workaround is simple enough for most cases: Complete the initialization at runtime. In the case of PyType_Type objects, PyType_Ready can set their base type at runtime just fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 14:56:25 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 18:56:25 +0000 Subject: [issue33161] Refactor of pathlib's _WindowsBehavior.gethomedir In-Reply-To: <1522198041.64.0.467229070634.issue33161@psf.upfronthosting.co.za> Message-ID: <1533322585.75.0.56676864532.issue33161@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the PR, but we usually avoid unnecessary churn in Python codebase. Both versions look fine, and deciding which one to use is just a matter of personal taste. ---------- components: -Windows nosy: +berker.peksag -paul.moore, steve.dower, tim.golden, zach.ware resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 15:27:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 19:27:16 +0000 Subject: [issue34253] Tkinter- On windows, calling filedialog or messagebox before the window is drawn causes focus issues In-Reply-To: <1532734093.09.0.56676864532.issue34253@psf.upfronthosting.co.za> Message-ID: <1533324436.94.0.56676864532.issue34253@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You only need to run .update_idletasks(), as there are no pending events to process. This is not a tkinter issue. It is a known fact that there are undocumented annoying differences in tk behavior on different systems and even different versions thereof. In #34275, for instance, we had to add .update_idletasks for IDLE calltips to appear on Macs with recent tk versions. For Windows, your code also needs entry.focus_set to be able to enter text, after the mbox is dismissed, without activating the widget with a click. Indeed, the call is needed here on Mac with Python 3.7.0 and tk 8.6.8. Without it, the root window partially keeps the focus, in that the traffic lights remain light, and the messagebox only partially get the focus, in that the title and OK button are dimmed. One has to click on the box to highlight the title and OK. With the call, the root lights go out and the box is active, and can be dismissed with . There is an additional issue on current Mac. When the mbox is dismissed, focus does not return properly to the root and entry. They have to be clicked on. Since this is similar to the problem in #34120, and since Novel's issue on Windows is exactly like the 'have to go away and come back' part of #34120, I wonder if the model mbox needs an explicit grab release. Kevin, since the mbox is created and destroyed within a call to the tk messageBox function we have no control of its operation. Perhaps you could check the tcl/tk code and see it if needs updating, as did the IDLE code. ---------- nosy: +serhiy.storchaka, terry.reedy, wordtech resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 15:28:12 2018 From: report at bugs.python.org (Happy Fakeboulder) Date: Fri, 03 Aug 2018 19:28:12 +0000 Subject: [issue34332] Suggestion for a new loop type Message-ID: <1533324492.86.0.56676864532.issue34332@psf.upfronthosting.co.za> New submission from Happy Fakeboulder : A "while-except" loop, in which it acts like a do-while loop from other languages, except the condition is "did an exception occur during the execution of the iteration". One could specify a type of exception at the top, similar to an except block header. (sorry, I'm an idiot) Example (the keyword might be different): # asks for a number until the user gives one properly, then # calculates the square of it. whexc ValueError: num = int(input("Enter a number: ")) print("The square of your number is " + str(num * num)) # assuming whexc works, this will not cause an error ---------- messages: 323065 nosy: Happy Fakeboulder priority: normal severity: normal status: open title: Suggestion for a new loop type type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 15:47:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 19:47:21 +0000 Subject: [issue34256] Python treats ASCII record separator ('\x1e') as a newline In-Reply-To: <1532772549.2.0.56676864532.issue34256@psf.upfronthosting.co.za> Message-ID: <1533325641.56.0.56676864532.issue34256@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A database record is equivalent to a logical line, possible wrapped onto multiple physical lines. So it is plausible. The 7643 in the test name refers to issue #7643, What is a Unicode line break character?" It contains this: " > We may add some words to the documentation for str.splitlines() and bytes.splitlines() to explain what is considered a line break character. For ASCII we should make the list of characters explicit. For Unicode, we should mention the above definition and give the table as example list (the Unicode database may add more such characters in the future). " The test was added but the doc not. I agree that it would be useful. Feel free to suggest a doc change. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, terry.reedy title: Python treats ASCII record seperator ('\x1e') as a newline -> Python treats ASCII record separator ('\x1e') as a newline versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 15:52:12 2018 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Aug 2018 19:52:12 +0000 Subject: [issue34332] Suggestion for a new loop type In-Reply-To: <1533324492.86.0.56676864532.issue34332@psf.upfronthosting.co.za> Message-ID: <1533325932.45.0.56676864532.issue34332@psf.upfronthosting.co.za> Zachary Ware added the comment: Ideas like this are better sent to the python-ideas at python.org mailing list for discussion rather than immediately opening an issue. Note though that I think this has a low chance of acceptance; there's a very high bar to clear to add syntax, even higher for new keywords, and this doesn't seem to buy much over: while True: try: num = int(input("Enter a number: ")) except ValueError: print("I said a *number*") else: break print("The square of your number is", num**2) Especially considering that this version allows you to handle the error however you want, and handle different errors differently, rather than just silently restarting the loop no matter the error. Also, this will be valid in 3.8 and achieve exactly what you're asking for: while not (ans := input("Enter a number: ")).isnumeric(): pass print("The square of your number is", int(ans) ** 2) Do feel free to send your idea to python-ideas anyway, I'm just one opinion :) ---------- nosy: +zach.ware resolution: -> rejected stage: -> resolved status: open -> closed versions: -Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:09:10 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 20:09:10 +0000 Subject: [issue34327] test_subprocess fails In-Reply-To: <1533257731.89.0.56676864532.issue34327@psf.upfronthosting.co.za> Message-ID: <1533326950.06.0.56676864532.issue34327@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- superseder: -> test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:19:14 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 20:19:14 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533327554.42.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:23:39 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 03 Aug 2018 20:23:39 +0000 Subject: [issue34126] Profiling certain invalid calls crashes Python In-Reply-To: <1531761430.57.0.56676864532.issue34126@psf.upfronthosting.co.za> Message-ID: <1533327819.6.0.56676864532.issue34126@psf.upfronthosting.co.za> Change by Jeroen Demeyer : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:25:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 20:25:08 +0000 Subject: [issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533327908.81.0.56676864532.issue34247@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:27:52 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 20:27:52 +0000 Subject: [issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533328072.07.0.56676864532.issue34247@psf.upfronthosting.co.za> STINNER Victor added the comment: I first proposed to backport all code from master: https://mail.python.org/pipermail/python-dev/2018-July/154882.html But I'm not sure that it's a good idea, since I made *many* changes in the master branch since 3.7... I even added more files, and the _PyCoreConfig API is going to change anyway... So I wrote a simpler PR 8659 which backports unit tests, adapt them for Python 3.7, and fix this issue: PYTHONOPTIMIZE and other environment variables and now read by Py_Initialize(), not only by Py_Main(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:34:49 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 03 Aug 2018 20:34:49 +0000 Subject: [issue34321] mmap.mmap() should not necessarily clone the file descriptor In-Reply-To: <1533216123.68.0.56676864532.issue34321@psf.upfronthosting.co.za> Message-ID: <1533328489.47.0.56676864532.issue34321@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Why would it "cause an issue if the file is closed before accessing the mmapped region"? As shown in your own link, the constructor performs the mmap call immediately after the descriptor is duplicated, with the GIL held; any race condition that could close the file before the mmap occurs could equally well close it before the descriptor is duplicated. The possible issues aren't tied to accessing the memory (once the mapping has been performed, the file descriptor can be safely closed in general), but rather, to the size and resize methods of mmap objects (the former using the fd to fstat the file, the latter using it to ftruncate the file). As long as you don't use size/resize, nothing else depends on the file descriptor after construction has completed. The size method in particular seems like a strange wart on the API; it returns the total file size, not the size of the mapping (len(mapping) gets the size of the actual mapping). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:35:30 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 20:35:30 +0000 Subject: [issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533328530.01.0.56676864532.issue34247@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested manually attached t.c with PR 8659: I get optimize=2 as expected. Full output: sys.flags(debug=0, inspect=0, interactive=0, optimize=2, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, dev_mode=False, utf8_mode=1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:41:07 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 Aug 2018 20:41:07 +0000 Subject: [issue34331] Incorrectly pluralized abstract class error message In-Reply-To: <1533311791.76.0.56676864532.issue34331@psf.upfronthosting.co.za> Message-ID: <1533328867.5.0.56676864532.issue34331@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm not sure the effort and code is justified for a trivial fix to an error message. Is this causing some actual problem? ---------- nosy: +eric.smith type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:45:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 20:45:08 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533329108.81.0.56676864532.issue34170@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +8154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:45:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 20:45:08 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533329108.91.0.665841612001.issue34326@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +8155 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:46:59 2018 From: report at bugs.python.org (ppperry) Date: Fri, 03 Aug 2018 20:46:59 +0000 Subject: [issue34331] Incorrectly pluralized abstract class error message In-Reply-To: <1533311791.76.0.56676864532.issue34331@psf.upfronthosting.co.za> Message-ID: <1533329219.02.0.56676864532.issue34331@psf.upfronthosting.co.za> ppperry added the comment: No, this isn't causing me an actual problem, however the related issue34127 was accepted, and this one should be no harder to fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:49:10 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 20:49:10 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533329350.2.0.56676864532.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5a953fd0ab4d0f792f4c1537616b2ce8ee40d976 by Victor Stinner in branch 'master': bpo-34170: _PyCoreConfig_Read() don't replace coerce_c_locale (GH-8658) https://github.com/python/cpython/commit/5a953fd0ab4d0f792f4c1537616b2ce8ee40d976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:49:44 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 20:49:44 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533329384.56.0.56676864532.issue34329@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 46dc4e34ed8005a688d7f3512844ef227a3465f4 by Berker Peksag (Stefan Otte) in branch 'master': bpo-34329: Doc'd how to remove suffix of pathlib.Path() (GH-8655) https://github.com/python/cpython/commit/46dc4e34ed8005a688d7f3512844ef227a3465f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:50:29 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 20:50:29 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533329429.83.0.56676864532.issue34329@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:50:40 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 03 Aug 2018 20:50:40 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533329440.62.0.56676864532.issue34329@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:56:38 2018 From: report at bugs.python.org (desbma) Date: Fri, 03 Aug 2018 20:56:38 +0000 Subject: [issue32073] Add copy_directory_metadata parameter to shutil.copytree In-Reply-To: <1511032407.02.0.213398074469.issue32073@psf.upfronthosting.co.za> Message-ID: <1533329798.72.0.56676864532.issue32073@psf.upfronthosting.co.za> desbma added the comment: Traceback is not very useful in that case: mkdir /tmp/a touch /tmp/a/b python Python 3.6.6 (default, Jun 27 2018, 13:11:40) [GCC 8.1.1 20180531] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os, shutil >>> os.getcwd() '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1' >>> shutil.copytree("/tmp/a", os.path.join(os.getcwd(), "test")) Traceback (most recent call last): File "", line 1, in File "/home/desbma/py-venvs/main/lib/python3.6/shutil.py", line 359, in copytree raise Error(errors) shutil.Error: [('/tmp/a/b', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test/b', '[Errno 95] Operation not supported'), ('/tmp/a', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test', '[Errno 95] Operation not supported')] >>> shutil.copytree("/tmp/a", os.path.join(os.getcwd(), "test2"), copy_function=shutil.copy) Traceback (most recent call last): File "", line 1, in File "/home/desbma/py-venvs/main/lib/python3.6/shutil.py", line 359, in copytree raise Error(errors) shutil.Error: [('/tmp/a/b', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test2/b', "[Errno 95] Operation not supported: '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test2/b'"), ('/tmp/a', '/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C006%5D/sdcard1/test2', '[Errno 95] Operation not supported')] The exception is thrown from here https://github.com/python/cpython/blob/9bb6fe52742340f6c92f0dda18599a4577a94e18/Lib/shutil.py#L359 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:00:58 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 03 Aug 2018 21:00:58 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533330058.45.0.56676864532.issue30317@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: New changeset f0e3da8814259283e8f3d53ad3d9735ffc273e00 by Pablo Galindo in branch '3.6': bpo-30317: Fix multiprocessing test_timeout() (GH-8621) https://github.com/python/cpython/commit/f0e3da8814259283e8f3d53ad3d9735ffc273e00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:01:03 2018 From: report at bugs.python.org (desbma) Date: Fri, 03 Aug 2018 21:01:03 +0000 Subject: [issue32073] Add copy_directory_metadata parameter to shutil.copytree In-Reply-To: <1511032407.02.0.213398074469.issue32073@psf.upfronthosting.co.za> Message-ID: <1533330063.4.0.56676864532.issue32073@psf.upfronthosting.co.za> desbma added the comment: Note that in the examples above both copytree calls actually succeed (only metadata copy failed). The user can disable file metadata copy by passing 'copy_function=shutil.copy', but there is no way to do the same for directories and the directory copystat call https://github.com/python/cpython/blob/9bb6fe52742340f6c92f0dda18599a4577a94e18/Lib/shutil.py#L353 fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:03:07 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:03:07 +0000 Subject: [issue34333] Path.with_suffix() raises TypeError when doing %-formatting Message-ID: <1533330187.01.0.56676864532.issue34333@psf.upfronthosting.co.za> New submission from Berker Peksag : import pathlib path = pathlib.Path('TR') with_suffix = path.with_suffix(('/', '.md')) The snippet I shared above will raise: TypeError: not all arguments converted during string formatting While we are relying on duck typing, I think this can be considered as a bug in this case. ---------- assignee: berker.peksag components: Library (Lib) messages: 323078 nosy: berker.peksag, pitrou priority: normal severity: normal stage: needs patch status: open title: Path.with_suffix() raises TypeError when doing %-formatting type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:07:43 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:07:43 +0000 Subject: [issue34333] Path.with_suffix() raises TypeError when doing %-formatting In-Reply-To: <1533330187.01.0.56676864532.issue34333@psf.upfronthosting.co.za> Message-ID: <1533330463.37.0.56676864532.issue34333@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8158 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:15:22 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 03 Aug 2018 21:15:22 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1533330922.02.0.56676864532.issue32773@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I started a discussion at https://mail.python.org/mm3/archives/list/distutils-sig at python.org/thread/4FHEGHZYWCDRWVPGYLAU5VUS5BAX73MO/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:21:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 21:21:57 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533331317.96.0.56676864532.issue34273@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The closest anchor is https://docs.python.org/3.8/library/string.html#format-specification-mini-language. The table title is "The available presentation types for floating point and decimal values are:". This is slightly confusing to me. Does this mean instances of 'float' and 'decimal' classes? or 'floating point numbers (floats and decimals) and integral numbers, sometimes called decimals since usually written with decimal digits'? Within the table, 'number' refers to whatever the title refers to. So I think adding '(floating point)' would be confusing and wrong, as it excludes 'decimals' whatever they are. On the other hand, changing 'Fixed point' to 'Fixed point notation', in parallel with 'Exponential notation', is correct and should be helpful. ---------- nosy: +terry.reedy stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:25:43 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 03 Aug 2018 21:25:43 +0000 Subject: [issue32073] Add copy_directory_metadata parameter to shutil.copytree In-Reply-To: <1511032407.02.0.213398074469.issue32073@psf.upfronthosting.co.za> Message-ID: <1533331543.41.0.56676864532.issue32073@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: It's not clear where the exception originates from. Try to use copy2() instead of copytree(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:27:11 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:27:11 +0000 Subject: [issue26818] trace CLI doesn't respect -s option In-Reply-To: <1461248919.65.0.631004346458.issue26818@psf.upfronthosting.co.za> Message-ID: <1533331631.87.0.56676864532.issue26818@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:27:11 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:27:11 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1533331631.96.0.665841612001.issue31908@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:34:55 2018 From: report at bugs.python.org (desbma) Date: Fri, 03 Aug 2018 21:34:55 +0000 Subject: [issue32073] Add copy_directory_metadata parameter to shutil.copytree In-Reply-To: <1511032407.02.0.213398074469.issue32073@psf.upfronthosting.co.za> Message-ID: <1533332095.62.0.56676864532.issue32073@psf.upfronthosting.co.za> desbma added the comment: copy2 always raises "OSError: [Errno 95] Operation not supported" here https://github.com/python/cpython/blob/9bb6fe52742340f6c92f0dda18599a4577a94e18/Lib/shutil.py#L258 but I can work around that by passing copy_function=shutil.copy to copytree as I did above. The problem is that there is currently no way to avoid the copystat call made on the directory itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:45:24 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:45:24 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533332724.31.0.56676864532.issue34329@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 764f9d09b03654d7cd70d59afafafd51d24f2750 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-34329: Doc'd how to remove suffix of pathlib.Path() (GH-8655) https://github.com/python/cpython/commit/764f9d09b03654d7cd70d59afafafd51d24f2750 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:45:49 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:45:49 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533332749.88.0.56676864532.issue34329@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 39fcd9949832323b672f7ff05fd1498b8844a329 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-34329: Doc'd how to remove suffix of pathlib.Path() (GH-8655) https://github.com/python/cpython/commit/39fcd9949832323b672f7ff05fd1498b8844a329 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:46:15 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:46:15 +0000 Subject: [issue34329] Document how to remove a suffix with pathlib.Path.with_suffix In-Reply-To: <1533290285.58.0.56676864532.issue34329@psf.upfronthosting.co.za> Message-ID: <1533332775.84.0.56676864532.issue34329@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:54:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 21:54:08 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533333248.3.0.56676864532.issue34326@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d8078626770a8d358eb83d7928c12d75ff4e821a by Victor Stinner in branch 'master': bpo-34170: Fix pymain_run_file() (GH-8660) https://github.com/python/cpython/commit/d8078626770a8d358eb83d7928c12d75ff4e821a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:54:08 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 21:54:08 +0000 Subject: [issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432) In-Reply-To: <1532100252.91.0.56676864532.issue34170@psf.upfronthosting.co.za> Message-ID: <1533333248.45.0.902498594338.issue34170@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d8078626770a8d358eb83d7928c12d75ff4e821a by Victor Stinner in branch 'master': bpo-34170: Fix pymain_run_file() (GH-8660) https://github.com/python/cpython/commit/d8078626770a8d358eb83d7928c12d75ff4e821a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:54:54 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Aug 2018 21:54:54 +0000 Subject: [issue34171] Lib/trace.cover not removed by the clean target In-Reply-To: <1532102937.62.0.56676864532.issue34171@psf.upfronthosting.co.za> Message-ID: <1533333294.21.0.56676864532.issue34171@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8161 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 17:56:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 21:56:35 +0000 Subject: [issue34279] RFC: issue a warning in regrtest when no tests have been executed? In-Reply-To: <1532947707.98.0.56676864532.issue34279@psf.upfronthosting.co.za> Message-ID: <1533333395.96.0.56676864532.issue34279@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A test file that runs no test functions should pass on the buildbots. (If it imports the target file, it is not completely empty. And I can think of a use case for WIP PRs that intentionally do not run anything.) But I also would like a visually different display, having been fooled more than once. For one thing, one can omit '(unittest.testCase)' from test class definitions ;-). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 18:08:26 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 Aug 2018 22:08:26 +0000 Subject: [issue34331] Incorrectly pluralized abstract class error message In-Reply-To: <1533311791.76.0.56676864532.issue34331@psf.upfronthosting.co.za> Message-ID: <1533334106.8.0.56676864532.issue34331@psf.upfronthosting.co.za> Eric V. Smith added the comment: Actually, this one is probably easier to fix. In my opinion, #34127 is more important to fix, since it's seen much more often than the message about abstract base classes. I wouldn't necessarily object to fixing this one, I just personally think it's not worth the hassle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 18:11:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 22:11:55 +0000 Subject: [issue34286] lib2to3 tests fail on the 3.7 branch (used to work with 3.7.0) In-Reply-To: <1533007091.73.0.56676864532.issue34286@psf.upfronthosting.co.za> Message-ID: <1533334315.54.0.56676864532.issue34286@psf.upfronthosting.co.za> Terry J. Reedy added the comment: test_lib2to3 passes for me on Win 10 for both installed 3.7.0 (in home directory) and repository 3.7 (in clone directory) compiled yesterday. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 18:13:42 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 22:13:42 +0000 Subject: [issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot In-Reply-To: <1494345179.69.0.743787858569.issue30317@psf.upfronthosting.co.za> Message-ID: <1533334422.37.0.56676864532.issue30317@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh. Now I understand why I'm confused. _test_multiprocessing.py in master has not less than 5 methods with the same name: test_timeout()! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 18:18:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 22:18:06 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533334686.6.0.56676864532.issue34296@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We are aware that startup time is a issue, especially for quick scripts. I don't know if your ideas have been considered, so I added a couple of people who might. The python-ideas list would likely be a better place for discussion until there is some idea about a concrete patch. ---------- nosy: +ncoghlan, terry.reedy, vstinner type: enhancement -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 18:21:14 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 22:21:14 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533334874.68.0.56676864532.issue34326@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Thanks Victor, I don't know enough the API C-Python :/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 18:24:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Aug 2018 22:24:37 +0000 Subject: [issue34297] Windows py.exe launcher fail to handle quote correctly In-Reply-To: <1533058834.14.0.56676864532.issue34297@psf.upfronthosting.co.za> Message-ID: <1533335077.71.0.56676864532.issue34297@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified this much: F:\dev\37>py "-3" -m test.test_idle (null): can't open file '3 -m test.test_idle': [Errno 2] No such file or directory ---------- components: -Demos and Tools, Distutils nosy: +eryksun, terry.reedy -dstufft, eric.araujo stage: -> test needed versions: -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 18:31:31 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 03 Aug 2018 22:31:31 +0000 Subject: [issue34326] test_subprocess.POSIXProcessTestCase fails in AMD64 Ubuntu 3.x In-Reply-To: <1533254228.03.0.56676864532.issue34326@psf.upfronthosting.co.za> Message-ID: <1533335491.38.0.56676864532.issue34326@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 19:09:07 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 23:09:07 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533337747.22.0.56676864532.issue34325@psf.upfronthosting.co.za> STINNER Victor added the comment: The two buildbots are back to green. ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 19:09:34 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 23:09:34 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533337774.96.0.56676864532.issue34097@psf.upfronthosting.co.za> STINNER Victor added the comment: > Tests are failed on some buildbots. See issue34325. Marcel Plch already fixed it: commit 7b41dbad78c6b03ca2f98800a92a1977d3946643. The two buildbots are back to green. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 19:11:18 2018 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2018 23:11:18 +0000 Subject: [issue34325] test_zipfile gets OverflowError in multiple buildbots In-Reply-To: <1533253946.81.0.56676864532.issue34325@psf.upfronthosting.co.za> Message-ID: <1533337878.91.0.56676864532.issue34325@psf.upfronthosting.co.za> STINNER Victor added the comment: A possible enhancement is to mock os.stat() instead of really modifying the real filesystem modification time, it would allow to test the bug on any platform. But I'm not sure that it's worth it, and if anyone is interested, I would suggest to discuss on bpo-34097. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 19:55:15 2018 From: report at bugs.python.org (Martin Panter) Date: Fri, 03 Aug 2018 23:55:15 +0000 Subject: [issue34256] Python treats ASCII record separator ('\x1e') as a newline In-Reply-To: <1532772549.2.0.56676864532.issue34256@psf.upfronthosting.co.za> Message-ID: <1533340515.32.0.56676864532.issue34256@psf.upfronthosting.co.za> Martin Panter added the comment: What documentation were you looking at? I remember adding 0x1E and others to the list in Issue 12855. See : ??? str.splitlines([keepends]) . . . This method splits on the following line boundaries. . . . Representation Description ============== =========== . . . \x1e Record Separator . . . ??? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 20:37:25 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 04 Aug 2018 00:37:25 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533343045.22.0.56676864532.issue34296@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 03:41:45 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 Aug 2018 07:41:45 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533368505.23.0.56676864532.issue34296@psf.upfronthosting.co.za> Nick Coghlan added the comment: It isn't currently feasible to do anything along these lines, as the CPython runtime is highly configurable, so it's far from clear what, if anything, could be shared from run to run, and nor is it clear how the interpreter could check whether or not the current configuration settings matched those of the pre-warmed one. However, the work taking place for PEP 432 (issue dependency added) will potentially make it possible to revisit this, as there may be a way to cache preconfigured interpreters in a fashion that means calculating the cache key from the current configuration and then loading the cached interpreter state is faster that imperatively initialising a fresh interpreter. Even if it isn't possible to cache an entire interpreter state, there may at least be opportunities to optimise particular configuration substeps. ---------- dependencies: +PEP 432: Redesign the interpreter startup sequence _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 03:51:47 2018 From: report at bugs.python.org (Daniel Andrade Groppe) Date: Sat, 04 Aug 2018 07:51:47 +0000 Subject: [issue34331] Incorrectly pluralized abstract class error message In-Reply-To: <1533311791.76.0.56676864532.issue34331@psf.upfronthosting.co.za> Message-ID: <1533369107.96.0.56676864532.issue34331@psf.upfronthosting.co.za> Change by Daniel Andrade Groppe : ---------- keywords: +patch pull_requests: +8162 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 03:53:14 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 04 Aug 2018 07:53:14 +0000 Subject: [issue34332] Suggestion for a new loop type In-Reply-To: <1533324492.86.0.56676864532.issue34332@psf.upfronthosting.co.za> Message-ID: <1533369194.13.0.56676864532.issue34332@psf.upfronthosting.co.za> St?phane Wirtel added the comment: You can also use a context manager and the `with` statement. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 06:08:13 2018 From: report at bugs.python.org (Adrian Dries) Date: Sat, 04 Aug 2018 10:08:13 +0000 Subject: [issue34334] QueueHandler logs exc_info twice Message-ID: <1533377293.21.0.56676864532.issue34334@psf.upfronthosting.co.za> New submission from Adrian Dries : Since Python 3.7 logging.handlers.QueueHandler logs tracebacks twice:: >>> import logging >>> from logging.handlers import QueueHandler, QueueListener >>> from queue import Queue >>> q = Queue() >>> logging.getLogger().addHandler(QueueHandler(q)) >>> listener = QueueListener(q, logging.StreamHandler()) >>> listener.start() >>> try: 1/0 ... except: logging.exception('Look out!') ... Look out! Traceback (most recent call last): File "", line 1, in ZeroDivisionError: division by zero Traceback (most recent call last): File "", line 1, in ZeroDivisionError: division by zero Patching QueueHandler.prepare() to set exc_text to None seems to fix this. ---------- components: Library (Lib) messages: 323100 nosy: avdd priority: normal severity: normal status: open title: QueueHandler logs exc_info twice type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 07:36:11 2018 From: report at bugs.python.org (Erik Janssens) Date: Sat, 04 Aug 2018 11:36:11 +0000 Subject: [issue20596] Support for alternate wcstok syntax for Windows compilers In-Reply-To: <1392123816.37.0.457546149708.issue20596@psf.upfronthosting.co.za> Message-ID: <1533382571.16.0.56676864532.issue20596@psf.upfronthosting.co.za> Erik Janssens added the comment: Would anyone mind if I create a new issue to reflect the current situation and create a PR to handle it with a Py_WCSTOK ? ---------- nosy: +erikjanss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 07:54:17 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 Aug 2018 11:54:17 +0000 Subject: [issue33898] pathlib issues with Windows device paths In-Reply-To: <1529361630.0.0.56676864532.issue33898@psf.upfronthosting.co.za> Message-ID: <1533383657.1.0.56676864532.issue33898@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8163 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 08:53:01 2018 From: report at bugs.python.org (Michael Felt) Date: Sat, 04 Aug 2018 12:53:01 +0000 Subject: [issue28009] core logic of uuid.getnode() is broken for AIX - all versions In-Reply-To: <1473290315.48.0.840701308825.issue28009@psf.upfronthosting.co.za> Message-ID: <1533387181.36.0.56676864532.issue28009@psf.upfronthosting.co.za> Change by Michael Felt : ---------- pull_requests: +8164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 09:08:41 2018 From: report at bugs.python.org (Michael Fischer) Date: Sat, 04 Aug 2018 13:08:41 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533388121.91.0.56676864532.issue34273@psf.upfronthosting.co.za> Michael Fischer added the comment: Terry: I absolutely agree with you. Changing 'Fixed point' to 'Fixed point notation' is the optimal solution here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 09:10:34 2018 From: report at bugs.python.org (tzickel) Date: Sat, 04 Aug 2018 13:10:34 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1533388234.49.0.56676864532.issue34172@psf.upfronthosting.co.za> tzickel added the comment: It actually makes tons of sense that while the thread is running, that the object representing it is alive. After the thread finishes its work, the object dies. >>> import time, threading, weakref, gc >>> t = threading.Thread(target=time.sleep, args=(10,)) >>> wr = weakref.ref(t) >>> t.start() >>> del t >>> gc.collect() >>> wr() Wait 10 seconds... >>> gc.collect() >>> wr() The thread is gone (which doesn't happen with the pool). Anyhow, I've submitted a patch to fix the bug that was introduced 9 years ago on GH, feel free to check it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 09:40:17 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Aug 2018 13:40:17 +0000 Subject: [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted In-Reply-To: <1532105129.76.0.56676864532.issue34172@psf.upfronthosting.co.za> Message-ID: <1533390017.0.0.56676864532.issue34172@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks a lot tzickle, I'll take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 09:59:44 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 04 Aug 2018 13:59:44 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1533391184.16.0.56676864532.issue21914@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Hey Rajalakshmi, Are you still working on this issue? Is there anything we can help you with? ---------- nosy: +CuriousLearner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 10:17:50 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 Aug 2018 14:17:50 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533392270.13.0.56676864532.issue32797@psf.upfronthosting.co.za> Nick Coghlan added the comment: This problem isn't unique to Cython extension modules - it exists for pyc-only distribution of pure Python files as well. The underlying problem is that we don't currently have a mechanism comparable to JavaScript source maps, whereby a preprocessed runtime artifact can provide a reference back to a more debugging-friendly representation that's stored somewhere else (whether that's adjacent to the compiled form, in a different directory elsewhere on the same machine, or even on a remote web server). So I think asking how ExtensionFileLoader.get_source() should behave is likely looking at the problem at the wrong level: a better question may be to ask what feature *linecache* is missing to allow it to correctly report source lines for modules that do *not* include their source code when installed, but do have that source code available in a shadow directory, where the only things that change are the root location (which could potentially even be a HTTP or HTTPS URL), and a fixed transformation on the module filename itself (e.g. replacing "*.so" with "*.c", or "*.pyc" with "*.py"). Given such a feature in Python 3.8, and support for it in Cython, the enhanced linecache module could then be published to PyPI as backports.linecache, providing access to this improved behaviour on all Python 3 versions that SageMath wants to support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 10:35:15 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 Aug 2018 14:35:15 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533393315.26.0.56676864532.issue32797@psf.upfronthosting.co.za> Nick Coghlan added the comment: As a completely minimal strawman design that's the closest fit to what SafeMath is already doing: what if there was a "linecache.fallback_source_path" attribute that linecache searched with importlib whenever a loader returned None to indicate that the module existed, but not in a format that provided source code? Then instead of adding the source directory to sys.path (which was only working because the legacy import system never implemented PEP 302 properly), SageMath could instead add the source directory to that new linecache.fallback_source_path list. (Given a separate linecache.fallback_metapath, a suitably clever Finder implementation could then even provide the URL source lookup feature) There'd be some API design issues to work out around ensuring that directories added to linecache.fallback_source_path are added in the same relative order as directories on sys.path, but the end result would likely be more reliable and resilient than relying on "additional directory installed later in sys.path" as the fallback strategy for handling sourceless modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 10:37:03 2018 From: report at bugs.python.org (Michael Felt) Date: Sat, 04 Aug 2018 14:37:03 +0000 Subject: [issue34194] test_ssl, AIX, and defaults for _ssl connections In-Reply-To: <1532328016.0.0.56676864532.issue34194@psf.upfronthosting.co.za> Message-ID: <1533393423.72.0.56676864532.issue34194@psf.upfronthosting.co.za> Michael Felt added the comment: I "guess" it is somewhere in this code. But I am getting lost in all the macros that call other macros. Some help would really be appreciated! Currently looking in _ssl.c at: /*[clinic input] _ssl.get_default_verify_paths Return search paths and environment vars that are used by SSLContext's set_default_verify_paths() to load defa ult CAs. The values are 'cert_file_env', 'cert_file', 'cert_dir_env', 'cert_dir'. [clinic start generated code]*/ static PyObject * _ssl_get_default_verify_paths_impl(PyObject *module) /*[clinic end generated code: output=e5b62a466271928b input=5210c953d98c3eb5]*/ { PyObject *ofile_env = NULL; PyObject *ofile = NULL; PyObject *odir_env = NULL; PyObject *odir = NULL; #define CONVERT(info, target) { \ const char *tmp = (info); \ target = NULL; \ if (!tmp) { Py_INCREF(Py_None); target = Py_None; } \ else if ((target = PyUnicode_DecodeFSDefault(tmp)) == NULL) { \ target = PyBytes_FromString(tmp); } \ if (!target) goto error; \ } CONVERT(X509_get_default_cert_file_env(), ofile_env); CONVERT(X509_get_default_cert_file(), ofile); CONVERT(X509_get_default_cert_dir_env(), odir_env); CONVERT(X509_get_default_cert_dir(), odir); #undef CONVERT return Py_BuildValue("NNNN", ofile_env, ofile, odir_env, odir); error: Py_XDECREF(ofile_env); Py_XDECREF(ofile); Py_XDECREF(odir_env); Py_XDECREF(odir); return NULL; } What I would like to know is what environment variable is being used. Not clear to me from the code here. Thx. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 11:01:25 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Aug 2018 15:01:25 +0000 Subject: [issue13574] refresh example in doc for Extending and Embedding In-Reply-To: <1323546725.7.0.960922330938.issue13574@psf.upfronthosting.co.za> Message-ID: <1533394885.07.0.56676864532.issue13574@psf.upfronthosting.co.za> Berker Peksag added the comment: The documentation has been modernized in https://github.com/python/cpython/commit/1d80a561734b9932961c546b0897405a3bfbf3e6 and the "Weak Reference Support" section has been updated to show the modern way of adding weakref support: https://github.com/python/cpython/commit/1d80a561734b9932961c546b0897405a3bfbf3e6#diff-1ace1cc14bb5b7f4ee77f22238ede084R556 ---------- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 11:34:15 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Aug 2018 15:34:15 +0000 Subject: [issue33736] Improve the documentation of asyncio stream API In-Reply-To: <1528472164.69.0.592728768989.issue33736@psf.upfronthosting.co.za> Message-ID: <1533396855.17.0.56676864532.issue33736@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 11:44:41 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 Aug 2018 15:44:41 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1533397481.74.0.56676864532.issue34284@psf.upfronthosting.co.za> Nick Coghlan added the comment: Looking at the code in https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Python/sysmodule.c#L2360, I think the underlying problem here is that the code to make these PyStructSequence subclasses uninstantiable isn't really right - rather than clearing those fields in the subclass (which still allows dynamic method lookup to fall back to the parent class, even though fast C level dispatch fails), it would be more consistent and reliable to replace them with implementations that always raise a TypeError with a suitable message. (An alternative may be to implement the same behaviour as the builtin singleton types used for None and Ellipsis: replace __new__ with an implementation that always returns the original singleton instance. However, there isn't a compelling use case, so raising a descriptive exception along the lines of what ppperry suggests seems most appropriate) ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 11:46:54 2018 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Sat, 04 Aug 2018 15:46:54 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1533397614.09.0.56676864532.issue1230540@psf.upfronthosting.co.za> Andrey Vlasovskikh added the comment: > Would it be possible to modify the default implementation of sys.excepthook to have a different output when it's not called from the main thread? Mimick the current traceback from threads. I agree it's a good idea to mimic what `_thread` does in case of both handled and unhandled exceptions. Why would you want to do it in `sys.excepthook`? The code for handling unhandled exceptions in `_thread` threads is located in `_threadmodule.c` itself, so there is no dependency from `sys` to `_thread`. By following the same logic, the code for handling unhandled exceptions in `threading` should be located in `threading.py`, like it does now. So the only thing that's missing in the pull request compared to `_thread` is the output: Unhandled exception in thread started by at 0x7f6769ca8e18> for all the exceptions: not caught by the sys.excepthook **and** caught by the sys.exceptook. > An alternative would be to introduce a new hook to log exceptions in threads, ex: sys.threadexcepthook. That hoook would take a 4th parameter. But Andrey Vlasovskikh didn't like this idea. I'm overall OK with this idea, but I would prefer to make the existing `sys.excepthook` API applicable to all the exceptions: for the main thread (works well), for `_thread` threads (works well) and for `threading` threads (doesn't work). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 12:06:27 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 Aug 2018 16:06:27 +0000 Subject: [issue34309] Trouble when reloading extension modules. In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533398787.68.0.56676864532.issue34309@psf.upfronthosting.co.za> Nick Coghlan added the comment: As others have noted, dynamically reloading CPython extension modules is akin to dynamically reloading any other C/C++ shared library, so it has enough opportunities for things to go wrong that we consider allowing the shared state to persist across initialize/finalize cycles the less problematic of two problematic options (at least for now). Reliable hot reloading support is typically a property of pure Python modules (and even at that higher level, inter-module dependencies can still cause problems at runtime). (FWIW, this problem is currently also the main reason we don't offer an in-REPL package installation command - while PEP 489 offers significant opportunities for improvement, it's likely to be years before we see widespread adoption of that, so we prefer to advise folks to run an installer outside the REPL, then restart and replay their interactive session) If subinterpreters are an option though, then yeah, that has far more potential to be viable. It wouldn't be trivial, as we'd need to add dlmopen support (thanks Stack Overflow [1]) to give the subinterpreter a truly independent copy of the shared library (and also work out whatever the equivalent to dlmopen might be on other platforms), but going down that path could also potentially provide a way around the known problems with global state leaking between subinterpreters via extension modules. [1] https://stackoverflow.com/questions/48864659/loading-shared-library-twice/48888598#48888598 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 12:25:38 2018 From: report at bugs.python.org (ppperry) Date: Sat, 04 Aug 2018 16:25:38 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1533399938.09.0.56676864532.issue34284@psf.upfronthosting.co.za> ppperry added the comment: The problem doesn't just happen with `sys.flags`, though. It happens with all types that can't be created directly by python. Ex: frame objects, generators, cells, etc. The bug is that in types whose c-level tp_new is null, the python-level __new__ is inherited from the superclass (and since object defines a `__new__`, such a function always exists), instead of being defined to always raise an error, like calling the type directly does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 13:17:22 2018 From: report at bugs.python.org (Martin Altmayer) Date: Sat, 04 Aug 2018 17:17:22 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1533403042.76.0.56676864532.issue33649@psf.upfronthosting.co.za> Change by Martin Altmayer : ---------- nosy: +MartinAltmayer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 13:36:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 04 Aug 2018 17:36:26 +0000 Subject: [issue33649] asyncio docs overhaul In-Reply-To: <1527277722.54.0.682650639539.issue33649@psf.upfronthosting.co.za> Message-ID: <1533404186.4.0.56676864532.issue33649@psf.upfronthosting.co.za> Yury Selivanov added the comment: Status update: I'm working on a first rewrite. I expect to have something to review on a couple of weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 13:39:49 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sat, 04 Aug 2018 17:39:49 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533404389.7.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Then instead of adding the source directory to sys.path What's wrong with that? Installing the .pyx sources together with the .so compiled modules makes a lot of sense to me: it is very analogous to installing the .py sources together with the .pyc byte-compiled files. In https://bugs.python.org/issue32797#msg315965 Paul Moore disagreed with that analogy, but I don't quite understand why. And if ${prefix}/lib/pythonX.Y/site-packages/PKGNAME is not a good place to store the installed sources, where would you want to install them otherwise? > (which was only working because the legacy import system never implemented PEP 302 properly) Not sure what you mean here... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 14:01:00 2018 From: report at bugs.python.org (Jeffrey Armstrong) Date: Sat, 04 Aug 2018 18:01:00 +0000 Subject: [issue23876] Fix mkdir() call for Watcom compilers on UNIX-like platforms In-Reply-To: <1428324075.5.0.672514551353.issue23876@psf.upfronthosting.co.za> Message-ID: <1533405660.6.0.56676864532.issue23876@psf.upfronthosting.co.za> Change by Jeffrey Armstrong : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 14:25:00 2018 From: report at bugs.python.org (Paul Moore) Date: Sat, 04 Aug 2018 18:25:00 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533407100.28.0.56676864532.issue32797@psf.upfronthosting.co.za> Paul Moore added the comment: > What's wrong with that? Installing the .pyx sources together with the .so compiled modules makes a lot of sense to me: it is very analogous to installing the .py sources together with the .pyc byte-compiled files. In https://bugs.python.org/issue32797#msg315965 Paul Moore disagreed with that analogy, but I don't quite understand why. Because if someone deletes the .pyc file, the interpreter can (and will) regenerate it using the .py file. If someone deletes the .so file, you're stuck. Having the .pyx file present won't help you. In my view (and that of the documentation for sys.path), sys.path is where you put things that the Python interpreter can load - .so files, .pyc files and .py files. Looking for source to report as part of a traceback is a separate process, and there's no immediate reason why it should involve sys.path. The fact that historically it did (because that worked for pure Python modules that shipped with source) doesn't mean it's the right solution. I'd rather see a well-designed protocol for "find me the source for this module" that tools like Cython can support, than trying to patch up the loader protocol and sys.path to do something they weren't ever designed for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 14:52:55 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sat, 04 Aug 2018 18:52:55 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533408775.28.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > In my view (and that of the documentation for sys.path), sys.path is where you put things that the Python interpreter can load - .so files, .pyc files and .py files. It's quite typical for packages to install stuff in site-packages which the interpreter cannot load. In fact, that's the exactly the point of the package_data argument to setup(), see https://packaging.python.org/guides/distributing-packages-using-setuptools/#package-data Just as an example, Numpy installs tons of stuff inside site-packages/numpy/ (header files, configuration files, data files for the testsuite) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 15:22:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Aug 2018 19:22:32 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533410552.17.0.56676864532.issue34273@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +8165 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 15:48:24 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sat, 04 Aug 2018 19:48:24 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1533412104.41.0.56676864532.issue33187@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Hello Anjali, As far as I remember, you started this in a PyDelhi Dev Sprint. So, just wanted to check around, if you're looking for any help :) ---------- nosy: +CuriousLearner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 16:15:38 2018 From: report at bugs.python.org (Brett Cannon) Date: Sat, 04 Aug 2018 20:15:38 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1533408775.28.0.56676864532.issue32797@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, Aug 4, 2018, 11:52 Jeroen Demeyer, wrote: > > Jeroen Demeyer added the comment: > > > In my view (and that of the documentation for sys.path), sys.path is > where you put things that the Python interpreter can load - .so files, .pyc > files and .py files. > > It's quite typical for packages to install stuff in site-packages which > the interpreter cannot load. In fact, that's the exactly the point of the > package_data argument to setup(), see > https://packaging.python.org/guides/distributing-packages-using-setuptools/#package-data > > Just as an example, Numpy installs tons of stuff inside > site-packages/numpy/ (header files, configuration files, data files for the > testsuite) > I think the key point no one is saying is that .pyc files are no longer on sys.path because they are in __pycache__ and those aren't importable unless you access them as namespace packages. So we have been moving to keeping artifacts like .pyc files off of sys.path. As Nick said, we have no generalized concept of source maps and I think coming up with that is what will be required to solve this as i personally don't view Loader.get_source() is not meant to be a generalized concept of some form of source code but Python source code. > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 16:33:19 2018 From: report at bugs.python.org (Matej Cepl) Date: Sat, 04 Aug 2018 20:33:19 +0000 Subject: [issue26171] heap overflow in zipimporter module In-Reply-To: <1453348353.03.0.314168195173.issue26171@psf.upfronthosting.co.za> Message-ID: <1533414799.41.0.56676864532.issue26171@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 17:47:48 2018 From: report at bugs.python.org (Stefan Krah) Date: Sat, 04 Aug 2018 21:47:48 +0000 Subject: [issue33731] string formatting that produces floats with preset precision while respecting locale In-Reply-To: <1527856953.25.0.682650639539.issue33731@psf.upfronthosting.co.za> Message-ID: <1533419268.35.0.56676864532.issue33731@psf.upfronthosting.co.za> Change by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 18:07:37 2018 From: report at bugs.python.org (James Emerton) Date: Sat, 04 Aug 2018 22:07:37 +0000 Subject: [issue34311] locale.format() and locale.format_string() cast Decimals to float In-Reply-To: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> Message-ID: <1533420457.82.0.56676864532.issue34311@psf.upfronthosting.co.za> Change by James Emerton : ---------- keywords: +patch pull_requests: +8166 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 18:12:52 2018 From: report at bugs.python.org (James Emerton) Date: Sat, 04 Aug 2018 22:12:52 +0000 Subject: [issue34311] locale.format() and locale.format_string() cast Decimals to float In-Reply-To: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> Message-ID: <1533420772.33.0.56676864532.issue34311@psf.upfronthosting.co.za> Change by James Emerton : ---------- pull_requests: -8166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 18:14:21 2018 From: report at bugs.python.org (James Emerton) Date: Sat, 04 Aug 2018 22:14:21 +0000 Subject: [issue34311] locale.format() and locale.format_string() cast Decimals to float In-Reply-To: <1533154971.69.0.56676864532.issue34311@psf.upfronthosting.co.za> Message-ID: <1533420861.81.0.56676864532.issue34311@psf.upfronthosting.co.za> James Emerton added the comment: It looks like a bot got a bit excited when I mentioned this issue in the PR for bpo-33731. I unlinked the PR but this issue still got flagged for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 18:56:22 2018 From: report at bugs.python.org (Mikhail Terekhov) Date: Sat, 04 Aug 2018 22:56:22 +0000 Subject: [issue34335] Fix examples in asyncio docs (suppliment to bpo-32258) Message-ID: <1533423382.45.0.56676864532.issue34335@psf.upfronthosting.co.za> New submission from Mikhail Terekhov : Couple of examples in in asyncio documentation mix @asyncio.coroutine decorator and await. ---------- components: asyncio messages: 323121 nosy: asvetlov, termim, yselivanov priority: normal severity: normal status: open title: Fix examples in asyncio docs (suppliment to bpo-32258) versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 19:05:34 2018 From: report at bugs.python.org (Mikhail Terekhov) Date: Sat, 04 Aug 2018 23:05:34 +0000 Subject: [issue34335] Fix examples in asyncio docs (suppliment to bpo-32258) In-Reply-To: <1533423382.45.0.56676864532.issue34335@psf.upfronthosting.co.za> Message-ID: <1533423934.44.0.56676864532.issue34335@psf.upfronthosting.co.za> Change by Mikhail Terekhov : ---------- keywords: +patch pull_requests: +8167 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 19:05:34 2018 From: report at bugs.python.org (Mikhail Terekhov) Date: Sat, 04 Aug 2018 23:05:34 +0000 Subject: [issue32258] Rewrite asyncio docs to use async/await syntax In-Reply-To: <1512813975.64.0.213398074469.issue32258@psf.upfronthosting.co.za> Message-ID: <1533423934.54.0.665841612001.issue32258@psf.upfronthosting.co.za> Change by Mikhail Terekhov : ---------- pull_requests: +8168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 19:07:04 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sat, 04 Aug 2018 23:07:04 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533424024.49.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: To everybody who mentioned that Cython sources don't belong on sys.path: where *do* they belong then? One issue which hasn't been mentioned before is packaging. By installing Cython sources along with the generated .so files, we can re-use all the existing tooling from distutils/setuptools/wheel to install those source files. If we want to install them in a different way, ideally it should be done in a way sanctioned by the PyPA and the tools should support it. We should then also change linecache to search for source files in that directory. Unless somebody can come up with a simple suggestion, this seems to require basically a PEP. I don't plan to write that PEP and fight for it, since this can easily be fixed with essentially a 1-line patch to linecache, as I proposed in https://github.com/python/cpython/pull/6653 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 19:48:49 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 04 Aug 2018 23:48:49 +0000 Subject: [issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc In-Reply-To: <1415787811.02.0.365080072485.issue22852@psf.upfronthosting.co.za> Message-ID: <1533426529.58.0.56676864532.issue22852@psf.upfronthosting.co.za> Martin Panter added the comment: I like this option. I suppose choosing which option to take is a compromise between compatiblity and simplicity. In the short term, the ?allows_none? option requires user code to be updated. In the long term it may break compatibility. But the ?has_netloc? etc option is more complex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 20:06:02 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 05 Aug 2018 00:06:02 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1533424024.49.0.56676864532.issue32797@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, Aug 4, 2018, 16:07 Jeroen Demeyer, wrote: > > Jeroen Demeyer added the comment: > > To everybody who mentioned that Cython sources don't belong on sys.path: > where *do* they belong then? > In a subdirectory similar to __pycache__. > One issue which hasn't been mentioned before is packaging. By installing > Cython sources along with the generated .so files, we can re-use all the > existing tooling from distutils/setuptools/wheel to install those source > files. Technically this doesn't fall under our purview but that of distutils-sig. Plus how distutils or setuptools do anything is an implementation detail and it's more important how a wheel would handle this (if any special support is even necessary). Remember, PEP 517 us our future and is there to break the monopoly of setuptools. If we want to install them in a different way, ideally it should be done in > a way sanctioned by the PyPA and the tools should support it. We should > then also change linecache to search for source files in that directory. > Yep. > Unless somebody can come up with a simple suggestion, this seems to > require basically a PEP. Or at least a new API. I don't plan to write that PEP and fight for it, since this can easily be > fixed with essentially a 1-line patch to linecache, as I proposed in > https://github.com/python/cpython/pull/6653 > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 20:35:57 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 05 Aug 2018 00:35:57 +0000 Subject: [issue24937] Multiple problems in getters & setters in capsulethunk.h In-Reply-To: <1440520892.99.0.130273606833.issue24937@psf.upfronthosting.co.za> Message-ID: <1533429357.04.0.56676864532.issue24937@psf.upfronthosting.co.za> Berker Peksag added the comment: It would be nice to remove PyCObject_* entries from Doc/data/refcounts.dat. +.. _documentation: http://py3c.readthedocs.org/en/latest/capsulethunk.html Nit: We could the HTTPS link. ---------- nosy: +berker.peksag stage: -> patch review type: -> enhancement versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 20:57:44 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 05 Aug 2018 00:57:44 +0000 Subject: [issue6952] deprecated conversion from string constant to char * In-Reply-To: <1253446186.78.0.0648542984315.issue6952@psf.upfronthosting.co.za> Message-ID: <1533430664.29.0.56676864532.issue6952@psf.upfronthosting.co.za> Berker Peksag added the comment: All changes (except PyUnicode_EncodeDecimal() which was deprecated in Python 3.3) have already been implemented in the following commits: * https://github.com/python/cpython/commit/c679227e31245b0e8dec74a1f7cc77710541d985 * https://github.com/python/cpython/commit/f308132cc29eea9b7fe899deb575d29d607a48f4 * https://github.com/python/cpython/commit/f0b463ad845c7433a0c561ef2c71d350f4b508c5 Closing this as 'out of date'. ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 21:53:12 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Aug 2018 01:53:12 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1533433992.22.0.56676864532.issue34284@psf.upfronthosting.co.za> Nick Coghlan added the comment: Agreed, but it's still a definition time bug, as the types are only nulling out tp_new after creating the singleton instance, and not preventing __new__ from resolving. If they *don't* null out tp_new, but instead set tp_new to a common helper function that raises "TypeError: Cannot create instances", that will both prevent __new__ from working, and also ensure that `type(obj)()` and `type(obj).__new__()` give the same error. (Changing the applicable version, as this issues combines a relatively obscure error reporting issue with a relatively intrusive fix, so the risk/reward ratio pushes it towards being a Python 3.8 only change). ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 22:26:50 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Aug 2018 02:26:50 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533436010.73.0.56676864532.issue32797@psf.upfronthosting.co.za> Nick Coghlan added the comment: Regarding PEP 302 compliance: until Python 3.3, the builtin import system wasn't present on sys.metapath - it was its own implicit legacy thing. The change in Python 3.3 was to fix that, and make it work based on a handful of default sys.metapath entries. Not coincidentally, 3.3 was also the first release where the import system was finally added to the language reference rather than being wholly implementation dependent: https://docs.python.org/3/reference/import.html I think that also points the way forward for providing a useful import spec compliant fallback for sourceless files in linecache in a way that could be backported to earlier Python 3 versions: it's possible to create a FileFinder [1] instance that only looks for source files, and ignores files that don't provide source code. Given that, the changes needed to make SageMath tracebacks "just work" the way they currently do in Python 2 would be: 1. Enhance PathFinder [2] to allow specification of which path importer cache and path_hooks entries to use 2. Set up a source-only metapath in linecache with a single default entry: a PathFinder configured with a source-only FileFinder instance as a path hook 3. Fall back to the source-only metapath if the main import system indicates the module is being loaded from a sourceless format. [1] https://docs.python.org/3/library/importlib.html#importlib.machinery.FileFinder [2] https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder ---------- versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 01:03:04 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 Aug 2018 05:03:04 +0000 Subject: [issue34330] The decode_header function does not always work correctly. In-Reply-To: <1533307205.91.0.56676864532.issue34330@psf.upfronthosting.co.za> Message-ID: <1533445384.28.0.56676864532.issue34330@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 01:51:09 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 05 Aug 2018 05:51:09 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533448269.57.0.56676864532.issue32797@psf.upfronthosting.co.za> Stefan Behnel added the comment: FWIW, I can see that Cython is a special case because it can control the source line mapping and reporting through the C-API. Other code generators might not be able to do that, e.g. for a DSL or template language that gets translated to Python code, for which an explicit source mapping would be required. But, I definitely see the analogy between .py files and .pyx files. In fact, .pyx files often originate from renaming .py files. And keep in mind that Cython can also compile .py files, which leads to .so files in the same package directory. Installing the .pyx files alongside with the .so files is currently easy for our users because distutils does it automatically. Changing the place where they get installed would require tooling support and most likely also changes on user side in all Cython projects out there (unless it's configured through the distutils Extension object, which Cython can control). The recommended way to structure Cython packages is to have the .pyx files where the resulting extension modules go, in their package, so that both end up next to each other with "setup.py build_ext --inplace", but also to make relative imports and inclusions work through the normal path lookup mechanism in Cython. Keeping two identical package structures in different places, one for .py files and generated .so files, and one for Cython source files (.pyx, .pxd, .pxi), is not desirable from a user perspective, and would require namespace packages for the lookup, where otherwise a simple single Python package structure would suffice. That would complicate Cython's internal compile time import lookup system quite a bit. If we keep that single package structure (and from a user's perspective, I'm all for it), but change the way source files are looked up, we would have to additionally come up with a way to support the debugging case in a source checkout, where .pyx files and .so file are necessarily in the same package directory, together with the .py files. This whole idea looks backwards and complicated. As Brett noted, .pyc files were moved out of the source tree, because they are build time artifacts and not sources. With that analogy, it's the .so files that would have to move, not the .pyx or .py source files, which are sources for the compiled .so files. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:21:11 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 05 Aug 2018 06:21:11 +0000 Subject: [issue33839] IDLE tooltips.py: refactor and add docstrings and tests In-Reply-To: <1528747780.64.0.592728768989.issue33839@psf.upfronthosting.co.za> Message-ID: <1533450071.75.0.56676864532.issue33839@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 87e59ac11ee074b0dc1bc864c74fac0660b27f6e by Tal Einat in branch 'master': bpo-33839: refactor IDLE's tooltips & calltips, add docstrings and tests (GH-7683) https://github.com/python/cpython/commit/87e59ac11ee074b0dc1bc864c74fac0660b27f6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:21:35 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 06:21:35 +0000 Subject: [issue33839] IDLE tooltips.py: refactor and add docstrings and tests In-Reply-To: <1528747780.64.0.592728768989.issue33839@psf.upfronthosting.co.za> Message-ID: <1533450095.95.0.56676864532.issue33839@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:21:42 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 06:21:42 +0000 Subject: [issue33839] IDLE tooltips.py: refactor and add docstrings and tests In-Reply-To: <1528747780.64.0.592728768989.issue33839@psf.upfronthosting.co.za> Message-ID: <1533450102.97.0.56676864532.issue33839@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:47:30 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 06:47:30 +0000 Subject: [issue33839] IDLE tooltips.py: refactor and add docstrings and tests In-Reply-To: <1528747780.64.0.592728768989.issue33839@psf.upfronthosting.co.za> Message-ID: <1533451650.5.0.56676864532.issue33839@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e65ec491fbaa14db61a6559eb269733616b0e7f0 by Miss Islington (bot) in branch '3.7': bpo-33839: refactor IDLE's tooltips & calltips, add docstrings and tests (GH-7683) https://github.com/python/cpython/commit/e65ec491fbaa14db61a6559eb269733616b0e7f0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:51:25 2018 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 05 Aug 2018 06:51:25 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments Message-ID: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> New submission from Ville Skytt? : The documentation of typing.Optional seems to promote practices for not specifying Optional that are recommended against in PEP 484: https://www.python.org/dev/peps/pep-0484/#union-types -- end of chapter recommends against inferring Optional. https://docs.python.org/3.8/library/typing.html#typing.Optional -- second paragraph promotes the possibility of leaving out Optional. I'm not sure how to improve the typing.Optional doc wording, perhaps it would be better to just remove the second paragraph altogether. ---------- assignee: docs at python components: Documentation messages: 323132 nosy: docs at python, scop priority: normal severity: normal status: open title: Don't promote possibility to omit Optional on optional/defaulted arguments type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:53:25 2018 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 05 Aug 2018 06:53:25 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments In-Reply-To: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> Message-ID: <1533452005.13.0.56676864532.issue34336@psf.upfronthosting.co.za> Change by Ville Skytt? : ---------- keywords: +patch pull_requests: +8172 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:58:08 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 06:58:08 +0000 Subject: [issue33839] IDLE tooltips.py: refactor and add docstrings and tests In-Reply-To: <1528747780.64.0.592728768989.issue33839@psf.upfronthosting.co.za> Message-ID: <1533452288.77.0.56676864532.issue33839@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2474cef34cd50e603c674c4856a17e3da4af71b3 by Miss Islington (bot) in branch '3.6': bpo-33839: refactor IDLE's tooltips & calltips, add docstrings and tests (GH-7683) https://github.com/python/cpython/commit/2474cef34cd50e603c674c4856a17e3da4af71b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:59:48 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 05 Aug 2018 06:59:48 +0000 Subject: [issue33839] IDLE tooltips.py: refactor and add docstrings and tests In-Reply-To: <1528747780.64.0.592728768989.issue33839@psf.upfronthosting.co.za> Message-ID: <1533452388.69.0.56676864532.issue33839@psf.upfronthosting.co.za> Change by Tal Einat : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:59:56 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 05 Aug 2018 06:59:56 +0000 Subject: [issue33839] IDLE tooltips.py: refactor and add docstrings and tests In-Reply-To: <1528747780.64.0.592728768989.issue33839@psf.upfronthosting.co.za> Message-ID: <1533452396.63.0.56676864532.issue33839@psf.upfronthosting.co.za> Change by Tal Einat : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 03:04:48 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 05 Aug 2018 07:04:48 +0000 Subject: [issue34313] IDLE crashes with Tk-related error on macOS with ActiveTcl 8.6 In-Reply-To: <1533156582.15.0.56676864532.issue34313@psf.upfronthosting.co.za> Message-ID: <1533452688.26.0.56676864532.issue34313@psf.upfronthosting.co.za> Tal Einat added the comment: I can confirm the these issues do *not* occur on my macOS setup when using tcl/tk 8.6.8 built from source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 03:40:09 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 05 Aug 2018 07:40:09 +0000 Subject: [issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533454809.58.0.56676864532.issue34247@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The PR works for me as well, and looks ok to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 03:44:46 2018 From: report at bugs.python.org (Yiwei Guo) Date: Sun, 05 Aug 2018 07:44:46 +0000 Subject: [issue34337] Fail to get a right answer for 1.2%0.2 Message-ID: <1533455086.01.0.56676864532.issue34337@psf.upfronthosting.co.za> Change by Yiwei Guo : ---------- components: Tests nosy: qq100460045 priority: normal severity: normal status: open title: Fail to get a right answer for 1.2%0.2 type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 03:46:13 2018 From: report at bugs.python.org (Yiwei Guo) Date: Sun, 05 Aug 2018 07:46:13 +0000 Subject: [issue34337] Fail to get a right answer for 1.2%0.2 Message-ID: <1533455173.68.0.56676864532.issue34337@psf.upfronthosting.co.za> New submission from Yiwei Guo : the answer of 1.2%0.2 should be zero ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 03:58:54 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 05 Aug 2018 07:58:54 +0000 Subject: [issue34337] Fail to get a right answer for 1.2%0.2 In-Reply-To: <1533455173.68.0.56676864532.issue34337@psf.upfronthosting.co.za> Message-ID: <1533455934.31.0.56676864532.issue34337@psf.upfronthosting.co.za> Mark Dickinson added the comment: This isn't a bug: in short, you're evaluating a discontinuous function very close to a discontinuity; the errors inherent in floating-point arithmetic put you the "wrong" side of the discontinuity. Or more simply, with binary floating-point, What You See Is Not What You Get. When you type 1.2, the value actually stored is the closest values that's exactly representable as a float, which turns out to be 1.1999999999999999555910790149937383830547332763671875. Similarly, the value actually stored for 0.2 is 0.200000000000000011102230246251565404236316680908203125. And 1.1999999999999999555910790149937383830547332763671875 % 0.200000000000000011102230246251565404236316680908203125 is 0.199999999999999900079927783735911361873149871826171875. Some references: https://docs.python.org/3/tutorial/floatingpoint.html https://docs.python.org/3/reference/expressions.html#id17 ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 04:47:41 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 05 Aug 2018 08:47:41 +0000 Subject: [issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6 In-Reply-To: <1533145125.37.0.56676864532.issue34310@psf.upfronthosting.co.za> Message-ID: <1533458861.54.0.56676864532.issue34310@psf.upfronthosting.co.za> Xiang Zhang added the comment: I could not find the specific commit you mentioned on master branch. Maybe you are on a customized branch(what is master-dirty)? ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 04:51:14 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 08:51:14 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533459074.58.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > In a subdirectory similar to __pycache__. I thought about that, but I don't like the idea because then the directory structure of the actual sources would be different from the directory structure of the installed sources. So for example, how should "pip install -e" install the sources? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 04:55:43 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 05 Aug 2018 08:55:43 +0000 Subject: [issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6 In-Reply-To: <1533145125.37.0.56676864532.issue34310@psf.upfronthosting.co.za> Message-ID: <1533459343.77.0.56676864532.issue34310@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Could you retry with a make distclean && ./configure --with-debug && make ? To be sure. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 05:08:11 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 05 Aug 2018 09:08:11 +0000 Subject: [issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6 In-Reply-To: <1533145125.37.0.56676864532.issue34310@psf.upfronthosting.co.za> Message-ID: <1533460091.46.0.56676864532.issue34310@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Yu, I am going to close this issue because 1. there is no master-dirty branch 2. your hash commit: d17fe275a3 does not exist in the CPython repository 3. I just downloaded the last revision of CPython and compile it on a 10.13.4 OSX and I don't have your issue. Maybe you should clean your working directory with make distclean and restart with ./configure --with-debug && make Thank you for your feedback, and re-open this issue if you have again the problem with the master branch. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 05:22:16 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 05 Aug 2018 09:22:16 +0000 Subject: [issue34310] Build error with option "--with-pydebug" on Mac OS 10.13.6 In-Reply-To: <1533145125.37.0.56676864532.issue34310@psf.upfronthosting.co.za> Message-ID: <1533460936.08.0.56676864532.issue34310@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- resolution: rejected -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 05:30:33 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 09:30:33 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533461433.29.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: Nick: do you agree that this "source-only metapath" should by default contain an entry to look in sys.path for source files? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 05:32:47 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 09:32:47 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533461567.63.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Keeping two identical package structures in different places, one for .py files and generated .so files, and one for Cython source files (.pyx, .pxd, .pxi), is not desirable from a user perspective, and would require namespace packages for the lookup, where otherwise a simple single Python package structure would suffice. That would complicate Cython's internal compile time import lookup system quite a bit. This is an important point. You shouldn't consider these Cython files as "extra stuff", they really should be considered as part of the package. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 06:32:04 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Aug 2018 10:32:04 +0000 Subject: [issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533465124.39.0.56676864532.issue34247@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0c90d6f75931da4fec84d06c2efe9dd94bb96b77 by Victor Stinner in branch '3.7': [3.7] bpo-34247: Fix Python 3.7 initialization (#8659) https://github.com/python/cpython/commit/0c90d6f75931da4fec84d06c2efe9dd94bb96b77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 06:33:50 2018 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Aug 2018 10:33:50 +0000 Subject: [issue34247] PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533465230.36.0.56676864532.issue34247@psf.upfronthosting.co.za> STINNER Victor added the comment: On my PR, Nick Coghlan wrote: "We may want to tweak the porting note in What's New, as I believe this may read more environment variables at init time than the interpreter did previously, so embedding applications that want more complete control may now need to set Py_IgnoreEnvironmentFlag when they could previously get by without it." https://github.com/python/cpython/pull/8659#pullrequestreview-143397378 I'm not sure about this, since it's really a bug of Python 3.7.0 and it's now fixed. I let you decide if the issue should be closed or not, I leave it open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 07:45:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Aug 2018 11:45:42 +0000 Subject: [issue34247] PYTHONOPTIMIZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533469542.35.0.56676864532.issue34247@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- title: PYTHONOPTIMZE ignored in 3.7.0 when using custom launcher -> PYTHONOPTIMIZE ignored in 3.7.0 when using custom launcher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 07:54:40 2018 From: report at bugs.python.org (Paul Moore) Date: Sun, 05 Aug 2018 11:54:40 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1533448269.57.0.56676864532.issue32797@psf.upfronthosting.co.za> Message-ID: Paul Moore added the comment: On Sun, 5 Aug 2018 at 06:51, Stefan Behnel wrote: > This whole idea looks backwards and complicated. As Brett noted, .pyc files were moved out of the source tree, because they are build time artifacts and not sources. With that analogy, it's the .so files that would have to move, not the .pyx or .py source files, which are sources for the compiled .so files. I disagree. In *Python* terms: * .py files are the executable units of Python code * .so/.pyd files are the executable units of extension modules * .pyc/.pyo files are runtime artifacts that cache the results of the compilation step of loading .py code. There's no equivalent for .so/.pyd files as there's no compilation step needed when loading them. * .c, .h., .pyx, ... files are the source code for .so/.pyd files. There's no equivalent for .py files, because Python code is executable from source. Executable units of code go on sys.path. Cached runtime artifacts go in __pycache__. There's no defined location for source code. Whether you agree with the above or not, please accept that it's a consistent view of things. Sourceless distributions of Python code are an oddball corner case, but they do *not* demonstrate that Python is a compiled language and the .pyc/.pyo is the "executable" and the .py file is the "source". At least not in my opinion. It's entirely reasonable that we want to ensure that an exception object, whether raised from a Python file or a compiled extension module, includes a reference to the source of the issue, and that the traceback mechanism can, if at all possible, locate that source and display it in the exception traceback. That's basically what the loader "get_source" method is for - isn't the problem here simply that get_source for .pyd/.so files returns None, which in turn is because there's no obvious way to get to the source file for a general binary (and so the current implementation takes the easy way out and gives up[1])? Note that Cython is *not* unique here. Any tool that generates .so/.pyd files has the same problem, and we should be looking for a general solution. C code is the obvious example, and while I doubt anyone is going to ship C sources with a Python extension, it's still a valid case. Doesn't CFFI have a mode where it compiles a .pyd at wheel build time? Shouldn't that be able to locate the source? As a separate example, consider Jython, which may want to be able to locate the Java (or Groovy, or Scala, ...) source for a .class file on sys.path, and would have the same problem with get_source that CPython does with .so/.pyd files. So basically what's needed here is a modification to ExtensionFileLoader to return a more useful value from get_source. How it *does* that is up for debate, and brings in questions around what standards the packaging community want to establish for shipping extension sources, etc. And because the resulting decisions will end up implemented as stdlib code, they need to be properly thought through, as the timescales to fix design mistakes are quite long. "Bung stuff on sys.path" isn't really a well thought through solution in that sense, at least IMO - regardless of the fact that it's in effect what linecache supported prior to Python 3.3. So as a way forward, how about this: 1. Agree that what we actually need a better get_source method on ExtensionFileLoader 2. Adjourn to distutils-sig to agree a standard for where tools that generate .pyd/.so files should put their sources, if they should choose to ship their sources in the wheel with the final built extension. 3. Come back here with the results of that discussion to produce a PR that implements that change to ExtensionFileLoader The one possible fly in the ointment is if there are use cases that we need to support where a single .so/.pyd file is built from *multiple* source files, as get_source doesn't allow for that. Then it's back to the drawing board... Paul [1] I remember working on the original design of PEP 302 and "take the easy way out and give up" is *precisely* the thinking behind this :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 08:12:35 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Sun, 05 Aug 2018 12:12:35 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533471155.16.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: Having 3.6.5 and 3.7.0 with Tcl/Tk 8.6.8, try to File->Open Module and open ssl module. On 3.6 everything is fine, on 3.7 the scroller sticks at the bottom. A Tk text widget with the same amount of lines shows no problem. Apple macOS 17.7.0 with 64 bit Python and Tcl/Tk. IDLE problem probably. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 08:25:14 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Sun, 05 Aug 2018 12:25:14 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533471914.38.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: The solution was very simple on my Mac. In /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py, lines 461-462 should be: up = {EventType.MouseWheel: (event.delta >= 0) == darwin, EventType.Button: event.num == 4} instead of: up = {EventType.MouseWheel: event.delta >= 0 == darwin, EventType.Button: event.num == 4} Does this solve the scrollbar locked down issue for anyone else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 08:42:39 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 05 Aug 2018 12:42:39 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533472959.93.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: Yes! Vlad's fix resolves the "sticks at bottom of file" bug for me on macOS. It also resolves #2 in my list of additional bugs, regarding scrolling direction. With both 3.7.0 and current master, I still see additional bugs #1 and #3, i.e. issues dragging the scrollbar slider when it is at the top of the scrollbar and clicking slightly under the slider having no effect. I'll open a separate issue about that as it seems like something separate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 08:45:57 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 Aug 2018 12:45:57 +0000 Subject: [issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error In-Reply-To: <1529915026.11.0.56676864532.issue33954@psf.upfronthosting.co.za> Message-ID: <1533473157.0.0.56676864532.issue33954@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 08:48:38 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 05 Aug 2018 12:48:38 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533473318.31.0.56676864532.issue34047@psf.upfronthosting.co.za> Change by Tal Einat : ---------- keywords: +patch pull_requests: +8173 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 09:03:28 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 13:03:28 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533474208.22.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > The one possible fly in the ointment is if there are use cases that we need to support where a single .so/.pyd file is built from *multiple* source files, as get_source doesn't allow for that. Yes, we must support that. A cython module may have multiple sources. The simplest solution to solve that would be a new PEP 302 API, something like get_source_from_filename(self, filename) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 09:31:16 2018 From: report at bugs.python.org (Paul Moore) Date: Sun, 05 Aug 2018 13:31:16 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533475876.58.0.56676864532.issue32797@psf.upfronthosting.co.za> Paul Moore added the comment: So, where is the filename coming from? Looking at exception and frame objects, I don't see a "source filename" attribute anywhere - have I missed something here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 10:25:49 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Sun, 05 Aug 2018 14:25:49 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533479149.0.0.56676864532.issue34319@psf.upfronthosting.co.za> Sanyam Khurana added the comment: +1 to Terry's suggestion. I've reviewed xtreak's PR and it looks good to me. ---------- nosy: +CuriousLearner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 11:38:38 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Sun, 05 Aug 2018 15:38:38 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533483518.33.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: With: up = {EventType.MouseWheel: (event.delta >= 0) == darwin, EventType.Button: (event.num == 4)} in editor.py at 461-462 I don't see bugs #1 neither #3 on 3.7.0 but I'll try with other files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 11:48:54 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Sun, 05 Aug 2018 15:48:54 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533484134.09.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: In fact, if the first click before dragging takes place in the upper half of the scrollbar slider, the click is not received nor the drag after. Is like the scroll slider is translated down with half of the slider length (that's why I can drag the slider even when I'm a little bit lower with the pointer). I'll check the click callback and the scrollbar setup functions. Can anybody check if clicking then starting to drag the slider in the inferior half of the slider, even at the top of a file, functions well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 11:55:03 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Aug 2018 15:55:03 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533484503.6.0.56676864532.issue32797@psf.upfronthosting.co.za> Nick Coghlan added the comment: While I'd be inclined to agree with Paul's analysis if CPython were a greenfield project, I also think if SageMath had already been ported to Python 3.2, we would have considered this change a behavioural regression between 3.2 and 3.3 resulting from the importlib migration and worked out a way to get it to work implicitly again. Now, though, we need a way for SageMath to get it working on releases up to and including 3.7, *without* any help from Cython or CPython, since it needs to work with existing Cython releases on existing CPython versions to avoid presenting itself to SageMath users as regression introduced by switching from Python 2 to Python 3. To do that, I believe it can be made to work in much the same way it did in Python 2 if SageMath were to do the following: 1. Define a subclass of ExtensionModuleLoader [1] that overrides get_source() to also look for a ".pyx" file adjacent to the extension module. This would also look for any of the file suffixes in SOURCE_SUFFIXES if a .pyx file isn't found. 2. Create an instance of FileFinder [3] that uses the custom loader subclass for any of the file suffixes in EXTENSION_SUFFIXES [4] 3. Replace the regular file finding hook in sys.path_hooks with the path_hook method from that new FileFinder instance (by default, there's only one FileFinder hook installed, and it can currently be identified as "obj.__name__ == 'path_hook_for_FileFinder') 4. Invalidate importlib's caches, so any future extension module imports will use the custom extension module loader, rather than the default one [1] https://docs.python.org/3/library/importlib.html#importlib.machinery.ExtensionFileLoader [2] https://docs.python.org/3/library/importlib.html#importlib.machinery.SOURCE_SUFFIXES [3] https://docs.python.org/3/library/importlib.html#importlib.machinery.FileFinder [4] https://docs.python.org/3/library/importlib.html#importlib.machinery.EXTENSION_SUFFIXES ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 12:07:17 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Aug 2018 16:07:17 +0000 Subject: [issue34247] PYTHONOPTIMIZE ignored in 3.7.0 when using custom launcher In-Reply-To: <1532693250.08.0.56676864532.issue34247@psf.upfronthosting.co.za> Message-ID: <1533485237.63.0.56676864532.issue34247@psf.upfronthosting.co.za> Nick Coghlan added the comment: My comment wasn't about the 3.7.0 -> 3.7.1 fix, but rather about the fact that I suspect that 3.7.1 is now going to respect some environment variables in this case that 3.6.x ignored. I don't know for sure though, since we didn't have a test case for this until you wrote one. So I was thinking we could include a porting note along the lines of: =============== - starting in 3.7.1, `Py_Initialize` now consistently reads and respects all of the same environment settings as `Py_Main` (in earlier Python versions, it respected an ill-defined subset of those environment variables, while in Python 3.7.0 it didn't read any of them due to :issue:`34247`). If this behaviour is unwanted, set `Py_IgnoreEnvironmentFlag = 1` before calling `Py_Initialize`. =============== That note then serves two purposes: - it lets embedders know that `Py_IgnoreEnvironmentFlag = 0` just plain doesn't work properly in 3.7.0 (without their needing to find this bug for themselves) - it lets embedders know that they may want to set `Py_IgnoreEnvironmentFlag = 1` if their embedded interpreter is now being affected by environmental settings that it ignored in previous versions ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 12:29:46 2018 From: report at bugs.python.org (Michael Hooreman) Date: Sun, 05 Aug 2018 16:29:46 +0000 Subject: [issue34338] abstractmethod can run on classes Message-ID: <1533486586.96.0.56676864532.issue34338@psf.upfronthosting.co.za> New submission from Michael Hooreman : Hello, When I decorate a class method with abc.abstractmethod, and I call it from the class (not the instance), the call is successful. It looks like ID 5867 which was closed years ago. See https://stackoverflow.com/questions/51669362/python-3-6-abc-abstracmethod-on-classmethod-no-check-on-class-level-call Thanks! ---------- components: Library (Lib) messages: 323157 nosy: Michael Hooreman priority: normal severity: normal status: open title: abstractmethod can run on classes type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 12:37:04 2018 From: report at bugs.python.org (danijar) Date: Sun, 05 Aug 2018 16:37:04 +0000 Subject: [issue34339] Argument unpacking syntax for lambdas Message-ID: <1533487024.74.0.56676864532.issue34339@psf.upfronthosting.co.za> New submission from danijar : It would be great to support argument unpacking for lambdas. Example: lambda x, (y, z): x + y + z instead of lambda x, y_and_z: x + y_and_z[0] + y_and_z[1] Similar unpacking syntax is available for normal functions: def foo(x, y_and_z): y, z = y_and_z return x + y + z This would greatly increase readability in some cases. ---------- components: Interpreter Core messages: 323158 nosy: benjamin.peterson, brett.cannon, danijar, yselivanov priority: normal severity: normal status: open title: Argument unpacking syntax for lambdas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 12:38:07 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Aug 2018 16:38:07 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments In-Reply-To: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> Message-ID: <1533487087.32.0.56676864532.issue34336@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 336c945858055059a65134d4c501a85037d70d99 by Ivan Levkivskyi (Ville Skytt?) in branch 'master': bpo-34336: Don't promote possibility to leave out typing.Optional (#8677) https://github.com/python/cpython/commit/336c945858055059a65134d4c501a85037d70d99 ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 12:48:48 2018 From: report at bugs.python.org (bpypy) Date: Sun, 05 Aug 2018 16:48:48 +0000 Subject: [issue34340] mimetypes libmagic compatibility Message-ID: <1533487728.36.0.56676864532.issue34340@psf.upfronthosting.co.za> New submission from bpypy : An obvious use case for mimetypes would be to check if file has correct mimetype, by getting the type with some of libmagic wrappers, and then comparing to guess_type result. But it seems that they don't always match. One example: applicattion/rar vs application/x-rar https://github.com/file/file/blob/b9e60f088847f885b5c9fde61ff8fc9645843506/magic/Magdir/archive#L986 Kills half the usefullness of the module. ---------- components: Extension Modules messages: 323160 nosy: bpypy priority: normal severity: normal status: open title: mimetypes libmagic compatibility type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:04:21 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 17:04:21 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments In-Reply-To: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> Message-ID: <1533488661.12.0.56676864532.issue34336@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:04:37 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 17:04:37 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments In-Reply-To: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> Message-ID: <1533488677.63.0.56676864532.issue34336@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8175 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:10:16 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 05 Aug 2018 17:10:16 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1533484503.6.0.56676864532.issue32797@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, Aug 5, 2018, 08:55 Nick Coghlan, wrote: > > Nick Coghlan added the comment: > > While I'd be inclined to agree with Paul's analysis if CPython were a > greenfield project, I also think if SageMath had already been ported to > Python 3.2, we would have considered this change a behavioural regression > between 3.2 and 3.3 resulting from the importlib migration and worked out a > way to get it to work implicitly again. > Perhaps, but no point on dwelling on 4 releases ago. ? One other thing I will say is that the PEP 302 APIs were seemingly designed for working with Python source and were not necessarily oriented towards alternative code representations that were executed, e.g. Quixote was supported because it transpiled to Python source (although Paul is a co-author on the PEP and could more definitively answer ?). IOW the APIs are oriented towards the Python programming language, not the CPython interpreter. This is why, for instance, I'm suggesting that if a more general solution is desired to be made official, then trying to force everything into the current APIs might not turn out well. > Now, though, we need a way for SageMath to get it working on releases up > to and including 3.7, *without* any help from Cython or CPython, since it > needs to work with existing Cython releases on existing CPython versions to > avoid presenting itself to SageMath users as regression introduced by > switching from Python 2 to Python 3. > > To do that, I believe it can be made to work in much the same way it did > in Python 2 if SageMath were to do the following: > > 1. Define a subclass of ExtensionModuleLoader [1] that overrides > get_source() to also look for a ".pyx" file adjacent to the extension > module. This would also look for any of the file suffixes in > SOURCE_SUFFIXES if a .pyx file isn't found. > 2. Create an instance of FileFinder [3] that uses the custom loader > subclass for any of the file suffixes in EXTENSION_SUFFIXES [4] > 3. Replace the regular file finding hook in sys.path_hooks with the > path_hook method from that new FileFinder instance (by default, there's > only one FileFinder hook installed, and it can currently be identified as > "obj.__name__ == 'path_hook_for_FileFinder') > 4. Invalidate importlib's caches, so any future extension module imports > will use the custom extension module loader, rather than the default one > This sounds like it would work to me and doesn't require any special changes on our part to function. -Brett > [1] > https://docs.python.org/3/library/importlib.html#importlib.machinery.ExtensionFileLoader > [2] > https://docs.python.org/3/library/importlib.html#importlib.machinery.SOURCE_SUFFIXES > [3] > https://docs.python.org/3/library/importlib.html#importlib.machinery.FileFinder > [4] > https://docs.python.org/3/library/importlib.html#importlib.machinery.EXTENSION_SUFFIXES > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:13:42 2018 From: report at bugs.python.org (Paul Moore) Date: Sun, 05 Aug 2018 17:13:42 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: Message-ID: Paul Moore added the comment: On Sun, 5 Aug 2018 at 18:10, Brett Cannon wrote: > One other thing I will say is that the PEP 302 APIs were seemingly designed > for working with Python source and were not necessarily oriented towards > alternative code representations that were executed, e.g. Quixote was > supported because it transpiled to Python source (although Paul is a > co-author on the PEP and could more definitively answer ?). IOW the APIs > are oriented towards the Python programming language, not the CPython > interpreter. This is why, for instance, I'm suggesting that if a more > general solution is desired to be made official, then trying to force > everything into the current APIs might not turn out well That's how I recall it. The only cases we really considered were Python modules (source code plus pyc) and extension modules (no source, loader should return None). Paul ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:22:48 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 05 Aug 2018 17:22:48 +0000 Subject: [issue34339] Argument unpacking syntax for lambdas In-Reply-To: <1533487024.74.0.56676864532.issue34339@psf.upfronthosting.co.za> Message-ID: <1533489768.01.0.56676864532.issue34339@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think this is an explicit decision to remove it in Python 3 unless I am mistaking the syntax you are referring to. Please refer : https://www.python.org/dev/peps/pep-3113/ . A note on 2to3 to fix this : https://www.python.org/dev/peps/pep-3113/#transition-plan ? cpython git:(master) python2 Python 2.7.14 (default, Mar 12 2018, 13:54:56) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> (lambda x, (y, z): [x, y])(1, (2, 3)) [1, 2] >>> (lambda x, (y, z): [x, y, z])(1, (2, 3)) [1, 2, 3] ? cpython git:(master) python3 Python 3.6.4 (default, Mar 12 2018, 13:42:53) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> (lambda x, (y, z): [x, y, z])(1, (2, 3)) File "", line 1 (lambda x, (y, z): [x, y, z])(1, (2, 3)) ^ SyntaxError: invalid syntax Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:22:50 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 17:22:50 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments In-Reply-To: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> Message-ID: <1533489770.25.0.56676864532.issue34336@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 02c4eae35cd24ab71c12b5e61ec22e993ac4839b by Miss Islington (bot) in branch '3.6': bpo-34336: Don't promote possibility to leave out typing.Optional (GH-8677) https://github.com/python/cpython/commit/02c4eae35cd24ab71c12b5e61ec22e993ac4839b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:27:18 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 17:27:18 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533490038.64.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > So, where is the filename coming from? Python 3.7.0 (default, Jul 23 2018, 10:07:21) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from sage.all import Integer >>> try: ... Integer(1)/Integer(0) ... except Exception as e: ... E = e >>> E.__traceback__.tb_next.tb_frame.f_code.co_filename 'sage/structure/element.pyx' So this is the correct filename, relative to site-packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:36:07 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 05 Aug 2018 17:36:07 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments In-Reply-To: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> Message-ID: <1533490567.16.0.56676864532.issue34336@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e610c4f9984d50b45eb00e04c73c4208c0542a3b by Miss Islington (bot) in branch '3.7': bpo-34336: Don't promote possibility to leave out typing.Optional (GH-8677) https://github.com/python/cpython/commit/e610c4f9984d50b45eb00e04c73c4208c0542a3b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:41:47 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 17:41:47 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533490907.51.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Now, though, we need a way for SageMath to get it working on releases up to and including 3.7, *without* any help from Cython or CPython That's not really what I need. We already have a work-around in SageMath: try: from importlib.machinery import ExtensionFileLoader except ImportError: pass # Python 2 else: del ExtensionFileLoader.get_source So this issue is about finding a proper solution, which doesn't require a monkey-patch like the above. And I want it to work without any special support from the package, installing .pyx sources should "just work". This issue is not specific to SageMath, it's just that SageMath is the only project that I know which actually installs .pyx sources. > Define a subclass of ExtensionModuleLoader [1] that overrides get_source() to also look for a ".pyx" file adjacent to the extension module. As I mentioned before, get_source() cannot work because a single Cython module can have multiple sources. So whatever method is used to retrieve the Cython sources must know the filename; the module is not sufficient. As you can see from the monkey-patch, not implementing get_source() at all works, but that's probably more or less by accident. I'm not sure to what extent that could be documented as the official way to look up a filename relative to sys.path entries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:43:07 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Aug 2018 17:43:07 +0000 Subject: [issue34336] Don't promote possibility to omit Optional on optional/defaulted arguments In-Reply-To: <1533451885.05.0.56676864532.issue34336@psf.upfronthosting.co.za> Message-ID: <1533490987.02.0.56676864532.issue34336@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:53:17 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 17:53:17 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533491597.02.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > One other thing I will say is that the PEP 302 APIs were seemingly designed for working with Python source and were not necessarily oriented towards alternative code representations that were executed That's also my impression. I'm perfectly fine with saying that the get_source() method defined in PEP 302 only applies to Python sources. That, together with the fact that we are really looking for *filenames* not *modules* is why the fix should involve the linecache module and not PEP 302. In https://bugs.python.org/issue32797#msg323106 Nick seemed to agree with that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:54:55 2018 From: report at bugs.python.org (ppperry) Date: Sun, 05 Aug 2018 17:54:55 +0000 Subject: [issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator In-Reply-To: <1529915026.11.0.56676864532.issue33954@psf.upfronthosting.co.za> Message-ID: <1533491695.13.0.56676864532.issue33954@psf.upfronthosting.co.za> Change by ppperry : ---------- title: float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error -> float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 14:09:17 2018 From: report at bugs.python.org (danijar) Date: Sun, 05 Aug 2018 18:09:17 +0000 Subject: [issue34339] Argument unpacking syntax for lambdas In-Reply-To: <1533487024.74.0.56676864532.issue34339@psf.upfronthosting.co.za> Message-ID: <1533492557.98.0.56676864532.issue34339@psf.upfronthosting.co.za> danijar added the comment: Thank you! Closing this. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 14:33:27 2018 From: report at bugs.python.org (Paul Moore) Date: Sun, 05 Aug 2018 18:33:27 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533494007.28.0.56676864532.issue32797@psf.upfronthosting.co.za> Paul Moore added the comment: If you're OK with that, I don't see the problem. My objection was with the claims that ExtensionLoader.get_source shouldn't return None or shouldn't exist. PEP 302 mandates that loaders have a get_source, and that get_source should return None if the loader can't supply source. And that's precisely what ExtensionLoader is doing. So if we're agreed that there's no changes needed to PEP 302 (more accurately, the loader protocol as it exists now) or to ExtensionLoader, then I'm happy to let others work out a solution on that basis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 14:40:14 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 18:40:14 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533494414.2.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > If you're OK with that, I don't see the problem. I recall that we already agreed several months ago, when I submitted https://github.com/python/cpython/pull/6653 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 14:58:54 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 18:58:54 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533495534.18.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I just realized the existence of https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceReader Isn't this *exactly* what we need here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 15:11:24 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 05 Aug 2018 19:11:24 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533496283.99.0.56676864532.issue32797@psf.upfronthosting.co.za> Stefan Behnel added the comment: > SageMath is the only project that I know which actually installs .pyx sources. Ah, right. I wrongly remembered that they are automatically included in binary packages, but that only applies to .py source of Cython compiled Python modules (which are obviously included), not for .pyx sources. Those still need to be explicitly included, which suggests that most projects wouldn't do that (especially because it doesn't help, given this very issue). > The one possible fly in the ointment is if there are use cases that we > need to support where a single .so/.pyd file is built from *multiple* > source files, as get_source doesn't allow for that. That probably applies to many, if not most, extension modules. For Cython it's .pyx, .pxi and .pxd files, plus any external C/C++ source files, for C it's .c/.cpp and .h files, other code generators have their own (set of) source files, many wrapper extension modules out there consist of more than one source file that would be relevant, ? I would consider .py files the exceptional case here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 16:24:35 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Sun, 05 Aug 2018 20:24:35 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533500675.96.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: Check the commands below and the results to see why the problem with the mouse wheel appeared: >>> a = 1 >>> a >= 0 == True False >>> (a >= 0) == True True >>> a >= (0 == True) True >>> a >= 0 == False True >>> (a >= 0) == False False >>> a >= (0 == False) True >>> (a >= 0) == True True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 16:29:05 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Sun, 05 Aug 2018 20:29:05 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533500945.28.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I think I could make linecache use the ResourceReader API to find the source file instead of looking in the sys.path entries. However, that's orthogonal to PR 6653: we still need PR 6653 to continue looking for the source file in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 17:15:14 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 05 Aug 2018 21:15:14 +0000 Subject: [issue34236] Test6012 in test_capi is not run as part of make test In-Reply-To: <1532612537.28.0.56676864532.issue34236@psf.upfronthosting.co.za> Message-ID: <1533503714.27.0.56676864532.issue34236@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +8176 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 17:17:11 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 05 Aug 2018 21:17:11 +0000 Subject: [issue34236] Test6012 in test_capi is not run as part of make test In-Reply-To: <1532612537.28.0.56676864532.issue34236@psf.upfronthosting.co.za> Message-ID: <1533503831.29.0.56676864532.issue34236@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- components: +Tests -Build nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 18:31:57 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Aug 2018 22:31:57 +0000 Subject: [issue34254] Include type annotations in error messages for better errors In-Reply-To: <1532764112.96.0.56676864532.issue34254@psf.upfronthosting.co.za> Message-ID: <1533508317.73.0.56676864532.issue34254@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: FWIW I am rather -1 on this. More detailed errors messages are always good, but in the proposed form it looks more like a distraction. I think just showing a fully qualified name of the function would be both more concise and more informative, since the user would likely need to look at the function code/docstring anyway in order to write a correct call. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 22:57:34 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 06 Aug 2018 02:57:34 +0000 Subject: [issue26515] Update extending/embedding docs to new way to build modules in C In-Reply-To: <1457491421.2.0.684118231911.issue26515@psf.upfronthosting.co.za> Message-ID: <1533524254.96.0.56676864532.issue26515@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8177 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 23:05:47 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 06 Aug 2018 03:05:47 +0000 Subject: [issue26515] Update extending/embedding docs to new way to build modules in C In-Reply-To: <1457491421.2.0.684118231911.issue26515@psf.upfronthosting.co.za> Message-ID: <1533524747.72.0.56676864532.issue26515@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +berker.peksag type: -> enhancement versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 01:11:21 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 06 Aug 2018 05:11:21 +0000 Subject: [issue34254] Include type annotations in error messages for better errors In-Reply-To: <1532764112.96.0.56676864532.issue34254@psf.upfronthosting.co.za> Message-ID: <1533532281.95.0.56676864532.issue34254@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the feedback on this. Brett also gave feedback on the python-ideas mailing list as below : > Two things to quickly mention: one is that type hints have no run-time semantics, so adding them to such a critical exception would be escalating their meaning a bit. The other point is this TypeError has nothing to do with the cause of the exception, so I would say that it's slightly distracting from the cause of the issue. I am closing this. Thanks ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 02:28:35 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 06 Aug 2018 06:28:35 +0000 Subject: [issue34248] dbm errors should contain file names In-Reply-To: <1532698438.31.0.56676864532.issue34248@psf.upfronthosting.co.za> Message-ID: <1533536915.79.0.56676864532.issue34248@psf.upfronthosting.co.za> Berker Peksag added the comment: PR 8590 only changes dbm.gnu. If we do this, we should update dbm.ndbm as well: https://github.com/python/cpython/blob/4a745333406a4b9c5b0194bdac4a77d9fadd5457/Modules/_dbmmodule.c#L65 ---------- nosy: +berker.peksag type: -> enhancement versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 02:43:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 06:43:30 +0000 Subject: [issue14315] zipfile.ZipFile() unable to open zip File with a short extra header In-Reply-To: <1331810146.14.0.995585507713.issue14315@psf.upfronthosting.co.za> Message-ID: <1533537810.25.0.56676864532.issue14315@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Just for information: the padding in APK files is added by the zipalign utility [1]. [1] https://developer.android.com/studio/command-line/zipalign ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 03:41:56 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 06 Aug 2018 07:41:56 +0000 Subject: [issue25872] multithreading traceback KeyError when modifying file In-Reply-To: <1450200064.35.0.872448112145.issue25872@psf.upfronthosting.co.za> Message-ID: <1533541316.48.0.56676864532.issue25872@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: It seems there was a major refactor in traceback module with 6bc2c1e7ebf359224e5e547f58ffc2c42cb36a39 where this was fixed in Python 3. Ignoring the KeyError seems reasonable to me. Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 03:53:26 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Aug 2018 07:53:26 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533542006.83.0.56676864532.issue34296@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- nosy: +inada.naoki versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 03:57:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 07:57:50 +0000 Subject: [issue34341] Appending to ZIP archive blows up existing Central Directory entries Message-ID: <1533542270.27.0.56676864532.issue34341@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : When the ZIP archive is opened for appending, it reads the Central Directory at opening and writes existing entries back at closing. The Zip64 Extra Field is appended to existing Extra Fields if necessary. This leads to increasing the size of the Extra Fields data every time when append to the ZIP archive. Since the total size of Extra Fields is limited by 0xffff bytes, this can cause the failure. The proposed PR removes the Zip64 Extra Field before adding a new Zip64 Extra Field. ---------- assignee: serhiy.storchaka components: Library (Lib) messages: 323181 nosy: alanmcintyre, serhiy.storchaka, twouters priority: normal severity: normal status: open title: Appending to ZIP archive blows up existing Central Directory entries type: behavior versions: Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 03:59:21 2018 From: report at bugs.python.org (Shahriyar Rzayev) Date: Mon, 06 Aug 2018 07:59:21 +0000 Subject: [issue34342] Fix the broken links in CPythonVmInternals wiki page Message-ID: <1533542361.92.0.56676864532.issue34342@psf.upfronthosting.co.za> New submission from Shahriyar Rzayev : Please see: https://wiki.python.org/moin/CPythonVmInternals There are some links under "Particularly useful pieces of documentation: " which are broken and should be updated respectively as follows: [Execution Model] -> https://docs.python.org/3/reference/executionmodel.html [GIL] -> https://docs.python.org/3/c-api/init.html#thread-state-and-the-global-interpreter-lock or this one https://wiki.python.org/moin/GlobalInterpreterLock [Bytecodes] -> Which is now can be found in https://docs.python.org/3/library/dis.html [Disassembler] -> same here https://docs.python.org/3/library/dis.html ---------- assignee: docs at python components: Documentation messages: 323182 nosy: docs at python, shako priority: normal severity: normal status: open title: Fix the broken links in CPythonVmInternals wiki page type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 04:07:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 08:07:41 +0000 Subject: [issue34341] Appending to ZIP archive blows up existing Central Directory entries In-Reply-To: <1533542270.27.0.56676864532.issue34341@psf.upfronthosting.co.za> Message-ID: <1533542861.2.0.56676864532.issue34341@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +8178 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 04:07:47 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Aug 2018 08:07:47 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533542867.92.0.56676864532.issue34296@psf.upfronthosting.co.za> INADA Naoki added the comment: > i did 2 implementations in both python and pure bash, python takes about 500ms to run while bash is more than 10 times faster. VM startup + `import site` are done in 10~20ms on common Linux machine. It won't take 500ms. While Python VM startup is not lightning fast, library import time is much slower than VM startup in many cases. And since "importing library" may have many important side effects, we can't "pre warm" it. Have you tried `PYTHONPROFILEIMPORTTIME=1` environment variable added by Python 3.7? https://dev.to/methane/how-to-speed-up-python-application-startup-time-nkf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 04:28:30 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Aug 2018 08:28:30 +0000 Subject: [issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs In-Reply-To: <1386217330.5.0.714990905065.issue19891@psf.upfronthosting.co.za> Message-ID: <1533544110.24.0.56676864532.issue19891@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset b2499669ef2e6dc9a2cdb49b4dc498e078167e26 by INADA Naoki (Anthony Sottile) in branch 'master': bpo-19891: Ignore error while writing history file (GH-8483) https://github.com/python/cpython/commit/b2499669ef2e6dc9a2cdb49b4dc498e078167e26 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 04:28:41 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 08:28:41 +0000 Subject: [issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs In-Reply-To: <1386217330.5.0.714990905065.issue19891@psf.upfronthosting.co.za> Message-ID: <1533544121.01.0.56676864532.issue19891@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 04:28:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 08:28:51 +0000 Subject: [issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs In-Reply-To: <1386217330.5.0.714990905065.issue19891@psf.upfronthosting.co.za> Message-ID: <1533544131.93.0.56676864532.issue19891@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 04:32:46 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 06 Aug 2018 08:32:46 +0000 Subject: [issue34342] Fix the broken links in CPythonVmInternals wiki page In-Reply-To: <1533542361.92.0.56676864532.issue34342@psf.upfronthosting.co.za> Message-ID: <1533544366.31.0.56676864532.issue34342@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. wiki.python.org is maintained by the Python community, not by Python core developers. You can fix those broken links by creating an account and requesting edit access by emailing to pydotorg-www at python.org. See https://wiki.python.org/moin/FrontPage#Editing_pages for details. ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 05:03:52 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 09:03:52 +0000 Subject: [issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs In-Reply-To: <1386217330.5.0.714990905065.issue19891@psf.upfronthosting.co.za> Message-ID: <1533546232.92.0.56676864532.issue19891@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 416f3435c536c5197f5c6a23504955cf717df200 by Miss Islington (bot) in branch '3.7': bpo-19891: Ignore error while writing history file (GH-8483) https://github.com/python/cpython/commit/416f3435c536c5197f5c6a23504955cf717df200 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 05:15:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 09:15:51 +0000 Subject: [issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs In-Reply-To: <1386217330.5.0.714990905065.issue19891@psf.upfronthosting.co.za> Message-ID: <1533546951.95.0.56676864532.issue19891@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e20d31cdb33bdfee68bce059f9a9c7ce71b035fe by Miss Islington (bot) in branch '3.6': bpo-19891: Ignore error while writing history file (GH-8483) https://github.com/python/cpython/commit/e20d31cdb33bdfee68bce059f9a9c7ce71b035fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 05:24:31 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Mon, 06 Aug 2018 09:24:31 +0000 Subject: [issue34343] Why is turtle still present in python embedded for Windows? Message-ID: <1533547471.89.0.56676864532.issue34343@psf.upfronthosting.co.za> New submission from Vlad Tudorache : I've just started using the embedded Python 3.6 for Windows and I find turtle.py in the archive, knowing that tkinter isn't present. There's no large space loss because of it, but it's presence may be confusing. ---------- components: Library (Lib), Windows messages: 323188 nosy: paul.moore, steve.dower, tim.golden, vtudorache, zach.ware priority: normal severity: normal status: open title: Why is turtle still present in python embedded for Windows? type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 05:42:26 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Aug 2018 09:42:26 +0000 Subject: [issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs In-Reply-To: <1386217330.5.0.714990905065.issue19891@psf.upfronthosting.co.za> Message-ID: <1533548546.47.0.56676864532.issue19891@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- components: +Library (Lib) -Extension Modules resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 05:58:27 2018 From: report at bugs.python.org (Cyker Way) Date: Mon, 06 Aug 2018 09:58:27 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533549507.54.0.56676864532.issue34296@psf.upfronthosting.co.za> Cyker Way added the comment: > VM startup + `import site` are done in 10~20ms on common Linux machine. > While Python VM startup is not lightning fast, library import time is much slower than VM startup in many cases. In my tests, a helloworld python script generally takes about 30-40 ms, while a similar helloworld bash script takes about 3-4 ms. Adding some common library imports (`os`, `sys`, etc.), then the python script's running time goes up to 60-70ms. I'm not sure how to compare this against bash because there are no library imports in bash. The 500ms (python) vs 50ms (bash) comparison is based on minimal implementations of the same simple job and meant to reflect the minimal amount of time needed for such a job in different languages. While it doesn't cover everything and may not even be fair enough, the result does match that of the helloworld test (10 times faster/slower). Plus, in your linked post, it shows importing pipenv takes about 700ms. Therefore I believe some hundreds of milliseconds are necessary for such scripts that do a simple but meaningful job. I understand many things can happen while importing a library. But for a specific program, its imports are usually fixed and very much likely the same between runs. That's why I believe a zygote/fork/snapshot feature would still be helpful to help avoid the startup delay. Finally, for simple and quick user scrips, the 30-40 ms startup time without any import statements may not be a huge problem, but it's still tangible and makes the program feel not that sleek. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:04:47 2018 From: report at bugs.python.org (Vlad Starostin) Date: Mon, 06 Aug 2018 10:04:47 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop Message-ID: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> New submission from Vlad Starostin : The docstring says "This may be None or an instance of EventLoop". But docs explicitly state that get_event_loop "must never return None". The same docstring is also in the example in docs: https://docs.python.org/3.6/library/asyncio-eventloops.html#customizing-the-event-loop-policy I propose changing it to: def get_event_loop(self): """Get the event loop. Returns an instance of EventLoop or raises an exception. """ If the wording is ok, I'll make a PR. ---------- assignee: docs at python components: Documentation, asyncio messages: 323190 nosy: asvetlov, docs at python, drtyrsa, yselivanov priority: normal severity: normal status: open title: Fix the docstring for AbstractEventLoopPolicy.get_event_loop versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:12:38 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Aug 2018 10:12:38 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533550358.03.0.56676864532.issue34296@psf.upfronthosting.co.za> INADA Naoki added the comment: > In my tests, a helloworld python script generally takes about 30-40 ms. [snip] > Finally, for simple and quick user scrips, the 30-40 ms startup time without any import statements may not be a huge problem, but it's still tangible and makes the program feel not that sleek. What is your environment? I optimized startup on Python 3.7, especially on macOS (it was very slow before 3.7). And some legacy features (e.g. legacy "namespace package" system from setuptools) will make startup much slower, because they import some heavy libraries silently even when you just run "hello world". PYTHONPROFILEIMPORTTIME will help to find them too. And venv allow to split out such legacy tools from your main Python environment. > The 500ms (python) vs 50ms (bash) comparison is based on minimal implementations of the same simple job and meant to reflect the minimal amount of time needed for such a job in different languages. Would you give us some example script? > Plus, in your linked post, it shows importing pipenv takes about 700ms. Therefore I believe some hundreds of milliseconds are necessary for such scripts that do a simple but meaningful job. FYI, it compiles many regular expressions at startup time. I want to add lazy compilation API to re module in 3.8. (I'm waiting bpo-21145 is implemented) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:19:07 2018 From: report at bugs.python.org (Erik Bray) Date: Mon, 06 Aug 2018 10:19:07 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533550747.88.0.56676864532.issue32797@psf.upfronthosting.co.za> Erik Bray added the comment: Brett: > As Nick said, we have no generalized concept of source maps and I think coming up with that is what will be required to solve this as i personally don't view Loader.get_source() is not meant to be a generalized concept of some form of source code but Python source code. I see what you're saying here, but given that Loader can return Python modules that are ostensibly not actually generated from Python source code, then it's not *obvious* that Loader.get_source() must return Python source. At the very least the documentation [1] should clarify this. But it's also a bit arbitrarily limiting, especially given the demonstrable possibility of providing tracebacks and code inspection for *non-Python* code (as in the case of Cython) that compiles to Python modules. Nick: > 1. Enhance PathFinder to allow specification of which path importer cache and path_hooks entries to use This would be good. Perhaps veering off-topic, but in an earlier attempt to fix this issue I actually tried to implement a sys.path_hooks hook for importing Cython modules such that I could provide an appropriate Loader for them with a get_source that actually works. This turned out to be very difficult in large part due to the difficulty of customizing the relationship between the default PathFinder on sys.meta_path and the sys.path_hooks entries. I made a post about this to python-ideas [2] but it never gained much traction, probably in large part due to the specialized nature of the problem and the complexity of my solution :) [1] https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader.get_source [2] https://mail.python.org/pipermail/python-ideas/2018-February/048905.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:25:40 2018 From: report at bugs.python.org (Erik Bray) Date: Mon, 06 Aug 2018 10:25:40 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533551140.14.0.56676864532.issue32797@psf.upfronthosting.co.za> Erik Bray added the comment: To add, while an enhancement just to linecache would make sense in its own right, I don't see the problem with also extending the Loader.get_source() API to be more useful as well. Its current behavior is to just return a string (or None), but it seems to me one could keep that basic behavior, but also extend it to optionally return a more sophisticated source map data structure (that could involve multiple source files as well). This could even be useful for built-in modules. I would love, for example, to be able to get stack traces within extension modules integrated into Python tracebacks if they are compiled with some appropriate debug flags. The case of Cython demonstrates that something like this is perfectly doable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:28:39 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Aug 2018 10:28:39 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533551319.92.0.56676864532.issue34296@psf.upfronthosting.co.za> INADA Naoki added the comment: > I understand many things can happen while importing a library. But for a specific program, its imports are usually fixed and very much likely the same between runs. That's why I believe a zygote/fork/snapshot feature would still be helpful to help avoid the startup delay. I agree it can be useful. It's different from your first post. (Snapshot whole application, rather than just Python VM). And this idea is discussed on Python-dev ML several times. But I think it can be implemented as 3rd party tool at first. It is better because (1) we can battle test the idea before adding it to stdlib, and (2) we can use the tool even for Python 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:39:48 2018 From: report at bugs.python.org (Cyker Way) Date: Mon, 06 Aug 2018 10:39:48 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533551988.88.0.56676864532.issue34296@psf.upfronthosting.co.za> Cyker Way added the comment: It was tested on a x86_64 Linux system. The machine is not quite new but is OK for building and running python. The test script is actually a management tool for a larger project that is not released in public so I don't have right to disclose it here. When tested on python 3.7 it did run faster than python 3.6 so there were indeed great improvements. While optimizing standard libraries definitely makes the program start up faster, we should also note that each user program also has its own specific initialization procedure. This is in general out of control of language platform developers, but forking a user-initialized vm or using a snapshot chosen by the user still helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:43:38 2018 From: report at bugs.python.org (Erik Bray) Date: Mon, 06 Aug 2018 10:43:38 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533552218.72.0.56676864532.issue32797@psf.upfronthosting.co.za> Erik Bray added the comment: > To do that, I believe it can be made to work in much the same way it did in Python 2 if SageMath were to do the following: > > 1. Define a subclass of ExtensionModuleLoader [1] that overrides get_source() to also look for a ".pyx" file adjacent to the extension module. This would also look for any of the file suffixes in SOURCE_SUFFIXES if a .pyx file isn't found. > 2. Create an instance of FileFinder [3] that uses the custom loader subclass for any of the file suffixes in EXTENSION_SUFFIXES [4] > 3. Replace the regular file finding hook in sys.path_hooks with the path_hook method from that new FileFinder instance (by default, there's only one FileFinder hook installed, and it can currently be identified as "obj.__name__ == 'path_hook_for_FileFinder') > 4. Invalidate importlib's caches, so any future extension module imports will use the custom extension module loader, rather than the default one This is pretty edifying, because Nick's idea is almost exactly what I did six months ago :) https://git.sagemath.org/sage.git/diff/?id2=0a674fd488dcd7cb779101d263c10a874a13cf77&id=8b63abe731c510f0de9ef0e3ab9a0bda3669dce1 Turned out to be very non-trivial of course, and I believe it should not have been as complicated as it was. It also still doesn't solve the problem that Loader.get_source does not support multiple source files, which Cython code may have (a .pyx and a .pxd being a common case). I'm glad Paul Moore seems to also agree (now that I've actually read the rest of the thread) that the ExtensionLoader.get_source, at the very least, could be made more useful. Whatever form that takes would be worth extending to other loaders that implement get_source as well... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:46:46 2018 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 06 Aug 2018 10:46:46 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533552406.0.0.56676864532.issue32797@psf.upfronthosting.co.za> Stefan Behnel added the comment: Or, define a new "get_sourcemap()" method that could return additional metadata, e.g. a line number mapping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 06:50:01 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 06 Aug 2018 10:50:01 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533552601.66.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > I would love, for example, to be able to get stack traces within extension modules integrated into Python tracebacks if they are compiled with some appropriate debug flags. Awesome idea, I want to work on that :-) This should be possible using the backtrace() and backtrace_symbols() functions, which exist at least in GNU libc and on OSX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:08:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 12:08:19 +0000 Subject: [issue34345] Add tests for PEP 468 and PEP 520 Message-ID: <1533557299.17.0.56676864532.issue34345@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : AFAIK there no purposed tests for PEP 468 and PEP 520. If making dict not preserving order, noting related to these PEPs is failed. I think we need explicit tests for PEP 468 and PEP 520. At least in 3.6 the dict order is not guaranteed. And even in 3.7+ preserving the dict order doesn't guarantee implementing PEP 468 and PEP 520. The order can be broken in a meanwhile (for example by iterating a list of keys in the reversed order). ---------- components: Tests messages: 323199 nosy: eric.snow, serhiy.storchaka priority: normal severity: normal status: open title: Add tests for PEP 468 and PEP 520 type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:08:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 12:08:50 +0000 Subject: [issue34320] Creating dict from OrderedDict doesn't preserve order In-Reply-To: <1533215543.91.0.56676864532.issue34320@psf.upfronthosting.co.za> Message-ID: <1533557330.19.0.56676864532.issue34320@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- dependencies: +Add tests for PEP 468 and PEP 520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:10:11 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 06 Aug 2018 12:10:11 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1533557411.28.0.56676864532.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Or, define a new "get_sourcemap()" method that could return additional metadata, e.g. a line number mapping. What's your use case for that? I am asking because it might make more sense for get_source() (or whatever its replacement is) to return the already-mapped sources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:41:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Aug 2018 12:41:26 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533559286.67.0.56676864532.issue34273@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 28c7f8c8ce34a0cb848822a252a9d0a761fb42d5 by Terry Jan Reedy in branch 'master': bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (#8673) https://github.com/python/cpython/commit/28c7f8c8ce34a0cb848822a252a9d0a761fb42d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:41:35 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 12:41:35 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533559295.8.0.56676864532.issue34273@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8181 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:41:43 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 12:41:43 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533559303.32.0.56676864532.issue34273@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:47:39 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 12:47:39 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533559659.62.0.56676864532.issue34273@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e39fb207f26f8007e95fcf120f5ff1cb7372791a by Miss Islington (bot) in branch '3.7': bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673) https://github.com/python/cpython/commit/e39fb207f26f8007e95fcf120f5ff1cb7372791a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:49:37 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 12:49:37 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533559777.9.0.56676864532.issue34273@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ed8dd598ae7e0d944974af0fd73c2fbb6105fd5c by Miss Islington (bot) in branch '3.6': bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673) https://github.com/python/cpython/commit/ed8dd598ae7e0d944974af0fd73c2fbb6105fd5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 08:57:07 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Aug 2018 12:57:07 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533560227.01.0.56676864532.issue34273@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +8183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 09:03:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Aug 2018 13:03:48 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533560628.0.0.56676864532.issue34273@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9027502e99cba700cadb675b3b2db03c311d1c4d by Terry Jan Reedy in branch '2.7': [2.7] bpo-34273: Change 'Fixed point' to 'Fixed-point notation'. (GH-8673) https://github.com/python/cpython/commit/9027502e99cba700cadb675b3b2db03c311d1c4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 09:04:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Aug 2018 13:04:24 +0000 Subject: [issue34273] %f is confusingly associated with fixed point format In-Reply-To: <1532899552.57.0.56676864532.issue34273@psf.upfronthosting.co.za> Message-ID: <1533560664.5.0.56676864532.issue34273@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 09:47:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 13:47:52 +0000 Subject: [issue34236] Test6012 in test_capi is not run as part of make test In-Reply-To: <1532612537.28.0.56676864532.issue34236@psf.upfronthosting.co.za> Message-ID: <1533563272.44.0.56676864532.issue34236@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7e4ff9796cb2c5b64307a2bd928e35930e3f1b2a by Serhiy Storchaka (Zackery Spytz) in branch '2.7': [2.7] bpo-34236: Remove mistakenly backported Test6012 in test_capi.py. (GH-8681) https://github.com/python/cpython/commit/7e4ff9796cb2c5b64307a2bd928e35930e3f1b2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 09:48:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 13:48:27 +0000 Subject: [issue34236] Test6012 in test_capi is not run as part of make test In-Reply-To: <1532612537.28.0.56676864532.issue34236@psf.upfronthosting.co.za> Message-ID: <1533563307.99.0.56676864532.issue34236@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Karthikeyan and Zackery! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 09:50:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 13:50:23 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1533563422.99.0.56676864532.issue34272@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8f7bb100d0fa7fb2714f3953b5b627878277c7c6 by Serhiy Storchaka in branch 'master': bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567) https://github.com/python/cpython/commit/8f7bb100d0fa7fb2714f3953b5b627878277c7c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 09:50:38 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 13:50:38 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1533563438.44.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 09:57:49 2018 From: report at bugs.python.org (Chris Fuller) Date: Mon, 06 Aug 2018 13:57:49 +0000 Subject: [issue34346] dir() hangs interpreter Message-ID: <1533563869.83.0.56676864532.issue34346@psf.upfronthosting.co.za> New submission from Chris Fuller : It's a little obscure. Nothing to get alarmed about, probably. It involves recursion and __getattr__() during object creation. Only present with 2.7 new-style classes. Old-style 2.7 did not exhibit this behavior nor did 3.x. Checked on Linux/Cygwin/Windows. ---------- files: splat.py messages: 323208 nosy: sfaleron priority: normal severity: normal status: open title: dir() hangs interpreter type: crash versions: Python 2.7 Added file: https://bugs.python.org/file47731/splat.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 10:10:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 14:10:10 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1533564610.14.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 10:11:08 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 14:11:08 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1533564668.76.0.56676864532.issue34272@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a1ff5f9031dc81b2c368def037fc0e88f5bc48b7 by Miss Islington (bot) in branch '3.7': bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567) https://github.com/python/cpython/commit/a1ff5f9031dc81b2c368def037fc0e88f5bc48b7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 10:34:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 14:34:50 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1533566090.96.0.56676864532.issue34272@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 278d975ce158608f6be491c561247d4701c842be by Serhiy Storchaka in branch '3.6': [3.6] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). (GH-8690) https://github.com/python/cpython/commit/278d975ce158608f6be491c561247d4701c842be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 10:49:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 14:49:42 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1533566982.81.0.56676864532.issue34272@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 11:06:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Aug 2018 15:06:19 +0000 Subject: [issue34272] Reorganize C API tests In-Reply-To: <1532868961.04.0.56676864532.issue34272@psf.upfronthosting.co.za> Message-ID: <1533567979.37.0.56676864532.issue34272@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d1c5e278a1a2458bc5efcdc300c17f9e39a59b6c by Serhiy Storchaka in branch '2.7': [2.7] bpo-34272: Move argument parsing tests from test_capi to test_getargs2. (GH-8567). (GH-8691) https://github.com/python/cpython/commit/d1c5e278a1a2458bc5efcdc300c17f9e39a59b6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 11:13:23 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 06 Aug 2018 15:13:23 +0000 Subject: [issue34346] dir() hangs interpreter In-Reply-To: <1533563869.83.0.56676864532.issue34346@psf.upfronthosting.co.za> Message-ID: <1533568403.72.0.56676864532.issue34346@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't think the description you give is very accurate. The description in the file splat.py says: "Hangs/core dumps Python2 when instantiated" (which is it? hang or core dump?) but I can't replicate that. Instantiating A() is fine for me. (Tested in Python 2.7 on Linux.) The whole business about "splat" is amusing but irrelevant. I can replicate the hang (no core dump) using this simpler example: class B: def __getattr__(self, name): return name in dir(self) Instantiating the class is fine, but calling dir() on it locks up: >>> b = B() >>> dir(b) [1]+ Stopped python2.7 -E (after typing Ctrl-Z in the xterm). Notice that B is an old-style class in this example. The same behaviour also occurs when inheriting from object. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 11:39:08 2018 From: report at bugs.python.org (Steap) Date: Mon, 06 Aug 2018 15:39:08 +0000 Subject: [issue33802] Regression in logging configuration In-Reply-To: <1528412435.4.0.592728768989.issue33802@psf.upfronthosting.co.za> Message-ID: <1533569948.01.0.56676864532.issue33802@psf.upfronthosting.co.za> Steap added the comment: It seems like this regression has not completely been fixed: there are still issues with "None": $ python3.6 -c 'import configparser; configparser.ConfigParser(defaults={"a": None})' $ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a": 1})' $ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a": None})' Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/configparser.py", line 638, in __init__ self._read_defaults(defaults) File "/usr/lib/python3.7/configparser.py", line 1216, in _read_defaults self.read_dict({self.default_section: defaults}) File "/usr/lib/python3.7/configparser.py", line 753, in read_dict self.set(section, key, value) File "/usr/lib/python3.7/configparser.py", line 1197, in set self._validate_value_types(option=option, value=value) File "/usr/lib/python3.7/configparser.py", line 1182, in _validate_value_types raise TypeError("option values must be strings") TypeError: option values must be strings Should "None" not be used, or should this bug be reopened? ---------- nosy: +Steap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 12:06:50 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 06 Aug 2018 16:06:50 +0000 Subject: [issue34347] AIX: test_utf8_mode.test_cmd_line fails Message-ID: <1533571610.9.0.56676864532.issue34347@psf.upfronthosting.co.za> New submission from Michael Felt : The test fails because byte_str.decode('ascii', 'surragateescape') is not what ascii(byte_str) - returns when called from the commandline. Assumption: since " check('utf8', [arg_utf8])" succeeds I assume the parsing of the command-line is correct. DETAILS >>> arg = 'h\xe9\u20ac'.encode('utf-8') >>> arg b'h\xc3\xa9\xe2\x82\xac' >>> arg.decode('ascii', 'surrogateescape') 'h\udcc3\udca9\udce2\udc82\udcac' I am having a difficult time getting the syntax correct for all the "escapes", so I added a print statement in the check routine: test_cmd_line (test.test_utf8_mode.UTF8ModeTests) ... code:import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:]))) arg:b'h\xc3\xa9\xe2\x82\xac' out:UTF-8:['h\xe9\u20ac'] code:import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:]))) arg:b'h\xc3\xa9\xe2\x82\xac' out:ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] test code with my debug statement (to generate above): def test_cmd_line(self): arg = 'h\xe9\u20ac'.encode('utf-8') arg_utf8 = arg.decode('utf-8') arg_ascii = arg.decode('ascii', 'surrogateescape') code = 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))' def check(utf8_opt, expected, **kw): out = self.get_output('-X', utf8_opt, '-c', code, arg, **kw) print("\ncode:%s arg:%s\nout:%s" % (code, arg, out)) args = out.partition(':')[2].rstrip() self.assertEqual(args, ascii(expected), out) check('utf8', [arg_utf8]) if sys.platform == 'darwin' or support.is_android: c_arg = arg_utf8 else: c_arg = arg_ascii check('utf8=0', [c_arg], LC_ALL='C') So the first check succeeds: check('utf8', [arg_utf8]) But the second does not: FAIL: test_cmd_line (test.test_utf8_mode.UTF8ModeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/src/python3-3.7.0/Lib/test/test_utf8_mode.py", line 225, in test_cmd_line check('utf8=0', [c_arg], LC_ALL='C') File "/data/prj/python/src/python3-3.7.0/Lib/test/test_utf8_mode.py", line 218, in check self.assertEqual(args, ascii(expected), out) AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != "['h\\udcc3\\udca9\\udce2\\udc82\\udcac']" - ['h\xc3\xa9\xe2\x82\xac'] + ['h\udcc3\udca9\udce2\udc82\udcac'] : ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] I tried saying the "expected" is arg, but arg is still a byte object, the cmd_line result is not (printed as such). AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != "[b'h\\xc3\\xa9\\xe2\\x82\\xac']" - ['h\xc3\xa9\xe2\x82\xac'] + [b'h\xc3\xa9\xe2\x82\xac'] ? + : ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] ---------- components: Interpreter Core, Tests messages: 323214 nosy: Michael.Felt priority: normal severity: normal status: open title: AIX: test_utf8_mode.test_cmd_line fails type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 14:38:14 2018 From: report at bugs.python.org (Abhishek Reddy) Date: Mon, 06 Aug 2018 18:38:14 +0000 Subject: [issue34348] Python 3.7 - Issues Installing Scikit Learn Message-ID: <1533580694.5.0.56676864532.issue34348@psf.upfronthosting.co.za> New submission from Abhishek Reddy : Hi I am currently encountering below issues when trying to install any version of Scikit Learn (0.19.0 or 0.19.1 or 0.19.2) Python Version - 3.7 /usr/local/bsb-python37 - Custom Location in which I configured and installed Python 3.7 I have installed all the prerequisite - OS packages - bias-devel , lapack-devel , atlas-devel. Earlier when I installed Python 2.7 I didn't run into any issues. Now when I re-try to install the scikit learn under Python 2.7 I am running into the same issue and the earlier successful installed version of scikit learn is corrupted. Error # /usr/local/bsb-python37/bin/python3.7 setup.py install --prefix=/usr/local/bsb-python37 Partial import of sklearn during the build process. blas_opt_info: blas_mkl_info: customize UnixCCompiler libraries mkl_rt not found in ['/usr/local/bsb-python37/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/'] NOT AVAILABLE blis_info: customize UnixCCompiler libraries blis not found in ['/usr/local/bsb-python37/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/'] NOT AVAILABLE error: Command "g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/bsb-python37/lib/python3.7/site-packages/numpy-1.14.5-py3.7-linux-x86_64.egg/numpy/core/include -I/usr/local/bsb-python37/lib/python3.7/site-packages/numpy-1.14.5-py3.7-linux-x86_64.egg/numpy/core/include -I/usr/local/bsb-python37/include/python3.7m -c sklearn/cluster/_dbscan_inner.cpp -o build/temp.linux-x86_64-3.7/sklearn/cluster/_dbscan_inner.o -MMD -MF build/temp.linux-x86_64-3.7/sklearn/cluster/_dbscan_inner.o.d" failed with exit status 1 Any help is greatly appreciated. I tried to google around and did all that I could try. No luck. Thanks, Abhishek ---------- components: Installation messages: 323215 nosy: abhishekreddyc priority: normal severity: normal status: open title: Python 3.7 - Issues Installing Scikit Learn type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 14:51:49 2018 From: report at bugs.python.org (Jens Troeger) Date: Mon, 06 Aug 2018 18:51:49 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1431879719.97.0.835565097524.issue24218@psf.upfronthosting.co.za> Message-ID: <1533581509.38.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: David, I tried to find the mentioned '\r\r?\n' issue but I could not find it here. However, from an initial investigation into the BytesGenerator, here is what?s happening. Flattening the body and attachments of the EmailMessage object works, and eventually _write_headers() is called to flatten the headers which happens entry by entry (https://github.com/python/cpython/blob/master/Lib/email/generator.py#L417-L418). Flattening a header entry is a recursive process over the parse tree of the entry, which builds the flattened and encoded final string by descending into the parse tree and encoding & concatenating the individual ?parts? (tokens of the header entry). Given the parse tree for a header entry like "Mart?n C?rdoba " eventually results in the correct flattened string: '=?utf-8?q?Mart=C3=ADn_C=C3=B3rdoba?= \r\n' at the bottom of the recursion for this ?Mailbox? part. The recursive callstack is then: _refold_parse_tree _header_value_parser.py:2687 fold [Mailbox] _header_value_parser.py:144 _refold_parse_tree _header_value_parser.py:2630 fold [Address] _header_value_parser.py:144 _refold_parse_tree _header_value_parser.py:2630 fold [AddressList] _header_value_parser.py:144 _refold_parse_tree _header_value_parser.py:2630 fold [Header] _header_value_parser.py:144 fold [_UniqueAddressHeader] headerregistry.py:258 _fold [EmailPolicy] policy.py:205 fold_binary [EmailPolicy] policy.py:199 _write_headers [BytesGenerator] generator.py:418 _write [BytesGenerator] generator.py:195 The problem now arises from the interplay of # https://github.com/python/cpython/blob/master/Lib/email/_header_value_parser.py#L2629 encoded_part = part.fold(policy=policy)[:-1] # strip nl which strips the '\n' from the returned string, and # https://github.com/python/cpython/blob/master/Lib/email/_header_value_parser.py#L2686 return policy.linesep.join(lines) + policy.linesep which adds the policy?s line separation string linesep="\r\n" to the end of the flattened string upon unrolling the recursion. I am not sure about a proper fix here, but considering that the linesep policy can be any string length (in this case len("\r\n") == 2) a fixed truncation of one character [:-1] seems wrong. Instead, using: encoded_part = part.fold(policy=policy)[:-len(policy.linesep)] # strip nl seems to work for entries with and without Unicode characters in their display names. David, please advise on how to proceed from here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 14:55:51 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 06 Aug 2018 18:55:51 +0000 Subject: [issue2122] mmap.flush does not check for errors on windows In-Reply-To: <1203081603.58.0.172093843344.issue2122@psf.upfronthosting.co.za> Message-ID: <1533581751.47.0.56676864532.issue2122@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8187 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:41:06 2018 From: report at bugs.python.org (Nic Watson) Date: Mon, 06 Aug 2018 19:41:06 +0000 Subject: [issue34349] asyncio.wait should accept generator of tasks as first argument Message-ID: <1533584466.72.0.56676864532.issue34349@psf.upfronthosting.co.za> New submission from Nic Watson : Currently, passing a generator of coroutines or futures as the first parameter of asyncio.wait raises a TypeError. This is in conflict with the documentation calling the first parameter a "sequence". Line in question. https://github.com/python/cpython/blob/3.7/Lib/asyncio/tasks.py#L347 Generators are indeed coroutines, so the check to validate that the first parameter is not a coroutine or a future is too specific. I'd suggest replacing that line with a check that the passed-in parameter is iterable, i.e. hasattr(futures, __iter__). ---------- components: asyncio messages: 323217 nosy: asvetlov, jnwatson, yselivanov priority: normal severity: normal status: open title: asyncio.wait should accept generator of tasks as first argument versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:52:45 2018 From: report at bugs.python.org (Chris Fuller) Date: Mon, 06 Aug 2018 19:52:45 +0000 Subject: [issue34346] dir() hangs interpreter In-Reply-To: <1533563869.83.0.56676864532.issue34346@psf.upfronthosting.co.za> Message-ID: <1533585165.53.0.56676864532.issue34346@psf.upfronthosting.co.za> Change by Chris Fuller : Removed file: https://bugs.python.org/file47731/splat.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:53:10 2018 From: report at bugs.python.org (Chris Fuller) Date: Mon, 06 Aug 2018 19:53:10 +0000 Subject: [issue34346] dir() hangs interpreter In-Reply-To: <1533563869.83.0.56676864532.issue34346@psf.upfronthosting.co.za> Message-ID: <1533585190.7.0.56676864532.issue34346@psf.upfronthosting.co.za> Change by Chris Fuller : Added file: https://bugs.python.org/file47732/splat.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:54:59 2018 From: report at bugs.python.org (Chris Fuller) Date: Mon, 06 Aug 2018 19:54:59 +0000 Subject: [issue34346] dir() hangs interpreter In-Reply-To: <1533563869.83.0.56676864532.issue34346@psf.upfronthosting.co.za> Message-ID: <1533585299.05.0.56676864532.issue34346@psf.upfronthosting.co.za> Chris Fuller added the comment: It hangs, and on Cygwin it dumped core when I hit ctrl-break. I uploaded a revised script. It';s a heisenbug, all I did was removed the unused splat method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:55:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Aug 2018 19:55:06 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533585306.8.0.56676864532.issue34319@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 5b2657fb8c5aaa98e5748e1c325c74b97ea12fd1 by Terry Jan Reedy (Xtreak) in branch 'master': bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645) https://github.com/python/cpython/commit/5b2657fb8c5aaa98e5748e1c325c74b97ea12fd1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:55:45 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 19:55:45 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533585345.13.0.56676864532.issue34319@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:55:55 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 19:55:55 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533585355.79.0.56676864532.issue34319@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8189 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:59:45 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 19:59:45 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533585585.77.0.56676864532.issue34319@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1c6df83e9318ab4ef8e32b805b8226b1324e1ffd by Miss Islington (bot) in branch '3.7': bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645) https://github.com/python/cpython/commit/1c6df83e9318ab4ef8e32b805b8226b1324e1ffd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 16:04:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 06 Aug 2018 20:04:33 +0000 Subject: [issue34319] Clarify pathlib.Path("filepath").read_text() In-Reply-To: <1533210753.86.0.56676864532.issue34319@psf.upfronthosting.co.za> Message-ID: <1533585873.76.0.56676864532.issue34319@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 3da5c5c76d90ddfc4c188cc801d9387501b63b7f by Miss Islington (bot) in branch '3.6': bpo-34319: Clarify file handler closure in pathlib.read_text (GH-8645) https://github.com/python/cpython/commit/3da5c5c76d90ddfc4c188cc801d9387501b63b7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 16:10:54 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 06 Aug 2018 20:10:54 +0000 Subject: [issue34347] AIX: test_utf8_mode.test_cmd_line fails In-Reply-To: <1533571610.9.0.56676864532.issue34347@psf.upfronthosting.co.za> Message-ID: <1533586254.96.0.56676864532.issue34347@psf.upfronthosting.co.za> Michael Felt added the comment: In short, I do not understand how this passes on Linux. This is python3-3.4.6 on sles12: >>> 'h\xe9\u20ac'.encode('utf-8') b'h\xc3\xa9\xe2\x82\xac' >>> ascii('h\xe9\u20ac'.encode('utf-8')) "b'h\\xc3\\xa9\\xe2\\x82\\xac'" >>> 'h\xe9\u20ac'.encode('utf-8').decode('us-ascii', 'surrogateescape') 'h\udcc3\udca9\udce2\udc82\udcac' >>> This is python3-3.7.0 on AIX: >>> 'h\xe9\u20ac'.encode('utf-8') b'h\xc3\xa9\xe2\x82\xac' >>> ascii('h\xe9\u20ac'.encode('utf-8')) "b'h\\xc3\\xa9\\xe2\\x82\\xac'" >>> 'h\xe9\u20ac'.encode('utf-8').decode('us-ascii', 'surrogateescape') 'h\udcc3\udca9\udce2\udc82\udcac' If I am missing something essential here - please be blunt! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 16:26:57 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 06 Aug 2018 20:26:57 +0000 Subject: [issue34347] AIX: test_utf8_mode.test_cmd_line fails In-Reply-To: <1533586254.96.0.56676864532.issue34347@psf.upfronthosting.co.za> Message-ID: <385a7a2d-7147-8c9a-8543-b96d23a708ab@felt.demon.nl> Michael Felt added the comment: On 8/6/2018 10:10 PM, Michael Felt wrote: > Michael Felt added the comment: > > In short, I do not understand how this passes on Linux. > > This is python3-3.4.6 on sles12: > >>>> 'h\xe9\u20ac'.encode('utf-8') > b'h\xc3\xa9\xe2\x82\xac' >>>> ascii('h\xe9\u20ac'.encode('utf-8')) > "b'h\\xc3\\xa9\\xe2\\x82\\xac'" >>>> 'h\xe9\u20ac'.encode('utf-8').decode('us-ascii', 'surrogateescape') > 'h\udcc3\udca9\udce2\udc82\udcac' > This is python3-3.7.0 on AIX: >>>> 'h\xe9\u20ac'.encode('utf-8') > b'h\xc3\xa9\xe2\x82\xac' >>>> ascii('h\xe9\u20ac'.encode('utf-8')) > "b'h\\xc3\\xa9\\xe2\\x82\\xac'" >>>> 'h\xe9\u20ac'.encode('utf-8').decode('us-ascii', 'surrogateescape') > 'h\udcc3\udca9\udce2\udc82\udcac' > > If I am missing something essential here - please be blunt! Also seeing the same with Windows. C:\Users\MICHAELFelt>python Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> 'h\xe9\u20ac'.encode('utf-8') b'h\xc3\xa9\xe2\x82\xac' >>> ascii('h\xe9\u20ac'.encode('utf-8')) "b'h\\xc3\\xa9\\xe2\\x82\\xac'" >>> 'h\xe9\u20ac'.encode('utf-8').decode('ascii','surrogateescape') 'h\udcc3\udca9\udce2\udc82\udcac' >>> > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: https://bugs.python.org/file47733/pEpkey.asc _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 1765 bytes Desc: not available URL: From report at bugs.python.org Mon Aug 6 16:41:27 2018 From: report at bugs.python.org (Sebastian) Date: Mon, 06 Aug 2018 20:41:27 +0000 Subject: [issue34350] Non obvious logging handler behaviour Message-ID: <1533588087.55.0.56676864532.issue34350@psf.upfronthosting.co.za> New submission from Sebastian : In Python 3.6.3 I can do: import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logger.info("this does not work") logging.info("PARTY") logger.info("this works") And it outputs: INFO:root:PARTY INFO:root:this works The line logging.info("PARTY") seems to add a handler which makes the last line work. This is very confusing behavior as it is not obvious that a call to "logging.info" mutates the state of the logging subsystem and affects subsequent logging calls. ---------- components: Library (Lib) messages: 323224 nosy: oneofthose priority: normal severity: normal status: open title: Non obvious logging handler behaviour versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 16:56:24 2018 From: report at bugs.python.org (Erik Janssens) Date: Mon, 06 Aug 2018 20:56:24 +0000 Subject: [issue27186] add os.fspath() In-Reply-To: <20160602220647.10416.48472.A244A1B0@psf.io> Message-ID: <1533588984.36.0.56676864532.issue27186@psf.upfronthosting.co.za> Erik Janssens added the comment: is there a particular reason for PyOS_FSPath to live in posixmodule.c since Objects/unicodeobject.c uses this function, this makes it not possible to compile Python without a posixmodule. this makes it difficult to compile a 'core' python on a new platform, since implementing the posixmodule on a new platform is not trivial. also the documentation on porting mentions that one should first port python without a posixmodule. ---------- nosy: +erikjanss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 17:01:10 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Mon, 06 Aug 2018 21:01:10 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1533589270.68.0.56676864532.issue34284@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: Sorry for the delay, I'm still working on a new PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 17:03:42 2018 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 06 Aug 2018 21:03:42 +0000 Subject: [issue34350] Non obvious logging handler behaviour In-Reply-To: <1533588087.55.0.56676864532.issue34350@psf.upfronthosting.co.za> Message-ID: <1533589422.6.0.56676864532.issue34350@psf.upfronthosting.co.za> Mark Dickinson added the comment: The behaviour is long-standing and documented, in the note just under this entry: https://docs.python.org/3/library/logging.html?highlight=logging#logging.log But I do agree that it's surprising and (at least for me) undesirable behaviour, in that it makes it way too easy to accidentally configure logging in library code, which is a no-no according to most logging "best practices" advice. (Applications do logging configuration; libraries should usually confine themselves to creating loggers and emitting log messages.) But I suspect it would be rather hard to change now. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 17:05:29 2018 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 06 Aug 2018 21:05:29 +0000 Subject: [issue2122] mmap.flush does not check for errors on windows In-Reply-To: <1203081603.58.0.172093843344.issue2122@psf.upfronthosting.co.za> Message-ID: <1533589529.61.0.56676864532.issue2122@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 17:11:56 2018 From: report at bugs.python.org (epiphyte) Date: Mon, 06 Aug 2018 21:11:56 +0000 Subject: [issue34349] asyncio.wait should accept generator of tasks as first argument In-Reply-To: <1533584466.72.0.56676864532.issue34349@psf.upfronthosting.co.za> Message-ID: <1533589916.47.0.56676864532.issue34349@psf.upfronthosting.co.za> Change by epiphyte : ---------- nosy: +epiphyte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 18:20:02 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Aug 2018 22:20:02 +0000 Subject: [issue27186] add os.fspath() In-Reply-To: <1533588984.36.0.56676864532.issue27186@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Mon, Aug 6, 2018, 13:56 Erik Janssens, wrote: > > Erik Janssens added the comment: > > is there a particular reason for PyOS_FSPath to live in posixmodule.c > It's there because the C API for the os module is kept in that module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 20:08:43 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 Aug 2018 00:08:43 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1533600523.17.0.56676864532.issue31047@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset b0bf51b32240369ccb736dc32ff82bb96f375402 by Steve Dower in branch '3.6': bpo-31047: Fix ntpath.abspath for invalid paths (GH-8544) https://github.com/python/cpython/commit/b0bf51b32240369ccb736dc32ff82bb96f375402 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 20:40:02 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 Aug 2018 00:40:02 +0000 Subject: [issue34343] Why is turtle still present in python embedded for Windows? In-Reply-To: <1533547471.89.0.56676864532.issue34343@psf.upfronthosting.co.za> Message-ID: <1533602402.36.0.56676864532.issue34343@psf.upfronthosting.co.za> Steve Dower added the comment: No particular reason. Just needs to be added to EXCLUDE_FILE_FROM_LIBRARY in Tools/msi/make_zip.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 20:41:07 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 Aug 2018 00:41:07 +0000 Subject: [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False In-Reply-To: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> Message-ID: <1533602467.34.0.56676864532.issue31047@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:12:21 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 07 Aug 2018 02:12:21 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1533607941.97.0.56676864532.issue18540@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset e4dcbbd7f4ac18d01c0ec85f64ae98b8281ed403 by Berker Peksag in branch 'master': bpo-18540: Fix EAI_NONAME in imaplib.IMAP4*() (GH-8634) https://github.com/python/cpython/commit/e4dcbbd7f4ac18d01c0ec85f64ae98b8281ed403 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:12:36 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Aug 2018 02:12:36 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1533607956.74.0.56676864532.issue18540@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:12:44 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Aug 2018 02:12:44 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1533607964.21.0.56676864532.issue18540@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:37:41 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 07 Aug 2018 02:37:41 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1533609461.56.0.56676864532.issue18540@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 5799e5a84c78eac672e5f5f4f3fd2d903ba51a9d by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-18540: Fix EAI_NONAME in imaplib.IMAP4*() (GH-8634) https://github.com/python/cpython/commit/5799e5a84c78eac672e5f5f4f3fd2d903ba51a9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:38:08 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 07 Aug 2018 02:38:08 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1533609488.16.0.56676864532.issue18540@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 671a13a7b6ff1022a6fd868e5842687123ab9fd1 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-18540: Fix EAI_NONAME in imaplib.IMAP4*() (GH-8634) https://github.com/python/cpython/commit/671a13a7b6ff1022a6fd868e5842687123ab9fd1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:38:52 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 07 Aug 2018 02:38:52 +0000 Subject: [issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18 In-Reply-To: <1374657571.18.0.17831195671.issue18540@psf.upfronthosting.co.za> Message-ID: <1533609532.62.0.56676864532.issue18540@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 00:39:32 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 07 Aug 2018 04:39:32 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533616772.87.0.56676864532.issue34296@psf.upfronthosting.co.za> INADA Naoki added the comment: * While this issue is "pre warming VM", VM startup is not significant part of your 500ms. * You're talking about application specific strategy now. It's different of this issue. And many ideas like yours are already discussed on ML, again and again. I feel nothing is new or concrete. It's not productive at all. I want to close this issue. Please give us more concrete idea or patch with target sample application you want to optimize. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 00:49:59 2018 From: report at bugs.python.org (David Kopec) Date: Tue, 07 Aug 2018 04:49:59 +0000 Subject: [issue31689] random.choices does not work with negative weights In-Reply-To: <1507121599.13.0.213398074469.issue31689@psf.upfronthosting.co.za> Message-ID: <1533617399.6.0.56676864532.issue31689@psf.upfronthosting.co.za> David Kopec added the comment: It's not a bug, but I agree with Allen that it could use a much more clear error message. I think his proposed ValueError makes a lot more sense than just raising an IndexError as currently occurs. This will help people debug their programs who don't even realize they're accidentally using negative weights to begin with. ---------- nosy: +davecom versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 01:33:25 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Tue, 07 Aug 2018 05:33:25 +0000 Subject: [issue34343] Why is turtle still present in python embedded for Windows? In-Reply-To: <1533547471.89.0.56676864532.issue34343@psf.upfronthosting.co.za> Message-ID: <1533620005.13.0.56676864532.issue34343@psf.upfronthosting.co.za> Vlad Tudorache added the comment: Thank you very much. Then I will simply remove it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 03:56:44 2018 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Aug 2018 07:56:44 +0000 Subject: [issue34348] Python 3.7 - Issues Installing Scikit Learn In-Reply-To: <1533580694.5.0.56676864532.issue34348@psf.upfronthosting.co.za> Message-ID: <1533628604.08.0.56676864532.issue34348@psf.upfronthosting.co.za> Mark Dickinson added the comment: Have you reported this upstream to the scikit-learn folks? scikit-learn is not part of core Python, so there's probably not a lot we can do here. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 04:07:14 2018 From: report at bugs.python.org (TROUVERIE Joachim) Date: Tue, 07 Aug 2018 08:07:14 +0000 Subject: [issue29612] TarFile.extract() suffers from hard links inside tarball In-Reply-To: <1487671846.82.0.103027933595.issue29612@psf.upfronthosting.co.za> Message-ID: <1533629234.42.0.56676864532.issue29612@psf.upfronthosting.co.za> Change by TROUVERIE Joachim : ---------- pull_requests: +8192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 05:24:40 2018 From: report at bugs.python.org (Alisue Lambda) Date: Tue, 07 Aug 2018 09:24:40 +0000 Subject: [issue33350] WinError 10038 is raised when loop.sock_connect is wrapped with asyncio.wait_for In-Reply-To: <1524588676.0.0.682650639539.issue33350@psf.upfronthosting.co.za> Message-ID: <1533633880.33.0.56676864532.issue33350@psf.upfronthosting.co.za> Alisue Lambda added the comment: I use the following patch to fix the behavior in Windows. ``` import sys if sys.platform != 'win32': def patch(): pass else: def patch(): """Patch selectors.SelectSelector to fix WinError 10038 in Windows Ref: https://bugs.python.org/issue33350 """ import select from selectors import SelectSelector def _select(self, r, w, _, timeout=None): try: r, w, x = select.select(r, w, w, timeout) except OSError as e: if hasattr(e, 'winerror') and e.winerror == 10038: # descriptors may already be closed return [], [], [] raise else: return r, w + x, [] SelectSelector._select = _select ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 05:56:50 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 07 Aug 2018 09:56:50 +0000 Subject: [issue34349] asyncio.wait should accept generator of tasks as first argument In-Reply-To: <1533584466.72.0.56676864532.issue34349@psf.upfronthosting.co.za> Message-ID: <1533635810.17.0.56676864532.issue34349@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 06:50:15 2018 From: report at bugs.python.org (Conrad Ho) Date: Tue, 07 Aug 2018 10:50:15 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533639015.94.0.56676864532.issue24255@psf.upfronthosting.co.za> Conrad Ho added the comment: Hi Sanyam, were you able to fix the CI errors? The fixes for the infinite loop that you are seeing in your PR CI run and the changes to test correct logging (vs testing stdout) etc are in my original patch already. I've checked that the test suite passes with my patch. Otherwise, should I try to submit a PR / what's the best way to move this forward? It's my first contribution to cpython! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 07:43:06 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 07 Aug 2018 11:43:06 +0000 Subject: [issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation? In-Reply-To: <1509753073.77.0.213398074469.issue31940@psf.upfronthosting.co.za> Message-ID: <1533642186.77.0.56676864532.issue31940@psf.upfronthosting.co.za> Change by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 07:53:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Aug 2018 11:53:25 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1533642805.74.0.56676864532.issue34284@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue5322 may has a relation to this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 10:20:15 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 07 Aug 2018 14:20:15 +0000 Subject: [issue34349] asyncio.wait should accept generator of tasks as first argument In-Reply-To: <1533584466.72.0.56676864532.issue34349@psf.upfronthosting.co.za> Message-ID: <1533651615.32.0.56676864532.issue34349@psf.upfronthosting.co.za> Yury Selivanov added the comment: Since we're deprecating generator-based coroutines anyways, I too think that the check can be relaxed. ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 10:46:04 2018 From: report at bugs.python.org (Abhishek Reddy) Date: Tue, 07 Aug 2018 14:46:04 +0000 Subject: [issue34348] Python 3.7 - Issues Installing Scikit Learn In-Reply-To: <1533628604.08.0.56676864532.issue34348@psf.upfronthosting.co.za> Message-ID: Abhishek Reddy added the comment: Hi Mark, Thank you for your update. How do I reach to the upstream scikit-learn folks ? Thanks, Abhishek ?On 8/7/18, 2:56 AM, "Mark Dickinson" wrote: Mark Dickinson added the comment: Have you reported this upstream to the scikit-learn folks? scikit-learn is not part of core Python, so there's probably not a lot we can do here. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 10:55:20 2018 From: report at bugs.python.org (Abhishek Reddy) Date: Tue, 07 Aug 2018 14:55:20 +0000 Subject: [issue34351] Python 3.7 - Issues Installing Scikit Learn Message-ID: <1533653720.64.0.56676864532.issue34351@psf.upfronthosting.co.za> New submission from Abhishek Reddy : Hi I am currently encountering below issues when trying to install any version of Scikit Learn (0.19.0 or 0.19.1 or 0.19.2) on Linux - RHEL / Centos 7 OS. Few months back I could successfully install scikit-learn under python 2.7 without issues. When I re-run the installation of scikit-learn package under python 2.7 its failing with the same below error. I have installed all the required dependencies of OS and Python packages for scikit-learn Python Version - 3.7 /usr/local/bsb-python37 - Custom Location in which I configured and installed Python 3.7 I have installed all the prerequisite - OS packages - bias-devel , lapack-devel , atlas-devel. Earlier when I installed Python 2.7 I didn't run into any issues. Now when I re-try to install the scikit learn under Python 2.7 I am running into the same issue and the earlier successful installed version of scikit learn is corrupted. Error # /usr/local/bsb-python37/bin/python3.7 setup.py install --prefix=/usr/local/bsb-python37 Partial import of sklearn during the build process. blas_opt_info: blas_mkl_info: customize UnixCCompiler libraries mkl_rt not found in ['/usr/local/bsb-python37/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/'] NOT AVAILABLE blis_info: customize UnixCCompiler libraries blis not found in ['/usr/local/bsb-python37/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/'] NOT AVAILABLE error: Command "g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/bsb-python37/lib/python3.7/site-packages/numpy-1.14.5-py3.7-linux-x86_64.egg/numpy/core/include -I/usr/local/bsb-python37/lib/python3.7/site-packages/numpy-1.14.5-py3.7-linux-x86_64.egg/numpy/core/include -I/usr/local/bsb-python37/include/python3.7m -c sklearn/cluster/_dbscan_inner.cpp -o build/temp.linux-x86_64-3.7/sklearn/cluster/_dbscan_inner.o -MMD -MF build/temp.linux-x86_64-3.7/sklearn/cluster/_dbscan_inner.o.d" failed with exit status 1 Any help is greatly appreciated. I tried to google around and did all that I could try. No luck. Thanks, Abhishek ---------- components: Library (Lib) messages: 323243 nosy: abhishekreddyc priority: normal severity: normal status: open title: Python 3.7 - Issues Installing Scikit Learn type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 11:17:29 2018 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Aug 2018 15:17:29 +0000 Subject: [issue34348] Python 3.7 - Issues Installing Scikit Learn In-Reply-To: <1533580694.5.0.56676864532.issue34348@psf.upfronthosting.co.za> Message-ID: <1533655049.57.0.56676864532.issue34348@psf.upfronthosting.co.za> Mark Dickinson added the comment: > How do I reach to the upstream scikit-learn folks ? See http://scikit-learn.org/stable/support.html Closing here. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 11:24:36 2018 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Aug 2018 15:24:36 +0000 Subject: [issue34351] Python 3.7 - Issues Installing Scikit Learn In-Reply-To: <1533653720.64.0.56676864532.issue34351@psf.upfronthosting.co.za> Message-ID: <1533655476.86.0.56676864532.issue34351@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as duplicate of #34348. ---------- nosy: +mark.dickinson resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 12:52:40 2018 From: report at bugs.python.org (Anthony Guevara) Date: Tue, 07 Aug 2018 16:52:40 +0000 Subject: [issue34352] Using tailf with python3.4 Message-ID: <1533660760.63.0.56676864532.issue34352@psf.upfronthosting.co.za> New submission from Anthony Guevara : When using tailf with Python2.7 there are no issues. When using tailf with Python3.4 some print statements use the old version 2 style. Python3 also complains about an implicit conversion. I have included a patch. ---------- components: Distutils files: tailf.patch keywords: patch messages: 323246 nosy: amboxer21, dstufft, eric.araujo priority: normal severity: normal status: open title: Using tailf with python3.4 type: crash versions: Python 3.4 Added file: https://bugs.python.org/file47734/tailf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 12:57:04 2018 From: report at bugs.python.org (Zachary Ware) Date: Tue, 07 Aug 2018 16:57:04 +0000 Subject: [issue34352] Using tailf with python3.4 In-Reply-To: <1533660760.63.0.56676864532.issue34352@psf.upfronthosting.co.za> Message-ID: <1533661024.01.0.56676864532.issue34352@psf.upfronthosting.co.za> Zachary Ware added the comment: That appears to be a third-party project, though I can't find it via Google. You'll need to submit your patch to that project; there's nothing we can do with it here. ---------- components: -Distutils nosy: +zach.ware resolution: -> third party stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 13:23:14 2018 From: report at bugs.python.org (G) Date: Tue, 07 Aug 2018 17:23:14 +0000 Subject: [issue34353] stat's python implementation of filemode (fallback) doesn't behave like the C implementation Message-ID: <1533662594.31.0.56676864532.issue34353@psf.upfronthosting.co.za> New submission from G : stat.py (Lib/stat.py)'s implementation of filemode doesn't account for socket-type files, while _stat (Modules/_stat.c) does, using S_IFSOCK. ---------- components: Library (Lib) messages: 323248 nosy: gpery priority: normal severity: normal status: open title: stat's python implementation of filemode (fallback) doesn't behave like the C implementation type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 13:28:48 2018 From: report at bugs.python.org (G) Date: Tue, 07 Aug 2018 17:28:48 +0000 Subject: [issue34353] stat's python implementation of filemode (fallback) doesn't behave like the C implementation In-Reply-To: <1533662594.31.0.56676864532.issue34353@psf.upfronthosting.co.za> Message-ID: <1533662928.39.0.56676864532.issue34353@psf.upfronthosting.co.za> Change by G : ---------- keywords: +patch pull_requests: +8193 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 15:07:56 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 07 Aug 2018 19:07:56 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533668876.9.0.56676864532.issue24255@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Hey Conrad, I've merged your fixes as well. They are in the PR now. Also added your name in the NEWS entry :) @Vinay, I noticed that there are linting errors in `test_logging.py`. Does it make sense to issue a separate Pull Request to fix those? Currently, I've fixed them in the current Pull Request. Please let me know :) ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 16:23:35 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 07 Aug 2018 20:23:35 +0000 Subject: [issue34347] AIX: test_utf8_mode.test_cmd_line fails In-Reply-To: <1533571610.9.0.56676864532.issue34347@psf.upfronthosting.co.za> Message-ID: <1533673415.26.0.56676864532.issue34347@psf.upfronthosting.co.za> Michael Felt added the comment: Common "experts" - feedback needed! Original test test_utf8_mode failed -- Traceback (most recent call last): File "/data/prj/python/git/python3-3.8/Lib/test/test_utf8_mode.py", line 225, in test_cmd_line check('utf8=0', [c_arg], LC_ALL='C') File "/data/prj/python/git/python3-3.8/Lib/test/test_utf8_mode.py", line 217, in check self.assertEqual(args, ascii(expected), out) AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != "['h\\udcc3\\udca9\\udce2\\udc82\\udcac']" - ['h\xc3\xa9\xe2\x82\xac'] + ['h\udcc3\udca9\udce2\udc82\udcac'] : ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] Modification #1: if sys.platform == 'darwin' or support.is_android: c_arg = arg_utf8 elif sys.platform.startswith("aix"): c_arg = arg_ascii.encode('utf-8', 'surrogateescape') else: c_arg = arg_ascii check('utf8=0', [c_arg], LC_ALL='C') Result: AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != "[b'h\\xc3\\xa9\\xe2\\x82\\xac']" - ['h\xc3\xa9\xe2\x82\xac'] + [b'h\xc3\xa9\xe2\x82\xac'] ? + : ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] Modifiction #2: if sys.platform == 'darwin' or support.is_android: c_arg = arg_utf8 elif sys.platform.startswith("aix"): c_arg = arg else: c_arg = arg_ascii check('utf8=0', [c_arg], LC_ALL='C') AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != "[b'h\\xc3\\xa9\\xe2\\x82\\xac']" - ['h\xc3\xa9\xe2\x82\xac'] + [b'h\xc3\xa9\xe2\x82\xac'] ? + : ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] The "expected" continues to be a "bytes" object, while the CLI code returns a non-byte string. Or - the original has an ascii string object but uses \udc rather than \x \udc is common (i.e., I see it frequently in googled results on other things) - should something in ascii() be changed to output \udc rather than \x ? Thx! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 16:29:10 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 07 Aug 2018 20:29:10 +0000 Subject: [issue34335] Fix examples in asyncio docs (suppliment to bpo-32258) In-Reply-To: <1533423382.45.0.56676864532.issue34335@psf.upfronthosting.co.za> Message-ID: <1533673750.19.0.56676864532.issue34335@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset d2ac400267940f35d731d66c2dafafe099d770d9 by Mariatta (Mikhail Terekhov) in branch 'master': bpo-34335: Use async/await syntax in documentation examples (GH-8674) https://github.com/python/cpython/commit/d2ac400267940f35d731d66c2dafafe099d770d9 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 16:29:30 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Aug 2018 20:29:30 +0000 Subject: [issue34335] Fix examples in asyncio docs (suppliment to bpo-32258) In-Reply-To: <1533423382.45.0.56676864532.issue34335@psf.upfronthosting.co.za> Message-ID: <1533673770.61.0.56676864532.issue34335@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8195 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 16:33:35 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 07 Aug 2018 20:33:35 +0000 Subject: [issue34335] Fix examples in asyncio docs (suppliment to bpo-32258) In-Reply-To: <1533423382.45.0.56676864532.issue34335@psf.upfronthosting.co.za> Message-ID: <1533674015.31.0.56676864532.issue34335@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fac49762c53822c40f24dcb5ca4945cffdf40cd9 by Miss Islington (bot) in branch '3.7': bpo-34335: Use async/await syntax in documentation examples (GH-8674) https://github.com/python/cpython/commit/fac49762c53822c40f24dcb5ca4945cffdf40cd9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 17:03:52 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 07 Aug 2018 21:03:52 +0000 Subject: [issue34335] Fix examples in asyncio docs (suppliment to bpo-32258) In-Reply-To: <1533423382.45.0.56676864532.issue34335@psf.upfronthosting.co.za> Message-ID: <1533675832.42.0.56676864532.issue34335@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 17:06:20 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 07 Aug 2018 21:06:20 +0000 Subject: [issue34335] Fix examples in asyncio docs (suppliment to bpo-32258) In-Reply-To: <1533423382.45.0.56676864532.issue34335@psf.upfronthosting.co.za> Message-ID: <1533675980.37.0.56676864532.issue34335@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 17:40:43 2018 From: report at bugs.python.org (Cyker Way) Date: Tue, 07 Aug 2018 21:40:43 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533678043.0.0.56676864532.issue34296@psf.upfronthosting.co.za> Cyker Way added the comment: > While this issue is "pre warming VM", VM startup is not significant part of your 500ms. 10-20ms should be OK for shell scripts. But a fork is still faster. > You're talking about application specific strategy now. It's different of this issue. Actually, this issue is created to look for a generic approach that can optimize the running time for most, or even all, python scripts. Different scripts may import different modules, but this doesn't mean there isn't a method that works for all of them. > And many ideas like yours are already discussed on ML, again and again. I browsed about 6-7 threads on python-dev. I think 2-3 of them provide great information. But I don't think any of them gives concrete solutions. So we are still facing this problem today. > I want to close this issue. Please give us more concrete idea or patch with target sample application you want to optimize. As said I'm looking for a generic approach. So optimizing specific applications isn't really the goal of this issue (though work on specific modules still helps). I did implement a proof of concept (link: ) for the fork-exec startup approach. It's still very rough and elementary, but proves this approach has its value. As Nick said: > ...the CPython runtime is highly configurable, so it's far from clear what, if anything, could be shared from run to run... What I hope is we can inspect these configurations and figure out the invariants. This would help us make a clean environment as the forking base. If this is impossible, I think we can still fork from a known interpreter state chosen by the user script author. You may close this issue if nobody has more to say, but I hope the fork-exec startup can be standardized one day as I believe, for quick scripts, however much you optimize the cold start it can't be faster than a fork. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 18:42:55 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 07 Aug 2018 22:42:55 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533681775.71.0.56676864532.issue24255@psf.upfronthosting.co.za> R. David Murray added the comment: We generally do not fix "linting errors" unless they reveal logic errors or we touch the lines of code for some other reason. We also follow the existing style of a module rather than any particular style guide (the stdlib modules are often older than all of the style guides...even PEP8). In short, omit those changes from your PR, and don't bother creating a separate one, it would just get rejected ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 20:29:59 2018 From: report at bugs.python.org (Nikolas Vanderhoof) Date: Wed, 08 Aug 2018 00:29:59 +0000 Subject: [issue34338] abstractmethod can run on classes In-Reply-To: <1533486586.96.0.56676864532.issue34338@psf.upfronthosting.co.za> Message-ID: <1533688199.66.0.56676864532.issue34338@psf.upfronthosting.co.za> Nikolas Vanderhoof added the comment: This behavior is consistent with the behavior described in the documentation for `@classmethod`. https://docs.python.org/3.6/library/functions.html?highlight=classmethod#classmethod "It can be called either on the class (such as C.f()) or on an instance (such as C().f())." In this case, it can't be called on an instance because it is abstract, but since it's a classmethod, it is still okay to call it on the class directly. ---------- nosy: +nikvanderhoof _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 20:32:28 2018 From: report at bugs.python.org (Nikolas Vanderhoof) Date: Wed, 08 Aug 2018 00:32:28 +0000 Subject: [issue34338] abstractmethod can run on classes In-Reply-To: <1533486586.96.0.56676864532.issue34338@psf.upfronthosting.co.za> Message-ID: <1533688348.97.0.56676864532.issue34338@psf.upfronthosting.co.za> Nikolas Vanderhoof added the comment: I've also posted that response on stackoverflow to your question in case others have the same confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 22:35:47 2018 From: report at bugs.python.org (Glenn Linderman) Date: Wed, 08 Aug 2018 02:35:47 +0000 Subject: [issue28044] Make the sidebar in the documentation follow the section automatically In-Reply-To: <1473423727.81.0.401970346659.issue28044@psf.upfronthosting.co.za> Message-ID: <1533695747.27.0.56676864532.issue28044@psf.upfronthosting.co.za> Glenn Linderman added the comment: Nice implementation of sticky sidebar. https://css-tricks.com/sticky-smooth-active-nav/#more-273952 I haven't looked at the patch, and don't know what R. David Murray doesn't like about how it works, but I find the Python sidebar extremely annoying because it scrolls off the top, and would rather it stayed around visible. ---------- nosy: +v+python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 22:50:23 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 08 Aug 2018 02:50:23 +0000 Subject: [issue28044] Make the sidebar in the documentation follow the section automatically In-Reply-To: <1473423727.81.0.401970346659.issue28044@psf.upfronthosting.co.za> Message-ID: <1533696623.57.0.56676864532.issue28044@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Really sorry, but this issue is now out of date, and the patch no longer applies. The Python documentation theme is now being tracked in https://github.com/python/python-docs-theme/ Perhaps bring up this issue there? Thanks. ---------- nosy: +Mariatta resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 22:58:08 2018 From: report at bugs.python.org (Glenn Linderman) Date: Wed, 08 Aug 2018 02:58:08 +0000 Subject: [issue28044] Make the sidebar in the documentation follow the section automatically In-Reply-To: <1473423727.81.0.401970346659.issue28044@psf.upfronthosting.co.za> Message-ID: <1533697088.6.0.56676864532.issue28044@psf.upfronthosting.co.za> Glenn Linderman added the comment: Uh, thanks, I guess, but it wasn't marked out of date or resolved or closed when I commented. I haven't used the GitHub issue tracker. Sigh. There should be a link here to the issue that was copied there, to make it easy and obvious? ---------- nosy: -Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 23:08:32 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 08 Aug 2018 03:08:32 +0000 Subject: [issue28044] Make the sidebar in the documentation follow the section automatically In-Reply-To: <1473423727.81.0.401970346659.issue28044@psf.upfronthosting.co.za> Message-ID: <1533697712.21.0.56676864532.issue28044@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: You can file a new issue in https://github.com/python/python-docs-theme/ and just add a link to this issue from GitHub in the description. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 23:35:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 08 Aug 2018 03:35:40 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533678043.0.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: On Wed, Aug 8, 2018 at 6:40 AM Cyker Way wrote: > > Cyker Way added the comment: > > > While this issue is "pre warming VM", VM startup is not significant part of your 500ms. > > 10-20ms should be OK for shell scripts. But a fork is still faster. > > > You're talking about application specific strategy now. It's different of this issue. > > Actually, this issue is created to look for a generic approach that can optimize the running time for most, or even all, python scripts. Different scripts may import different modules, but this doesn't mean there isn't a method that works for all of them. > "Fork before loading any modules" and "fork after loading application" are totally different. It's not generic. Former can be done by Python core, but I'm not sure it's really helpful. Later can be done in some framework. And it can be battle tested on 3rd party CLI framework before adding it to Python stdlib. > > And many ideas like yours are already discussed on ML, again and again. > > I browsed about 6-7 threads on python-dev. I think 2-3 of them provide great information. But I don't think any of them gives concrete solutions. So we are still facing this problem today. > I didn't mean it's solved. I meant many people said same idea again and again, and I'm tired to read such random ideas. Python provides os.fork already. People can use it. CLI frameworks can use it. So what Python should be provide additionally? > > I want to close this issue. Please give us more concrete idea or patch with target sample application you want to optimize. > > As said I'm looking for a generic approach. So optimizing specific applications isn't really the goal of this issue (though work on specific modules still helps). I did implement a proof of concept (link: ) for the fork-exec startup approach. It's still very rough and elementary, but proves this approach has its value. As Nick said: > I doubt there is generic and safe approach which is fit in stdlib. For example, your PoC includes several considerable points: * Different Python, venv, or application version may listen the unix socket. * Where should be the socket listen? How about socket permission? * Environment variable may be differ. * When the server is not used for a long time, it should be exit automatically. Client start server if there are no server listening. I prefer battle-testing idea as 3rd party tool first. Then, we can discuss about we should add it on stdlib or not. "Add it on PyPI first" approach has several benefits: * It can be used with older Python. * It can be evolve quickly than Python's 1.5year release cycle. > > ...the CPython runtime is highly configurable, so it's far from clear what, if anything, could be shared from run to run... > > What I hope is we can inspect these configurations and figure out the invariants. This would help us make a clean environment as the forking base. If this is impossible, I think we can still fork from a known interpreter state chosen by the user script author. You may close this issue if nobody has more to say, but I hope the fork-exec startup can be standardized one day as I believe, for quick scripts, however much you optimize the cold start it can't be faster than a fork. > It relating only with "former" (fork before loading application) approach. I don't think it's really worth enough. Benefits will be very small compared to it's danger and complexity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 01:21:01 2018 From: report at bugs.python.org (Vinicius Pacheco) Date: Wed, 08 Aug 2018 05:21:01 +0000 Subject: [issue34354] Memory leak on _testCongestion Message-ID: <1533705661.31.0.56676864532.issue34354@psf.upfronthosting.co.za> New submission from Vinicius Pacheco : Following this document https://devguide.python.org/ to compile the python I've got a memory leak on the test _testCongestion. This test is on the file Lib/test/test_socket.py. The line that show me the issue is: while True: self.cli.sendto(self.data, 0, (HOST, self.port)) The process enters on the "while" and never finish. I'm using a Fedora 28 on this test. ---------- components: Interpreter Core messages: 323262 nosy: Vinicius Pacheco priority: normal severity: normal status: open title: Memory leak on _testCongestion type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 02:47:22 2018 From: report at bugs.python.org (Yohan Boniface) Date: Wed, 08 Aug 2018 06:47:22 +0000 Subject: [issue34355] SIGSEGV (Address boundary error) Message-ID: <1533710842.16.0.56676864532.issue34355@psf.upfronthosting.co.za> New submission from Yohan Boniface : Hi! Just installed 3.7 (ArchLinux) and I've a SIGSEGV on one of my projects. I've a hard time reducing to a minimal testcase, because it seems whatever random piece of code I remove the crash disappears at some point. Here is the repository: https://framagit.org/ybon/trefle To reproduce, install the project in a 3.7 venv with `python setup.py develop` then run `python trefle/bin.py` (or even `python -c 'from trefle import routine'`). Here is the output I have: ``` Initializing config Done initializing config fish: ?python trefle/bin.py? terminated by signal SIGSEGV (Address boundary error) ``` Here are some elements: - if I run the code with PYTHONMALLOC=debug, I have no crash - the project is using quite a lot of unicode (French content written in config files), even in some file names - the project is using asyncio (but it does not seem directly related at first look) - it is running without issue as is on python 3.6 Here is a gdb backtrace: ``` $ gdb python GNU gdb (GDB) 8.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from python...(no debugging symbols found)...done. (gdb) run trefle/bin.py Starting program: /home/ybon/.virtualenvs/trefle/bin/python trefle/bin.py [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Initializing config Done initializing config Program received signal SIGSEGV, Segmentation fault. 0x00007ffff791a9ce in PyObject_Malloc () from /usr/lib/libpython3.7m.so.1.0 (gdb) backtrace #0 0x00007ffff791a9ce in PyObject_Malloc () from /usr/lib/libpython3.7m.so.1.0 #1 0x00007ffff79fec6e in ?? () from /usr/lib/libpython3.7m.so.1.0 #2 0x00007ffff7a05874 in PyParser_ASTFromStringObject () from /usr/lib/libpython3.7m.so.1.0 #3 0x00007ffff7a693f2 in Py_CompileStringObject () from /usr/lib/libpython3.7m.so.1.0 #4 0x00007ffff7a695c3 in ?? () from /usr/lib/libpython3.7m.so.1.0 #5 0x00007ffff795963f in _PyMethodDef_RawFastCallDict () from /usr/lib/libpython3.7m.so.1.0 #6 0x00007ffff79597d1 in _PyCFunction_FastCallDict () from /usr/lib/libpython3.7m.so.1.0 #7 0x00007ffff79f7e16 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #8 0x00007ffff7939069 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.7m.so.1.0 #9 0x00007ffff7980982 in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #10 0x00007ffff79f3142 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #11 0x00007ffff7939069 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.7m.so.1.0 #12 0x00007ffff7980982 in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #13 0x00007ffff79f2225 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #14 0x00007ffff79807db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #15 0x00007ffff79f2225 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #16 0x00007ffff79807db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #17 0x00007ffff79f2225 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #18 0x00007ffff79807db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #19 0x00007ffff79f23cd in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #20 0x00007ffff79807db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #21 0x00007ffff79f23cd in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #22 0x00007ffff793a08b in _PyFunction_FastCallDict () from /usr/lib/libpython3.7m.so.1.0 #23 0x00007ffff7949888 in ?? () from /usr/lib/libpython3.7m.so.1.0 #24 0x00007ffff79b71b9 in _PyObject_CallMethodIdObjArgs () from /usr/lib/libpython3.7m.so.1.0 #25 0x00007ffff792e285 in PyImport_ImportModuleLevelObject () from /usr/lib/libpython3.7m.so.1.0 #26 0x00007ffff79f4434 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #27 0x00007ffff7939069 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.7m.so.1.0 #28 0x00007ffff7939f34 in PyEval_EvalCodeEx () from /usr/lib/libpython3.7m.so.1.0 #29 0x00007ffff7939f5c in PyEval_EvalCode () from /usr/lib/libpython3.7m.so.1.0 #30 0x00007ffff7a05a64 in ?? () from /usr/lib/libpython3.7m.so.1.0 #31 0x00007ffff7959709 in _PyMethodDef_RawFastCallDict () from /usr/lib/libpython3.7m.so.1.0 #32 0x00007ffff79597d1 in _PyCFunction_FastCallDict () from /usr/lib/libpython3.7m.so.1.0 #33 0x00007ffff79f7e16 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #34 0x00007ffff7939069 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.7m.so.1.0 #35 0x00007ffff7980982 in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #36 0x00007ffff79f6933 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #37 0x00007ffff79807db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #38 0x00007ffff79f2225 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #39 0x00007ffff79807db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #40 0x00007ffff79f23cd in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #41 0x00007ffff79807db in _PyFunction_FastCallKeywords () from /usr/lib/libpython3.7m.so.1.0 #42 0x00007ffff79f23cd in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #43 0x00007ffff793a08b in _PyFunction_FastCallDict () from /usr/lib/libpython3.7m.so.1.0 #44 0x00007ffff7949888 in ?? () from /usr/lib/libpython3.7m.so.1.0 #45 0x00007ffff79b71b9 in _PyObject_CallMethodIdObjArgs () from /usr/lib/libpython3.7m.so.1.0 #46 0x00007ffff792e285 in PyImport_ImportModuleLevelObject () from /usr/lib/libpython3.7m.so.1.0 #47 0x00007ffff79f4434 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.7m.so.1.0 #48 0x00007ffff7939069 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.7m.so.1.0 #49 0x00007ffff7939f34 in PyEval_EvalCodeEx () from /usr/lib/libpython3.7m.so.1.0 #50 0x00007ffff7939f5c in PyEval_EvalCode () from /usr/lib/libpython3.7m.so.1.0 #51 0x00007ffff7a68770 in ?? () from /usr/lib/libpython3.7m.so.1.0 #52 0x00007ffff7a6a54a in PyRun_FileExFlags () from /usr/lib/libpython3.7m.so.1.0 #53 0x00007ffff7a6bac5 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.7m.so.1.0 #54 0x00007ffff7a6da8f in ?? () from /usr/lib/libpython3.7m.so.1.0 #55 0x00007ffff7a6e420 in _Py_UnixMain () from /usr/lib/libpython3.7m.so.1.0 #56 0x00007ffff7dc9003 in __libc_start_main () from /usr/lib/libc.so.6 #57 0x000055555555477a in _start () ``` Thanks for your help on tracking this! :) Yohan ---------- components: asyncio messages: 323263 nosy: asvetlov, ybon, yselivanov priority: normal severity: normal status: open title: SIGSEGV (Address boundary error) type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 03:02:16 2018 From: report at bugs.python.org (Neil Booth) Date: Wed, 08 Aug 2018 07:02:16 +0000 Subject: [issue30105] Duplicated connection_made() call for some SSL connections In-Reply-To: <1492641406.9.0.0965010091679.issue30105@psf.upfronthosting.co.za> Message-ID: <1533711736.77.0.56676864532.issue30105@psf.upfronthosting.co.za> Neil Booth added the comment: Can someone close this please; I submitted this and no longer see it with recent Python versions; I suspect it has been fixed by one of the many SSL fixes in the last 12 months ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 03:24:40 2018 From: report at bugs.python.org (chris) Date: Wed, 08 Aug 2018 07:24:40 +0000 Subject: [issue34309] Trouble when reloading extension modules. In-Reply-To: <1533144973.44.0.56676864532.issue34309@psf.upfronthosting.co.za> Message-ID: <1533713080.84.0.56676864532.issue34309@psf.upfronthosting.co.za> chris added the comment: For short-term / mid-term we have now decided to start python as seperate process and interact with some kind of IPC. That leads to a limited interaction model between python and the embedded app but it has the advantage that unloading is possible (by simply restarting python). Hopefully, at some day python will have better support for unloading / reloading extension modules, but as some pointed out this will take time also until extension modules adopt new API discussed in the PEPs. Thanks for discussion and information! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 03:29:54 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 08 Aug 2018 07:29:54 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533713394.84.0.56676864532.issue34296@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This might be a useful feature but I think it would be better to develop this outside the stdlib, especially when the mechanism needs application specific code (such as preloading modules used by a specific script). If/when such a tool has enough traction on PyPI we can always reconsider including it in the stdlib. BTW. Python runs on a number of platforms where a forking server (option 2 in msg322800) is less useful. In particular Windows which doesn't have "fork" behaviour. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 03:30:27 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 08 Aug 2018 07:30:27 +0000 Subject: [issue34355] SIGSEGV (Address boundary error) In-Reply-To: <1533710842.16.0.56676864532.issue34355@psf.upfronthosting.co.za> Message-ID: <1533713427.64.0.56676864532.issue34355@psf.upfronthosting.co.za> Julien Palard added the comment: Can reproduce with python3.7 from Debian packages, but can't reproduce with a python3.7 built with --with-pydebug. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 03:52:04 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Wed, 08 Aug 2018 07:52:04 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1533714724.68.0.56676864532.issue24255@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Yeah, that is understandable. I've reverted major chunk of it. Just in the http client file, I've added blank lines where ever necessary (which I think won't change the blame information for any of the code :)) Would that be okay? Also, I did a change in the test to redirect the `output` from `test.support` to `stdout` in order to test the changes, but seems like the CI failed because the environment of test was changed. Is there a better method to accomplish it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 04:02:58 2018 From: report at bugs.python.org (Xavier Hardy) Date: Wed, 08 Aug 2018 08:02:58 +0000 Subject: [issue34356] Add support for args and kwargs in logging.conf Message-ID: <1533715378.01.0.56676864532.issue34356@psf.upfronthosting.co.za> New submission from Xavier Hardy : The behavior of formatters and handlers in logging.conf files is inconsistent. With handlers, it is possible to add custom (keyword and non-keyword) arguments, but it is not possible for formatters (only class, format, datefmt, style). https://github.com/python/cpython/blob/master/Lib/logging/config.py#L112 https://github.com/python/cpython/blob/master/Lib/logging/config.py#L141 I'll try to submit a pull request as soon as possible. ---------- messages: 323269 nosy: xavier.hardy priority: normal severity: normal status: open title: Add support for args and kwargs in logging.conf type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 05:50:09 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 Aug 2018 09:50:09 +0000 Subject: [issue34355] SIGSEGV (Address boundary error) In-Reply-To: <1533710842.16.0.56676864532.issue34355@psf.upfronthosting.co.za> Message-ID: <1533721809.16.0.56676864532.issue34355@psf.upfronthosting.co.za> St?phane Wirtel added the comment: With the last revision of 3.7 (w/o --with-debug), I don't get this issue on Fedora 28 :/ ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 05:51:31 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 Aug 2018 09:51:31 +0000 Subject: [issue34355] SIGSEGV (Address boundary error) In-Reply-To: <1533710842.16.0.56676864532.issue34355@psf.upfronthosting.co.za> Message-ID: <1533721891.95.0.56676864532.issue34355@psf.upfronthosting.co.za> St?phane Wirtel added the comment: and what's the issue with asyncio ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 05:52:58 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 Aug 2018 09:52:58 +0000 Subject: [issue34355] SIGSEGV (Address boundary error) In-Reply-To: <1533710842.16.0.56676864532.issue34355@psf.upfronthosting.co.za> Message-ID: <1533721978.35.0.56676864532.issue34355@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- components: -asyncio nosy: -asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 06:46:23 2018 From: report at bugs.python.org (Yohan Boniface) Date: Wed, 08 Aug 2018 10:46:23 +0000 Subject: [issue34355] SIGSEGV (Address boundary error) In-Reply-To: <1533710842.16.0.56676864532.issue34355@psf.upfronthosting.co.za> Message-ID: <1533725183.14.0.56676864532.issue34355@psf.upfronthosting.co.za> Yohan Boniface added the comment: Thanks all :) As noted by Julien, to reproduce the test cases, one also needs to install the dev requirements (or just `pip instal minicli hupper`): pip install -r requirements-dev.txt > and what's the issue with asyncio ? Nothing specific as far as I can tell. I mentioned it because not all projects use asyncio so I thought it was an significative point to have in mind, just in case. Also I blindly checked "asyncio" in the "Components" because the project does use asyncio, without foreseeing that this would point asyncio as a guilty and that asyncio maintainers would have been specifically CCed. Thanks for fixing this. One other thing to notice just in case: the code base do have unicode chars (in comments, strings and raw strings). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 07:04:45 2018 From: report at bugs.python.org (Farzeen) Date: Wed, 08 Aug 2018 11:04:45 +0000 Subject: [issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work In-Reply-To: <1532623484.23.0.56676864532.issue34238@psf.upfronthosting.co.za> Message-ID: <1533726285.23.0.56676864532.issue34238@psf.upfronthosting.co.za> Farzeen added the comment: Arch Linux is also affected. Steps to reproduce: ``` $ python Python 3.7.0 (default, Jul 15 2018, 10:44:58) [GCC 8.1.1 20180531] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.get(None) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/webbrowser.py", line 42, in get register_standard_browsers() File "/usr/lib/python3.7/webbrowser.py", line 567, in register_standard_browsers cmd = _synthesize(cmdline, -1) File "/usr/lib/python3.7/webbrowser.py", line 116, in _synthesize register(browser, None, controller, update_tryorder) TypeError: register() takes from 2 to 3 positional arguments but 4 were given >>> ``` Workaround: ``` $ env BROWSER='' python Python 3.7.0 (default, Jul 15 2018, 10:44:58) [GCC 8.1.1 20180531] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.get(None) >>> ``` ---------- nosy: +happycoder97 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 07:15:24 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 Aug 2018 11:15:24 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch In-Reply-To: <1532158324.8.0.56676864532.issue34177@psf.upfronthosting.co.za> Message-ID: <1533726924.79.0.56676864532.issue34177@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: I think this can be closed with https://github.com/python/buildmaster-config/commit/9a456462fb891328b5b8a170522d5f56f480fdfb. The buildbots are also green now with the failure reported in https://buildbot.python.org/all/#/builders/147/builds/174 fixed with the commit. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:17:07 2018 From: report at bugs.python.org (David) Date: Wed, 08 Aug 2018 12:17:07 +0000 Subject: [issue34357] situation where urllib3 works, but urllib does not work Message-ID: <1533730627.83.0.56676864532.issue34357@psf.upfronthosting.co.za> New submission from David : Hello! Newbie to python here. I run into an issue with one desktop library, Cinnamon. Specifically this one: https://github.com/linuxmint/Cinnamon/issues/5926#issuecomment-411232144. This library uses the urllib in the standard library to download some json. But for some reason, it does not work for me. If however, I use [https://github.com/urllib3/urllib3](urllib3), it just works. It sounds like something the standard library could do better, so I'm reporting it here in case it's helpful. A minimal example would be: ```python from urllib.request import urlopen data = urlopen("https://cinnamon-spices.linuxmint.com/json/applets.json").read() print(data) ``` which just hangs for me. If I pass a specific number of bytes (less than ~65000), it works, but only downloads parts of the file. Using the equivalent code in urllib3 works just fine: ```python import urllib3 http = urllib3.PoolManager() response = http.request('GET', 'https://cinnamon-spices.linuxmint.com/json/applets.json') print(response.data) ``` This is on ``` Python 3.7.0 (default, Aug 7 2018, 23:24:26) [GCC 5.5.0 20171010] on linux ``` Any help troubleshooting this would be appreciated! ---------- messages: 323275 nosy: deivid priority: normal severity: normal status: open title: situation where urllib3 works, but urllib does not work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:26:39 2018 From: report at bugs.python.org (Sandu) Date: Wed, 08 Aug 2018 12:26:39 +0000 Subject: [issue34358] round() combined with product outputs ugly result Message-ID: <1533731199.22.0.56676864532.issue34358@psf.upfronthosting.co.za> New submission from Sandu : `from scipy import stats` `a = stats.norm.cdf(2.1882658846227234)` `round(a,4)` gives: `0.9857` `round(a,4)*100` one would expect to output 98.57. It returns: `98.57000000000001` For comparison, if I multiply with 10 or 1000 the output is as expected. ---------- messages: 323276 nosy: ursus priority: normal severity: normal status: open title: round() combined with product outputs ugly result versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:42:27 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 08 Aug 2018 12:42:27 +0000 Subject: [issue34358] round() combined with product outputs ugly result In-Reply-To: <1533731199.22.0.56676864532.issue34358@psf.upfronthosting.co.za> Message-ID: <1533732147.82.0.56676864532.issue34358@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 09:13:15 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 08 Aug 2018 13:13:15 +0000 Subject: [issue34358] round() combined with product outputs ugly result In-Reply-To: <1533731199.22.0.56676864532.issue34358@psf.upfronthosting.co.za> Message-ID: <1533733995.29.0.56676864532.issue34358@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is expected behaviour, the FAQ entry on floating point gives a good explanation about what's going on here: https://docs.python.org/3.7/tutorial/floatingpoint.html ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:16:10 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 08 Aug 2018 14:16:10 +0000 Subject: [issue34358] round() combined with product outputs ugly result In-Reply-To: <1533731199.22.0.56676864532.issue34358@psf.upfronthosting.co.za> Message-ID: <1533737770.17.0.56676864532.issue34358@psf.upfronthosting.co.za> Change by Steven D'Aprano : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:30:16 2018 From: report at bugs.python.org (Sascha Fuhrmann) Date: Wed, 08 Aug 2018 14:30:16 +0000 Subject: [issue34359] Wrong virtual environment found Message-ID: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> New submission from Sascha Fuhrmann : For my python development I have several directories on my Windows system: common: F:\python\scripts -> one-file-scripts based on python 2 F:\python\scripts3 -> one-file-scripts base on python 3 projects: F:\python\projects\timetracking ... Each directory has its own virtual environment (managed with pipenv): F:\python\scripts\.venv F:\python\scripts3\.venv F:\python\projects\timetracking\.venv Because I want to be able to call the scripts from everywhere, I added the directories to the path-environment variable. [...]F:\Python\scripts3;F:\Python\projects\timetracking[...] Let's have a look at the timetracking project. The main script (timetracking.py) has the following shebang-line: #! /usr/bin/env .venv/scripts/python.exe My current directory is the root of C When I call 'timetracking.py' I get an error that some modules have not been installed. With activating the debug mode (set PYLAUNCH_DEBUG=1) I get some more information: *** C:\>timetracking.py launcher build: 32bit launcher executable: Console File 'C:\Users\itsme\AppData\Local\py.ini' non-existent File 'C:\Windows\py.ini' non-existent Called with command line: "F:\Python\projects\timetracking\timetracking.py" maybe_handle_shebang: read 256 bytes maybe_handle_shebang: BOM not found, using UTF-8 parse_shebang: found command: F:\Python\scripts3\.venv\scripts\python.exe run_child: about to run 'F:\Python\scripts3\.venv\scripts\python.exe "F:\Python\projects\timetracking\timetracking.py" ' Traceback (most recent call last): File "F:\Python\projects\timetracking\timetracking.py", line 18, in import menu_definitions File "F:\Python\projects\timetracking\menu_definitions.py", line 15, in import menu_edit_item_functions File "F:\Python\projects\timetracking\menu_edit_item_functions.py", line 15, in import tools File "F:\Python\projects\timetracking\tools.py", line 19, in from texttable import Texttable ModuleNotFoundError: No module named 'texttable' child process exit code: 1 *** As you can see, the pylauncher found a shebang - but not that one I expected ('scripts3\.venv' instead of 'timetracking\.venv') *confused* It seems that the pylauncher uses the first .venv it found within the path variable... Any ideas? ---------- components: Windows messages: 323278 nosy: Sascha Fuhrmann, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Wrong virtual environment found type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:40:36 2018 From: report at bugs.python.org (Paul Moore) Date: Wed, 08 Aug 2018 14:40:36 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533739236.82.0.56676864532.issue34359@psf.upfronthosting.co.za> Paul Moore added the comment: >From https://docs.python.org/3.7/using/windows.html#shebang-lines the supported shebang lines are * /usr/bin/env python * /usr/bin/python * /usr/local/bin/python * python There's a provision in there: """ The /usr/bin/env form of shebang line has one further special property. Before looking for installed Python interpreters, this form will search the executable PATH for a Python executable. This corresponds to the behaviour of the Unix env program, which performs a PATH search. """ The launcher does *not* implement the full functionality of the Unix "env" program, and in particular doesn't support (relative or absolute) paths in the Python interpreter part. While "search PATH for the relative path given in the env shebang line" would be a potential feature request, it's not current behaviour, and in my view, it's too rare of a scenario to be worth the complexity it would add to the launcher. As a workaround, you can use an absolute path in your shebang line: #!F:\python\scripts3\.venv\Scripts\python.exe (Obviously that requires a little more manual management of the shebang lines in your scripts). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:50:24 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 Aug 2018 14:50:24 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533739824.86.0.56676864532.issue34359@psf.upfronthosting.co.za> St?phane Wirtel added the comment: And the Shebang is specific to the Unix-like systems, the loader from the operating system, will read the first line and will try to execute the defined interpreter. https://en.wikipedia.org/wiki/Shebang_(Unix) On Windows, I am not sure, but like Paul told you, PyLauncher does not implement the full functionality of the Unix "env" program. Maybe we could close this issue. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:54:49 2018 From: report at bugs.python.org (sfx2k) Date: Wed, 08 Aug 2018 14:54:49 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533740089.08.0.56676864532.issue34359@psf.upfronthosting.co.za> sfx2k added the comment: Thanks for your feedback, Paul and Stephane. The thing with the relative path works if I change the order in the path from [...]F:\Python\scripts3;F:\Python\projects\timetracking[...] to [...]F:\Python\projects\timetracking;F:\Python\scripts3[...] ;) An absolut path is not practicable because it can be different on other systems :) How do others do it? I don't think that I am the only one that uses such a workflow, or am I wrong? ---------- nosy: -matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:55:11 2018 From: report at bugs.python.org (Paul Moore) Date: Wed, 08 Aug 2018 14:55:11 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533740111.79.0.56676864532.issue34359@psf.upfronthosting.co.za> Change by Paul Moore : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:55:48 2018 From: report at bugs.python.org (Paul Moore) Date: Wed, 08 Aug 2018 14:55:48 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533740148.47.0.56676864532.issue34359@psf.upfronthosting.co.za> Paul Moore added the comment: Others use absolute paths, as I mentioned in my reply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:57:38 2018 From: report at bugs.python.org (Paul Moore) Date: Wed, 08 Aug 2018 14:57:38 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533740258.53.0.56676864532.issue34359@psf.upfronthosting.co.za> Paul Moore added the comment: Oh, and I suspect that the reason that "The thing with the relative path works if I change the order in the path" is simply because the bit of code that searches PATH just ignores what's after #!/usr/bin/env and looks for python.exe. (More or less - I haven't checked the code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 10:59:15 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 Aug 2018 14:59:15 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533740355.35.0.56676864532.issue34359@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Now, you could use a Windows shortcut where you specify the version of Python when you execute your script. F:\python\scripts3\.venv\bin\python myscript.py For example. ---------- nosy: +matrixise resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:02:23 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 08 Aug 2018 15:02:23 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1533740543.15.0.56676864532.issue23835@psf.upfronthosting.co.za> ?ukasz Langa added the comment: That's intentional. In ConfigParser objects this exception would be raised for any other section's assignment already. You want RawConfigParser if you want to put (invalid) types as option values. See: >>> cp = ConfigParser() >>> cp['asd'] = {'a': None} Traceback (most recent call last): ... TypeError: option values must be strings >>> rcp = RawConfigParser() >>> rcp['asd'] = {'a': None} >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:06:06 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 08 Aug 2018 15:06:06 +0000 Subject: [issue34242] configparser: SectionProxy.get is silent on missing options In-Reply-To: <1532636603.09.0.56676864532.issue34242@psf.upfronthosting.co.za> Message-ID: <1533740766.08.0.56676864532.issue34242@psf.upfronthosting.co.za> ?ukasz Langa added the comment: > Maybe a ConfigParser object could have an option to raise errors, because they are useful for discovering errors in config files. For this option, use mapping access instead of `.get()`: >>> cp['section']['key'] Traceback (most recent call last): ... KeyError: 'key' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:07:19 2018 From: report at bugs.python.org (sfx2k) Date: Wed, 08 Aug 2018 15:07:19 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533740839.35.0.56676864532.issue34359@psf.upfronthosting.co.za> sfx2k added the comment: Okay, thanks anyway :) btw: "Oh, and I suspect that the reason that "The thing with the relative path works if I change the order in the path" is simply because the bit of code that searches PATH just ignores what's after #!/usr/bin/env and looks for python.exe. (More or less - I haven't checked the code)." Nope - then it would find the python executable in c:\python3 first ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:07:41 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 08 Aug 2018 15:07:41 +0000 Subject: [issue34242] configparser: SectionProxy.get is silent on missing options In-Reply-To: <1532636603.09.0.56676864532.issue34242@psf.upfronthosting.co.za> Message-ID: <1533740861.88.0.56676864532.issue34242@psf.upfronthosting.co.za> ?ukasz Langa added the comment: > I still find the remark about the parser-level `get` being maintained for backwards compatibility strange (and it is eight years old), could this be improved? How? Parser-level `.get()` predates mapping protocol access and has an incompatible API. Thus, we need to leave it as is, otherwise we'd break existing code. Use mapping protocol everywhere in new code and you won't see those issues anymore. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:09:27 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 08 Aug 2018 15:09:27 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533740967.47.0.56676864532.issue34359@psf.upfronthosting.co.za> St?phane Wirtel added the comment: it's normal because this path is in the PATH env variable. so in this case, I think we can close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:10:39 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 08 Aug 2018 15:10:39 +0000 Subject: [issue2651] Strings passed to KeyError do not round trip In-Reply-To: <1208453081.65.0.886847251895.issue2651@psf.upfronthosting.co.za> Message-ID: <1533741039.51.0.56676864532.issue2651@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I agree with Inadasan. I was eager to fix this until I actually got to it at the '16 core sprint. I think there's too little value in fixing this versus possible backwards compatibility breakage. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:11:13 2018 From: report at bugs.python.org (sfx2k) Date: Wed, 08 Aug 2018 15:11:13 +0000 Subject: [issue34359] Wrong virtual environment found In-Reply-To: <1533738616.85.0.56676864532.issue34359@psf.upfronthosting.co.za> Message-ID: <1533741073.31.0.56676864532.issue34359@psf.upfronthosting.co.za> Change by sfx2k : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 11:14:16 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 08 Aug 2018 15:14:16 +0000 Subject: [issue33802] Regression in logging configuration In-Reply-To: <1528412435.4.0.592728768989.issue33802@psf.upfronthosting.co.za> Message-ID: <1533741256.63.0.56676864532.issue33802@psf.upfronthosting.co.za> ?ukasz Langa added the comment: None is an invalid value in the configparser. It only accepts strings. See: >>> cp = ConfigParser() >>> cp['asd'] = {'a': None} Traceback (most recent call last): ... TypeError: option values must be strings The DEFAULT section was an omission which is now fixed. You can use a RawConfigParser if you want to put invalid types as option values: >>> rcp = RawConfigParser() >>> rcp['asd'] = {'a': None} >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 12:02:35 2018 From: report at bugs.python.org (Florian Bruhin) Date: Wed, 08 Aug 2018 16:02:35 +0000 Subject: [issue34360] urllib.parse doesn't fail with multiple unmatching square brackets Message-ID: <1533744155.42.0.56676864532.issue34360@psf.upfronthosting.co.za> New submission from Florian Bruhin : Since bpo-29651, the urllib.parse docs say: > Unmatched square brackets in the netloc attribute will raise a ValueError. However, when there are at least one [ and ], but they don't match, there's somewhat inconsistent behavior: >>> urllib.parse.urlparse('http://[::1]]').hostname '::1' >>> urllib.parse.urlparse('http://[[::1]').hostname '[::1' ---------- components: Library (Lib) messages: 323292 nosy: Howie Benefiel, The Compiler, orsenthil priority: normal severity: normal status: open title: urllib.parse doesn't fail with multiple unmatching square brackets type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 13:01:47 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 08 Aug 2018 17:01:47 +0000 Subject: [issue34350] Non obvious logging handler behaviour In-Reply-To: <1533588087.55.0.56676864532.issue34350@psf.upfronthosting.co.za> Message-ID: <1533747707.4.0.56676864532.issue34350@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 14:15:06 2018 From: report at bugs.python.org (Vadim Pushtaev) Date: Wed, 08 Aug 2018 18:15:06 +0000 Subject: [issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects In-Reply-To: <1532981101.24.0.56676864532.issue34284@psf.upfronthosting.co.za> Message-ID: <1533752106.46.0.56676864532.issue34284@psf.upfronthosting.co.za> Vadim Pushtaev added the comment: Usually, tp_new==NULL means that __new__ is inherited, but not always. Here is the comment from typeobject.c: /* The condition below could use some explanation. It appears that tp_new is not inherited for static types whose base class is 'object'; this seems to be a precaution so that old extension types don't suddenly become callable (object.__new__ wouldn't insure the invariants that the extension type's own factory function ensures). Heap types, of course, are under our control, so they do inherit tp_new; static extension types that specify some other built-in type as the default also inherit object.__new__. */ So my current solution is to explicitly set __new__ to the common helper function that raises TypeError in that case. --- Thanks a lot for your comments and ideas. In truth, I feel a little overwhelmed and definitely need further guidance for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 14:16:09 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Wed, 08 Aug 2018 18:16:09 +0000 Subject: [issue34361] An error should be returned when there are spaces in between function name and parameters Message-ID: <1533752169.63.0.56676864532.issue34361@psf.upfronthosting.co.za> New submission from Sanyam Khurana : I noticed this while reviewing the code. The print function works like: ``` print (5) ``` This works with user-defined function too. Ideally, this is a function call and we should return an error stating that there shouldn't be any spaces between the function name and the parameters listed. This essentially is not good for people who're new to programming and learning to code with Python as their first language. ---------- components: Library (Lib) messages: 323294 nosy: CuriousLearner priority: normal severity: normal stage: needs patch status: open title: An error should be returned when there are spaces in between function name and parameters type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 14:17:49 2018 From: report at bugs.python.org (Cyker Way) Date: Wed, 08 Aug 2018 18:17:49 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533058284.7.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: <1533752269.77.0.56676864532.issue34296@psf.upfronthosting.co.za> Cyker Way added the comment: I'm fine with stdlib, 3rd party tools, or whatever. My focus is to understand is whether this idea can be correctly implemented on the python VM or not. I've been searching for similar implementations on standard JVM, but the results mostly come from research projects rather than industrial solutions. That being said, Android does have preloading implemented in its Dalvik/ART VM (which is more or less a variant of JVM). Cited from : > The preloaded classes list is a list of classes the zygote will initialize on startup. This saves each app from having to run these class initializers separately, allowing them to start up faster and share pages in memory. I was wondering what makes it difficult for standard JVM (eg. HotSpot) to have such feature and why Dalvik/ART is able to do it, and what would be the case for the python VM? ---- A few more words about my original vision: I was hoping to speed up python script execution using template VMs in which a list of selected modules are preloaded. For example, if you have one script for regex matching, and another for dir listing, then you can create 2 template VMs with `re` and `os` modules preloaded, respectively. The template VMs run as system service so that you can always fork from them to create something like a runtime version of *virtualenv* where only relevant modules are loaded. The preloaded modules can be standard modules or user modules. I don't really see what makes a difference here if the module is standard or not. ---- > In particular Windows which doesn't have "fork" behaviour. Forking helps the parent process keep a clean state since it basically does nothing after the fork. If the system doesn't natively support fork then the parent process can do the job by itself instead of forking a child process to do so. But additional work might be needed to remove the artifacts resulting from the execution of user script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 14:22:17 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 08 Aug 2018 18:22:17 +0000 Subject: [issue34361] An error should be returned when there are spaces in between function name and parameters In-Reply-To: <1533752169.63.0.56676864532.issue34361@psf.upfronthosting.co.za> Message-ID: <1533752537.88.0.56676864532.issue34361@psf.upfronthosting.co.za> R. David Murray added the comment: Sorry, but ignoring that whitespace is part of the python language definition. At this point in time, whatever the merits of the "beginner" argument, it is not going to change, for backward compatibility reasons if nothing else. ---------- nosy: +r.david.murray resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 15:07:33 2018 From: report at bugs.python.org (ppperry) Date: Wed, 08 Aug 2018 19:07:33 +0000 Subject: [issue34362] User-created types with wrong __new__ can be instantiated Message-ID: <1533755253.45.0.56676864532.issue34362@psf.upfronthosting.co.za> New submission from ppperry : If you have a class that defines __new__ to the __new__ of another builtin type that it isn't a subclass of: >>> class X: ... __new__ = tuple.__new__ Instantiating this class should produce an error because `tuple.__new__` can't handle non-tuples, but instead it succeeds: >>> X() <__main__.X object at 0x00000000032C3F98> (related: issue34284) ---------- components: Interpreter Core messages: 323297 nosy: Vadim Pushtaev, ncoghlan, ppperry, serhiy.storchaka priority: normal severity: normal status: open title: User-created types with wrong __new__ can be instantiated type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 15:41:25 2018 From: report at bugs.python.org (Alex DeLorenzo) Date: Wed, 08 Aug 2018 19:41:25 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple Message-ID: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> New submission from Alex DeLorenzo : Example: from typing import NamedTuple from dataclasses import dataclass, asdict class NamedTupleAttribute(NamedTuple): example: bool = True @dataclass class Data: attr1: bool attr2: NamedTupleAttribute data = Data(True, NamedTupleAttribute(example=True)) namedtuple_attr = asdict(data)['attr2'] print(type(namedtuple_attr.example)) >>> generator One would expect that the printed type would be of type bool. ---------- components: Interpreter Core messages: 323298 nosy: alexdelorenzo priority: normal severity: normal status: open title: dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 15:43:07 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 08 Aug 2018 19:43:07 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533757387.06.0.56676864532.issue34363@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 15:47:19 2018 From: report at bugs.python.org (ppperry) Date: Wed, 08 Aug 2018 19:47:19 +0000 Subject: [issue34362] User-created types with wrong __new__ can be instantiated In-Reply-To: <1533755253.45.0.56676864532.issue34362@psf.upfronthosting.co.za> Message-ID: <1533757639.43.0.56676864532.issue34362@psf.upfronthosting.co.za> ppperry added the comment: Whoops, realized this is a duplicate of issue5322. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 16:01:59 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 08 Aug 2018 20:01:59 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533758519.46.0.56676864532.issue34363@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 16:11:56 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 08 Aug 2018 20:11:56 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533759116.1.0.56676864532.issue34363@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: OK, so the crux of the bug is this difference: >>> a = (1, 2) >>> tuple(x for x in a) (1, 2) >>> NamedTupleAttribute(x for x in a) NamedTupleAttribute(example= at 0x10e2e52a0>) A potential solution would be to either use `type(obj) in (list, tuple)` instead of `isinstance(obj, (list, tuple))` (and thus cause using copy.deepcopy for everything else), but this might break some use cases (IMO quite unlikely). Any other thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 16:42:15 2018 From: report at bugs.python.org (bob gailer) Date: Wed, 08 Aug 2018 20:42:15 +0000 Subject: [issue34364] problem with traceback for syntax error in f-string Message-ID: <31c748a7-5e57-009a-08e5-c18171489bc0@gmail.com> New submission from bob gailer : Inconsistent tracebacks. Note that the traceback for bug.py does not reference the module file and line number. # bug.py def f(): ? f''' ? {d e}''' a=b import bug Traceback (most recent call last): ? File "", line 1 ??? (d e) ?????? ^ SyntaxError: invalid syntax ---------------------------------------- # bug2.py def f(): ? f''' ? {de}''' a=b import bug2 bug2.f() Traceback (most recent call last): ? File "C:\python\bug2.py", line 5, in ??? a=b NameError: name 'b' is not defined ---------- messages: 323301 nosy: bgailer priority: normal severity: normal status: open title: problem with traceback for syntax error in f-string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 17:06:54 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 08 Aug 2018 21:06:54 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533762414.89.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset cca4eec3c0a67cbfeaf09182ea6c097a94891ff6 by Yury Selivanov (Alex Gr?nholm) in branch 'master': bpo-34270: Make it possible to name asyncio tasks (GH-8547) https://github.com/python/cpython/commit/cca4eec3c0a67cbfeaf09182ea6c097a94891ff6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 17:08:30 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 08 Aug 2018 21:08:30 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533762510.24.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you for the contribution! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 17:13:24 2018 From: report at bugs.python.org (ppperry) Date: Wed, 08 Aug 2018 21:13:24 +0000 Subject: [issue5322] object.__new__ argument calling autodetection faulty In-Reply-To: <1235075665.37.0.301694124748.issue5322@psf.upfronthosting.co.za> Message-ID: <1533762804.12.0.56676864532.issue5322@psf.upfronthosting.co.za> Change by ppperry : ---------- title: Python 2.6 object.__new__ argument calling autodetection faulty -> object.__new__ argument calling autodetection faulty _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 17:52:35 2018 From: report at bugs.python.org (Julien Palard) Date: Wed, 08 Aug 2018 21:52:35 +0000 Subject: [issue34355] SIGSEGV (Address boundary error) In-Reply-To: <1533710842.16.0.56676864532.issue34355@psf.upfronthosting.co.za> Message-ID: <1533765155.58.0.56676864532.issue34355@psf.upfronthosting.co.za> Julien Palard added the comment: After noticing that without pydebug I can reproduce in v3.7.0 but not in master I ran a git bisect, the following commit looks like it fixes the issue: ``` commit 16dfca4d829e45f36e71bf43f83226659ce49315 Author: INADA Naoki Date: Sat Jul 14 12:06:43 2018 +0900 bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274) `_PyUnicode_TransformDecimalAndSpaceToASCII()` missed trailing NUL char. It caused buffer overflow in `_Py_string_to_number_with_underscores()`. This bug is introduced in 9b6c60cb. ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 17:52:38 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 08 Aug 2018 21:52:38 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533765158.74.0.56676864532.issue34363@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith components: +Library (Lib) -Interpreter Core versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 17:53:06 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 08 Aug 2018 21:53:06 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533765186.23.0.56676864532.issue34363@psf.upfronthosting.co.za> Eric V. Smith added the comment: Oops, didn't see that you commented on this, Ivan. I'll do some analysis tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 18:14:19 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 08 Aug 2018 22:14:19 +0000 Subject: [issue34350] Non obvious logging handler behaviour In-Reply-To: <1533588087.55.0.56676864532.issue34350@psf.upfronthosting.co.za> Message-ID: <1533766459.81.0.56676864532.issue34350@psf.upfronthosting.co.za> Vinay Sajip added the comment: The logging module-level convenience functions are specifically there for the use of casual, short scripts where users don't want to be concerned with the details of loggers and handlers. Even if you accidentally configure logging in library code because you typed logging.XXX() instead of logger.XXX(), that's just like any other bug introduced because of a typo. It would presumably get caught in testing. Obviously, this behaviour can't be changed because of the need to maintain backward compatibility (and IMO there is no reason to change this behaviour, as it is like this by design). ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 18:16:03 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 08 Aug 2018 22:16:03 +0000 Subject: [issue29036] logging module: Add `full_module_name` to LogRecord details In-Reply-To: <1482336912.68.0.293105867979.issue29036@psf.upfronthosting.co.za> Message-ID: <1533766563.52.0.56676864532.issue29036@psf.upfronthosting.co.za> Vinay Sajip added the comment: Closing this as rejected, as when using the recommended approach for naming loggers, you get the full package name which can be output in logs. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 18:17:11 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 08 Aug 2018 22:17:11 +0000 Subject: [issue34244] Add support of check logger In-Reply-To: <1532668540.12.0.56676864532.issue34244@psf.upfronthosting.co.za> Message-ID: <1533766631.25.0.56676864532.issue34244@psf.upfronthosting.co.za> Vinay Sajip added the comment: Closing, as no response received. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 18:52:58 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 08 Aug 2018 22:52:58 +0000 Subject: [issue11191] test_search_cpp error on AIX (with xlc) In-Reply-To: <1297436536.39.0.921212376741.issue11191@psf.upfronthosting.co.za> Message-ID: <1533768778.8.0.56676864532.issue11191@psf.upfronthosting.co.za> Change by Michael Felt : ---------- pull_requests: +8196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 21:25:28 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 09 Aug 2018 01:25:28 +0000 Subject: [issue34364] problem with traceback for syntax error in f-string In-Reply-To: <31c748a7-5e57-009a-08e5-c18171489bc0@gmail.com> Message-ID: <1533777928.13.0.56676864532.issue34364@psf.upfronthosting.co.za> Josh Rosenberg added the comment: So the bug is that the line number and module are incorrect for the f-string, right? Nothing else? ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 22:19:18 2018 From: report at bugs.python.org (Paul Monson) Date: Thu, 09 Aug 2018 02:19:18 +0000 Subject: [issue33125] Windows 10 ARM64 platform support In-Reply-To: <1521767011.97.0.467229070634.issue33125@psf.upfronthosting.co.za> Message-ID: <1533781158.22.0.56676864532.issue33125@psf.upfronthosting.co.za> Paul Monson added the comment: I'm interested in getting python working on Windows running on Raspberry Pi (Thumb-2 instruction set). I can also contribute to ARM64 Windows. I've made some progress getting ARM32 working on a fork. The next roadblock for my investigation is libffi support for ARM32 on Windows. Can I help with that? ---------- nosy: +Paul Monson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 22:39:06 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Aug 2018 02:39:06 +0000 Subject: [issue34364] problem with traceback for syntax error in f-string In-Reply-To: <31c748a7-5e57-009a-08e5-c18171489bc0@gmail.com> Message-ID: <1533782346.49.0.56676864532.issue34364@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think this is a duplicate, but I can't find the exact issue. I don't think it's exactly the same as #29051. ---------- assignee: -> eric.smith components: +Interpreter Core nosy: +eric.smith stage: -> needs patch type: -> behavior versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 22:54:31 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Aug 2018 02:54:31 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533783271.31.0.56676864532.issue34363@psf.upfronthosting.co.za> Eric V. Smith added the comment: Thanks for the pointer, Ivan. I haven't really thought it through yet, but this fixes the problem at hand: diff --git a/dataclasses.py b/dataclasses.py index ba34f6b..54916ee 100644 --- a/dataclasses.py +++ b/dataclasses.py @@ -1019,7 +1019,7 @@ def _asdict_inner(obj, dict_factory): result.append((f.name, value)) return dict_factory(result) elif isinstance(obj, (list, tuple)): - return type(obj)(_asdict_inner(v, dict_factory) for v in obj) + return type(obj)(*[_asdict_inner(v, dict_factory) for v in obj]) elif isinstance(obj, dict): return type(obj)((_asdict_inner(k, dict_factory), _asdict_inner(v, dict_factory)) for k, v in obj.items()) There are plenty more tests needed for this, plus I need to think it through some more. astuple() has the same issue. I'll also have to think about the dict subclass case, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 22:59:44 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 09 Aug 2018 02:59:44 +0000 Subject: [issue33989] ms.key_compare is not initialized in all paths of list_sort_impl() In-Reply-To: <1530207786.09.0.56676864532.issue33989@psf.upfronthosting.co.za> Message-ID: <1533783584.94.0.56676864532.issue33989@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz title: ms.key_compare is not initialized in all pathes of list_sort_impl -> ms.key_compare is not initialized in all paths of list_sort_impl() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 23:00:00 2018 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 09 Aug 2018 03:00:00 +0000 Subject: [issue33989] ms.key_compare is not initialized in all paths of list_sort_impl() In-Reply-To: <1530207786.09.0.56676864532.issue33989@psf.upfronthosting.co.za> Message-ID: <1533783600.24.0.56676864532.issue33989@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +8197 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 23:08:55 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 09 Aug 2018 03:08:55 +0000 Subject: [issue34296] Speed up python startup by pre-warming the vm In-Reply-To: <1533752269.77.0.56676864532.issue34296@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: On Thu, Aug 9, 2018 at 3:17 AM Cyker Way wrote: > > Cyker Way added the comment: > > I'm fine with stdlib, 3rd party tools, or whatever. My focus is to understand is whether this idea can be correctly implemented on the python VM or not. I've been searching for similar implementations on standard JVM, but the results mostly come from research projects rather than industrial solutions. That being said, Android does have preloading implemented in its Dalvik/ART VM (which is more or less a variant of JVM). Cited from : > > > The preloaded classes list is a list of classes the zygote will initialize on startup. This saves each app from having to run these class initializers separately, allowing them to start up faster and share pages in memory. > > I was wondering what makes it difficult for standard JVM (eg. HotSpot) to have such feature and why Dalvik/ART is able to do it, and what would be the case for the python VM? > Many WSGI servers provides "pre-fork" for (1) faster worker process creation and (2) sharing static memory. So it's definitely possible. When compared with JVM, Python is dynamic language. for example, if not os.environ.get('XXX_NO_SPEEDUP'): from xxx._speedup import somefunc # Load somefunc from extension else: from xxx._util import somefunc # Load somefunc from pure Python Environment variables, configuration files, or even input from keyboard or some sensors may affects importing modules, unlike JVM. So more strict restriction is required for application in Python's case. It can't be used for general, blindly and automatically from VM-side. It should be implemented explicitly from Application side. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 01:03:49 2018 From: report at bugs.python.org (Kevin Norris) Date: Thu, 09 Aug 2018 05:03:49 +0000 Subject: [issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" Message-ID: <1533791029.87.0.56676864532.issue34365@psf.upfronthosting.co.za> New submission from Kevin Norris : The 3.x datetime documentation contains the following footnote: > In other words, date1 < date2 if and only if date1.toordinal() < date2.toordinal(). In order to stop comparison from falling back to the default scheme of comparing object addresses, date comparison normally raises TypeError if the other comparand isn?t also a date object. However, NotImplemented is returned instead if the other comparand has a timetuple() attribute. This hook gives other kinds of date objects a chance at implementing mixed-type comparison. If not, when a date object is compared to an object of a different type, TypeError is raised unless the comparison is == or !=. The latter cases return False or True, respectively. But in 3.x, comparison no longer falls back to comparing object addresses. Also, some of the comments on issue 8005 seem to suggest that this footnote is not actually true in 3.x (aside from the first sentence, of course). But regardless, the footnote should not refer to a long dead interpreter behavior as if it were still around. ---------- assignee: docs at python components: Documentation messages: 323314 nosy: Kevin.Norris, docs at python priority: normal severity: normal status: open title: datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 01:08:33 2018 From: report at bugs.python.org (Ram Rachum) Date: Thu, 09 Aug 2018 05:08:33 +0000 Subject: [issue29036] logging module: Add `full_module_name` to LogRecord details In-Reply-To: <1482336912.68.0.293105867979.issue29036@psf.upfronthosting.co.za> Message-ID: <1533791313.21.0.56676864532.issue29036@psf.upfronthosting.co.za> Ram Rachum added the comment: Hi Vinay, Since it's been a couple of years since I opened this ticket, I can't tell you the case in which I wanted to know the full module name of a logger. But it's probably been a logger from a third-party library. Since I can't force a third-party library that doesn't use the `__name__` convention to use it, having an attribute with the full module name would be my only solution to getting that information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 02:21:13 2018 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 09 Aug 2018 06:21:13 +0000 Subject: [issue29036] logging module: Add `full_module_name` to LogRecord details In-Reply-To: <1482336912.68.0.293105867979.issue29036@psf.upfronthosting.co.za> Message-ID: <1533795673.29.0.56676864532.issue29036@psf.upfronthosting.co.za> Vinay Sajip added the comment: The full module name isn't readily available. The value that sets the LogRecord's pathname attribute [which is obtained from the Python code object for the caller] is used to derive the filename attribute (by taking the basename of the pathname) and the filename is used to determine the module attribute (by just dropping the extension from the filename). So if you really need the modulename, you would have to derive it from the pathname. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 02:48:30 2018 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Thu, 09 Aug 2018 06:48:30 +0000 Subject: [issue34366] _uuid module fails to compile on FreeBSD when libuuid is installed Message-ID: <1533797310.78.0.56676864532.issue34366@psf.upfronthosting.co.za> New submission from Micha? G?rny : The _uuid extension fails to build on my Gentoo/FreeBSD system: building '_uuid' extension x86_64-gentoo-freebsd11.1-gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -pipe -march=native -fwrapv -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include -I. -I/var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Include -I/var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0 -c /var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.c -o build/temp.freebsd-11.1-RELEASE-amd64-3.7/var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.o In file included from /usr/include/uuid.h:34:0, from /var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.c:8: /usr/include/sys/uuid.h:77:21: error: conflicting types for 'uuid_t' typedef struct uuid uuid_t; ^~~~~~ In file included from /var/tmp/portage/dev-lang/python-3.7.0/work/Python-3.7.0/Modules/_uuidmodule.c:5:0: /usr/include/uuid/uuid.h:44:23: note: previous declaration of 'uuid_t' was here typedef unsigned char uuid_t[16]; ^~~~~~ [...] Apparently the cause is that it includes headers belonging to the system uuid library and libuuid (from util-linux) simultaneously. The whole module seems to be written with the assumption that the two different implementations will not be present simultaneously. However, some software supports libuuid only, so we're forced to have both. Attaching the complete build log. I will submit a PR soonish. ---------- components: Extension Modules files: dev-lang:python-3.7.0:20180809-062928.log messages: 323317 nosy: mgorny priority: normal severity: normal status: open title: _uuid module fails to compile on FreeBSD when libuuid is installed type: compile error versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47735/dev-lang:python-3.7.0:20180809-062928.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 03:26:17 2018 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Thu, 09 Aug 2018 07:26:17 +0000 Subject: [issue34366] _uuid module fails to compile on FreeBSD when libuuid is installed In-Reply-To: <1533797310.78.0.56676864532.issue34366@psf.upfronthosting.co.za> Message-ID: <1533799577.53.0.56676864532.issue34366@psf.upfronthosting.co.za> Change by Micha? G?rny : ---------- keywords: +patch pull_requests: +8198 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 03:45:55 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 09 Aug 2018 07:45:55 +0000 Subject: [issue34360] urllib.parse doesn't fail with multiple unmatching square brackets In-Reply-To: <1533744155.42.0.56676864532.issue34360@psf.upfronthosting.co.za> Message-ID: <1533800755.44.0.56676864532.issue34360@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 05:46:10 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 09 Aug 2018 09:46:10 +0000 Subject: [issue32638] distutils test errors with AIX and xlc In-Reply-To: <1516737985.98.0.467229070634.issue32638@psf.upfronthosting.co.za> Message-ID: <1533807970.52.0.56676864532.issue32638@psf.upfronthosting.co.za> Michael Felt added the comment: this can be closed. Discussion, if any, at https://github.com/python/cpython/pull/8709 or issue11191 ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 07:55:07 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 09 Aug 2018 11:55:07 +0000 Subject: [issue34347] AIX: test_utf8_mode.test_cmd_line fails In-Reply-To: <1533571610.9.0.56676864532.issue34347@psf.upfronthosting.co.za> Message-ID: <1533815707.35.0.56676864532.issue34347@psf.upfronthosting.co.za> Michael Felt added the comment: Starting this discussion again. Please take time to read. I have spent hours trying to understand what is failing. Please spend a few minutes reading. Sadly, there is a lot of text - but I do not know what I could leave out without damaging the process of discovery. The failing result is: self.assertEqual(args, ascii(expected), out) AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != "['h\\udcc3\\udca9\\udce2\\udc82\\udcac']" - ['h\xc3\xa9\xe2\x82\xac'] + ['h\udcc3\udca9\udce2\udc82\udcac'] : ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] The test code is: +207 @unittest.skipIf(MS_WINDOWS, 'test specific to Unix') +208 def test_cmd_line(self): +209 arg = 'h\xe9\u20ac'.encode('utf-8') +210 arg_utf8 = arg.decode('utf-8') +211 arg_ascii = arg.decode('ascii', 'surrogateescape') +212 code = 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))' +213 +214 def check(utf8_opt, expected, **kw): +215 out = self.get_output('-X', utf8_opt, '-c', code, arg, **kw) +216 args = out.partition(':')[2].rstrip() +217 self.assertEqual(args, ascii(expected), out) +218 +219 check('utf8', [arg_utf8]) +220 if sys.platform == 'darwin' or support.is_android: +221 c_arg = arg_utf8 +222 else: +223 c_arg = arg_ascii +224 check('utf8=0', [c_arg], LC_ALL='C') Question 1: why is windows excluded? Because it does not use UTF-8 as it's default (it's default is CP1252) Question 2: It seems that what the test is 'checking' is that object.encode('utf-8') gets decoded by ascii() based on the utf8_mode set. +215 out = self.get_output('-X', utf8_opt, '-c', code, arg, **kw) rewrites (less indent) as: +215 out = self.get_output('-X', utf8_opt, '-c', code, 'h\xe9\u20ac'.encode('utf-8'), **kw) or out = self.get_output('-X', utf8_opt, '-c', code, b'h\xc3\xa9\xe2\x82\xac', **kw) Finally, in Lib/test/support/script_helper.py we have +127 print("\n", cmd_line) # debug info, ignore +128 proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE, +129 stdout=subprocess.PIPE, stderr=subprocess.PIPE, +130 env=env, cwd=cwd) Which gives: ['/data/prj/python/python3-3.8/python', '-X', 'faulthandler', '-X', 'utf8', '-c', 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))', b'h\xc3\xa9\xe2\x82\xac'] Above - utf8=1 - is successful ['/data/prj/python/python3-3.8/python', '-X', 'faulthandler', '-X', 'utf8=0', '-c', 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))', b'h\xc3\xa9\xe2\x82\xac'] Here: utf8=0 fails. The arg to the CLI is equal in both cases. FAIL ## Goiing back to check() and what does it have: ## Add some debug. The first line is the 'raw' expected, ## the second line is ascii(decoded) ## the final is the value extracted from get_output +214 def check(utf8_opt, expected, **kw): +215 out = self.get_output('-X', utf8_opt, '-c', code, arg, **kw) +216 args = out.partition(':')[2].rstrip() +217 print("") +218 print("%s: expected\n%s:ascii(expected)\n%s:out" % (expected, ascii(expected), out)) +219 self.assertEqual(args, ascii(expected), out) For: utf8 mode true, it works: ['h?\u20ac']: expected ['h\xe9\u20ac']:ascii(expected) UTF-8:['h\xe9\u20ac']:out +221 check('utf8', [arg_utf8]) But not for utf8=0 +226 check('utf8=0', [c_arg], LC_ALL='C') # note, different values for LC_ALL='C' have been tried ['h\udcc3\udca9\udce2\udc82\udcac']: expected ['h\udcc3\udca9\udce2\udc82\udcac']:ascii(expected) ISO8859-1:['h\xc3\xa9\xe2\x82\xac']:out ## re: expected and ascii(expected) When utf8=1 expected and ascii(expected) differ. "arg" looks different from both - but after processing by get_object() expected and out match. When utf8=0 there is no difference is "arg1" passed to "code". However, whith check - the values for both expected and ascii(expected) are identical. And, sadly, the value coming back via get_output looks nothing like 'expected'. In short, when utf8=1 ascii(b'h\xc3\xa9\xe2\x82\xac') becomes ['h\xe9\u20ac' which is what is desired. But when utf8=0 ascii(b'h\xc3\xa9\xe2\x82\xac') is b'h\xc3\xa9\xe2\x82\xac' not 'h\udcc3\udca9\udce2\udc82\udcac' Finally, when I run the command from the command line (after rewrites) What passes: ./python '-X' 'faulthandler' '-X' 'utf8=1' '-c' 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii( sys.argv[1:])))' b'h\xc3\xa9\xe2\x82\xac' UTF-8:['bh\\xc3\\xa9\\xe2\\x82\\xac'] encoding is UTF-8, but the result of ascii(argv[1]) is the same as argv[1] ./python '-X' 'faulthandler' '-X' 'utf8=0' '-c' 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii( sys.argv[1:])))' b'h\xc3\xa9\xe2\x82\xac' ISO8859-1:['bh\\xc3\\xa9\\xe2\\x82\\xac'] Here, the only difference in the output is that the "UTF-8" has been changed to "ISO8859-1", i.e., I was expecting a difference is the result of ascii('bh\\xc3\\xa9\\xe2\\x82\\xac'). Instead, I see "bytes obj in", "bytes obj out" -- apparently unchanged. HOWEVER, the result returned by get_output is always different, even it is just limited to removing the 'b' quality. Again: test result includes: ISO8859-1:['h\xc3\xa9\xe2\x82\xac'] - which is not equal to manual CLI with ISO8859-1:['bh\\xc3\\xa9\\xe2\\x82\\xac'] So, I feel the issue is not with test, but within what happens after: +127 proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE, +128 stdout=subprocess.PIPE, stderr=subprocess.PIPE, +129 env=env, cwd=cwd) Specifically: here. +130 with proc: +131 try: +132 out, err = proc.communicate() +133 finally: +134 proc.kill() +135 subprocess._cleanup() +136 rc = proc.returncode +137 err = strip_python_stderr(err) +138 return _PythonRunResult(rc, out, err), cmd_line PASS: ['/data/prj/python/python3-3.8/python', '-X', 'faulthandler', '-X', 'utf8', '-c', 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))', b'h\xc3\xa9\xe2\x82\xac'] 0 b"UTF-8:['h\\xe9\\u20ac']\n" b'' FAIL: ['/data/prj/python/python3-3.8/python', '-X', 'faulthandler', '-X', 'utf8=0', '-c', 'import locale, sys; print("%s:%s" % (locale.getpreferredencoding(), ascii(sys.argv[1:])))', b'h\xc3\xa9\xe2\x82\xac'] 0 b"ISO8859-1:['h\\xc3\\xa9\\xe2\\x82\\xac']\n" b'' Seems the 'b' quality disappears somehow with: +216 args = out.partition(':')[2].rstrip() So, maybe it is in test - in that line. However, this goes well beyond my comprehension of python internal workings. Hope this helps. Please comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 08:26:28 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 09 Aug 2018 12:26:28 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533817588.43.0.56676864532.issue34363@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: The problem with this solution is that it may brea (relatively common) use case of tuple valued fields, e.g.: >>> tuple(*[x for x in a]) Traceback (most recent call last): File "", line 1, in TypeError: tuple expected at most 1 arguments, got 2 Essentially, named tuples are all subclasses of `tuple` but they override __new__ in an incompatible way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 09:19:59 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 09 Aug 2018 13:19:59 +0000 Subject: [issue27494] 2to3 parser failure caused by a comma after a generator expression In-Reply-To: <1468319353.83.0.357995670089.issue27494@psf.upfronthosting.co.za> Message-ID: <1533820799.93.0.56676864532.issue27494@psf.upfronthosting.co.za> ?ukasz Langa added the comment: This is one of those issues where it's clear that the parser and 2to3 should be separate. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 09:39:38 2018 From: report at bugs.python.org (Erik Bray) Date: Thu, 09 Aug 2018 13:39:38 +0000 Subject: [issue34212] Cygwin link failure with builtin modules since issue30860 In-Reply-To: <1532452252.87.0.56676864532.issue34212@psf.upfronthosting.co.za> Message-ID: <1533821978.94.0.56676864532.issue34212@psf.upfronthosting.co.za> Change by Erik Bray : ---------- pull_requests: +8199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 09:42:04 2018 From: report at bugs.python.org (Erik Bray) Date: Thu, 09 Aug 2018 13:42:04 +0000 Subject: [issue34212] Cygwin link failure with builtin modules since issue30860 In-Reply-To: <1532452252.87.0.56676864532.issue34212@psf.upfronthosting.co.za> Message-ID: <1533822124.01.0.56676864532.issue34212@psf.upfronthosting.co.za> Erik Bray added the comment: I added a new PR modifying makesetup and adding a new variable to Makefile.pre.in, PY_BUILTIN_MODULE_CFLAGS, explicitly for building built-in modules. I think this, or some version of it, is a cleaner solution than my previous brute-force approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:17:49 2018 From: report at bugs.python.org (Alexander Tsvetkov) Date: Thu, 09 Aug 2018 14:17:49 +0000 Subject: [issue34367] AsyncResult.get() only notifies one thread Message-ID: <1533824269.46.0.56676864532.issue34367@psf.upfronthosting.co.za> New submission from Alexander Tsvetkov : If more than one thread is waiting for the multiprocessing.pool.AsyncResult (aka ApplyResult) returned from apply_async, only one thread will be notified once the result arrives. It happens because AsyncResult._set calls notify upon the result arrival, not notify_all. threading.Event used in Python 3 uses notify_all. Reproduction script is attached. Expected outcome: 1 1 is printed to STDOUT. Observed outcome: The script hangs. ---------- components: Library (Lib) files: async_result_demo.py messages: 323323 nosy: AlexWithBeard priority: normal severity: normal status: open title: AsyncResult.get() only notifies one thread versions: Python 2.7 Added file: https://bugs.python.org/file47736/async_result_demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:41:24 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 09 Aug 2018 14:41:24 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533825684.86.0.56676864532.issue34270@psf.upfronthosting.co.za> Eric Snow added the comment: FWIW, the C implementation of Task.__init__ is not exactly equivalent to the Python implementation (nor to both the C and Python implementation of Task.set_name). In the C impl of Task.__init__ the provided name is used as-is if it's an instance of str: (_asyncio_Task___init___impl() in Modules/_asynciomodule.c) if (name == Py_None) { name = PyUnicode_FromFormat("Task-%" PRIu64, ++task_name_counter); } else if (!PyUnicode_Check(name)) { name = PyObject_Str(name); } else { Py_INCREF(name); } One of the following should happen, right? 1. fix the Python implementation of Task.__init__() and both impl of Task.set_name() 2. change the check to PyUnicode_CheckExact() 3. remove the special-case (i.e. change the C impl to match the Python impl) p.s. Sorry I did not notice this before it got committed. :/ ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:46:46 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 14:46:46 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533826006.71.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: > 2. change the check to PyUnicode_CheckExact() I'd be OK with this, but why is this important? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:47:49 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 14:47:49 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533826069.65.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: As a side note, Alex, what do you think about appending coroutine's name to Task's name if the latter is autogenerated? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:51:25 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 14:51:25 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533826285.77.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: I also couldn't figure out yet why PyUnicode_Check() was necessary in the first place. Doesn't PyObject_Str() just increment the refcount if the argument is already a string? Eric, please explain why these changes should be done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:52:23 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 14:52:23 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533826343.44.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: Yury, I have no objections. Furthermore, it would be nice to expose the coroutine object publicly, like curio and trio do. It would make life simpler for me in some cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:55:28 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 14:55:28 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533826528.24.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I also couldn't figure out yet why PyUnicode_Check() was necessary in the first place. Doesn't PyObject_Str() just increment the refcount if the argument is already a string? `str()` returns its argument if it's exactly a `builtins.str` instance. If it's a subclass of str, it will construct a `builtins.str` out of it. >>> class mystr(str): ... pass >>> a = mystr('aaa') >>> str(a) is a False So Eric is right, there's a small discrepancy between Python and C version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:00:20 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 15:00:20 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533826820.16.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: Ok, I understand. But is the conversion a bad thing then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:05:42 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 09 Aug 2018 15:05:42 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533827142.91.0.56676864532.issue34324@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 599bfa18f8ebcb23af300b6855934048c3c64e7d by Mariatta (St?phane Wirtel) in branch 'master': bpo-34324: Doc README wrong directory name for venv (GH-8650) https://github.com/python/cpython/commit/599bfa18f8ebcb23af300b6855934048c3c64e7d ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:06:12 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Aug 2018 15:06:12 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533827172.45.0.56676864532.issue34324@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:06:21 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Aug 2018 15:06:21 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533827181.28.0.56676864532.issue34324@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:06:49 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 09 Aug 2018 15:06:49 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533827209.41.0.56676864532.issue34324@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:10:31 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Aug 2018 15:10:31 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533827431.15.0.56676864532.issue34324@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fe8f90aa3ca3f277cac634cdb96b829039225c6b by Miss Islington (bot) in branch '3.7': bpo-34324: Doc README wrong directory name for venv (GH-8650) https://github.com/python/cpython/commit/fe8f90aa3ca3f277cac634cdb96b829039225c6b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:16:55 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 15:16:55 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533827815.86.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Ok, I understand. But is the conversion a bad thing then? It's not a bad thing, it's just that we don't do it in C Task and we do it in pure Python Task. Eric wants us to synchronize them so that in a very unlikely scenario where someone uses subclasses of str for names they will have exact same behaviour under both Tasks implementations. I'd say let's just fix the C version to use PyUnicode_CheckExact. Even though it's highly unlikely somebody ever hits this, there's no reason to keep Python and C implementations even slightly out of sync w.r.t. behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:17:14 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Aug 2018 15:17:14 +0000 Subject: [issue34324] Doc README wrong directory name for venv In-Reply-To: <1533251941.31.0.56676864532.issue34324@psf.upfronthosting.co.za> Message-ID: <1533827834.66.0.56676864532.issue34324@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0ee2a29585e3c17e38eb6e6a2515405e40be22b5 by Miss Islington (bot) in branch '3.6': bpo-34324: Doc README wrong directory name for venv (GH-8650) https://github.com/python/cpython/commit/0ee2a29585e3c17e38eb6e6a2515405e40be22b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:22:13 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 09 Aug 2018 15:22:13 +0000 Subject: [issue34362] User-created types with wrong __new__ can be instantiated In-Reply-To: <1533755253.45.0.56676864532.issue34362@psf.upfronthosting.co.za> Message-ID: <1533828133.42.0.56676864532.issue34362@psf.upfronthosting.co.za> Eric Snow added the comment: I'm not sure that this is a duplicate of #5322. That one's about a warning when arguments are passed to object.__new__(). Yours is about using an incompatible __new__ when creating a new class in Python. I agree that behavior you're seeing is unexpected and should probably be fixed. Let's look at the situation a little more closely. Here's what I understood you reported: >>> class X: ... __new__ = tuple.__new__ ... >>> x1 = X() # This does not fail! However, that is a little misleading because you might think it is calling tuple.__new__(). It isn't. Apparently type.__call__() is invoking object.__new__() instead of X.__new__(): >>> x2 = X([1, 2]) Traceback (most recent call last): File "", line 1, in TypeError: object() takes no parameters >>> object.__new__(X, [1, 2]) Traceback (most recent call last): File "", line 1, in TypeError: object() takes no parameters If I had a little more time I'd look into the relevant code to see what's going on. In the meantime, let's see if we can find the edges of this problem. We can verify that X.__new__ is still set to tuple.__new__: >>> X.__new__ is object.__new__ False >>> X.__new__ is tuple.__new__ True >>> X.__new__(X) Traceback (most recent call last): File "", line 1, in TypeError: tuple.__new__(X): X is not a subtype of tuple >>> X.__new__(X, [1, 2]) Traceback (most recent call last): File "", line 1, in TypeError: tuple.__new__(X): X is not a subtype of tuple >>> X.__new__(tuple) () >>> X.__new__(tuple, [1, 2]) (1, 2) If we explicitly defer to tuple.__new__() then we get an error that matches our expectations better: >>> class Y: ... def __new__(cls, *args, **kwargs): ... return tuple.__new__(cls, *args, **kwargs) ... >>> y = Y() Traceback (most recent call last): File "", line 1, in File "", line 3, in __new__ TypeError: tuple.__new__(Y): Y is not a subtype of tuple This reinforces the conclusion that tuple.__call__() is doing something funny here. We can take that conclusion further by seeing that the unexpected behavior is not specific to using tuple.__new__: >>> class Z: ... __new__ = int.__new__ ... >>> z1 = Z() >>> z2 = Z(42) Traceback (most recent call last): File "", line 1, in TypeError: object() takes no parameters >>> Z.__new__(Z) Traceback (most recent call last): File "", line 1, in TypeError: int.__new__(Z): Z is not a subtype of int ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:26:42 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 15:26:42 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533828402.07.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: > It's not a bad thing, it's just that we don't do it in C Task and we do it in pure Python Task. Eric wants us to synchronize them so that in a very unlikely scenario where someone uses subclasses of str for names they will have exact same behaviour under both Tasks implementations. Should a new issue be created for this so I can make a PR against it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:28:00 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 09 Aug 2018 15:28:00 +0000 Subject: [issue34367] AsyncResult.get() only notifies one thread In-Reply-To: <1533824269.46.0.56676864532.issue34367@psf.upfronthosting.co.za> Message-ID: <1533828480.15.0.56676864532.issue34367@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:34:27 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 15:34:27 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533828867.75.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: Let's just reuse this issue, it's just a small fix. ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:36:11 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 15:36:11 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533828971.21.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: Which way do we want to change this? Do we want to convert to pure strings or retain the original object? In the latter case both the C and Python implementations (including set_name()) have to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:39:36 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 09 Aug 2018 15:39:36 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533829176.37.0.56676864532.issue34270@psf.upfronthosting.co.za> Eric Snow added the comment: I'm not too invested in any changes happening at this point, actually. :) Mostly I happened to be reading through the commit and noticed the inconsistency. If I had reviewed the PR then I would have asked that it be fixed. So I figured I'd mention it. FWIW, I don't expect it would cause any problems. It could result in a different (between the two implementations) Task repr if the name's type (a str subclass) implements __repr__. There's also the possibility of side-effects (from the implementation of the name's type). Neither is a big deal (especially the latter since it's *not* a common use case). On the other had, the matter is made moot by using PyUnicode_CheckExact(). :) ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 11:44:29 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 15:44:29 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533829469.28.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: > On the other had, the matter is made moot by using PyUnicode_CheckExact() Then, in order to keep the pure Python implementation in sync, we'd have to change it to something like this: if name is None: self._name = f'Task-{_task_name_counter()}' elif isinstance(name, str): self._name = name else: self._name = str(name) I don't know about you, but it looks pretty awkward to me. ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 12:00:39 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 16:00:39 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533830439.35.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: Please just change PyUnicode_Check to PyUnicode_CheckExact in C Task.__init__ and use the same if check in C Task.set_name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 12:06:05 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 16:06:05 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533830765.07.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: > Please just change PyUnicode_Check to PyUnicode_CheckExact in C Task.__init__ and use the same if check in C Task.set_name. I'll do that if you say so, but I'm just saying that the C and Python implementations will still remain different in semantics then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 12:09:39 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 16:09:39 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533830979.28.0.56676864532.issue34270@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I'll do that if you say so, but I'm just saying that the C and Python implementations will still remain different in semantics then. Probably I'm missing something here. How would they be different? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 12:10:11 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 16:10:11 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533831011.38.0.56676864532.issue34270@psf.upfronthosting.co.za> Alex Gr?nholm added the comment: > I'll do that if you say so, but I'm just saying that the C and Python implementations will still remain different in semantics then. Never mind, that was a brain fart. I keep ignoring the "!" in my mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 12:19:30 2018 From: report at bugs.python.org (=?utf-8?q?Alex_Gr=C3=B6nholm?=) Date: Thu, 09 Aug 2018 16:19:30 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533831570.28.0.56676864532.issue34270@psf.upfronthosting.co.za> Change by Alex Gr?nholm : ---------- pull_requests: +8202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 13:30:35 2018 From: report at bugs.python.org (Andriy Maletsky) Date: Thu, 09 Aug 2018 17:30:35 +0000 Subject: [issue32102] Add "capture_output=True" option to subprocess.run In-Reply-To: <1511244827.04.0.213398074469.issue32102@psf.upfronthosting.co.za> Message-ID: <1533835835.77.0.56676864532.issue32102@psf.upfronthosting.co.za> Change by Andriy Maletsky : ---------- pull_requests: +8204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 13:52:28 2018 From: report at bugs.python.org (ppperry) Date: Thu, 09 Aug 2018 17:52:28 +0000 Subject: [issue34362] User-created types with wrong __new__ can be instantiated In-Reply-To: <1533755253.45.0.56676864532.issue34362@psf.upfronthosting.co.za> Message-ID: <1533837148.77.0.56676864532.issue34362@psf.upfronthosting.co.za> ppperry added the comment: issue5322, despite its confusing title, mentions this exact bug in one of the comments below. It looks like there is one bug in the logic for assigning `__new__`, which causes `__new__` and `tp_new` to point to different things, confusing the error-handling logic in `object.__new__` as well as causing creation of a type by calling it to work in cases where direct calls to __new__ fail. There's no one bug report about that, however issue5322, issue25731 and some cases of issue34284 are all symptoms of the same root issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 16:12:59 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Thu, 09 Aug 2018 20:12:59 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533845579.66.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: I've tried to check the source code of IDLE in search of chained comparisons without parenthesis (like the example I showed and the bug with the mouse wheel). I couldn't find something important. Then I wrote in a file the following code: import tkinter root = tkinter.Tk() text = tkinter.Text(root) vbar = tkinter.Scrollbar(root) vbar.pack(side=tkinter.RIGHT, fill=tkinter.Y) text.pack(side=tkinter.LEFT, fill=tkinter.BOTH) text.config(yscrollcommand=vbar.set) vbar.config(command=text.yview) lines = ['This is the line number %d.\n' % i for i in range(200)] text.insert(tkinter.END, ''.join(lines)) In both Python 3.6 and 3.7 with Tk 8.6.8 on macOS 10.13, click-and-drag on the upper half of the scrollbar slider has no effect (the slider sticks at the top), like in the bugs #1 and #3. I strongly suspect a tkinter problem, as the equivalent Tcl/Tk code functions well. Click-and-drag in the lower half of the slider functions (in my code and IDLE) for me. Can someone reproduce this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 16:49:59 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2018 20:49:59 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1533847799.84.0.56676864532.issue34270@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 16:56:29 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Thu, 09 Aug 2018 20:56:29 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533848189.53.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: Edit: The code is: import tkinter root = tkinter.Tk() text = tkinter.Text(root) vbar = tkinter.Scrollbar(root) vbar.pack(side=tkinter.RIGHT, fill=tkinter.Y) text.pack(side=tkinter.LEFT, fill=tkinter.BOTH, expand=1) text.config(yscrollcommand=vbar.set) vbar.config(command=text.yview) lines = ['This is the line number %d.\n' % i for i in range(256)] text.insert(tkinter.END, ''.join(lines)) def click_trace(event): text.insert('%d.%d' % (1, 0), 'Clicked at (%d,%d) on %s.\n' % (event.x, event.y, vbar.identify(event.x, event.y))) vbar.bind('', click_trace) root.mainloop() Clicking at the top on the slider shows that the Scrollbar considers it as being on "through1" (in Tk the zone between the upper arrow and the "slider") and NOT on the "slider". Please, play with the script (python3 tktest.py) and see the results for yourselves. ---------- Added file: https://bugs.python.org/file47737/tktest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 17:15:05 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Thu, 09 Aug 2018 21:15:05 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533849305.55.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: And the result (video) of my script is attached to this post. ---------- Added file: https://bugs.python.org/file47738/tkinter_scroll_issues.mov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 18:02:59 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 09 Aug 2018 22:02:59 +0000 Subject: [issue32102] Add "capture_output=True" option to subprocess.run In-Reply-To: <1511244827.04.0.213398074469.issue32102@psf.upfronthosting.co.za> Message-ID: <1533852179.5.0.56676864532.issue32102@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 19:47:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 09 Aug 2018 23:47:27 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533858447.53.0.56676864532.issue34047@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Vlad, can you test the current patch on PR 8678 on Mac? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 20:49:30 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Aug 2018 00:49:30 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533862170.03.0.56676864532.issue34363@psf.upfronthosting.co.za> Eric V. Smith added the comment: Maybe do both, then. Also, it's probably better for performance reasons (I know: premature optimization and all that ...): @@ -1018,8 +1018,10 @@ def _asdict_inner(obj, dict_factory): value = _asdict_inner(getattr(obj, f.name), dict_factory) result.append((f.name, value)) return dict_factory(result) - elif isinstance(obj, (list, tuple)): + elif type(obj) in (list, tuple): return type(obj)(_asdict_inner(v, dict_factory) for v in obj) + elif isinstance(obj, (list, tuple)): + return type(obj)(*[_asdict_inner(v, dict_factory) for v in obj]) elif isinstance(obj, dict): return type(obj)((_asdict_inner(k, dict_factory), _asdict_inner(v, dict_factory)) for k, v in obj.items()) I guess we could argue it's a bug in nametuples, but I don't see that getting us very far. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 22:07:42 2018 From: report at bugs.python.org (ppperry) Date: Fri, 10 Aug 2018 02:07:42 +0000 Subject: [issue5322] object.__new__ argument calling autodetection faulty In-Reply-To: <1235075665.37.0.301694124748.issue5322@psf.upfronthosting.co.za> Message-ID: <1533866862.92.0.56676864532.issue5322@psf.upfronthosting.co.za> Change by ppperry : ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 00:27:00 2018 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 10 Aug 2018 04:27:00 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533875220.48.0.56676864532.issue34363@psf.upfronthosting.co.za> Neil Girdhar added the comment: Sorry if I'm intruding here, but I really dislike that we are doing isinstance versus list, tuple, and dict. And I dislike even more type(x) in (list, tuple). I think the ideal thing to do would have been to check versus abstract base classes like isinstance(x, Sequence) and isinstance(x, Mapping). The advantage to this is flexibility with user-defined types. The problem seems to be that the abstract base classes don't promise anything about the constructor. It seems like some Sequence types accept an Iterable (e.g. tuple), but others like NamedTuple want positional arguments. I think this promise should be encoded in some way. Maybe a third solution is to have NamedTuple special-cased out: isinstance(x, Sequence) and not isinstance(x, NamedTuple) If there are other Sequence types that do this (are there?) then an abstract base class could be created. This solution has the benefit of playing the most nicely with user-defined classes. ---------- nosy: +NeilGirdhar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 00:57:34 2018 From: report at bugs.python.org (H-ZeX) Date: Fri, 10 Aug 2018 04:57:34 +0000 Subject: [issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server Message-ID: <1533877054.01.0.56676864532.issue34368@psf.upfronthosting.co.za> Change by H-ZeX : ---------- components: XML nosy: H-ZeX priority: normal severity: normal status: open title: ftplib __init__ function can't handle 120 or 4xy reply when connect to the server type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 00:57:59 2018 From: report at bugs.python.org (H-ZeX) Date: Fri, 10 Aug 2018 04:57:59 +0000 Subject: [issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server Message-ID: <1533877079.57.0.56676864532.issue34368@psf.upfronthosting.co.za> Change by H-ZeX : ---------- components: +Library (Lib) -XML _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 01:01:02 2018 From: report at bugs.python.org (H-ZeX) Date: Fri, 10 Aug 2018 05:01:02 +0000 Subject: [issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server Message-ID: <1533877262.72.0.56676864532.issue34368@psf.upfronthosting.co.za> New submission from H-ZeX : in the __init__ function, call getresp, however, the getresp don't handle the 120 reply which indicate the request should be delay or 421 reply in the rfc 959 page 50, there are all reply that may return Connection Establishment 120 220 220 421 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 01:12:12 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 10 Aug 2018 05:12:12 +0000 Subject: [issue34353] stat's python implementation of filemode (fallback) doesn't behave like the C implementation In-Reply-To: <1533662594.31.0.56676864532.issue34353@psf.upfronthosting.co.za> Message-ID: <1533877932.63.0.56676864532.issue34353@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset b92c526ed5da474694f89e29d82565f2a654c29b by Benjamin Peterson (GPery) in branch 'master': closes bpo-34353: Add sockets to stat.filemode fallback python implementation. (GH-8703) https://github.com/python/cpython/commit/b92c526ed5da474694f89e29d82565f2a654c29b ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 01:50:55 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 10 Aug 2018 05:50:55 +0000 Subject: [issue32745] ctypes string pointer fields should accept embedded null characters In-Reply-To: <1517514890.15.0.467229070634.issue32745@psf.upfronthosting.co.za> Message-ID: <1533880255.0.0.56676864532.issue32745@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +8206 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 01:52:17 2018 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 10 Aug 2018 05:52:17 +0000 Subject: [issue32745] ctypes string pointer fields should accept embedded null characters In-Reply-To: <1517514890.15.0.467229070634.issue32745@psf.upfronthosting.co.za> Message-ID: <1533880337.47.0.56676864532.issue32745@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 02:02:11 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 10 Aug 2018 06:02:11 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533880931.79.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 077059e0f086cf8c8b7fb9d1f053e38ddc743f59 by Tal Einat in branch 'master': bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) https://github.com/python/cpython/commit/077059e0f086cf8c8b7fb9d1f053e38ddc743f59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 02:02:36 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Aug 2018 06:02:36 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533880956.03.0.56676864532.issue34047@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 02:02:44 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Aug 2018 06:02:44 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533880964.24.0.56676864532.issue34047@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 02:20:16 2018 From: report at bugs.python.org (Toshio Kuratomi) Date: Fri, 10 Aug 2018 06:20:16 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch Message-ID: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> New submission from Toshio Kuratomi : The current kqueue documentation specifies that timeout is a keyword argument but it can only be passed as a positional argument right now: >>> import select >>> ko = select.kqueue() >>> ko.control([1], 0, timeout=10) Traceback (most recent call last): File "", line 1, in TypeError: control() takes no keyword arguments >>> help(ko.control) Help on built-in function control: control(...) method of select.kqueue instance control(changelist, max_events[, timeout=None]) -> eventlist Calls the kernel kevent function. - changelist must be an iterable of kevent objects describing the changes to be made to the kernel's watch list or None. - max_events lets you specify the maximum number of events that the kernel will return. - timeout is the maximum time to wait in seconds, or else None, to wait forever. timeout accepts floats for smaller timeouts, too. This may be related to https://bugs.python.org/issue3852 in which the max_events argument used to be documented as optional but the code made it mandatory. ---------- components: Library (Lib) messages: 323357 nosy: a.badger priority: normal severity: normal status: open title: kqueue.control() documentation and implementation mismatch type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 02:28:19 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Fri, 10 Aug 2018 06:28:19 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533882499.56.0.56676864532.issue34047@psf.upfronthosting.co.za> Vlad Tudorache added the comment: The scroll works. Many thanks, I thought the callback should have been rewritten, too. Should one open a different report for the clicks on the scrollbar ends, like in the script I put (independent of IDLE)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 02:43:10 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Aug 2018 06:43:10 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533883390.23.0.56676864532.issue34047@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ea8835fb302447da82f265a5bc0f785353100271 by Miss Islington (bot) in branch '3.7': bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) https://github.com/python/cpython/commit/ea8835fb302447da82f265a5bc0f785353100271 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 02:59:00 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 10 Aug 2018 06:59:00 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533884340.83.0.56676864532.issue34047@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ca4badb5c0bedaa4ebcb33b9cad5f64750876750 by Miss Islington (bot) in branch '3.6': bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) https://github.com/python/cpython/commit/ca4badb5c0bedaa4ebcb33b9cad5f64750876750 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 03:17:02 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 10 Aug 2018 07:17:02 +0000 Subject: [issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch In-Reply-To: <1532158324.8.0.56676864532.issue34177@psf.upfronthosting.co.za> Message-ID: <1533885422.75.0.56676864532.issue34177@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 04:33:07 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 10 Aug 2018 08:33:07 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533889987.06.0.56676864532.issue34047@psf.upfronthosting.co.za> Tal Einat added the comment: > Should one open a different report for the clicks on the scrollbar ends, like in the script I put (independent of IDLE)? Indeed. Please open a new issue with an appropriate title and attach your example script and video. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 04:33:22 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 10 Aug 2018 08:33:22 +0000 Subject: [issue34047] IDLE: on macOS, scroll slider 'sticks' at bottom of file In-Reply-To: <1530724487.68.0.56676864532.issue34047@psf.upfronthosting.co.za> Message-ID: <1533890002.59.0.56676864532.issue34047@psf.upfronthosting.co.za> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 05:28:00 2018 From: report at bugs.python.org (Ivan Pozdeev) Date: Fri, 10 Aug 2018 09:28:00 +0000 Subject: [issue34360] urllib.parse doesn't fully comply to RFC 3986 In-Reply-To: <1533744155.42.0.56676864532.issue34360@psf.upfronthosting.co.za> Message-ID: <1533893280.35.0.56676864532.issue34360@psf.upfronthosting.co.za> Ivan Pozdeev added the comment: I confirm violation of https://tools.ietf.org/html/rfc3986#section-3.2.2 . URLs are now covered by RFC 3986 which obsoletes RFC 1808 that `urllib's documentation refers to. This new URL RFC adds [] to 'reserved' characters, so them being present unquoted anywhere where reserved characters are not allowed shall be a parsing error. ---------- nosy: +Ivan.Pozdeev title: urllib.parse doesn't fail with multiple unmatching square brackets -> urllib.parse doesn't fully comply to RFC 3986 versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 06:07:16 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Fri, 10 Aug 2018 10:07:16 +0000 Subject: [issue34370] Tkinter scroll issues on macOS Message-ID: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> New submission from Vlad Tudorache : Run the python script below. import tkinter root = tkinter.Tk() text = tkinter.Text(root) vbar = tkinter.Scrollbar(root) vbar.pack(side=tkinter.RIGHT, fill=tkinter.Y) text.pack(side=tkinter.LEFT, fill=tkinter.BOTH, expand=1) text.config(yscrollcommand=vbar.set) vbar.config(command=text.yview) lines = ['This is the line number %d.\n' % i for i in range(256)] text.insert(tkinter.END, ''.join(lines)) def click_trace(event): text.insert('%d.%d' % (1, 0), 'Clicked at (%d,%d) on %s.\n' % (event.x, event.y, vbar.identify(event.x, event.y))) vbar.bind('', click_trace) root.mainloop() When the slider is at the top of the scrollbar, clicking on its upper half doesn't allow dragging. The little script shows that the Scrollbar considers it as being on "through1" - in Tk the zone between the upper arrow and the "slider" - and not on "slider". Another consequence is that one can drag (up and down) the slider when clicking a little bit below the slider, on "through2" region. This issue doesn't manifest on Windows, where the scrollbar's arrows are shown. I've seen this issue when trying to explore the reasons of another (34047, fixed) concerning the slider locked at the end of the scrollbar in IDLE. ---------- components: Tkinter messages: 323363 nosy: vtudorache priority: normal severity: normal status: open title: Tkinter scroll issues on macOS type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 06:08:41 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Fri, 10 Aug 2018 10:08:41 +0000 Subject: [issue34343] Why is turtle still present in python embedded for Windows? In-Reply-To: <1533547471.89.0.56676864532.issue34343@psf.upfronthosting.co.za> Message-ID: <1533895721.14.0.56676864532.issue34343@psf.upfronthosting.co.za> Change by Vlad Tudorache : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 06:57:10 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 10 Aug 2018 10:57:10 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533898630.2.0.56676864532.issue34363@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Eric, I like your solution. It is probably not perfect, but at least it solves the existing problem without introducing obvious problems. Neil, your way will not work since named tuples don't have NamedTuple in their MROs: CustomNT.mro == (CustomNT, tuple, object) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 07:38:55 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 10 Aug 2018 11:38:55 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1533901135.68.0.56676864532.issue34369@psf.upfronthosting.co.za> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 07:41:39 2018 From: report at bugs.python.org (Marcel Plch) Date: Fri, 10 Aug 2018 11:41:39 +0000 Subject: [issue34097] ZIP does not support timestamps before 1980 In-Reply-To: <1531319758.26.0.56676864532.issue34097@psf.upfronthosting.co.za> Message-ID: <1533901299.17.0.56676864532.issue34097@psf.upfronthosting.co.za> Change by Marcel Plch : ---------- pull_requests: +8209 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 07:43:14 2018 From: report at bugs.python.org (Sverrir Berg) Date: Fri, 10 Aug 2018 11:43:14 +0000 Subject: [issue34371] File reading gets stuck if you read at eof on macos Message-ID: <1533901394.11.0.56676864532.issue34371@psf.upfronthosting.co.za> New submission from Sverrir Berg : Reading a file that is at eof causes the file reading to halt indefinitely. 1) open() a file and read() everything from it. 2) call read() a second time - reading nothing (this causes the issue). 3) append to the file (using another file handle or manually). 4) try to read it again - read() always returns nothing. Attached is a a test causing this - works correctly on Ubuntu 2.7.12/3.5.2, macos 3.7.0, macos PyPy 5.10.0 but fails on macos 2.7.10/2.7.15(brew) I assume the expected behaviour is the same as on the other versions where you can continue to read from the file when it has been appended to? ---------- components: IO files: readwrite.py messages: 323365 nosy: sverrirab priority: normal severity: normal status: open title: File reading gets stuck if you read at eof on macos type: behavior versions: Python 2.7 Added file: https://bugs.python.org/file47739/readwrite.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 08:00:01 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 10 Aug 2018 12:00:01 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1533902401.2.0.56676864532.issue34369@psf.upfronthosting.co.za> Berker Peksag added the comment: This is probably a regression from the Argument Clinic conversion. Another docstring mismatches: select(rlist, wlist, xlist, timeout=None, /) Wait until one or more file descriptors are ready for some kind of I/O. >>> select.select(timeout=0.1) Traceback (most recent call last): File "", line 1, in TypeError: select() takes no keyword arguments poll(timeout=None, /) method of select.poll instance Polls the set of registered file descriptors. >>> select.poll().poll(timeout=0.1) Traceback (most recent call last): File "", line 1, in TypeError: poll() takes no keyword arguments ---------- nosy: +berker.peksag, taleinat versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 08:05:54 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 10 Aug 2018 12:05:54 +0000 Subject: [issue34371] File reading gets stuck if you read at eof on macos In-Reply-To: <1533901394.11.0.56676864532.issue34371@psf.upfronthosting.co.za> Message-ID: <1533902754.78.0.56676864532.issue34371@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is IMHO not a bug in CPython (or even macOS). On Python 2.7 file I/O is implemented using C's stdio library and that prescribes this behaviour (the "at EOF" state of a file stream is sticky. fd.seek(0, 2) should unset the "at EOF" flag. ---------- nosy: +ronaldoussoren resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 09:03:58 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 10 Aug 2018 13:03:58 +0000 Subject: [issue33125] Windows 10 ARM64 platform support In-Reply-To: <1521767011.97.0.467229070634.issue33125@psf.upfronthosting.co.za> Message-ID: <1533906238.2.0.56676864532.issue33125@psf.upfronthosting.co.za> Steve Dower added the comment: If libffi already has support and just needs to be updated in CPython, then sure. I thought we'd finished extracting it, but Zach posted aPR link above that apparently still needs finishing. However, if libffi doesn't have the support yet then you'll have to approach them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 09:12:14 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 10 Aug 2018 13:12:14 +0000 Subject: [issue34371] File reading gets stuck if you read at eof on macos In-Reply-To: <1533901394.11.0.56676864532.issue34371@psf.upfronthosting.co.za> Message-ID: <1533906734.02.0.56676864532.issue34371@psf.upfronthosting.co.za> Ronald Oussoren added the comment: For completeness sake I've attached a C program demonstrating the same problem. ---------- status: pending -> open Added file: https://bugs.python.org/file47740/readwrite.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 09:12:19 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 10 Aug 2018 13:12:19 +0000 Subject: [issue34371] File reading gets stuck if you read at eof on macos In-Reply-To: <1533901394.11.0.56676864532.issue34371@psf.upfronthosting.co.za> Message-ID: <1533906739.93.0.56676864532.issue34371@psf.upfronthosting.co.za> Change by Ronald Oussoren : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 09:50:21 2018 From: report at bugs.python.org (Toshio Kuratomi) Date: Fri, 10 Aug 2018 13:50:21 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1533909021.36.0.56676864532.issue34369@psf.upfronthosting.co.za> Toshio Kuratomi added the comment: I don't believe (kqueue.control at least) is a regression from Argument Clinic. Both the documentation and the behaviour are the same in Python-2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 11:02:24 2018 From: report at bugs.python.org (Arusekk) Date: Fri, 10 Aug 2018 15:02:24 +0000 Subject: [issue34372] Compiler could output more accurate line numbers Message-ID: <1533913344.46.0.56676864532.issue34372@psf.upfronthosting.co.za> New submission from Arusekk : If this is a duplicate, please excuse me. In particular, the most noticeable inaccuracy happens when the postfix if-else expression is involved. Maybe there are more of them. The problem is quite self-explaining. The module named 'dis' will be helpful to reproduce the issue. >>> import dis >>> code = """( ... [ ... call1(), ... call2() ... ] ... + call3() ... * call4() ... )""" >>> dis.dis(code) 3 0 LOAD_NAME 0 (call1) 3 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 4 6 LOAD_NAME 1 (call2) 9 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 12 BUILD_LIST 2 6 15 LOAD_NAME 2 (call3) 18 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 7 21 LOAD_NAME 3 (call4) 24 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 27 BINARY_MULTIPLY 28 BINARY_ADD 29 RETURN_VALUE >>> dis.dis(code.replace("+", "if").replace("*", "else")) 6 0 LOAD_NAME 0 (call3) 3 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 6 POP_JUMP_IF_FALSE 25 9 LOAD_NAME 1 (call1) 12 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 15 LOAD_NAME 2 (call2) 18 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 21 BUILD_LIST 2 24 RETURN_VALUE 7 >> 25 LOAD_NAME 3 (call4) 28 CALL_FUNCTION 0 (0 positional, 0 keyword pair) 31 RETURN_VALUE I used this code to show the difference between if-else and some arithmetics. AFAICT the feature is possible to implement, as lnotab can contain negative line differences. I don't know whether it is just a bug or a fully intended feature, but it would be quite an enhancement to have better line number tracking, useful for debugging. If this is implemented, it may be worth further backporting. Possible reasons in the upstream Python/compile.c (using < instead of !=): https://github.com/python/cpython/blob/077059e0f086cf8c8b7fb9d1f053e38ddc743f59/Python/compile.c#L4092 https://github.com/python/cpython/blob/077059e0f086cf8c8b7fb9d1f053e38ddc743f59/Python/compile.c#L4438 ---------- components: Interpreter Core messages: 323371 nosy: Arusekk priority: normal severity: normal status: open title: Compiler could output more accurate line numbers type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 12:15:51 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 10 Aug 2018 16:15:51 +0000 Subject: [issue34373] test_time errors on AIX Message-ID: <1533917751.88.0.56676864532.issue34373@psf.upfronthosting.co.za> New submission from Michael Felt : 32-bit: ====================================================================== ERROR: test_mktime (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/src/python3-3.7.0/Lib/test/test_time.py", line 446, in test_mktime self.assertEqual(time.mktime(tt), t) OverflowError: mktime argument out of range ====================================================================== FAIL: test_pthread_getcpuclockid (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/src/python3-3.7.0/Lib/test/test_time.py", line 129, in test_pthread_getcpuclockid self.assertNotEqual(clk_id, time.CLOCK_THREAD_CPUTIME_ID) AssertionError: 12 == 12 ---------------------------------------------------------------------- 64-bit: ====================================================================== ERROR: test_mktime (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/lib/python3.7/test/test_time.py", line 446, in test_mktime self.assertEqual(time.mktime(tt), t) OverflowError: mktime argument out of range ====================================================================== ERROR: test_pthread_getcpuclockid (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/lib/python3.7/test/test_time.py", line 130, in test_pthread_getcpuclockid t1 = time.clock_gettime(clk_id) OverflowError: signed integer is greater than maximum The test_mktime failed because time.mktime(time.localtime(-2)) -- actually any negative value in localtime - fails The patch in the file Modules/timemodule.c fixes this. The test_pthread_getcpuclockid is a bit more complex as the result is different depending on 32 or 64-bit mode. In 32-bit mode AIX always responds with the constant CLOCK_THREAD_CPUTIME_ID. The patch in Lib/test/test_time.py makes the test aware of this. In AIX clockid_t is actually long long. However, changing the type to parse to "L" broke many other things. It seems to work as a long ("l") when the ABI is 64-bit. See additional change in Modules/timemodule.c static PyObject * time_clock_gettime Finally, added some (additional) range checking for _PyTime_localtime for AIX. Not having this complicated testing for above. ---------- components: Interpreter Core, Tests messages: 323372 nosy: Michael.Felt priority: normal severity: normal status: open title: test_time errors on AIX versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 12:23:57 2018 From: report at bugs.python.org (Michael Felt) Date: Fri, 10 Aug 2018 16:23:57 +0000 Subject: [issue34373] test_time errors on AIX In-Reply-To: <1533917751.88.0.56676864532.issue34373@psf.upfronthosting.co.za> Message-ID: <1533918237.61.0.56676864532.issue34373@psf.upfronthosting.co.za> Change by Michael Felt : ---------- keywords: +patch pull_requests: +8210 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 13:36:47 2018 From: report at bugs.python.org (theger) Date: Fri, 10 Aug 2018 17:36:47 +0000 Subject: [issue34374] Shouldn't shutil.copyfile replace link in dst with follow_symlinks set? Message-ID: <1533922607.61.0.56676864532.issue34374@psf.upfronthosting.co.za> New submission from theger : This might not be an issue at all and maybe I'm just missing something but this confused me a bit and hence the question in title. Python's shutil.copyfile() has a follow_symlinks argument but it only affects the source, not the destination - i.e. when src is a symlink, it makes a difference whether the flag is set (and then it will copy the destination of that src symlink) or not (and then it will just create a new symlink in dst pointing to the src symlink's destination). I hope it's clear so far. When dst is a link though, the flag doesn't change anything and it will always copy that file to the dst symlink's destination. My question is... If dst is a symlink and follow_symlinks flag is not set, wouldn't it be more logical if the dst symlink was just replaced by a copy of src instead of copying src to dst's destination? Thanks and sorry if this is just noise. ---------- components: Library (Lib) messages: 323373 nosy: theger priority: normal severity: normal status: open title: Shouldn't shutil.copyfile replace link in dst with follow_symlinks set? type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 13:56:20 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 10 Aug 2018 17:56:20 +0000 Subject: [issue34374] Shouldn't shutil.copyfile replace link in dst with follow_symlinks set? In-Reply-To: <1533922607.61.0.56676864532.issue34374@psf.upfronthosting.co.za> Message-ID: <1533923780.08.0.56676864532.issue34374@psf.upfronthosting.co.za> R. David Murray added the comment: It is following the model of the posix cp command, whose equivalent to 'follow_symlinks' only affects the source. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 13:56:26 2018 From: report at bugs.python.org (Victor Porton) Date: Fri, 10 Aug 2018 17:56:26 +0000 Subject: [issue34375] Subtests (unittest) Message-ID: <1533923786.85.0.56676864532.issue34375@psf.upfronthosting.co.za> New submission from Victor Porton : The following is a fragment of a real code: ~~~ def test_run_xinlude(self): # stub_stdin(self, Global.get_resource_bytes("tests/core/data/xml/xinclude.xml")) for next_script_mode in ['doc1', 'doc2']: for order in ['breadth', 'depth']: with capture_stdin_and_stdout(): command_line.main(['-r', order, 'chain', Global.get_filename("tests/core/data/xml/xinclude.xml"), '-u', 'http://portonvictor.org/ns/trans/precedence-include', '-s', next_script_mode]) self.assertEqual(sys.stdout.buffer.getvalue(), TestUtility.XInclude_output, "for next_script=%s, order=%s" % (next_script_mode, order)) ~~~ I wrote it in one test method instead of four similar methods. It has the deficiency that if the first test fails, the three remaining tests are skipped. I propose to add `subtest` context manager to use it like: ~~~ with subtest(): with capture_stdin_and_stdout(): command_line.main(['-r', order, 'chain', Global.get_filename("tests/core/data/xml/xinclude.xml"), '-u', 'http://portonvictor.org/ns/trans/precedence-include', '-s', next_script_mode]) self.assertEqual(sys.stdout.buffer.getvalue(), TestUtility.XInclude_output, "for next_script=%s, order=%s" % (next_script_mode, order)) ~~~ which would split our test into four independent tests. ---------- components: Library (Lib) messages: 323375 nosy: porton priority: normal severity: normal status: open title: Subtests (unittest) type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 13:59:14 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 10 Aug 2018 17:59:14 +0000 Subject: [issue34375] Subtests (unittest) In-Reply-To: <1533923786.85.0.56676864532.issue34375@psf.upfronthosting.co.za> Message-ID: <1533923954.54.0.56676864532.issue34375@psf.upfronthosting.co.za> R. David Murray added the comment: https://docs.python.org/3/library/unittest.html#distinguishing-test-iterations-using-subtests ---------- nosy: +r.david.murray resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:07:45 2018 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 10 Aug 2018 18:07:45 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533924465.6.0.56676864532.issue34363@psf.upfronthosting.co.za> Neil Girdhar added the comment: Why can't we add an ABC into a NamedTuple instance's MRO? Because while I like Eric's solution, it seems to be backwards: tuple and list are not the special cases?NamedTuple is. All sequences accept an iterable in their constructor, and NamedTuple doesn't. So it should be NamedTuple that is marked as being "weird". Right now, NamedTuple instances claim to be tuples, but don't accept iterables to initialize themselves. That seems wrong. This problem that we have with dataclass can easily pop up somewhere else, and it will require the same restriction to list and tuple types to fix it (breaking user-defined types). Is it imposible to add to the MRO of NamedTuple instances? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:19:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Aug 2018 18:19:58 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() Message-ID: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Apply two accuracy improvements that work well together and that are both cheap (less than 5% difference in speed). 1. Moving the max value to the end saves an iteration and can improve accuracy (especially in the case where len(args) <= 3 where the summation order is always optimal). 2. Use Kahan summation which works especially well because all the inputs are non-negative. The patched version generally gets the error down to within 1 ULP (tested with 100,000 trials using 100 arguments to hypot() where the arguments are generated using random.expovariate(1.0) and arranged in the least favorable order, largest-to-smallest): Patched: [(0.0, 67276), (1.0, 16700), (-0.5, 14702), (-1.0, 1322)] Baseline: [(1.0, 30364), (0.0, 25328), (-0.5, 17407), (-1.0, 10554), (2.0, 6274), (-1.5, 4890), (-2.0, 3027), (-2.5, 897), (3.0, 752), (-3.0, 380), (-3.5, 61), (4.0, 51), (-4.0, 13), (-4.5, 1), (5.0, 1)] The impact on performance is minimal (well under 5%). Patched: $ py -c 'import sys; print(sys.version)' 3.8.0a0 (heads/hypot-kahan-late-swap-2:e1d89184f0, Aug 10 2018, 11:06:21) [Clang 9.1.0 (clang-902.0.39.2)] $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0)' 1000000 loops, best of 7: 230 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0)' 2000000 loops, best of 7: 170 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(5.0, 4.0, 3.0, 2.0, 1.0)' 2000000 loops, best of 7: 119 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(3.0, 2.0, 1.0)' 5000000 loops, best of 7: 95.7 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(2.0, 1.0)' 5000000 loops, best of 7: 81.5 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(1.0)' 5000000 loops, best of 7: 67.4 nsec per loop Baseline: $ py -c 'import sys; print(sys.version)' 3.8.0a0 (heads/master:077059e0f0, Aug 10 2018, 11:02:47) [Clang 9.1.0 (clang-902.0.39.2)] $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0)' 1000000 loops, best of 7: 237 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0)' 2000000 loops, best of 7: 173 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(5.0, 4.0, 3.0, 2.0, 1.0)' 2000000 loops, best of 7: 120 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(3.0, 2.0, 1.0)' 5000000 loops, best of 7: 94.8 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(2.0, 1.0)' 5000000 loops, best of 7: 80.3 nsec per loop $ py -m timeit -r 7 -s 'from math import hypot' 'hypot(1.0)' 5000000 loops, best of 7: 67.1 nsec per loop ---------- assignee: rhettinger components: Library (Lib) files: measure_hypot_alternatives.py messages: 323378 nosy: mark.dickinson, rhettinger, serhiy.storchaka, tim.peters priority: low severity: normal status: open title: Improve accuracy of math.hypot() and math.dist() type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file47741/measure_hypot_alternatives.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:22:40 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Aug 2018 18:22:40 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1533925360.81.0.56676864532.issue34376@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +8211 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:22:49 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Aug 2018 18:22:49 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533925369.87.0.56676864532.issue34363@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +8212 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:28:28 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Fri, 10 Aug 2018 18:28:28 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1533925708.53.0.56676864532.issue34370@psf.upfronthosting.co.za> Vlad Tudorache added the comment: The bug needs forwarding to the Tcl/Tk community. This is the script written in Tcl (run with tclsh8.6 script.tcl for Tcl 8.6 and tclsh8.5 script.tcl for 8.5): package require Tk scrollbar .vbar -width 10 text .edit pack .vbar -side right -fill y pack .edit -side left -fill both -expand 1 .vbar configure -command {.edit yview} .edit configure -yscrollcommand {.vbar set} bind .vbar { } { set cx %x set cy %y set dz [.vbar identify $cx $cy] puts "You clicked at ($cx,$cy) on $dz.\n" } for {set i 1} {$i <= 256} {incr i} { .edit insert "$i.0" "This is the line number $i.\n" } I will post two videos made on my MacBook, showing an expected behavior with Tk 8.5 and the scroll problems with Tk 8.6 on macOS. ---------- Added file: https://bugs.python.org/file47742/Tk86MacIssue.mov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:30:29 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Aug 2018 18:30:29 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533925829.8.0.56676864532.issue34363@psf.upfronthosting.co.za> Eric V. Smith added the comment: Hmm, for some reason I'm not getting mail from this issue, so I made my PR before I saw the comments since my last comment. Raymond has resisted adding a base class to namedtuple. I believe the preferred way to identify a namedtuple is to look for a _fields member. We could do that instead of use the (*[]) trick for all classes derived from tuple or list. Maybe it's worthwhile bringing up the differences in how tuple and namedtuple handle creation with iterables on python-dev. I'm still not certain of the right approach, but PR 8728 adds some tests and fixes the problem identified in this issue. I probably won't commit it until I can discuss with some other people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:34:08 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Fri, 10 Aug 2018 18:34:08 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1533926048.29.0.56676864532.issue34370@psf.upfronthosting.co.za> Vlad Tudorache added the comment: Now, the video for TK 8.5 showing expected behavior on macOS. ---------- Added file: https://bugs.python.org/file47743/Tk85Mac.mov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:37:04 2018 From: report at bugs.python.org (Paul Monson) Date: Fri, 10 Aug 2018 18:37:04 +0000 Subject: [issue33125] Windows 10 ARM64 platform support In-Reply-To: <1521767011.97.0.467229070634.issue33125@psf.upfronthosting.co.za> Message-ID: <1533926224.98.0.56676864532.issue33125@psf.upfronthosting.co.za> Paul Monson added the comment: The PR hasn't changed since September. Is it still active? Should I consider updating the libffi_msvc code to support ARM32 in Python? Completing the switch to libffi makes more sense to me. I fetched the PR code to my fork and rebased it on the current master branch. When I run python -m test there are 2 tests that fail. Is that what's holding the PR up? or is it something more? I'm new to the Python codebase but I can try to help debugging if the failing tests are the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:40:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Aug 2018 18:40:52 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533926452.47.0.56676864532.issue34363@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Raymond has resisted adding a base class to namedtuple. I believe the > preferred way to identify a namedtuple is to look for a _fields member. FWIW, that was also Guido's opinion as well. A named tuple is generic concept defined in the glossary as "Any tuple-like class whose indexable elements are also accessible using a named attribute". This includes user-defined classes, classes created by collections.namedtuple, and instances of structseq. The code generated by oollections.namedtuple was based on patterns already in widespread use at the time. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:52:51 2018 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 10 Aug 2018 18:52:51 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533927171.15.0.56676864532.issue34363@psf.upfronthosting.co.za> Neil Girdhar added the comment: > The code generated by oollections.namedtuple was based on patterns already in widespread use at the time. That's fair enough. However, it seems like there is one important difference: unlike any other Sequence, namedtuples cannot be initialized with an iterable. For that reason, I like Eric's option of checking for the _fields member rather than special-casing list and tuple since it seems like namedtuple is the special case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 14:54:25 2018 From: report at bugs.python.org (Paul Price) Date: Fri, 10 Aug 2018 18:54:25 +0000 Subject: [issue34377] Update valgrind suppressions Message-ID: <1533927265.92.0.56676864532.issue34377@psf.upfronthosting.co.za> New submission from Paul Price : I've found that the valgrind suppressions don't work for me with cpython 3.6.2. Renaming PyObject_Free/PyObject_Realloc to _PyObject_Free/_PyObject_Realloc in the suppressions file works. I've got a patch that I'll put in via a GitHub PR. ---------- components: Demos and Tools messages: 323385 nosy: Paul Price priority: normal severity: normal status: open title: Update valgrind suppressions type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 15:03:08 2018 From: report at bugs.python.org (Paul Price) Date: Fri, 10 Aug 2018 19:03:08 +0000 Subject: [issue34377] Update valgrind suppressions In-Reply-To: <1533927265.92.0.56676864532.issue34377@psf.upfronthosting.co.za> Message-ID: <1533927788.12.0.56676864532.issue34377@psf.upfronthosting.co.za> Change by Paul Price : ---------- keywords: +patch pull_requests: +8213 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 15:14:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2018 19:14:13 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1533928453.43.0.56676864532.issue34376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What results for all components equal? hypot(1.0, 1.0, ..., 1.0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 15:28:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2018 19:28:31 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1533929311.75.0.56676864532.issue34376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Would it give a performance benefit if get rid of multiplication and division, and scale by the power of two approximation of the max using ldexp()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 16:02:05 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Aug 2018 20:02:05 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1533931325.66.0.56676864532.issue18307@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 16:05:41 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Aug 2018 20:05:41 +0000 Subject: [issue18307] Relative path in co_filename for zipped modules In-Reply-To: <1372256829.94.0.0966099631525.issue18307@psf.upfronthosting.co.za> Message-ID: <1533931541.97.0.56676864532.issue18307@psf.upfronthosting.co.za> Brett Cannon added the comment: This will be a semantic change to the value of co_filename so I don't think this can safely be backported. ---------- versions: -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 16:40:32 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Aug 2018 20:40:32 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1533933632.32.0.56676864532.issue34376@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > What results for all components equal? hypot(1.0, 1.0, ..., 1.0) The scaled summation will be exact (all elements scale to 1.0 and frac is always 0.0). > Would it give a performance benefit if get rid of multiplication > and division, and scale by the power of two approximation of the > max using ldexp()? You're right that the multiplication and division are the most expensive part (the adds and subtracts are cheaper and can be done in parallel with subsequent memory fetches). See the attached Clang and GCC-8 disassemblies. I've tried a number of variants and couldn't get any performance boost without breaking some of the test cases. This patch is the best of a dozen attempts. ---------- Added file: https://bugs.python.org/file47744/math_hypot.s _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 16:53:14 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Aug 2018 20:53:14 +0000 Subject: [issue34363] dataclasses.asdict() mishandles dataclass instance attributes that are instances of subclassed typing.NamedTuple In-Reply-To: <1533757285.89.0.56676864532.issue34363@psf.upfronthosting.co.za> Message-ID: <1533934394.84.0.56676864532.issue34363@psf.upfronthosting.co.za> Eric V. Smith added the comment: For the record, I don't disagree with namedtuples not having a base class. Maybe it's best to let copy.deepcopy() deal with namedtuples, instead of trying to detect them here. So just special case exact tuples and lists, and pass everything else to copy.deepcopy(). >>> C = namedtuple('C', 'a b c') >>> c = C(1, 2, 3) >>> b=copy.deepcopy(c) >>> b C(a=1, b=2, c=3) >>> hasattr(b, '_fields') True >>> hasattr(c, '_fields') True >>> b is c False >>> Although by doing that, you lose dict_factory or tuple_factory on nested data structures, and namedtuples that contain dataclasses would be handled differently, I think. I'll do some investigating. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 17:18:48 2018 From: report at bugs.python.org (Tim Peters) Date: Fri, 10 Aug 2018 21:18:48 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1533935928.49.0.56676864532.issue34376@psf.upfronthosting.co.za> Tim Peters added the comment: Not that it matters: "ulp" is a measure of absolute error, but the script is computing some notion of relative error and _calling_ that "ulp". It can understate the true ulp error by up to a factor of 2 (the "wobble" of base 2 fp). Staying away from denorms, this is an easy way to get one ulp with respect to a specific 754 double: def ulp(x): import math mant, exp = math.frexp(x) return math.ldexp(0.5, exp - 52) Then, e.g., >>> x 1.9999999999999991 >>> y 1.9999999999999996 >>> y - x 4.440892098500626e-16 >>> oneulp = ulp(x) >>> oneulp # the same as sys.float_info.epsilon for this x 2.220446049250313e-16 >>> (y - x) / oneulp 2.0 which is the true absolute error of y wrt x. >>> x + 2 * oneulp == y True But: >>> (y - x) / x 2.220446049250314e-16 >>> _ / oneulp 1.0000000000000004 understates the true ulp error by nearly a factor of 2, while the mathematically (but not numerically) equivalent spelling used in the script: >>> (y/x - 1.0) / oneulp 1.0 understates it by exactly a factor of 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 17:28:50 2018 From: report at bugs.python.org (Karan) Date: Fri, 10 Aug 2018 21:28:50 +0000 Subject: [issue34378] Documentation 3.5+ Message-ID: <1533936530.23.0.56676864532.issue34378@psf.upfronthosting.co.za> New submission from Karan : The documentation link for 3.5+ is having an issue with the left sidebar where the index is present. In 2.7 if I scroll the main doc below to mid of the document the sidebar still shows me the index. The same is not present in the 3.5+. I know this is a very minor thing but for a new learner like me who is constantly reading these docs, this very small thing irritates a lot. Thanks ---------- assignee: docs at python components: Documentation files: imgonline-com-ua-twotoone-eLRSfZftmcsz.jpg messages: 323393 nosy: Kapple, docs at python priority: normal severity: normal status: open title: Documentation 3.5+ type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47745/imgonline-com-ua-twotoone-eLRSfZftmcsz.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 17:51:16 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Aug 2018 21:51:16 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1533937876.22.0.56676864532.issue34376@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Here's a little more performance data that might suggest where possible speed optimizations may lay (I was mostly going for accuracy improvements in this patch). On my 2.6GHz (3.6Ghz burst) Haswell, the hypot() function for n arguments takes about 11*n+60 ns per call. The 60 ns fixed portion goes to function call overhead, manipulating native Python objects scattered all over memory, Inf/NaN handling, and in the external calls to __PyArg_ParseStack(), PyObject_Malloc(), PyFloat_AsDouble(), PyObject_Free(), and PyFloat_FromDouble(). The inlined summation routine accesses native C doubles in consecutive memory addresses. Per Agner Fog's instruction timing tables, the DIVSD takes 10-13 cycles which is about 3 ns, the MULSD takes 5 cycles which is about 2ns, and ADDSD/SUBSD each have a 3 cycle latency for another 1 ns each. That accounts for most of the 11 ns per argument variable portion of the running time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 17:56:18 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Aug 2018 21:56:18 +0000 Subject: [issue34378] Documentation 3.5+ In-Reply-To: <1533936530.23.0.56676864532.issue34378@psf.upfronthosting.co.za> Message-ID: <1533938178.19.0.56676864532.issue34378@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Sorry you're having trouble with this. There is similar issue as https://bugs.python.org/issue28044. The Python documentation Sphinx theme is now being maintained over at https://github.com/python/python-docs-theme/ Please file the issue there. Thanks. ---------- nosy: +Mariatta resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Make the sidebar in the documentation follow the section automatically _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 18:10:19 2018 From: report at bugs.python.org (Evan Allrich) Date: Fri, 10 Aug 2018 22:10:19 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section Message-ID: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> New submission from Evan Allrich : At present the note [0] appears under the documentation for `json.dumps` (which does not use the `fp` argument). It seems the note would be better placed with the documentation for the affected function. [0] > Note > > Unlike pickle and marshal, JSON is not a framed protocol, so trying to > serialize multiple objects with repeated calls to dump() using the same > fp will result in an invalid JSON file. ---------- assignee: docs at python components: Documentation messages: 323396 nosy: docs at python, eallrich priority: normal severity: normal status: open title: Move note about repeated calls to json.dump using the same fp to the json.dump section type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 18:20:18 2018 From: report at bugs.python.org (Evan Allrich) Date: Fri, 10 Aug 2018 22:20:18 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section In-Reply-To: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> Message-ID: <1533939618.11.0.56676864532.issue34379@psf.upfronthosting.co.za> Change by Evan Allrich : ---------- keywords: +patch pull_requests: +8215 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 18:35:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Aug 2018 22:35:27 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1533940527.42.0.56676864532.issue34376@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Retested using Tim's ulp(x) function (see attached script). The accuracy results are for 1,000 trials using 10,000 arguments to hypot() where the arguments are generated using triangular(0.999, 1.001) and arranged in the least favorable order, largest-to-smallest: Patched: [(-1.0, 129), (0.0, 723), (1.0, 148)] Baseline: [(-33.0, 2), (-32.0, 1), (-31.0, 1), (-28.0, 5), (-27.0, 2), (-26.0, 4), (-25.0, 3), (-24.0, 4), (-23.0, 1), (-21.0, 9), (-20.0, 7), (-19.0, 6), (-18.0, 15), (-17.0, 12), (-16.0, 6), (-15.0, 12), (-14.0, 14), (-13.0, 15), (-12.0, 15), (-11.0, 25), (-10.0, 21), (-9.0, 24), (-8.0, 26), (-7.0, 29), (-6.0, 36), (-5.0, 33), (-4.0, 37), (-3.0, 31), (-2.0, 39), (-1.0, 43), (0.0, 48), (1.0, 45), (2.0, 32), (3.0, 37), (4.0, 34), (5.0, 25), (6.0, 36), (7.0, 29), (8.0, 35), (9.0, 27), (10.0, 24), (11.0, 17), (12.0, 18), (13.0, 18), (14.0, 18), (15.0, 11), (16.0, 8), (17.0, 6), (18.0, 9), (19.0, 15), (20.0, 8), (21.0, 5), (22.0, 6), (23.0, 4), (24.0, 2), (25.0, 1), (28.0, 2), (30.0, 1), (33.0, 1)] ---------- Added file: https://bugs.python.org/file47746/hypot_accuracy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 01:45:12 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 05:45:12 +0000 Subject: [issue34333] Path.with_suffix() raises TypeError when doing %-formatting In-Reply-To: <1533330187.01.0.56676864532.issue34333@psf.upfronthosting.co.za> Message-ID: <1533966312.41.0.56676864532.issue34333@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 423d05f6f59b24c91b9ef6b2e4ac130316764382 by Berker Peksag in branch 'master': bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663) https://github.com/python/cpython/commit/423d05f6f59b24c91b9ef6b2e4ac130316764382 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 01:45:34 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 05:45:34 +0000 Subject: [issue34333] Path.with_suffix() raises TypeError when doing %-formatting In-Reply-To: <1533330187.01.0.56676864532.issue34333@psf.upfronthosting.co.za> Message-ID: <1533966334.29.0.56676864532.issue34333@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:00:13 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:00:13 +0000 Subject: [issue34333] Path.with_suffix() raises TypeError when doing %-formatting In-Reply-To: <1533330187.01.0.56676864532.issue34333@psf.upfronthosting.co.za> Message-ID: <1533967213.63.0.56676864532.issue34333@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c614121224a5a81d958643471720645b1cb3166e by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663) https://github.com/python/cpython/commit/c614121224a5a81d958643471720645b1cb3166e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:00:36 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:00:36 +0000 Subject: [issue34333] Path.with_suffix() raises TypeError when doing %-formatting In-Reply-To: <1533330187.01.0.56676864532.issue34333@psf.upfronthosting.co.za> Message-ID: <1533967236.33.0.56676864532.issue34333@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:05:06 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:05:06 +0000 Subject: [issue9372] pulldom.DOMEventStream.__getitem__ is broken In-Reply-To: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> Message-ID: <1533967506.89.0.56676864532.issue9372@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 84a13fbda0d79789e3c9efcc9f64752261ce1e8d by Berker Peksag in branch 'master': bpo-9372: Deprecate several __getitem__ methods (GH-8609) https://github.com/python/cpython/commit/84a13fbda0d79789e3c9efcc9f64752261ce1e8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:05:27 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:05:27 +0000 Subject: [issue9372] pulldom.DOMEventStream.__getitem__ is broken In-Reply-To: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> Message-ID: <1533967527.28.0.56676864532.issue9372@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:15:46 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:15:46 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1533968146.1.0.56676864532.issue31908@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c8b0dbc4928a1fe4bd5abebd810b6849374c7af3 by Berker Peksag in branch 'master': bpo-26818: Add a test to make sure the bug is fixed (GH-8664) https://github.com/python/cpython/commit/c8b0dbc4928a1fe4bd5abebd810b6849374c7af3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:15:46 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:15:46 +0000 Subject: [issue26818] trace CLI doesn't respect -s option In-Reply-To: <1461248919.65.0.631004346458.issue26818@psf.upfronthosting.co.za> Message-ID: <1533968146.51.0.902498594338.issue26818@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c8b0dbc4928a1fe4bd5abebd810b6849374c7af3 by Berker Peksag in branch 'master': bpo-26818: Add a test to make sure the bug is fixed (GH-8664) https://github.com/python/cpython/commit/c8b0dbc4928a1fe4bd5abebd810b6849374c7af3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:16:03 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 06:16:03 +0000 Subject: [issue26818] trace CLI doesn't respect -s option In-Reply-To: <1461248919.65.0.631004346458.issue26818@psf.upfronthosting.co.za> Message-ID: <1533968163.24.0.56676864532.issue26818@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:16:03 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 06:16:03 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1533968163.34.0.665841612001.issue31908@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:28:37 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:28:37 +0000 Subject: [issue31908] trace module cli does not write cover files In-Reply-To: <1509418506.94.0.213398074469.issue31908@psf.upfronthosting.co.za> Message-ID: <1533968917.71.0.56676864532.issue31908@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 8fc21c80af73226de875886132e0c32a4ffb32c5 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-26818: Add a test to make sure the bug is fixed (GH-8664) https://github.com/python/cpython/commit/8fc21c80af73226de875886132e0c32a4ffb32c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:28:37 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:28:37 +0000 Subject: [issue26818] trace CLI doesn't respect -s option In-Reply-To: <1461248919.65.0.631004346458.issue26818@psf.upfronthosting.co.za> Message-ID: <1533968917.95.0.902498594338.issue26818@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 8fc21c80af73226de875886132e0c32a4ffb32c5 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-26818: Add a test to make sure the bug is fixed (GH-8664) https://github.com/python/cpython/commit/8fc21c80af73226de875886132e0c32a4ffb32c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:29:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 11 Aug 2018 06:29:00 +0000 Subject: [issue26818] trace CLI doesn't respect -s option In-Reply-To: <1461248919.65.0.631004346458.issue26818@psf.upfronthosting.co.za> Message-ID: <1533968940.29.0.56676864532.issue26818@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:41:38 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Aug 2018 06:41:38 +0000 Subject: [issue34377] Update valgrind suppressions In-Reply-To: <1533927265.92.0.56676864532.issue34377@psf.upfronthosting.co.za> Message-ID: <1533969698.01.0.56676864532.issue34377@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset db6075ab3aa44f69c13c4a169806d08596d25003 by Benjamin Peterson (Paul Price) in branch 'master': closes bpo-34377: Update Valgrind suppressions. (GH-8729) https://github.com/python/cpython/commit/db6075ab3aa44f69c13c4a169806d08596d25003 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:41:56 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 06:41:56 +0000 Subject: [issue34377] Update valgrind suppressions In-Reply-To: <1533927265.92.0.56676864532.issue34377@psf.upfronthosting.co.za> Message-ID: <1533969716.02.0.56676864532.issue34377@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 02:42:04 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 06:42:04 +0000 Subject: [issue34377] Update valgrind suppressions In-Reply-To: <1533927265.92.0.56676864532.issue34377@psf.upfronthosting.co.za> Message-ID: <1533969724.03.0.56676864532.issue34377@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 03:29:35 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 07:29:35 +0000 Subject: [issue34377] Update valgrind suppressions In-Reply-To: <1533927265.92.0.56676864532.issue34377@psf.upfronthosting.co.za> Message-ID: <1533972575.4.0.56676864532.issue34377@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 39c1253bd12d253d8d6d009a1ee1c3729c5ebde4 by Miss Islington (bot) in branch '3.7': closes bpo-34377: Update Valgrind suppressions. (GH-8729) https://github.com/python/cpython/commit/39c1253bd12d253d8d6d009a1ee1c3729c5ebde4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 03:34:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 11 Aug 2018 07:34:04 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section In-Reply-To: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> Message-ID: <1533972844.96.0.56676864532.issue34379@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 9e840848510d20e644a19c723b803877377d3765 by INADA Naoki (Evan Allrich) in branch 'master': bpo-34379: Doc: Move note for json.dump (GH-8730) https://github.com/python/cpython/commit/9e840848510d20e644a19c723b803877377d3765 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 03:34:20 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 07:34:20 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section In-Reply-To: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> Message-ID: <1533972860.86.0.56676864532.issue34379@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 03:34:26 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 07:34:26 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section In-Reply-To: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> Message-ID: <1533972866.71.0.56676864532.issue34379@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 04:02:11 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 11 Aug 2018 08:02:11 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section In-Reply-To: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> Message-ID: <1533974531.26.0.56676864532.issue34379@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6b145085225d4b114b4422f6d3c6e859e75b97d7 by Miss Islington (bot) in branch '3.7': bpo-34379: Doc: Move note for json.dump (GH-8730) https://github.com/python/cpython/commit/6b145085225d4b114b4422f6d3c6e859e75b97d7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 05:13:10 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 11 Aug 2018 09:13:10 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section In-Reply-To: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> Message-ID: <1533978790.5.0.56676864532.issue34379@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset eb6ed12f486f184cb00fc35662d012dbb1f30d2e by INADA Naoki (Miss Islington (bot)) in branch '3.6': bpo-34379: Doc: Move note for json.dump (GH-8730) https://github.com/python/cpython/commit/eb6ed12f486f184cb00fc35662d012dbb1f30d2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 05:13:33 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 11 Aug 2018 09:13:33 +0000 Subject: [issue34379] Move note about repeated calls to json.dump using the same fp to the json.dump section In-Reply-To: <1533939019.03.0.56676864532.issue34379@psf.upfronthosting.co.za> Message-ID: <1533978813.96.0.56676864532.issue34379@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 05:22:13 2018 From: report at bugs.python.org (Steven Silvester) Date: Sat, 11 Aug 2018 09:22:13 +0000 Subject: [issue34380] Relax Restrictions on await? Message-ID: <1533979333.92.0.56676864532.issue34380@psf.upfronthosting.co.za> New submission from Steven Silvester : When writing an `async` function, we often want to `await` a method call that may or may not be `async`. For instance, it may be synchronous in the base class, but asynchronous in the subclass on the instance we have been given. It would be nice for `await foo` to be a no-op if `foo` does not have an `__await__` method. For instance, the following works in EMCAScript 2017: `async function foo () { let bar = await 1; console.log(bar); }`. As a workaround, we have been using `await force_async(foo.bar)`, where `force_async` is the following: ```python async def force_async(obj): """Force an object to be asynchronous""" if hasattr(obj, '__await__'): return await obj async def inner(): return obj return await inner() ``` This functionality is roughly equivalent to `gen.maybe_future` for coroutines, that is now deprecated in Tornado. cf http://www.tornadoweb.org/en/stable/gen.html#tornado.gen.maybe_future ---------- components: asyncio messages: 323410 nosy: Steven Silvester, asvetlov, yselivanov priority: normal severity: normal status: open title: Relax Restrictions on await? versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 05:25:15 2018 From: report at bugs.python.org (Markus Wegmann) Date: Sat, 11 Aug 2018 09:25:15 +0000 Subject: [issue30545] Enum equality across modules: comparing objects instead of values In-Reply-To: <1496379539.81.0.670964151039.issue30545@psf.upfronthosting.co.za> Message-ID: <1533979515.26.0.56676864532.issue30545@psf.upfronthosting.co.za> Markus Wegmann added the comment: Hi there! I came as well in contact with this kind of bug. Sadly, I could not replicate it with a simplified toy example. You can experience the bug, if checkout https://github.com/Atokulus/flora_tools/tree/56bb17ea33c910915875214e916ab73f567b3b0c and run `python3.7 main.py generate_code -d ..` You find the crucial part where the identity check fails at 'radio_math.py:102' in function `get_message_toa`. The program then fails, due to the wrong program flow. ` C:\Users\marku\AppData\Local\Programs\Python\Python37\python.exe C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py generate_code -d C:\Users\marku\Documents\flora Traceback (most recent call last): File "C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py", line 110, in main() File "C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py", line 104, in main generate_code(args.path) File "C:/Users/marku/PycharmProjects/flora_tools/flora_tools/__main__.py", line 58, in generate_code code_gen = CodeGen(flora_path) File "C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", line 37, in __init__ self.generate_all() File "C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", line 40, in generate_all self.generate_radio_constants() File "C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", line 72, in generate_radio_constants radio_toas.append([math.get_message_toa(payload) for payload in payloads]) File "C:\Users\marku\PycharmProjects\flora_tools\flora_tools\codegen\codegen.py", line 72, in radio_toas.append([math.get_message_toa(payload) for payload in payloads]) File "C:\Users\marku\PycharmProjects\flora_tools\flora_tools\radio_math.py", line 130, in get_message_toa ) / self.configuration.bitrate TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' Process finished with exit code 1 ` In the appendix, you find a toy project with similar structure, which in contrast to `flora_tools` works flawlessly. I hope there is somebody out there with a little more experience in spotting the cause. If there is a bug in Python or CPython, it might have quite a security & safety impact. Meanwhile I will hotfix my program by comparing the unerlying enum values. Best regards Atokulus ---------- nosy: +Markus Wegmann Added file: https://bugs.python.org/file47747/enum_bug-flawless_example.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 05:42:16 2018 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 11 Aug 2018 09:42:16 +0000 Subject: [issue30271] Make sqlite3 statement cache optional In-Reply-To: <1493924630.07.0.362744800273.issue30271@psf.upfronthosting.co.za> Message-ID: <1533980536.49.0.56676864532.issue30271@psf.upfronthosting.co.za> Aviv Palivoda added the comment: I don't have any specific use case for making the statement cache optional. I expected that by changing the cache size to 0 there will be no statement cache. I think that this is a common assumption as can be seen in https://github.com/ghaering/pysqlite/issues/126#issue-346189937. rogerbinns did give a use case where we would like to disable the statement cache in https://github.com/ghaering/pysqlite/issues/126#issuecomment-410030910. I think that statement cache should be disable implicitly in that case as you suggest. The code change will be very similar and I do believe we should allow the user to disable the cache. I will be happy to open a new PR once this is merged that will disable the statement cache implicitly when calling `set_authorizer()` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 05:43:13 2018 From: report at bugs.python.org (Michael Osipov) Date: Sat, 11 Aug 2018 09:43:13 +0000 Subject: [issue34381] Make tests with outbound connection optional Message-ID: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> New submission from Michael Osipov <1983-01-06 at gmx.net>: I am currently trying investigate tests failures on HP-UX to port some engineering applications away from Fortran to Python, but a bunch of tests require outbound connection which I do not have. I do have an HTTP proxy only. Please add something to TESTOPTS, e.g., '-o' (offline) to skip test. I'd like to focus on the real test failures. ---------- components: Tests messages: 323413 nosy: michael-o priority: normal severity: normal status: open title: Make tests with outbound connection optional type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 08:31:06 2018 From: report at bugs.python.org (Michael Felt) Date: Sat, 11 Aug 2018 12:31:06 +0000 Subject: [issue34382] test_os.test_mode fails when directory base directory has g+s set Message-ID: <1533990666.21.0.56676864532.issue34382@psf.upfronthosting.co.za> New submission from Michael Felt : test_mode assumes that the SGID bit is not set in the parent directory. If it is set the assertEqual() tests fail. This PR checks the mode of 'base' to see if the SGID bit is set, or not, and compares results accordingly. Back-porting requested. ---------- components: Tests messages: 323414 nosy: Michael.Felt priority: normal severity: normal status: open title: test_os.test_mode fails when directory base directory has g+s set type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 08:37:19 2018 From: report at bugs.python.org (Michael Felt) Date: Sat, 11 Aug 2018 12:37:19 +0000 Subject: [issue34382] test_os.test_mode fails when directory base directory has g+s set In-Reply-To: <1533990666.21.0.56676864532.issue34382@psf.upfronthosting.co.za> Message-ID: <1533991039.4.0.56676864532.issue34382@psf.upfronthosting.co.za> Change by Michael Felt : ---------- keywords: +patch pull_requests: +8224 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 09:12:11 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Aug 2018 13:12:11 +0000 Subject: [issue34151] use malloc() for better performance of some list operations In-Reply-To: <1531935109.04.0.56676864532.issue34151@psf.upfronthosting.co.za> Message-ID: <1533993131.23.0.56676864532.issue34151@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 2fc46979b8c802675ca7fd51c6f2108a305001c8 by Xiang Zhang (Sergey Fedoseev) in branch 'master': bpo-34151: Improve performance of some list operations (GH-8332) https://github.com/python/cpython/commit/2fc46979b8c802675ca7fd51c6f2108a305001c8 ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 09:14:26 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Aug 2018 13:14:26 +0000 Subject: [issue34151] use malloc() for better performance of some list operations In-Reply-To: <1531935109.04.0.56676864532.issue34151@psf.upfronthosting.co.za> Message-ID: <1533993266.2.0.56676864532.issue34151@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 10:58:55 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 11 Aug 2018 14:58:55 +0000 Subject: [issue34380] Relax Restrictions on await? In-Reply-To: <1533979333.92.0.56676864532.issue34380@psf.upfronthosting.co.za> Message-ID: <1533999535.88.0.56676864532.issue34380@psf.upfronthosting.co.za> Yury Selivanov added the comment: This isn't something we want to do in Python. We have a dynamic but strict type system. 1 + '1' is an error in Python, but works just fine in JavaScript. Likewise, in 'await foo' foo is expected to be an awaitable in Python and not anything else. This has been discussed multiple times during PEP 492 approval process. I've been beaten myself by lose semantics of await in JS by awaiting a function that returned null?a simple bug that turned out to be a nightmare to identify in a complex system. So unfortunately I have to close this one as "won't fix", sorry. Thank you for suggesting the idea though. ---------- resolution: -> rejected stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 12:27:05 2018 From: report at bugs.python.org (Steven Silvester) Date: Sat, 11 Aug 2018 16:27:05 +0000 Subject: [issue34380] Relax Restrictions on await? In-Reply-To: <1533979333.92.0.56676864532.issue34380@psf.upfronthosting.co.za> Message-ID: <1534004825.61.0.56676864532.issue34380@psf.upfronthosting.co.za> Steven Silvester added the comment: Thanks for your consideration and for implementing the original feature! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 13:31:39 2018 From: report at bugs.python.org (Ethan Furman) Date: Sat, 11 Aug 2018 17:31:39 +0000 Subject: [issue30545] Enum equality across modules: comparing objects instead of values In-Reply-To: <1496379539.81.0.670964151039.issue30545@psf.upfronthosting.co.za> Message-ID: <1534008699.72.0.56676864532.issue30545@psf.upfronthosting.co.za> Ethan Furman added the comment: Markus Wegmann said: -------------------- > In the appendix, you find a toy project with similar structure, which > in contrast to `flora_tools` works flawlessly. I appreciate your attempt to reproduce the problem, but since you weren't able to, the issue is probably somewhere else and not in Enum. > TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' Your Enum example in flawless is not an IntEnum, so the error (unable to add an integer to None) seems entirely unrelated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 13:39:18 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 11 Aug 2018 17:39:18 +0000 Subject: [issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path In-Reply-To: <1509026474.72.0.213398074469.issue31874@psf.upfronthosting.co.za> Message-ID: <1534009158.41.0.56676864532.issue31874@psf.upfronthosting.co.za> Jason R. Coombs added the comment: In [setuptools 1453](https://github.com/pypa/setuptools/issues/1453), this issue hit the project hard. Tox 3.2 changed the default invocation of pip from the script-based invocation to the runpy based implementation (python -m pip), which causes pip to be unable to uninstall the setuptools in the environment. This use case also reveals that the heuristic of "retain '' in sys.path if the module being executed is in a subdirectory of a current directory" wouldn't address the issue, as `.tox/python/lib/python3.7/site-packages/pip/__main__.py` is in a subdirectory of the current directory, but one would still expect '' not to be in sys.path in this case. But basing on __main__.__spec__, that would probably do what is expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 14:32:59 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 11 Aug 2018 18:32:59 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1534012379.51.0.56676864532.issue34376@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Applied in: https://mail.python.org/pipermail/python-checkins/2018-August/156572.html Note, the BPO number was left off the checkin message. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 15:28:45 2018 From: report at bugs.python.org (Andrei) Date: Sat, 11 Aug 2018 19:28:45 +0000 Subject: [issue34383] asyncio passes SSL certificate error to loop.call_exception_handler() Message-ID: <1534015725.83.0.56676864532.issue34383@psf.upfronthosting.co.za> New submission from Andrei : I'm using 3.7, but it's an issue that I've found in the old github repo for 3.6. When using asyncio, SSL certificate errors don't get suppressed. I've tried: - with contextlib.suppress(Exception) - except & pass Original ticket: https://github.com/python/asyncio/issues/404 ---------- components: asyncio messages: 323421 nosy: DanAndrei, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio passes SSL certificate error to loop.call_exception_handler() type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 17:07:54 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Aug 2018 21:07:54 +0000 Subject: [issue34377] Update valgrind suppressions In-Reply-To: <1533927265.92.0.56676864532.issue34377@psf.upfronthosting.co.za> Message-ID: <1534021674.88.0.56676864532.issue34377@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset fe62d3664431dcd01a4421256ff700f0daab4e3c by Benjamin Peterson (Miss Islington (bot)) in branch '3.6': closes bpo-34377: Update Valgrind suppressions. (GH-8734) https://github.com/python/cpython/commit/fe62d3664431dcd01a4421256ff700f0daab4e3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 17:56:50 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 11 Aug 2018 21:56:50 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1534024610.7.0.56676864532.issue34376@psf.upfronthosting.co.za> Tim Peters added the comment: Thanks for doing the "real ulp" calc, Raymond! It was intended to make the Kahan gimmick look better, and it succeeded ;-) I don't personally care whether adding 10K things ends up with 50 ulp error, but to each their own. Division can be mostly removed from scaling, but it's a bit delicate. The obvious stab would be to multiply by 1/max instead of dividing by max. That introduces another rounding error, but as you've already discovered this computation as a whole is relatively insensitive to rounding errors in scaling. The real problem is that 1/max can overflow (when max is subnormal - the IEEE range isn't symmetric). Instead a power of 2 could be used, chosen so that it and its reciprocal are both representable. There's no particular virtue in scaling the largest value to 1.0 - the real point is to avoid spurious overflow/underflow when squaring the scaled x. Code like the following could work. Scaling would introduce essentially no rounding errors then. But I bet a call to `ldexp()` is even more expensive than division on most platforms. So it may well be slower when there are few points. def hyp_ps(xs): b = max(map(abs, xs)) _, exp = frexp(b) exp = -3 * exp // 4 # scale and invscale are exact. # Multiplying by scale is exact, except when # the result becomes subnormal (in which case # |x| is insignifcant compared to |b|). # invscale isn't needed until the loop ends, # so the division time should overlap with the # loop body. scale = ldexp(1.0, exp) # exact invscale = 1.0 / scale # exact # and `x * scale` is exact except for underflow s = fsum((x * scale)**2 for x in xs) return invscale * sqrt(s) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 18:11:03 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 11 Aug 2018 22:11:03 +0000 Subject: [issue33300] Bad usage example in id() DocString In-Reply-To: <1523995335.26.0.682650639539.issue33300@psf.upfronthosting.co.za> Message-ID: <1534025463.8.0.56676864532.issue33300@psf.upfronthosting.co.za> Change by Martin Panter : ---------- resolution: -> duplicate status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 19:04:16 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 11 Aug 2018 23:04:16 +0000 Subject: [issue24111] Valgrind suppression file should be updated In-Reply-To: <1430549990.4.0.860597056405.issue24111@psf.upfronthosting.co.za> Message-ID: <1534028656.19.0.56676864532.issue24111@psf.upfronthosting.co.za> Zackery Spytz added the comment: This was fixed in #34377. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 19:10:28 2018 From: report at bugs.python.org (Matt Pruitt) Date: Sat, 11 Aug 2018 23:10:28 +0000 Subject: [issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX In-Reply-To: <1507266884.06.0.213398074469.issue31710@psf.upfronthosting.co.za> Message-ID: <1534029028.82.0.56676864532.issue31710@psf.upfronthosting.co.za> Matt Pruitt added the comment: Also ran into this issue while building Python in an isolated environment. Realized that libffi is installing into the $EPREFIX/lib64 directory of our build environment. Despite pkg-config returning the correct directory for linking libffi, it took explicitly setting LDFLAGS to the correct lib64 directory in my build process for the Python build to succeed. I noticed from your build.log that you don't explicitly add your lib64 to your LDFLAGS. Perhaps give that a shot? ---------- nosy: +mhpruitt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 20:21:27 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Aug 2018 00:21:27 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1534033287.92.0.56676864532.issue34369@psf.upfronthosting.co.za> Martin Panter added the comment: I think this was an attempt to specify a positional-only parameter (by using square brackets), and include a default value in the signature. The usual approach in this situation is to use square brackets, but only mention the default value in the text: control(changelist, max_events[, timeout]) . . . The default for "timeout" is None, to wait forever. In Issue 13386 Ezio suggested against showing both square brackets and a default value, and I agree. Berker: your "select" and "poll" cases all include the PEP 457 slash "/" notation, which was supposed to indicate positional-only parameters. See Issue 21314 about explaining this notation in the documentation somewhere. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, martin.panter versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 23:41:11 2018 From: report at bugs.python.org (Girts Folkmanis) Date: Sun, 12 Aug 2018 03:41:11 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows Message-ID: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> New submission from Girts Folkmanis : Documentation for os.readlink says "Changed in version 3.6: Accepts a path-like object.". This works fine on macOS, but blows up on Windows: Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> import pathlib >>> os.readlink(pathlib.Path('foo')) Traceback (most recent call last): File "", line 1, in TypeError: readlink() argument 1 must be str, not WindowsPath ---------- components: Library (Lib) messages: 323427 nosy: girtsf priority: normal severity: normal status: open title: os.readlink does not accept pathlib.Path on Windows type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 00:56:09 2018 From: report at bugs.python.org (John Nelson) Date: Sun, 12 Aug 2018 04:56:09 +0000 Subject: [issue34323] False timeout log message on proactor close In-Reply-To: <1533250213.71.0.56676864532.issue34323@psf.upfronthosting.co.za> Message-ID: <1534049769.87.0.56676864532.issue34323@psf.upfronthosting.co.za> John Nelson added the comment: Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform, sys >>> platform.win32_ver() ('2012ServerR2', '6.3.9600', 'SP0', 'Multiprocessor Free') >>> sys.version_info sys.version_info(major=3, minor=5, micro=4, releaselevel='final', serial=0) ---------- nosy: +John Nelson2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 01:10:35 2018 From: report at bugs.python.org (LarBob Doomer) Date: Sun, 12 Aug 2018 05:10:35 +0000 Subject: [issue34385] Failed to build these modules: _ctypes on Solaris 10 Message-ID: <1534050635.26.0.56676864532.issue34385@psf.upfronthosting.co.za> New submission from LarBob Doomer : I am compiling with GNU binutils 2.24, GCC 5.5.0, GNU make 4.2.1. When attempting to build 3.6.x, the build is successful except for the fact that the _ctypes module fails to build. This of course causes the install to fail. Failed to build these modules: _ctypes I do have libffi-dev installed through OpenCSW. ---------- components: ctypes messages: 323429 nosy: LarBob Doomer priority: normal severity: normal status: open title: Failed to build these modules: _ctypes on Solaris 10 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 01:36:51 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 12 Aug 2018 05:36:51 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534052211.88.0.56676864532.issue34384@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +8225 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 01:39:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Aug 2018 05:39:39 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1534052379.75.0.56676864532.issue34376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that in most real cases (unless max is too large or too small) we can get rid of scaling at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 01:54:20 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 12 Aug 2018 05:54:20 +0000 Subject: [issue22602] UTF-7 codec decodes ill-formed sequences starting with "+" In-Reply-To: <1412945083.94.0.341902119278.issue22602@psf.upfronthosting.co.za> Message-ID: <1534053260.34.0.56676864532.issue22602@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +8226 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 01:57:56 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 12 Aug 2018 05:57:56 +0000 Subject: [issue22602] UTF-7 codec decodes ill-formed sequences starting with "+" In-Reply-To: <1412945083.94.0.341902119278.issue22602@psf.upfronthosting.co.za> Message-ID: <1534053476.71.0.56676864532.issue22602@psf.upfronthosting.co.za> Zackery Spytz added the comment: This was also mentioned in #24848. ---------- nosy: +ZackerySpytz versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 02:33:10 2018 From: report at bugs.python.org (Markus Wegmann) Date: Sun, 12 Aug 2018 06:33:10 +0000 Subject: [issue30545] Enum equality across modules: comparing objects instead of values In-Reply-To: <1496379539.81.0.670964151039.issue30545@psf.upfronthosting.co.za> Message-ID: <1534055590.55.0.56676864532.issue30545@psf.upfronthosting.co.za> Markus Wegmann added the comment: Hi Ethan > Your Enum example in flawless is not an IntEnum, so the error (unable to add an integer to None) seems entirely unrelated. The TypeError is just a consequence of the faulty Enum identity comparison some lines before. I mentioned the TypeError so you can verify whether your Python version takes the same program flow. I also did further research. The Enum's are definitely different regarding the module path -- the instance comparison will therefore return False. I checked __module__ + __qualname__: `flora_tools.radio_configuration.RadioModem.LORA` vs. `radio_configuration.RadioModem.LORA` The cause is the wrong import statement in `flora_tools/codegen/codegen.py`: `from radio_configuration import RadioConfiguration,\ RADIO_CONFIGURATIONS` It should have been `from flora_tools.radio_configuration import RadioConfiguration\ RADIO_CONFIGURATIONS` The real deal here is why I was allowed to directly import from `radio_configuration` in the first place. I'm not allowed to directly import a submodule in the toy project without the proper root module name appended. Maybe I don't see the big picture, or have some crude options/monkey_patching enabled. Nevertheless, the behaviour regarding Enum comparisons and different import paths seems to me quite misleading. Best regards Atokulus ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 02:36:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Aug 2018 06:36:18 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534055778.43.0.56676864532.issue34384@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 02:52:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Aug 2018 06:52:05 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534056725.17.0.56676864532.issue34384@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Windows nosy: +berker.peksag, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 03:10:06 2018 From: report at bugs.python.org (Ethan Furman) Date: Sun, 12 Aug 2018 07:10:06 +0000 Subject: [issue30545] Enum equality across modules: comparing objects instead of values In-Reply-To: <1496379539.81.0.670964151039.issue30545@psf.upfronthosting.co.za> Message-ID: <1534057806.88.0.56676864532.issue30545@psf.upfronthosting.co.za> Ethan Furman added the comment: What you have discovered is not Enum specific, but in fact can happen with any module (as stated in my first comment in this bug report). Maybe these SO question will help: https://stackoverflow.com/q/2489601/208880 https://stackoverflow.com/a/4798648/208880 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 03:43:30 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 12 Aug 2018 07:43:30 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1534059810.59.0.56676864532.issue34376@psf.upfronthosting.co.za> Stefan Behnel added the comment: Could we maybe make an educated guess based on absmin and absmax whether scaling is needed or not? ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 03:50:05 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 12 Aug 2018 07:50:05 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1534060205.77.0.56676864532.issue34369@psf.upfronthosting.co.za> Tal Einat added the comment: In Python 3.8 this will have already been fixed (thanks to the recent conversion of the select module to use Argument Clinic); see below output from a recent build from the master branch. Given that, is this worth fixing on 2.7 and <3.8? Help on built-in function control: control(changelist, maxevents, timeout=None, /) method of select.kqueue instance Calls the kernel kevent function. changelist Must be an iterable of kevent objects describing the changes to be made to the kernel's watch list or None. maxevents The maximum number of events that the kernel will return. timeout The maximum time to wait in seconds, or else None to wait forever. This accepts floats for smaller timeouts, too. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 05:00:30 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 12 Aug 2018 09:00:30 +0000 Subject: [issue21314] Document '/' in signatures In-Reply-To: <1397988439.5.0.703056699862.issue21314@psf.upfronthosting.co.za> Message-ID: <1534064430.6.0.56676864532.issue21314@psf.upfronthosting.co.za> Berker Peksag added the comment: I'd suggest adding a FAQ entry to the "Core Language" section at https://docs.python.org/3/faq/programming.html#core-language then we can link to it from the places (except pydoc docs) Zachary listed in msg223893. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 05:20:19 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 12 Aug 2018 09:20:19 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534065619.12.0.56676864532.issue30411@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- keywords: +patch pull_requests: +8227 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 05:36:13 2018 From: report at bugs.python.org (Artem Golubin) Date: Sun, 12 Aug 2018 09:36:13 +0000 Subject: [issue34386] Expose a dictionary of interned strings in sys module Message-ID: <1534066573.72.0.56676864532.issue34386@psf.upfronthosting.co.za> New submission from Artem Golubin : Python provides an ability to intern strings (sys.intern). It would be useful to expose a read-only dictionary of interned strings to the Python users so we can see what kind of strings are interned. It takes minimal changes since internally it's just a dictionary. Is this worth adding to the sys module? ---------- components: Interpreter Core messages: 323437 nosy: rushter priority: normal severity: normal status: open title: Expose a dictionary of interned strings in sys module type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 05:56:15 2018 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Aug 2018 09:56:15 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1534067775.72.0.56676864532.issue34369@psf.upfronthosting.co.za> Martin Panter added the comment: Even in 3.8, the main documentation is not fixed: https://docs.python.org/dev/library/select.html#kqueue-objects ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 06:21:54 2018 From: report at bugs.python.org (Tal Einat) Date: Sun, 12 Aug 2018 10:21:54 +0000 Subject: [issue34369] kqueue.control() documentation and implementation mismatch In-Reply-To: <1533882016.89.0.56676864532.issue34369@psf.upfronthosting.co.za> Message-ID: <1534069314.36.0.56676864532.issue34369@psf.upfronthosting.co.za> Tal Einat added the comment: We can just remove the "=None" in the docs for select.kqueue.control() to conform with the rest of that doc. We don't use the PEP 457 slash notation in the docs for select (or perhaps at all?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 06:44:04 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 12 Aug 2018 10:44:04 +0000 Subject: [issue34386] Expose a dictionary of interned strings in sys module In-Reply-To: <1534066573.72.0.56676864532.issue34386@psf.upfronthosting.co.za> Message-ID: <1534070644.41.0.56676864532.issue34386@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Could you explain why this would be useful? ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 07:46:09 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 12 Aug 2018 11:46:09 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1534074369.64.0.56676864532.issue34213@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 4d12e4dc28b7c782c368bae2e8fd3815167ed37d by Eric V. Smith (Vadim Pushtaev) in branch 'master': bpo-34213: Allow dataclasses to work with a field named 'object'. (GH-8452) https://github.com/python/cpython/commit/4d12e4dc28b7c782c368bae2e8fd3815167ed37d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 07:46:29 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 12 Aug 2018 11:46:29 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1534074389.56.0.56676864532.issue34213@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 07:55:20 2018 From: report at bugs.python.org (Kamyar Inanloo) Date: Sun, 12 Aug 2018 11:55:20 +0000 Subject: [issue34387] Deletion of attributes in dataclass is buggy! Message-ID: <1534074920.67.0.56676864532.issue34387@psf.upfronthosting.co.za> New submission from Kamyar Inanloo : When using del or delattr on an instance of dataclass, attribute does not get deleted truly! using vars or getattr still returns the deleted attribute just using delattr again raises error! ---------- components: Argument Clinic messages: 323442 nosy: Kamyar Inanloo, larry priority: normal severity: normal status: open title: Deletion of attributes in dataclass is buggy! type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 08:36:17 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 12 Aug 2018 12:36:17 +0000 Subject: [issue24076] sum() several times slower on Python 3 64-bit In-Reply-To: <1430332618.4.0.236828536627.issue24076@psf.upfronthosting.co.za> Message-ID: <1534077377.67.0.56676864532.issue24076@psf.upfronthosting.co.za> Stefan Behnel added the comment: FWIW, a PGO build of Py3.7 is now about 20% *faster* here than my Ubuntu 16/04 system Python 2.7, and for some (probably unrelated) reason, the system Python 3.5 is another 2% faster on my side. IMHO, the only other thing that seems obvious to try would be to inline the unpacking of single digit PyLongs into sum(). I attached a simple patch that does that, in case someone wants to test it out. For non-PGO builds, it's about 17% faster for me. Didn't take the time to benchmark PGO builds with it. ---------- versions: -Python 3.5 Added file: https://bugs.python.org/file47748/unpack_single_digits.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 08:44:11 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 Aug 2018 12:44:11 +0000 Subject: [issue24076] sum() several times slower on Python 3 64-bit In-Reply-To: <1430332618.4.0.236828536627.issue24076@psf.upfronthosting.co.za> Message-ID: <1534077851.38.0.56676864532.issue24076@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 10:15:40 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 12 Aug 2018 14:15:40 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1534083340.02.0.56676864532.issue34213@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 10:25:07 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 12 Aug 2018 14:25:07 +0000 Subject: [issue34387] Deletion of attributes in dataclass is buggy! In-Reply-To: <1534074920.67.0.56676864532.issue34387@psf.upfronthosting.co.za> Message-ID: <1534083907.65.0.56676864532.issue34387@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- components: +Library (Lib) -Argument Clinic nosy: +eric.smith -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 11:04:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Aug 2018 15:04:29 +0000 Subject: [issue22602] UTF-7 codec decodes ill-formed sequences starting with "+" In-Reply-To: <1412945083.94.0.341902119278.issue22602@psf.upfronthosting.co.za> Message-ID: <1534086269.99.0.56676864532.issue22602@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about a "+" character followed immediately by the end of the bytestring? >>> b'+'.decode('utf-7') '' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 11:54:57 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Aug 2018 15:54:57 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1534089297.17.0.56676864532.issue30871@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: pythoninfo is failing on several buildbots: https://buildbot.python.org/all/#/builders/102/builds/55 https://buildbot.python.org/all/#/builders/79/builds/237 https://buildbot.python.org/all/#/builders/112/builds/161 https://buildbot.python.org/all/#/builders/118/builds/164 https://buildbot.python.org/all/#/builders/56/builds/105 https://buildbot.python.org/all/#/builders/18/builds/109 Example error: ./python -m test.pythoninfo ERROR: collect_gdb() failed Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/pythoninfo.py", line 561, in collect_info collect_func(info_add) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/pythoninfo.py", line 300, in collect_gdb version = version.splitlines()[0] IndexError: list index out of range ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 11:55:01 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Aug 2018 15:55:01 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1534089301.27.0.56676864532.issue30871@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 11:58:55 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Aug 2018 15:58:55 +0000 Subject: [issue34388] collect_gdb fails for test.pythoninfo in several buildbots Message-ID: <1534089535.5.0.56676864532.issue34388@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : collect_gdb fails for the test.pythoninfo step in several buildbots: https://buildbot.python.org/all/#/builders/102/builds/55 https://buildbot.python.org/all/#/builders/79/builds/237 https://buildbot.python.org/all/#/builders/112/builds/161 https://buildbot.python.org/all/#/builders/118/builds/164 https://buildbot.python.org/all/#/builders/56/builds/105 https://buildbot.python.org/all/#/builders/18/builds/109 Example error: ./python -m test.pythoninfo ERROR: collect_gdb() failed Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/pythoninfo.py", line 561, in collect_info collect_func(info_add) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/pythoninfo.py", line 300, in collect_gdb version = version.splitlines()[0] IndexError: list index out of range ---------- components: Build, Tests messages: 323446 nosy: pablogsal priority: normal severity: normal status: open title: collect_gdb fails for test.pythoninfo in several buildbots type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 11:59:59 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Aug 2018 15:59:59 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1534089599.07.0.56676864532.issue30871@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: All of these failures seems related to `collect_gdb` I am going to open a new issue: https://bugs.python.org/issue34388 Please, re-open this one if you think is better to have both open. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 12:00:26 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Aug 2018 16:00:26 +0000 Subject: [issue34388] collect_gdb fails for test.pythoninfo in several buildbots In-Reply-To: <1534089535.5.0.56676864532.issue34388@psf.upfronthosting.co.za> Message-ID: <1534089626.17.0.56676864532.issue34388@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: The origin of this can be related to https://bugs.python.org/issue30871 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 12:00:36 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Aug 2018 16:00:36 +0000 Subject: [issue34376] Improve accuracy of math.hypot() and math.dist() In-Reply-To: <1533925198.56.0.56676864532.issue34376@psf.upfronthosting.co.za> Message-ID: <1534089636.37.0.56676864532.issue34376@psf.upfronthosting.co.za> Tim Peters added the comment: Sure, if we make more assumptions. For 754 doubles, e.g., scaling isn't needed if `1e-100 < absmax < 1e100` unless there are a truly ludicrous number of points. Because, if that holds, the true sum is between 1e-200 and number_of_points*1e200, both far from being near trouble. Then the summation loop gets mostly duplicated (with and without scaling), a platform-dependent assumption is introduced, and we need two test-and-branches to determine which to run. In the common two-argument cases, it saves one division in return. Note that without the current form of scaling, we lose the guarantee that the sum is exact when all the arguments are the same (because they're all scaled to exactly 1.0 then, but in general each x*x loses half the product bits without scaling). I don't care about that myself, but Serhiy seems to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 12:10:45 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Aug 2018 16:10:45 +0000 Subject: [issue34388] collect_gdb fails for test.pythoninfo in several AMD64 FreeBSD buildbots In-Reply-To: <1534089535.5.0.56676864532.issue34388@psf.upfronthosting.co.za> Message-ID: <1534090245.74.0.56676864532.issue34388@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- title: collect_gdb fails for test.pythoninfo in several buildbots -> collect_gdb fails for test.pythoninfo in several AMD64 FreeBSD buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 12:32:43 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 12 Aug 2018 16:32:43 +0000 Subject: [issue34388] collect_gdb fails for test.pythoninfo in several AMD64 FreeBSD buildbots In-Reply-To: <1534089535.5.0.56676864532.issue34388@psf.upfronthosting.co.za> Message-ID: <1534091563.6.0.56676864532.issue34388@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 13:01:08 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 12 Aug 2018 17:01:08 +0000 Subject: [issue34386] Expose a dictionary of interned strings in sys module In-Reply-To: <1534066573.72.0.56676864532.issue34386@psf.upfronthosting.co.za> Message-ID: <1534093268.09.0.56676864532.issue34386@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I wouldn't want a user to be able to mutate the dictionary directly (otherwise, non-strings could be added). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 14:41:41 2018 From: report at bugs.python.org (LarBob Doomer) Date: Sun, 12 Aug 2018 18:41:41 +0000 Subject: [issue34385] Failed to build these modules: _ctypes on Solaris 10 In-Reply-To: <1534050635.26.0.56676864532.issue34385@psf.upfronthosting.co.za> Message-ID: <1534099301.26.0.56676864532.issue34385@psf.upfronthosting.co.za> LarBob Doomer added the comment: This is due to it not finding the external libffi I have. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 15:32:17 2018 From: report at bugs.python.org (Antony Lee) Date: Sun, 12 Aug 2018 19:32:17 +0000 Subject: [issue34389] CPython may fail to build in the presence of a ~/.pydistutils.cfg Message-ID: <1534102337.9.0.56676864532.issue34389@psf.upfronthosting.co.za> New submission from Antony Lee : I have a ~/.pydistutils.cfg with the following contents: [build_ext] force = true inplace = true (--force is useful because sometimes just comparing timestamps is insufficient to know whether a package needs to be rebuilt, e.g. in the presence of external dependencies -- and I use ccache anyways to avoid paying for excessive rebuilds; --inplace is useful as I have quite a few packages with extension modules that are editably-installed). With this ~/.pydistutils.cfg, cpython fails to build. For example, having checked out v3.7.0 from a git clone (otherwise clean git repo, per `git clean -xfd`), mkdir build && cd build && ../configure && make ultimately results in gcc -pthread -shared build/temp.linux-x86_64-3.7/home/antony/src/extern/cpython/Modules/_ctypes/_ctypes.o build/temp.linux-x86_64-3.7/home/antony/src/extern/cpython/Modules/_ctypes/callbacks.o build/temp.linux-x86_64-3.7/home/antony/src/extern/cpython/Modules/_ctypes/callproc.o build/temp.linux-x86_64-3.7/home/antony/src/extern/cpython/Modules/_ctypes/stgdict.o build/temp.linux-x86_64-3.7/home/antony/src/extern/cpython/Modules/_ctypes/cfield.o -L/usr/local/lib -lffi -ldl -o /home/antony/src/extern/cpython/build/_ctypes.cpython-37m-x86_64-linux-gnu.so *** WARNING: renaming "_struct" since importing it failed: build/lib.linux-x86_64-3.7/_struct.cpython-37m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory Traceback (most recent call last): File "../setup.py", line 442, in check_extension_import importlib._bootstrap._load(spec) File "", line 696, in _load File "", line 670, in _load_unlocked File "", line 583, in module_from_spec File "", line 1043, in create_module File "", line 219, in _call_with_frames_removed ImportError: build/lib.linux-x86_64-3.7/_struct.cpython-37m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "../setup.py", line 2363, in main() File "../setup.py", line 2358, in main "Tools/scripts/2to3", "Tools/scripts/pyvenv"] File "/home/antony/src/extern/cpython/Lib/distutils/core.py", line 148, in setup dist.run_commands() File "/home/antony/src/extern/cpython/Lib/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/antony/src/extern/cpython/Lib/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/antony/src/extern/cpython/Lib/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/home/antony/src/extern/cpython/Lib/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/antony/src/extern/cpython/Lib/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/antony/src/extern/cpython/Lib/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "../setup.py", line 308, in build_extensions self.check_extension_import(ext) File "../setup.py", line 447, in check_extension_import assert not self.inplace AssertionError make: *** [Makefile:618: sharedmods] Error 1 Removing the ~/.pydistutils.cfg fixes the issue and leads to a successful build. I think(?) CPython's build system should essentially make sure that distutils behaves as if `--no-user-cfg` was in effect. Or at least the limitation should be documented, but it's not very practical to have to temporarily rename an existing ~/.pydistutils.cfg whenever building CPython. See also https://bugs.python.org/issue9309, perhaps. ---------- components: Build messages: 323452 nosy: Antony.Lee priority: normal severity: normal status: open title: CPython may fail to build in the presence of a ~/.pydistutils.cfg versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 15:41:27 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 12 Aug 2018 19:41:27 +0000 Subject: [issue34387] Deletion of attributes in dataclass is buggy! In-Reply-To: <1534074920.67.0.56676864532.issue34387@psf.upfronthosting.co.za> Message-ID: <1534102887.72.0.56676864532.issue34387@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:09:33 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 12 Aug 2018 20:09:33 +0000 Subject: [issue34386] Expose a dictionary of interned strings in sys module In-Reply-To: <1534066573.72.0.56676864532.issue34386@psf.upfronthosting.co.za> Message-ID: <1534104573.03.0.56676864532.issue34386@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Another reason for not wanting write access to the sys.intern dictionary is that this dictionary does not own references to its keys and values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:14:01 2018 From: report at bugs.python.org (Kamyar Inanloo) Date: Sun, 12 Aug 2018 20:14:01 +0000 Subject: [issue34387] Deletion of attributes in dataclass is buggy! In-Reply-To: <1534074920.67.0.56676864532.issue34387@psf.upfronthosting.co.za> Message-ID: <1534104841.09.0.56676864532.issue34387@psf.upfronthosting.co.za> Kamyar Inanloo added the comment: Actually it just sets the attribute to its default value, instead of removing it from the instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:33:06 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Aug 2018 20:33:06 +0000 Subject: [issue24111] Valgrind suppression file should be updated In-Reply-To: <1430549990.4.0.860597056405.issue24111@psf.upfronthosting.co.za> Message-ID: <1534105986.51.0.56676864532.issue24111@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Update valgrind suppressions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:57:51 2018 From: report at bugs.python.org (Artem Golubin) Date: Sun, 12 Aug 2018 20:57:51 +0000 Subject: [issue34386] Expose a dictionary of interned strings in sys module In-Reply-To: <1534066573.72.0.56676864532.issue34386@psf.upfronthosting.co.za> Message-ID: <1534107471.92.0.56676864532.issue34386@psf.upfronthosting.co.za> Artem Golubin added the comment: Thank you, I agree. I can't come up with practical use cases other than my curiosity. Is it possible to somehow expose the dictionary in the debug build of Python? Currently, there is no way to access it from the interpreter even with ctypes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 19:10:00 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 12 Aug 2018 23:10:00 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1534115400.01.0.56676864532.issue34370@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +serhiy.storchaka, wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 19:37:06 2018 From: report at bugs.python.org (Lisa Roach) Date: Sun, 12 Aug 2018 23:37:06 +0000 Subject: [issue33073] Add as_integer_ratio() to int() objects In-Reply-To: <1520976305.18.0.467229070634.issue33073@psf.upfronthosting.co.za> Message-ID: <1534117026.88.0.56676864532.issue33073@psf.upfronthosting.co.za> Change by Lisa Roach : ---------- keywords: +patch pull_requests: +8230 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 22:28:40 2018 From: report at bugs.python.org (Greg Toombs) Date: Mon, 13 Aug 2018 02:28:40 +0000 Subject: [issue4508] distutils compiler not handling spaces in path to output/src files In-Reply-To: <1228341537.43.0.522254260997.issue4508@psf.upfronthosting.co.za> Message-ID: <1534127320.2.0.56676864532.issue4508@psf.upfronthosting.co.za> Greg Toombs added the comment: Confirmed still broken in 3.6.3. I ran into this when running CFFI. It does very wrong things with the path to cl.exe and include files with path spaces. My workaround is to monkeypatch distutils.ccompiler.gen_preprocess_options such that include paths are formed as -I"path" and not -Ipath; and to monkeypatch distutils.spawn._nt_quote_args so that it leaves all of the arguments unquoted except the first arg (path to cl.exe), which I only got working by using tilde-mangled short names. ---------- nosy: +Greg Toombs versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 23:24:43 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 13 Aug 2018 03:24:43 +0000 Subject: [issue34387] Deletion of attributes in dataclass is buggy! In-Reply-To: <1534074920.67.0.56676864532.issue34387@psf.upfronthosting.co.za> Message-ID: <1534130683.82.0.56676864532.issue34387@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think this is just normal behavior with classes. But since you haven't shown any code, I can't tell exactly what you're doing and what you're expecting. When providing bug reports, you need to provide: - Exactly what code you're executing. - Exactly what output you're seeing. - What you expect if it's different from what you're seeing. Please provide this in the body of a message as text, not (for example) as an attached image file. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 23:25:05 2018 From: report at bugs.python.org (Matthias Fripp) Date: Mon, 13 Aug 2018 03:25:05 +0000 Subject: [issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments Message-ID: <1534130705.52.0.56676864532.issue34390@psf.upfronthosting.co.za> New submission from Matthias Fripp : The code below demonstrates this bug. import argparse parser = argparse.ArgumentParser() parser.add_argument('--list-arg', nargs='+', default=[]) parser.parse_known_args(['--list-arg', 'a', '--text-arg=hello world']) The result should be (Namespace(list_arg=['a']), ['--text-arg=hello world']), but is actually (Namespace(list_arg=['a', '--text-arg=hello world']), []). i.e., --list-arg consumes the next argument if that argument hasn't been defined and uses an equal sign and has a space in the assigned value. Note that both of the following work correctly: parser.parse_known_args(['--list-arg', 'a', '--text-arg', 'hello world']) parser.parse_known_args(['--list-arg', 'a', '--text-arg=hello']) Further, the next line should cause an error, but doesn't, due to the behavior noted above: parser.parse_args(['--list-arg', 'a', '--text-arg=hello world']) ---------- components: Library (Lib) messages: 323458 nosy: Matthias Fripp priority: normal severity: normal status: open title: arparse.ArgumentParser misparses list arguments followed by undefined arguments type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 23:32:51 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 13 Aug 2018 03:32:51 +0000 Subject: [issue34213] Frozen dataclass __init__ fails for "object" property" In-Reply-To: <1532457260.21.0.56676864532.issue34213@psf.upfronthosting.co.za> Message-ID: <1534131171.11.0.56676864532.issue34213@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 32e58fc32188753d2a3604feacdf9540fe9515fb by Miss Islington (bot) in branch '3.7': bpo-34213: Allow dataclasses to work with a field named 'object'. (GH-8452) https://github.com/python/cpython/commit/32e58fc32188753d2a3604feacdf9540fe9515fb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 01:10:20 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 13 Aug 2018 05:10:20 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534137020.96.0.56676864532.issue34384@psf.upfronthosting.co.za> Berker Peksag added the comment: Steve and/or Eryk, I was adding some tests for os.readlink() in PR 8740 and I noticed that os.readlink() always returns str on Windows. However, the documentation for os.readlink() says: If the path is a bytes object (direct or indirectly), the result will be a bytes object. The question is, should I add support for bytes as part of PR 8740? And what is the best way to implement it? (e.g. use CreateFileA() if PyUnicode_Check(path.object) returns false?) ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 01:26:52 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 13 Aug 2018 05:26:52 +0000 Subject: [issue13837] test_shutil fails with symlinks enabled under Windows In-Reply-To: <1327255807.39.0.63998442373.issue13837@psf.upfronthosting.co.za> Message-ID: <1534138012.91.0.56676864532.issue13837@psf.upfronthosting.co.za> Berker Peksag added the comment: Issue 20055 was a duplicate of this one. Both tests have been adjusted in https://github.com/python/cpython/commit/3f48ac98c04fc17f12c63dcf593dd0c19379c7df. ---------- dependencies: -os.chmod() does not follow symlinks on Windows, os.path.realpath on Windows does not follow symbolic links nosy: +berker.peksag resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 01:38:52 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 13 Aug 2018 05:38:52 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534138732.39.0.56676864532.issue34384@psf.upfronthosting.co.za> Berker Peksag added the comment: In msg235615 (Issue 9949), Zachary said using bytes paths on Windows is deprecated, but I can't see the actual conversation because Rietveld seems to be down: https://bugs.python.org/review/9949/#ps5077 I think the os.readlink() documentation needs to be updated if we decide to keep the status quo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 02:21:18 2018 From: report at bugs.python.org (Joshua Kinard) Date: Mon, 13 Aug 2018 06:21:18 +0000 Subject: [issue18597] On Windows sys.stdin.readline() doesn't handle Ctrl-C properly In-Reply-To: <1375175592.24.0.539816782076.issue18597@psf.upfronthosting.co.za> Message-ID: <1534141278.09.0.56676864532.issue18597@psf.upfronthosting.co.za> Joshua Kinard added the comment: I was able to modify eryksun's patch for Python-2.7.15, at least the bulk of it. It looks like the '_PyOS_SigintEvent' function is new to the 3.x branch, and despite it being a fairly simple function, it's used in a few core Python modules. So I'm not sure the difficulty of adding it for Python-2.7. Is there an alternative function available in the 2.7 code that I can replace it with? I also don't have a clue how anyone even builds Python-2.7 on Windows, because getting the required tools properly installed borders on the arcane (esp VS2008 tools). So testing it might be a bit difficult. Is there a cheat sheet somewhere? ---------- nosy: +kumba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 03:14:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Aug 2018 07:14:03 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534144443.49.0.56676864532.issue34384@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Currently the behavior doesn't match the documentation. Initially I thought that this can be solved by adding the support of path-like objects and backporting this up to 3.6. But os.readlink() on Windows doesn't not support also bytes paths, and never supported. This looks to me now more like a new feature. In 3.6 and 3.7 we can resolve this issue by just updating the documentation. Bytes paths on Windows were deprecated before 3.6. Since implementing PEP 529, their should be supported on Windows if they are supported on other platforms. We shouldn't use an 8-bit API like CreateFileA, but instead decode bytes paths with UTF-8 and use a Unicode API (this should be implemented in path_converter()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 03:21:48 2018 From: report at bugs.python.org (Niels Kristian Jensen) Date: Mon, 13 Aug 2018 07:21:48 +0000 Subject: [issue30563] [Cygwin] multiprocessing module with pool object issue In-Reply-To: <1496559266.31.0.239393976491.issue30563@psf.upfronthosting.co.za> Message-ID: <1534144908.73.0.56676864532.issue30563@psf.upfronthosting.co.za> Niels Kristian Jensen added the comment: I ran the same test on Windows 10, works fine, but Windows Server 2012 bails out with no message, no abnormal exit code. @Antoine Pitrou - if Cygwin and Python3 are non-compatible, I suggest that someone in the Python3 community writes a note about this, for reference. In fact, the Python package should probably be removed from Cygwin? ---------- nosy: +nkjensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 04:10:58 2018 From: report at bugs.python.org (Martin Panter) Date: Mon, 13 Aug 2018 08:10:58 +0000 Subject: [issue34357] situation where urllib3 works, but urllib does not work In-Reply-To: <1533730627.83.0.56676864532.issue34357@psf.upfronthosting.co.za> Message-ID: <1534147858.24.0.56676864532.issue34357@psf.upfronthosting.co.za> Martin Panter added the comment: I can?t get it to hang. Does your computer or Internet provider have a proxy or firewall that may be interfering? Perhaps it is worth comparing the HTTP header fields being sent and received. You can enable debug messages to see the request sent, and print the response fields directly. Most important things to look for are the Content-Length and Transfer-Encoding (if any) fields in the response. >>> import urllib.request >>> url = "https://cinnamon-spices.linuxmint.com/json/applets.json" >>> handler = urllib.request.HTTPSHandler(debuglevel=1) >>> opener = urllib.request.build_opener(handler) >>> resp = opener.open(url) send: b'GET /json/applets.json HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: cinnamon-spices.linuxmint.com\r\nUser-Agent: Python-urllib/3.6\r\nConnection: close\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: Server header: Date header: Content-Type header: Content-Length header: Connection header: Last-Modified header: ETag header: X-Sucuri-Cache header: X-XSS-Protection header: X-Frame-Options header: X-Content-Type-Options header: X-Sucuri-ID header: Accept-Ranges $ >>> print(response.info()) Server: Sucuri/Cloudproxy Date: Mon, 13 Aug 2018 07:18:11 GMT Content-Type: application/json Content-Length: 70576 Connection: close Last-Modified: Mon, 13 Aug 2018 07:25:14 GMT ETag: "113b0-5734bfe97145e" X-Sucuri-Cache: HIT X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN X-Content-Type-Options: nosniff X-Sucuri-ID: 11014 Accept-Ranges: bytes >>> data = resp.read() >>> len(data) 70576 Another experiment would be to try ?http.client? directly, which I understand is used by both the built-in ?urllib.request? module, and ?urllib3?: from http.client import HTTPSConnection conn = HTTPSConnection("cinnamon-spices.linuxmint.com") headers = { # Same header fields sent by ?urllib.request? "Accept-Encoding": "identity", "Host": "cinnamon-spices.linuxmint.com", "User-Agent": "Python-urllib/3.6", "Connection": "close", } conn.request("GET", "/json/applets.json", headers=headers) resp = conn.getresponse() print(resp.msg) data = resp.read() Try removing the ?Connection: close? field from the request. Occasionally this triggers bad server behaviour (see Issue 12849); maybe your server or proxy is affected. ---------- nosy: +martin.panter stage: -> test needed type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 04:23:44 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 13 Aug 2018 08:23:44 +0000 Subject: [issue34386] Expose a dictionary of interned strings in sys module In-Reply-To: <1534066573.72.0.56676864532.issue34386@psf.upfronthosting.co.za> Message-ID: <1534148624.65.0.56676864532.issue34386@psf.upfronthosting.co.za> Ronald Oussoren added the comment: IMHO we shouldn't expose the intern dictionary without there being a clear, and good enough, use case for doing so. Exposing the dictionary decreases implementation flexibility, and increases requirements on other implementations. One example of the former: at least in theory the interning dictionary could be a set, but we couldn't make that change if the dictionary were exposed in the API. With current information I'm -1 on exposing the dictionary, and -0 on doing that for debug builds only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 05:25:55 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 Aug 2018 09:25:55 +0000 Subject: [issue30563] [Cygwin] multiprocessing module with pool object issue In-Reply-To: <1496559266.31.0.239393976491.issue30563@psf.upfronthosting.co.za> Message-ID: <1534152355.1.0.56676864532.issue30563@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > In fact, the Python package should probably be removed from Cygwin? We don't maintain Cygwin nor Python on Cygwin here. You should contact those people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 05:38:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Aug 2018 09:38:52 +0000 Subject: [issue34386] Expose a dictionary of interned strings in sys module In-Reply-To: <1534066573.72.0.56676864532.issue34386@psf.upfronthosting.co.za> Message-ID: <1534153132.11.0.56676864532.issue34386@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Ronald. Using a dict instance is an implementation detail. CPython could use a dict, a set, a hashtable implementation from Modules/hashtable.c, or the HAMT implementation from Python/hamt.c. Other Python implementations can have other options. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 05:47:28 2018 From: report at bugs.python.org (Tal Einat) Date: Mon, 13 Aug 2018 09:47:28 +0000 Subject: [issue1529353] Squeezer - squeeze large output in the interpreter Message-ID: <1534153648.78.0.56676864532.issue1529353@psf.upfronthosting.co.za> Tal Einat added the comment: I'm back to working on this. I've made good progress: I'm nearly done with all of the changes suggested here and ready for another PR review. I'd like some opinions on a few things: 1. Should the tooltip-related configuration options be removed? There is one for whether to show tooltips for squeezed outputs and another to set the hover delay. I feel that they add unnecessary complexity. 2. Should there be an option to entirely disable auto-squeezing? Currently there is only a setting for the minimum number of lines, which can just be set very high. 3. Should we keep the events for squeezing the last output block and expanding the last squeezed output block? ISTM the keyboard shortcuts would only be used by "power users", which aren't our main target. Further, without keyboard shortcuts, I see no point for having these events at all, given that it is easy to achieve this otherwise. 4. Is it worth the effort to update the number of lines displayed for squeezed outputs when a shell window's width is changed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 05:50:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 Aug 2018 09:50:35 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 Message-ID: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> New submission from Christian Heimes : Related to #32947 Four ftplib tests are failing with OpenSSL 1.1.1-pre8 and TLS 1.3 enabled. All failing tests use a separate data connection and transfer data on the server. For store operations, the client never calls recv(). This breaks bidirectional shutdown. I assume there are session tickets stuck on the wire. ====================================================================== ERROR: test_storbinary (test.test_ftplib.TestTLS_FTPClassMixin) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 591, in test_storbinary self.client.storbinary('stor', f) File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 514, in storbinary conn.unwrap() File "/home/heimes/dev/python/cpython/Lib/ssl.py", line 1091, in unwrap s = self._sslobj.shutdown() OSError: [Errno 0] Error ====================================================================== ERROR: test_storbinary_rest (test.test_ftplib.TestTLS_FTPClassMixin) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 603, in test_storbinary_rest self.client.storbinary('stor', f, rest=r) File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 514, in storbinary conn.unwrap() File "/home/heimes/dev/python/cpython/Lib/ssl.py", line 1091, in unwrap s = self._sslobj.shutdown() OSError: [Errno 0] Error ====================================================================== ERROR: test_storlines (test.test_ftplib.TestTLS_FTPClassMixin) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 608, in test_storlines self.client.storlines('stor', f) File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 545, in storlines conn.unwrap() File "/home/heimes/dev/python/cpython/Lib/ssl.py", line 1091, in unwrap s = self._sslobj.shutdown() OSError: [Errno 0] Error ====================================================================== ERROR: test_data_connection (test.test_ftplib.TestTLS_FTPClass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 889, in test_data_connection self.assertEqual(self.client.voidresp(), "226 transfer complete") File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 251, in voidresp resp = self.getresp() File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 236, in getresp resp = self.getmultiline() File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 222, in getmultiline line = self.getline() File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 204, in getline line = self.file.readline(self.maxline + 1) File "/home/heimes/dev/python/cpython/Lib/socket.py", line 589, in readinto return self._sock.recv_into(b) socket.timeout: timed out ---------------------------------------------------------------------- Ran 88 tests in 9.402s FAILED (errors=4, skipped=1) ---------- messages: 323472 nosy: christian.heimes priority: normal severity: normal status: open title: test_ftplib is failing with TLS 1.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 06:24:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Aug 2018 10:24:33 +0000 Subject: [issue34392] Add sys.isinterned() Message-ID: <1534155873.32.0.56676864532.issue34392@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : I need to test whether the string is interned for Python implementations of marshal.dumps(). It is easy to do in C, and I suggest to expose this functionality to Python. Currently you can test if the string is interned using the following function: def isinterned(s): return sys.intern(s) is s But it has a side effect -- it interns a string if it is not equal to an already interned string. ---------- components: Interpreter Core messages: 323473 nosy: rhettinger, ronaldoussoren, serhiy.storchaka priority: normal severity: normal status: open title: Add sys.isinterned() type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 06:29:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Aug 2018 10:29:27 +0000 Subject: [issue34392] Add sys.isinterned() In-Reply-To: <1534155873.32.0.56676864532.issue34392@psf.upfronthosting.co.za> Message-ID: <1534156167.02.0.56676864532.issue34392@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +8231 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 07:07:02 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 13 Aug 2018 11:07:02 +0000 Subject: [issue34392] Add sys.isinterned() In-Reply-To: <1534155873.32.0.56676864532.issue34392@psf.upfronthosting.co.za> Message-ID: <1534158422.8.0.56676864532.issue34392@psf.upfronthosting.co.za> Christian Heimes added the comment: I'd prefer to have this as an internal API, either sys._isinterned() or as a helper method in testcapi. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 07:34:23 2018 From: report at bugs.python.org (liad) Date: Mon, 13 Aug 2018 11:34:23 +0000 Subject: [issue34393] json.dumps - allow compression Message-ID: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za> New submission from liad : The list of arguments of json.dump() can be seen here: https://docs.python.org/2/library/json.html Notice that there is no way to make compression. For example pandas allows you to do: df.to_csv(path_or_buf=file_name, index=False, encoding='utf-8', compression='gzip', quoting=QUOTE_NONNUMERIC) I want to be able to compress when I do: with open('products.json', 'w') as outfile: json.dump(data, outfile, sort_keys=True) Please add the ability to compress using json.dump() ---------- messages: 323475 nosy: liad100 priority: normal severity: normal status: open title: json.dumps - allow compression type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 07:49:24 2018 From: report at bugs.python.org (rushter) Date: Mon, 13 Aug 2018 11:49:24 +0000 Subject: [issue34393] json.dumps - allow compression In-Reply-To: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za> Message-ID: <1534160964.71.0.56676864532.issue34393@psf.upfronthosting.co.za> rushter added the comment: You can use the gzip module. with gzip.GzipFile('products.json', 'w') as outfile: outfile.write(json.dumps(data, outfile, sort_keys=True)) ---------- nosy: +rushter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 08:24:08 2018 From: report at bugs.python.org (liad) Date: Mon, 13 Aug 2018 12:24:08 +0000 Subject: [issue34393] json.dumps - allow compression In-Reply-To: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za> Message-ID: <1534163048.03.0.56676864532.issue34393@psf.upfronthosting.co.za> liad added the comment: The gzip module may work for saving file localy but for example: This upload json to Google Storage: import datalab.storage as storage storage.Bucket('mybucket').item(path).write_to(json.dumps(response), 'application/json') Your won't work here unless I save the file locally and only then upload it... It's a bit of a problem when your files are 100 GBs+ I still think the json.dump() should support compression ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 08:26:39 2018 From: report at bugs.python.org (David) Date: Mon, 13 Aug 2018 12:26:39 +0000 Subject: [issue34357] situation where urllib3 works, but urllib does not work In-Reply-To: <1533730627.83.0.56676864532.issue34357@psf.upfronthosting.co.za> Message-ID: <1534163199.66.0.56676864532.issue34357@psf.upfronthosting.co.za> David added the comment: Hi Martin. It's definitely something with my internet connection. Yesterday I temporarily changed the way I connect to the internet to use the mobile connection from my cell phone instead of my WiFi connection, and things started working. I also debugged the headers being received and I did notice the "Connection: Close" header was the only relevant difference in the request when comparing it to the request sent by my browser when accessing that page directly. My next task was to investigate how to do what you just suggested... With my currently knowledge of python it would've taken me ages to figure out, so thanks so much! Let me try your suggestions and report back! Thanks so much for your help! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 08:36:26 2018 From: report at bugs.python.org (Semyon) Date: Mon, 13 Aug 2018 12:36:26 +0000 Subject: [issue34394] Descriptors HowTo doesn't mention __set_name__ Message-ID: <1534163786.32.0.56676864532.issue34394@psf.upfronthosting.co.za> New submission from Semyon : There is a great HowTo document for descriptors https://github.com/python/cpython/blob/master/Doc/howto/descriptor.rst But it doesn't even mention the __set_name__ method which was added in py3. And it lists the descriptor protocol without that method as if it is the full protocol. The only way to know about that method is to go to the link for any other method and then you'll see that there is a __set_name__. I think the guide sholud be updated to include at least information about existence of __set_name__. ---------- assignee: docs at python components: Documentation messages: 323479 nosy: MarSoft, docs at python priority: normal severity: normal status: open title: Descriptors HowTo doesn't mention __set_name__ versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 08:39:51 2018 From: report at bugs.python.org (David) Date: Mon, 13 Aug 2018 12:39:51 +0000 Subject: [issue34357] situation where urllib3 works, but urllib does not work In-Reply-To: <1533730627.83.0.56676864532.issue34357@psf.upfronthosting.co.za> Message-ID: <1534163991.15.0.56676864532.issue34357@psf.upfronthosting.co.za> David added the comment: martin.parter, it worked! Thanks so much, I was going nuts!!!! I also read the issue you pointed to, very interesting. Even if all servers should just work here, it does not seem to be the case in real life (I guess it's something easy to misconfigure) so I agree not setting "Connection: false" by default would make the standard lib more user friendly. I guess I'll now talk to the maintainers of the upstream library and suggest the following: * Reading this issue and the one you pointed to. * Reviewing their server configuration. * Migrating to http.client, specially if they don't make to fix the server configuration. This can now be closed, thanks so much again <3 ---------- stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 08:48:25 2018 From: report at bugs.python.org (Jim Jewett) Date: Mon, 13 Aug 2018 12:48:25 +0000 Subject: [issue15100] Race conditions in shutil.copy, shutil.copy2 and shutil.copyfile In-Reply-To: <1340020668.92.0.801725909503.issue15100@psf.upfronthosting.co.za> Message-ID: <1534164505.89.0.56676864532.issue15100@psf.upfronthosting.co.za> Jim Jewett added the comment: (Note: I am talking only about the disclosure issue; file corruption would ideally be fixed as far back as possible, though I would be somewhat sympathetic to a "nah, that ain't security, too late" argument.) My current UI shows this as relevant to every release *except* 3.4 and 3.8. If it is really 3.4 only, I think it should be closed -- anyone still using 3.4 *and* able to install from source is likely to be more upset by unexpected (and possibly silent) breakage of an existing process than new exploits of a 6 year old bug. If it really does apply to 3.5-3.7, then it would be good to do the same fix in all (and to match 3.8, which presumably is also affected, and simply wasn't available to check when the Versions were last set). If, for some reason, the *right* fix on 3.8 (or at least 3.7 or 3.6) doesn't apply to earlier 3.x versions, I suggest closing it as won't-fix on those older versions. That said, I'm probably the wrong person to verify which versions are affected, so consider this as only soft support for Release Manager to do so if this continues to languish. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 08:53:46 2018 From: report at bugs.python.org (Jim Jewett) Date: Mon, 13 Aug 2018 12:53:46 +0000 Subject: [issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits In-Reply-To: <1360573856.52.0.124531930967.issue17180@psf.upfronthosting.co.za> Message-ID: <1534164826.3.0.56676864532.issue17180@psf.upfronthosting.co.za> Jim Jewett added the comment: My current UI shows this as relevant *only* to 3.4 and 3.5. If it really has been fixed in 3.6, and the fix can't be backported, I think the risk of breaking backup programs is enough to argue for doing nothing more than a doc change. Anyone still using 3.4 (or even 3.5) *and* able to install from source is likely to be more upset by unexpected (and possibly silent) breakage of an existing process than new exploits of a 6 year old bug. That said, I'm probably the wrong person to verify which versions are affected, so consider this as only soft support for Release Manager to do so if this continues to languish. ---------- nosy: +Jim.Jewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 09:14:33 2018 From: report at bugs.python.org (Jeff Dafoe) Date: Mon, 13 Aug 2018 13:14:33 +0000 Subject: [issue16038] ftplib: unlimited readline() from connection In-Reply-To: <1348569175.14.0.867789583045.issue16038@psf.upfronthosting.co.za> Message-ID: <1534166073.78.0.56676864532.issue16038@psf.upfronthosting.co.za> Jeff Dafoe added the comment: I have a question about this old patch, as it just came down in a CentOS 6 update. I think the patch is applied to the data channel in ASCII mode and not just the control channel. On the data channel in ASCII mode, there should be no assumption of maximum line length before EOL. I saw that your current value came from vsftpd's header file. I'm guessing if you look at the implementation, it's either only applied to the control channel or it's just used to set a single read size inside of a loop. Examples of ASCII mode files that can exceed nearly any MAXLINE value without EOL are XML files or EDI files. ---------- nosy: +Jeff Dafoe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 11:13:28 2018 From: report at bugs.python.org (Shiva Saxena) Date: Mon, 13 Aug 2018 15:13:28 +0000 Subject: [issue34117] Rename "generator expressions" to "generator comprehensions" In-Reply-To: <1531614433.94.0.56676864532.issue34117@psf.upfronthosting.co.za> Message-ID: <1534173208.11.0.56676864532.issue34117@psf.upfronthosting.co.za> Shiva Saxena added the comment: I am interested to work on this issue. It would be my first contribution in cpython. Should I go ahead? ---------- nosy: +GeekyShacklebolt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:26:18 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Aug 2018 16:26:18 +0000 Subject: [issue19050] [Python 2, Windows] fflush called on pointer to potentially closed file In-Reply-To: <1379595509.08.0.968867256316.issue19050@psf.upfronthosting.co.za> Message-ID: <1534177578.94.0.56676864532.issue19050@psf.upfronthosting.co.za> Steve Dower added the comment: As this is a fail-fast and not an uncontrolled crash, I vote to close as wontfix. This only applies to security-fix versions, and it is not exploitable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:28:15 2018 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 13 Aug 2018 16:28:15 +0000 Subject: [issue19050] [Python 2, Windows] fflush called on pointer to potentially closed file In-Reply-To: <1379595509.08.0.968867256316.issue19050@psf.upfronthosting.co.za> Message-ID: <1534177695.85.0.56676864532.issue19050@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:32:30 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 13 Aug 2018 16:32:30 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534177950.22.0.56676864532.issue34384@psf.upfronthosting.co.za> Steve Dower added the comment: Serhiy is exactly right, but to emphasise, the best way to do paths now is to use argument clinic with its path_t type. On Windows, .narrow is a flag that indicates whether you should PyUnicode_FSEncode() any results before returning them, and .wide is always initialized correctly. Do not use any *A APIs - only *W from now on :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:53:22 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Mon, 13 Aug 2018 16:53:22 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules Message-ID: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : There are memory leaks in csv and pickle modules caused by incautious usage of PyMem_Resize(). See GitHub PR. ---------- components: Extension Modules messages: 323487 nosy: sir-sigurd priority: normal severity: normal status: open title: memory leaks in error handling in csv and pickle modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:54:20 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Mon, 13 Aug 2018 16:54:20 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534179260.26.0.56676864532.issue34395@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +8232 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:08:17 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 13 Aug 2018 18:08:17 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534183697.74.0.56676864532.issue34384@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the suggestions! I've updated PR 8740. I will submit separate PRs to fix os.readlink() documentation in 3.6 and 3.7 branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:23:19 2018 From: report at bugs.python.org (Niklas Rosenstein) Date: Mon, 13 Aug 2018 19:23:19 +0000 Subject: [issue33262] Deprecate shlex.split(None) to read from stdin. In-Reply-To: <1523442529.49.0.682650639539.issue33262@psf.upfronthosting.co.za> Message-ID: <1534188199.02.0.56676864532.issue33262@psf.upfronthosting.co.za> Niklas Rosenstein added the comment: I've just run into this as well -- I thought it was a bug until I found this issue. I also think that this is anything from sane. ---------- nosy: +n_rosenstein _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:36:41 2018 From: report at bugs.python.org (Dan Snider) Date: Mon, 13 Aug 2018 19:36:41 +0000 Subject: [issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty Message-ID: <1534189001.92.0.56676864532.issue34396@psf.upfronthosting.co.za> New submission from Dan Snider : The ones I know of are list.__getitem__, dict __contains__ & __getitem__, and (frozen)set.__contains__ but from what I can tell so far it seems like dict.__getitem__ takes the worst hit. For dicts, I've spent a few hours trying to figure out what's getting put into the heap type's mp_subscript slot to slow it down so drastically but I just can't figure it out. So I just forced `dict_subscript` into the heap type's mp_subscript slot to confirm the rather obvious impossibility of it breaking anything. Here's a "little" timeit script to demonstrate how horribly inefficient `dict.__getitem__` is when called on anything other than an extension type: if __name__ == '__main__': import timeit from collections import OrderedDict as FastDictSub from ctypes import * class mappingmethods(Structure): _fields_ = [ ('mp_length', c_void_p), ('mp_subscript', PYFUNCTYPE(py_object,py_object,py_object)), ('mp_ass_subscript', c_void_p)] class _type_object(Structure): _fields_ = [('junk', (c_uint8*56)), # <- brevity ('tp_as_mapping', POINTER(mappingmethods))] py_type = POINTER(_type_object) class SlowDictSub(dict): pass assert SlowDictSub.__base__ is dict and FastDictSub.__base__ is dict assert SlowDictSub.__getitem__ is dict.__getitem__ assert FastDictSub.__getitem__ is dict.__getitem__ mp = dict.fromkeys(range(15)) setup = 'from __main__ import mp, %s as Dict; d=Dict(mp)' print(f'Comparing execution time of heap allocated dict subtype ' f'versus PyODict_Type (who also inherits dict.__getitem__)...\n') slown, slowt = timeit.Timer('d[10]', setup%'SlowDictSub').autorange() print(f'avg. exec {slown/slowt:_.0f} SlowDictSub[x] statements per second') fastn, fastt = timeit.Timer('d[10]', setup%'FastDictSub').autorange() print(f'avg. exec {fastn/fastt:_.0f} OrderedDict[x] statements per second') print() print(f'SlowDictSub was {1/(fastt/slowt):.2f}x slower than OrderedDict... ' f"Let's see what happens when we fix SlowDictSub's 'broken' " "mp_subscript slot:\n") slow_tp = cast(id(SlowDictSub), py_type).contents fast_tp = cast(id(FastDictSub), py_type).contents slow_tp.tp_as_mapping.contents.mp_subscript = ( fast_tp.tp_as_mapping.contents.mp_subscript) postn, postt = timeit.Timer('d[10]', setup%'SlowDictSub').autorange() print(f'avg. exec {postn/postt:_.0f} SlowDictSub[x] after slot change') print(f'which is now {1/(fastt/postt):.2}x the speed of dict_item') Comparing execution time of heap allocated dict subtype versus PyODict_Type (who also inherits dict.__getitem__)... avg. exec 6_220_709 SlowDictSub[x] statements per second avg. exec 21_894_971 OrderedDict[x] statements per second SlowDictSub was 3.52x slower than OrderedDict... Let's see what happens when we fix SlowDictSub's 'broken' mp_subscript slot: avg. exec 21_665_595 SlowDictSub[x] after slot change which is now 1.0x the speed of dict_item ---------- components: Interpreter Core messages: 323490 nosy: bup priority: normal severity: normal status: open title: Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty type: performance versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:38:54 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Mon, 13 Aug 2018 19:38:54 +0000 Subject: [issue34397] remove redundant overflow checks in tuple and list implementations Message-ID: <1534189134.26.0.56676864532.issue34397@psf.upfronthosting.co.za> New submission from Sergey Fedoseev : Max size of list and tuples is limited by PY_SSIZE_T_MAX / sizeof(PyObject*), so the sum of any two list/tuples sizes always <= PY_SSIZE_T_MAX if sizeof(PyObject*) > 1, which seems true for all supported (existing?) platforms. It means that overflow checks in app1, ins1, list_concat and tupleconcat are redundant and can be safely removed. ---------- components: Interpreter Core messages: 323491 nosy: sir-sigurd priority: normal severity: normal status: open title: remove redundant overflow checks in tuple and list implementations type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:39:51 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Mon, 13 Aug 2018 19:39:51 +0000 Subject: [issue34397] remove redundant overflow checks in tuple and list implementations In-Reply-To: <1534189134.26.0.56676864532.issue34397@psf.upfronthosting.co.za> Message-ID: <1534189191.67.0.56676864532.issue34397@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +8233 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:59:35 2018 From: report at bugs.python.org (Xavier Hardy) Date: Mon, 13 Aug 2018 19:59:35 +0000 Subject: [issue34356] Add support for args and kwargs in logging.conf In-Reply-To: <1533715378.01.0.56676864532.issue34356@psf.upfronthosting.co.za> Message-ID: <1534190375.94.0.56676864532.issue34356@psf.upfronthosting.co.za> Change by Xavier Hardy : ---------- keywords: +patch pull_requests: +8234 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 16:37:19 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 13 Aug 2018 20:37:19 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534192639.6.0.56676864532.issue34395@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Hi and thank you for the report. Could you elaborate a bit more on how/where the leak happens? This will help when reviewing the Pull Request. Thanks! ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 17:33:17 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Aug 2018 21:33:17 +0000 Subject: [issue34387] Deletion of attributes in dataclass is buggy In-Reply-To: <1534074920.67.0.56676864532.issue34387@psf.upfronthosting.co.za> Message-ID: <1534195997.54.0.56676864532.issue34387@psf.upfronthosting.co.za> Brett Cannon added the comment: I agree with Eric that without concrete details I suspect everything is working as expected. E.g. ```python class Foo: attr = -13 ins = Foo() ins.attr = 42 print(ins.attr) del ins.attr print(ins.attr) ``` ---------- nosy: +brett.cannon title: Deletion of attributes in dataclass is buggy! -> Deletion of attributes in dataclass is buggy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 18:12:06 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 13 Aug 2018 22:12:06 +0000 Subject: [issue34394] Descriptors HowTo doesn't mention __set_name__ In-Reply-To: <1534163786.32.0.56676864532.issue34394@psf.upfronthosting.co.za> Message-ID: <1534198326.69.0.56676864532.issue34394@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks. I'm already working on this. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 19:04:39 2018 From: report at bugs.python.org (Erik Janssens) Date: Mon, 13 Aug 2018 23:04:39 +0000 Subject: [issue27186] add os.fspath() In-Reply-To: <20160602220647.10416.48472.A244A1B0@psf.io> Message-ID: <1534201479.7.0.56676864532.issue27186@psf.upfronthosting.co.za> Erik Janssens added the comment: thank you for the info ... I'll have a look at making the posix module easier to port ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 20:53:51 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Aug 2018 00:53:51 +0000 Subject: [issue34117] Rename "generator expressions" to "generator comprehensions" In-Reply-To: <1531614433.94.0.56676864532.issue34117@psf.upfronthosting.co.za> Message-ID: <1534208031.62.0.56676864532.issue34117@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Results from two Python courses: * In terms of teaching gexexps, there was no net gain or loss. When genexps are show side-by-side with list/dict/set comps the symmetric relationship was obvious regardless of terminology. * In terms of being able to search StackOverflow, blog posts, and external resources, the new terminology made the resources unfindable. * When using the new terminology, I did get questions that never came up before, "why don't the parentheses mean tuple-comprehension". Based on those results, I recommend we keep the terminology the same as it is now. The loss of searchability isn't worth it (there doesn't seem to be any upside) and it is concerning that a new category of confusion (list/tuple comprehension) seems to be arising from the change in terminology. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 20:55:28 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Aug 2018 00:55:28 +0000 Subject: [issue34397] remove redundant overflow checks in tuple and list implementations In-Reply-To: <1534189134.26.0.56676864532.issue34397@psf.upfronthosting.co.za> Message-ID: <1534208128.62.0.56676864532.issue34397@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- nosy: +mark.dickinson, serhiy.storchaka, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 00:15:47 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 14 Aug 2018 04:15:47 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1534220147.1.0.56676864532.issue34270@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- pull_requests: +8235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 00:32:34 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 14 Aug 2018 04:32:34 +0000 Subject: [issue34270] Add names to asyncio tasks In-Reply-To: <1532856337.57.0.56676864532.issue34270@psf.upfronthosting.co.za> Message-ID: <1534221154.51.0.56676864532.issue34270@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset aa4e4a40db531f7095513a4b0aa6510f18162a07 by Benjamin Peterson in branch 'master': Make regular expressions in test_tasks.py raw strings. (GH-8759) https://github.com/python/cpython/commit/aa4e4a40db531f7095513a4b0aa6510f18162a07 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 00:40:20 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 14 Aug 2018 04:40:20 +0000 Subject: [issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty In-Reply-To: <1534189001.92.0.56676864532.issue34396@psf.upfronthosting.co.za> Message-ID: <1534221620.84.0.56676864532.issue34396@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Amusingly, this is because of an old hack to make directly calling somedict.__getitem__ fast: https://github.com/python/cpython/commit/8f5cdaa784f555149adf5e94fd2e989f99d6b1db Reverting the dictobject.c changes of the commit, i.e., the following patch, fixes your example. diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 413557d667..d85834977d 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -3032,8 +3032,6 @@ dict_sizeof(PyDictObject *mp, PyObject *Py_UNUSED(ignored)) return PyLong_FromSsize_t(_PyDict_SizeOf(mp)); } -PyDoc_STRVAR(getitem__doc__, "x.__getitem__(y) <==> x[y]"); - PyDoc_STRVAR(sizeof__doc__, "D.__sizeof__() -> size of D in memory, in bytes"); @@ -3071,8 +3069,6 @@ PyDoc_STRVAR(values__doc__, static PyMethodDef mapp_methods[] = { DICT___CONTAINS___METHODDEF - {"__getitem__", (PyCFunction)dict_subscript, METH_O | METH_COEXIST, - getitem__doc__}, {"__sizeof__", (PyCFunction)dict_sizeof, METH_NOARGS, sizeof__doc__}, DICT_GET_METHODDEF ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 00:41:13 2018 From: report at bugs.python.org (paul j3) Date: Tue, 14 Aug 2018 04:41:13 +0000 Subject: [issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments In-Reply-To: <1534130705.52.0.56676864532.issue34390@psf.upfronthosting.co.za> Message-ID: <1534221673.85.0.56676864532.issue34390@psf.upfronthosting.co.za> paul j3 added the comment: Parsing is a two step process. First the strings are passed through def _parse_optional(self, arg_string): which classifies them as 'O', an optional flag, or 'A', an argument. - no prefix char => A - the string is in the dictionary of option_strings (e.g. '--list-arg') => O - one char => A - has '=' and first part in option_strings => O - test for abreviations - negative number => O or A - contains space => A - else => unmatched O? (read it for the details) With your inputs, the pattern is: ['--list-arg', 'a', '--text-arg', 'hello world'] O A O? A ['--list-arg', 'a', '--text-arg=hello'] O A O? ['--list-arg', 'a', '--text-arg=hello world'] O A A It's the space in the string marks it as an argument that can be added to the '--list-arg' list. Unmatched optionals go on the 'extras' list. --- In [25]: parser.parse_known_args(['--list-arg', 'a', '--text-arg', 'hello world']) Out[25]: (Namespace(list_arg=['a']), ['--text-arg', 'hello world']) In [26]: parser.parse_known_args(['--list-arg', 'a', '--text-arg=hello']) Out[26]: (Namespace(list_arg=['a']), ['--text-arg=hello']) In [32]: parser.parse_known_args(['--list-arg', 'a', '--text-arg=hello world']) Out[32]: (Namespace(list_arg=['a', '--text-arg=hello world']), []) --- So '--text-arg=hello world' is split into ['--text-arg', 'hello world'] only if '--text-arg' is an option_string. Any ways, the behavior is explainable. Whether the blank should have this priority might be debatable, but I suspect any changes will be rejected on the grounds of backward incompatibility. Your users still have the option of using: --text-arg 'hello world' It may be worth search the issues for an earlier discussion. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 00:51:50 2018 From: report at bugs.python.org (paul j3) Date: Tue, 14 Aug 2018 04:51:50 +0000 Subject: [issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments In-Reply-To: <1534130705.52.0.56676864532.issue34390@psf.upfronthosting.co.za> Message-ID: <1534222310.03.0.56676864532.issue34390@psf.upfronthosting.co.za> paul j3 added the comment: Duplicate of https://bugs.python.org/issue22909 [argparse] Using parse_known_args, unknown arg with space in value is interpreted as first positional arg (closed as duplicate) https://bugs.python.org/issue22433 Argparse considers unknown optional arguments with spaces as a known positional argument In 22433 I suggested a patch but worried about backward incompatibility. I propose closing this as a duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 01:17:08 2018 From: report at bugs.python.org (Preston Moore) Date: Tue, 14 Aug 2018 05:17:08 +0000 Subject: [issue30400] Race condition in shutil.copyfile(): source file replaced file during copy In-Reply-To: <1495138920.07.0.300372261513.issue30400@psf.upfronthosting.co.za> Message-ID: <1534223828.3.0.56676864532.issue30400@psf.upfronthosting.co.za> Preston Moore added the comment: Hello everyone, I've just updated my pull request to include an additional test so everything should be in shape testing wise. Once I get confirmation that this strategy is acceptable and/or this PR is merged I will get to work addressing the other identified problem areas in a similar fashion. There are a few more weeks before classes start back up for the fall semester so I should have available bandwidth to make good progress. Thanks, Preston ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 01:24:18 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 14 Aug 2018 05:24:18 +0000 Subject: [issue34356] Add support for args and kwargs in logging.conf In-Reply-To: <1533715378.01.0.56676864532.issue34356@psf.upfronthosting.co.za> Message-ID: <1534224258.35.0.56676864532.issue34356@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Adding Vinay for his thoughts on this. Also Python 3.4 and 3.5 are in security fixes only mode and can be removed. Thanks ---------- nosy: +vinay.sajip, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 01:42:56 2018 From: report at bugs.python.org (Martin Panter) Date: Tue, 14 Aug 2018 05:42:56 +0000 Subject: [issue34357] situation where urllib3 works, but urllib does not work In-Reply-To: <1533730627.83.0.56676864532.issue34357@psf.upfronthosting.co.za> Message-ID: <1534225376.16.0.56676864532.issue34357@psf.upfronthosting.co.za> Change by Martin Panter : ---------- superseder: -> Cannot override 'connection: close' in urllib2 headers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 03:40:21 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 07:40:21 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1534232421.09.0.56676864532.issue32947@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +8236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 03:44:21 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 07:44:21 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1534232661.72.0.56676864532.issue32947@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +8237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 03:52:28 2018 From: report at bugs.python.org (Jonathan Fine) Date: Tue, 14 Aug 2018 07:52:28 +0000 Subject: [issue34398] Docs search does not index glossary Message-ID: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> New submission from Jonathan Fine : The docs contain a very useful page https://docs.python.org/3.5/glossary.html. However, the search feature does not index the glossary. Thus, the search https://docs.python.org/3.5/search.html?q=iterable does not produce the helpful glossary entry === iterable An object capable of returning its members one at a time. Examples of iterables include all sequence types (such as list, str, and tuple) and some non-sequence types like dict, file objects, and objects of any [...] === #788509 is the only docs issue I could find, whose title contains glossary. It gives insight into the thoughts then about the tutorial. In msg44460 Skip Montaro says (1) that the glossary is "for the tutorial", and (2) he'd like to improve links into the tutorial. I suggest that part of the fix for this issue is on the home page page Glossary in the first grouping "Parts of the documentation." ---------- assignee: docs at python components: Documentation messages: 323503 nosy: docs at python, jfine2358 priority: normal severity: normal status: open title: Docs search does not index glossary type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 04:46:29 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 08:46:29 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit Message-ID: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> New submission from Christian Heimes : Downstream vendors have started to tighten security. 1024 bits RSA and DH params are no longer considered as secure. Python 3.7 and master already use 2048 bits RSA keys for some tests (bpo-32602). 3.6 and 2.7 don't have 1024bit keys. DH params and some other certs are still 1024 bits. I'm going to update all keys and parameters to 2048. ---------- assignee: christian.heimes components: SSL, Tests messages: 323504 nosy: christian.heimes priority: normal severity: normal status: open title: [TLS] Update test keys to >= 2048bit type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 04:50:59 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 08:50:59 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534236659.21.0.56676864532.issue34399@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +8238 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 05:46:55 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 14 Aug 2018 09:46:55 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c Message-ID: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> New submission from Zackery Spytz : In parsetok(), null pointers are used in pointer arithmetic. ---------- components: Interpreter Core messages: 323505 nosy: ZackerySpytz priority: normal severity: normal status: open title: Undefined behavior in Parser/parsetok.c type: behavior versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 05:47:23 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 14 Aug 2018 09:47:23 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534240043.71.0.56676864532.issue34400@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +8239 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 06:10:26 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Tue, 14 Aug 2018 10:10:26 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534241426.06.0.56676864532.issue34395@psf.upfronthosting.co.za> Sergey Fedoseev added the comment: > Could you elaborate a bit more on how/where the leak happens? It happens when PyMem_Resize() fails. It was used like this: Py_UCS4 *field = self->field; self->field = PyMem_Resize(field, Py_UCS4, self->field_size); The last statement changes both self->field and field (macro magic!), so in the case PyMem_Resize() fails, previously allocated memory can't be freed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 06:54:26 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 10:54:26 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534244066.94.0.56676864532.issue34399@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 88bfd0bce05043f658e50addd21366f317995e35 by Christian Heimes in branch 'master': bpo-34399: 2048 bits RSA keys and DH params (#8762) https://github.com/python/cpython/commit/88bfd0bce05043f658e50addd21366f317995e35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 06:54:52 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 14 Aug 2018 10:54:52 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534244092.85.0.56676864532.issue34399@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 07:54:16 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 11:54:16 +0000 Subject: [issue34401] Make test_gdb work on HP-UX Message-ID: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> New submission from Michael Osipov <1983-01-06 at gmx.net>: Regex in test_gdb.py needs to be changed and test can continue, though will be skipped due to old version. ---------- components: Tests files: test_gdb.patch keywords: patch messages: 323508 nosy: michael-o priority: normal severity: normal status: open title: Make test_gdb work on HP-UX versions: Python 3.7 Added file: https://bugs.python.org/file47749/test_gdb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:01:14 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 12:01:14 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1534248074.18.0.56676864532.issue34401@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:05:56 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 Aug 2018 12:05:56 +0000 Subject: [issue34387] Deletion of attributes in dataclass is buggy In-Reply-To: <1534074920.67.0.56676864532.issue34387@psf.upfronthosting.co.za> Message-ID: <1534248356.84.0.56676864532.issue34387@psf.upfronthosting.co.za> Eric V. Smith added the comment: I assume this is the behavior you're seeing: >>> @dataclass ... class C: ... i: int = 0 ... >>> c = C(10) >>> c C(i=10) >>> del c.i >>> c C(i=0) >>> del c.i Traceback (most recent call last): File "", line 1, in AttributeError: i >>> If so, that's the expected behavior. You're deleting an instance attribute, so that the class attribute with the same name is seen. This also happens without dataclasses: >>> class C: ... i = 0 ... def __init__(self, i): ... self.i = i ... >>> c = C(10) >>> c.i 10 >>> del c.i >>> c.i 0 >>> del c.i Traceback (most recent call last): File "", line 1, in AttributeError: i >>> If you're seeing something different, please re-open this issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:22:27 2018 From: report at bugs.python.org (Anuj) Date: Tue, 14 Aug 2018 12:22:27 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1534249347.55.0.56676864532.issue18709@psf.upfronthosting.co.za> Anuj added the comment: Do we have patch for 3.1 version, or 3.2 patch will be also OK? ---------- nosy: +Anuj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:34:22 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 14 Aug 2018 12:34:22 +0000 Subject: [issue15258] argparse documentation: Improve optparse section regarding allow_interspersed_args In-Reply-To: <1341528073.03.0.435446433545.issue15258@psf.upfronthosting.co.za> Message-ID: <1534250062.98.0.56676864532.issue15258@psf.upfronthosting.co.za> Berker Peksag added the comment: ArgumentParser.parse_intermixed_arg() has been added in https://github.com/python/cpython/commit/0f6b9d230674da784ca79a0cf1a03d2af5a8b6a8 (Issue 14191) and the "Upgrading optparse code" section now has the following item: * Replace optparse.OptionParser.disable_interspersed_args() by using ArgumentParser.parse_intermixed_args() instead of ArgumentParser.parse_args(). Closing this as 'outdated'. ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:36:57 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 12:36:57 +0000 Subject: [issue34402] [SOLUTION] strftime fails on HP-UX Message-ID: <1534250217.83.0.56676864532.issue34402@psf.upfronthosting.co.za> New submission from Michael Osipov <1983-01-06 at gmx.net>: strftime() fails on HP-UX. It is mapped to wcsftime(3). It has a quirk on HP-UX that is does not conform to POSIX. To enable POSIX compat one has to do (excerpt from manpage): > APPLICATION USAGE > The "Unix Standards Only" prototype of wcsftime() is available to > applications if they are: > a. c99 conformant. > > b. Compiled with -D_XOPEN_SOURCE macro with a value >=500. > > c. Compiled with -D_POSIX_C_SOURCE macro with a value >= 200112. > > Also the application must be compiled with the environment variable > UNIX_STD set to the value 98 or above and exported. b and c are satasfied according to config.log. Let's get to a). The manpage of aCC says: > EXTERNAL INFLUENCES > Environment Variables > [...] > UNIX95 or UNIX_STD specify the XPG4 behavior for c89(1) and c99(1). > -D_XOPEN_UNIX is also set. UNIX_STD must be set to 1995, 1998 or > 2003. Both these variables cause an appropriate object file to be > linked into executables in order to customize libc to match ISO/IEC > 9899:1990/Amendment 1:1995 (1995) and the C++ and C99 Standards for > the various wide char (1998) or other C99 libc functions (2003). > NOTE: 2003 is only available on HP-UX 11.31. So one must at least do "export UNIX_STD=1998". I am quite certain that other parts of Python are affected too. The safest bet would be actually to test wcsftime at configure time wether the output is fine and have this env var set in the Makefile, unfortunately, this will only work for GNU make. Alternatively, a warning at the very end of the configure run has to be printed to export this env var. If done, test_strftime and test_teststrptime will pass flawlessly. ---------- components: Library (Lib) messages: 323512 nosy: michael-o priority: normal severity: normal status: open title: [SOLUTION] strftime fails on HP-UX type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:39:30 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 12:39:30 +0000 Subject: [issue34402] [SOLUTION] strftime fails on HP-UX In-Reply-To: <1534250217.83.0.56676864532.issue34402@psf.upfronthosting.co.za> Message-ID: <1534250370.43.0.56676864532.issue34402@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: The worst thing about wcsftime(3) is that it silently fails by not writing to output buffer. timemodule.c allocates more and more memory and then gives up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:40:23 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 12:40:23 +0000 Subject: [issue34401] [solution] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1534250423.09.0.56676864532.issue34401@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- title: Make test_gdb work on HP-UX -> [solution] Make test_gdb work on HP-UX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:45:53 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 12:45:53 +0000 Subject: [issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238) In-Reply-To: <1376307172.38.0.0558370001214.issue18709@psf.upfronthosting.co.za> Message-ID: <1534250753.03.0.56676864532.issue18709@psf.upfronthosting.co.za> Christian Heimes added the comment: These Python versions no longer receive security updates. Please update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:49:15 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 Aug 2018 12:49:15 +0000 Subject: [issue34393] json.dumps - allow compression In-Reply-To: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za> Message-ID: <1534250955.94.0.56676864532.issue34393@psf.upfronthosting.co.za> Eric V. Smith added the comment: There are too many types of compression for this to be built-in to json. There's zlib, gzip, bzip, zip, and no doubt dozens of others. How would we chose one, or several? Which to leave out? How to pass in the many parameters to all of these compression algorithms? As rushter points out, if your current compression library only compresses a file on disk, you should switch to a streaming compressor, like zlib.compressobj or gzip.GzipFile. If Google Storage won't let you pass a streaming compressor as a parameter, then that should be a feature request to Google. I suspect you can actually pass a streaming compressor to it, but I have't investigated their API. In any event, compression does not belong in the json library. ---------- nosy: +eric.smith resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 08:57:12 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 12:57:12 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions Message-ID: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> New submission from Michael Osipov <1983-01-06 at gmx.net>: Running from 3.7 branch on HP-UX 11.31 ia64, 32 bit, big endian. The test output is: > Re-running failed tests in verbose mode > Re-running test 'test_utf8_mode' in verbose mode > test_cmd_line (test.test_utf8_mode.UTF8ModeTests) ... FAIL > test_env_var (test.test_utf8_mode.UTF8ModeTests) ... ok > test_filesystemencoding (test.test_utf8_mode.UTF8ModeTests) ... ok > test_io (test.test_utf8_mode.UTF8ModeTests) ... ok > test_io_encoding (test.test_utf8_mode.UTF8ModeTests) ... ok > test_locale_getpreferredencoding (test.test_utf8_mode.UTF8ModeTests) ... ok > test_optim_level (test.test_utf8_mode.UTF8ModeTests) ... ok > test_posix_locale (test.test_utf8_mode.UTF8ModeTests) ... ok > test_stdio (test.test_utf8_mode.UTF8ModeTests) ... ok > test_xoption (test.test_utf8_mode.UTF8ModeTests) ... ok > > ====================================================================== > FAIL: test_cmd_line (test.test_utf8_mode.UTF8ModeTests) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 230, in test_cmd_line > check('utf8=0', [c_arg], LC_ALL='C') > File "/var/osipovmi/cpython/Lib/test/test_utf8_mode.py", line 223, in check > self.assertEqual(args, ascii(expected), out) > AssertionError: "['h\\xc3\\xa9\\xe2\\x82\\xac']" != "['h\\udcc3\\udca9\\udce2\\udc82\\udcac']" > - ['h\xc3\xa9\xe2\x82\xac'] > + ['h\udcc3\udca9\udce2\udc82\udcac'] > : roman8:['h\xc3\xa9\xe2\x82\xac'] > > ---------------------------------------------------------------------- > Ran 10 tests in 2.595s > > FAILED (failures=1) > test test_utf8_mode failed > 1 test failed again: > test_utf8_mode > > == Tests result: FAILURE then FAILURE == > > 1 test failed: > test_utf8_mode > > 1 re-run test: > test_utf8_mode > > Total duration: 7 sec 265 ms > Tests result: FAILURE then FAILURE > Makefile:1066: recipe for target 'test' failed > gmake: *** [test] Error 2 > I tried to understand the issue, but my Python knowledge is too low, especially I do not understand by a byte array "arg = 'h\xe9\u20ac'.encode('utf-8')" is passed as one arg to the forked process. I highly assume that this is related to the non-standard, default character encoding on HP-UX: https://en.wikipedia.org/wiki/HP_Roman#HP_Roman-8 (roman8). A stupid 8 bit encoding. The very same snippet on FreeBSD says: > $ LC_ALL=C python3.6 test_utf8.py > US-ASCII:[] Willing to test and modify if someone tells what to do. ---------- components: Library (Lib), Tests messages: 323516 nosy: michael-o priority: normal severity: normal status: open title: test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 09:16:02 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 13:16:02 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534252562.69.0.56676864532.issue34399@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +8241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 09:16:41 2018 From: report at bugs.python.org (liad) Date: Tue, 14 Aug 2018 13:16:41 +0000 Subject: [issue34393] json.dumps - allow compression In-Reply-To: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za> Message-ID: <1534252601.21.0.56676864532.issue34393@psf.upfronthosting.co.za> liad added the comment: True there are endless versions of compression just like there are endless version of file formats. Still there are some build-ins like conversion from string to json. For example you don't support of json to orc file. Same argument could have been raise here : how would we choose which conversions to also? Still a choice has been made and some basic conversion behavior is supported. You are claiming that it's all or nothing which I don't think is the right approach. Many are now moving their storage into cloud platforms. The storage is as it sound - storage. It doesn't offer any programming service what you stream is what you will have. Streaming huge files without compression = bleeding money for no reason. Saving the files to disk, compress them and then upload them might be very slow and also the idea is having machine with big memory and low storage - if you have to save huge files localy you'll also need big storage which costs more money. Regarding google there is a pending request for who chooses to use GoogleCloudPlatform package but not all use that. https://github.com/GoogleCloudPlatform/google-cloud-python/issues/5791 Not to mention that there are dozes of other service providers. So even if Google will support it - this doesn't give answer to storage service providers I still claim that this is a basic legit request and can be handled by the json.dump() function. gzip is fine. It also supported by pandas extension and is well known. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 09:16:53 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 14 Aug 2018 13:16:53 +0000 Subject: [issue33451] Start pyc file lock the file In-Reply-To: <1525898638.9.0.682650639539.issue33451@psf.upfronthosting.co.za> Message-ID: <1534252613.58.0.56676864532.issue33451@psf.upfronthosting.co.za> Berker Peksag added the comment: All PRs have been merged (commit message from the 3.6 branch doesn't listed here but PR 7889 has been merged in https://github.com/python/cpython/commit/8f8ad2c38237caf5ee48f690289e8c811d245455) Closing this as 'fixed'. Please reopen if this issue needs to stay open. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 09:20:34 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 13:20:34 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534252834.86.0.56676864532.issue34399@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +8242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 09:36:49 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 13:36:49 +0000 Subject: [issue34404] test_time incorrectly defined Message-ID: <1534253809.16.0.56676864532.issue34404@psf.upfronthosting.co.za> New submission from Michael Osipov <1983-01-06 at gmx.net>: I see a test failure on HP-UX: > test_negative (test.test_time.TestStrftime4dyear) ... FAIL > ====================================================================== > FAIL: test_negative (test.test_time.TestStrftime4dyear) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/var/osipovmi/cpython/Lib/test/test_time.py", line 687, in test_negative > return super().test_negative() > File "/var/osipovmi/cpython/Lib/test/test_time.py", line 713, in test_negative > self.assertEqual(self.yearstr(-1), self._format % -1) > AssertionError: '-0001' != '-001' > - -0001 > ? - > + -001 The bug is in the test class, not cause by HP-UX. Lib/test/test_time.py:713 says "self.assertEqual(self.yearstr(-1), self._format % -1)" where self._format is set in line 654 to "_format = '%04d'" because > Python 3.7.0+ (heads/3.7-dirty:ea8835fb30, Aug 14 2018, 14:44:19) [C] on hp-ux11 > Type "help", "copyright", "credits" or "license" for more information. > >>> import time > >>> time.strftime('%Y', (1,) + (0,) * 8) > '0001' Unfortunately, the zero padding in printf() applies to the entire string length. So > >>> "%+04d" % -1 > '-001' on HP-UX, Linux and FreeBSD. The format string must add an additional zero for negative numbers. ---------- components: Tests messages: 323519 nosy: michael-o priority: normal severity: normal status: open title: test_time incorrectly defined type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 09:43:58 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 Aug 2018 13:43:58 +0000 Subject: [issue34393] json.dumps - allow compression In-Reply-To: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za> Message-ID: <1534254238.09.0.56676864532.issue34393@psf.upfronthosting.co.za> Eric V. Smith added the comment: If you really want to see this added to Python, then I suggest you put together a proposal on what the API would be, what options you would or wouldn't support, and post that on python-ideas. But I'll warn you that your chances of success are low. Your better chance of success is to write a wrapper around json and whatever compression library you want to use, and post that to PyPI to see if it gets traction. I believe you can do what you want without a temporary disk file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 09:52:47 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 13:52:47 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p Message-ID: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> New submission from Christian Heimes : 1.0.2p and 1.1.0i were released today. Please update the Windows and macOS installers. ---------- components: Windows, macOS messages: 323521 nosy: christian.heimes, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Upgrade to OpenSSL 1.1.0i / 1.0.2p type: security versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 10:09:12 2018 From: report at bugs.python.org (liad) Date: Tue, 14 Aug 2018 14:09:12 +0000 Subject: [issue34393] json.dumps - allow compression In-Reply-To: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za> Message-ID: <1534255752.47.0.56676864532.issue34393@psf.upfronthosting.co.za> liad added the comment: I'm sure I will find a work-around. I posted it for other who will face the same issue as me. There are many who uses cloud storage but not many work with PB size files. This will likely to change in the near future as more and more company start to process huge amount of data. I'm not sure what you mean by designing an API. I think you sale it up for no need. It simply add of optional parameter which will trigger compression of gzip. That's it. Nothing sophisticated. Something like: json.dumps(data, outfile, sort_keys=True,compression='gzip') compression - Optional. A string representing the compression to use in the output. Allowed values are ?gzip?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 10:19:31 2018 From: report at bugs.python.org (Michael Osipov) Date: Tue, 14 Aug 2018 14:19:31 +0000 Subject: [issue34404] test_time incorrectly defined In-Reply-To: <1534253809.16.0.56676864532.issue34404@psf.upfronthosting.co.za> Message-ID: <1534256371.71.0.56676864532.issue34404@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: The proper format for int < 0 must be "%05d". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 10:40:36 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Aug 2018 14:40:36 +0000 Subject: [issue34390] arparse.ArgumentParser misparses list arguments followed by undefined arguments In-Reply-To: <1534130705.52.0.56676864532.issue34390@psf.upfronthosting.co.za> Message-ID: <1534257636.19.0.56676864532.issue34390@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 10:52:33 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 14:52:33 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534258353.57.0.56676864532.issue34399@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset e3228a3f44e382b6cdd2b5e001b651347013a7d3 by Christian Heimes (Miss Islington (bot)) in branch '3.7': bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8763) https://github.com/python/cpython/commit/e3228a3f44e382b6cdd2b5e001b651347013a7d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 10:53:06 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 14:53:06 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534258386.94.0.56676864532.issue34399@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 1f34aece28d143edb94ca202e661364ca394dc8c by Christian Heimes in branch '2.7': [2.7] bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8765) https://github.com/python/cpython/commit/1f34aece28d143edb94ca202e661364ca394dc8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 10:56:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Aug 2018 14:56:35 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1534258595.34.0.56676864532.issue32947@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 2a4ee8aa01d61b6a9c8e9c65c211e61bdb471826 by Christian Heimes in branch '3.6': bpo-32947: Fixes for TLS 1.3 and OpenSSL 1.1.1 (GH-8761) https://github.com/python/cpython/commit/2a4ee8aa01d61b6a9c8e9c65c211e61bdb471826 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 11:04:48 2018 From: report at bugs.python.org (Alisue Lambda) Date: Tue, 14 Aug 2018 15:04:48 +0000 Subject: [issue34406] Type in documentation Message-ID: <1534259088.23.0.56676864532.issue34406@psf.upfronthosting.co.za> New submission from Alisue Lambda : https://docs.python.org/3.8/using/windows.html#removing-the-max-path-limitation Current > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem at LongPathsEnabled Should be > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled ---------- assignee: docs at python components: Documentation messages: 323527 nosy: Alisue Lambda, docs at python priority: normal severity: normal status: open title: Type in documentation versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 11:04:57 2018 From: report at bugs.python.org (Alisue Lambda) Date: Tue, 14 Aug 2018 15:04:57 +0000 Subject: [issue34406] Typo in documentation In-Reply-To: <1534259088.23.0.56676864532.issue34406@psf.upfronthosting.co.za> Message-ID: <1534259097.23.0.56676864532.issue34406@psf.upfronthosting.co.za> Change by Alisue Lambda : ---------- title: Type in documentation -> Typo in documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 11:25:43 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 14 Aug 2018 15:25:43 +0000 Subject: [issue34398] Docs search does not index glossary In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534260343.01.0.56676864532.issue34398@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hmm the search is built-in functionality in Sphinx, and I don't think we have any way to control or customize that. ---------- nosy: +Mariatta resolution: -> third party status: open -> pending versions: -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 11:58:55 2018 From: report at bugs.python.org (Jonathan Fine) Date: Tue, 14 Aug 2018 15:58:55 +0000 Subject: [issue34398] Docs search does not index glossary In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534262335.11.0.56676864532.issue34398@psf.upfronthosting.co.za> Jonathan Fine added the comment: Good discovery. The glossary uses the RST glossary directive. https://github.com/python/cpython/blob/master/Doc/glossary.rst The Sphinx docs have a glossary, which is indexed by its search. http://www.sphinx-doc.org/en/master/search.html?q=domain So maybe Sphinx already has the functionality we require. Perhaps it's simply a matter of configuring the Python docs to use it. (This is optimism.) ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 12:13:59 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 14 Aug 2018 16:13:59 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p In-Reply-To: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> Message-ID: <1534263239.89.0.56676864532.issue34405@psf.upfronthosting.co.za> Steve Dower added the comment: I've pushed the new sources for the Windows build, and am about to do the new binaries. If someone else gets to updating the references in the CPython repo before I do, that's fine by me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 14:18:04 2018 From: report at bugs.python.org (Maksym Shalenyi (Enkidulan)) Date: Tue, 14 Aug 2018 18:18:04 +0000 Subject: [issue34407] datetime.time.isoformat function has inconsistent behavior with timezone Message-ID: <1534270684.14.0.56676864532.issue34407@psf.upfronthosting.co.za> New submission from Maksym Shalenyi (Enkidulan) : In some cases datetime.time.isoformat shows timezone info, but in some does not. Consider the example below. import datetime import pytz t = dict(hour=12, minute=31, second=21, microsecond=213456) # `datetime.time.isoformat` has inconsistent behavior. Some of printed has timezone, but others does not. print(datetime.time(tzinfo=pytz.timezone('Asia/Seoul'), **t).isoformat()) print(datetime.time(tzinfo=pytz.timezone('Etc/GMT-9'), **t).isoformat()) print(datetime.time(tzinfo=pytz.timezone('Australia/Sydney'), **t).isoformat()) print(datetime.time(tzinfo=pytz.timezone('Etc/UTC'), **t).isoformat()) # output: # 12:31:21.213456 # 12:31:21.213456+09:00 # 12:31:21.213456 # 12:31:21.213456+00:00 # `datetime.time.isoformat` is inconsistent with `datetime.datetime.isoformat`. `datetime` objects always shows tz information when tz is present. d = dict(year=2018, month=2, day=2, **t) print(datetime.datetime(tzinfo=pytz.timezone('Asia/Seoul'), **d).isoformat()) print(datetime.datetime(tzinfo=pytz.timezone('Etc/GMT-9'), **d).isoformat()) print(datetime.datetime(tzinfo=pytz.timezone('Australia/Sydney'), **d).isoformat()) print(datetime.datetime(tzinfo=pytz.timezone('Etc/UTC'), **d).isoformat()) # output: # 2018-02-02T12:31:21.213456+08:28 # 2018-02-02T12:31:21.213456+09:00 # 2018-02-02T12:31:21.213456+10:05 # 2018-02-02T12:31:21.213456+00:00 ---------- components: ctypes messages: 323531 nosy: Maksym Shalenyi (Enkidulan) priority: normal severity: normal status: open title: datetime.time.isoformat function has inconsistent behavior with timezone type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 14:30:15 2018 From: report at bugs.python.org (ppperry) Date: Tue, 14 Aug 2018 18:30:15 +0000 Subject: [issue19050] [Windows] fflush called on pointer to potentially closed file In-Reply-To: <1379595509.08.0.968867256316.issue19050@psf.upfronthosting.co.za> Message-ID: <1534271415.08.0.56676864532.issue19050@psf.upfronthosting.co.za> Change by ppperry : ---------- title: [Python 2, Windows] fflush called on pointer to potentially closed file -> [Windows] fflush called on pointer to potentially closed file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 14:32:33 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Aug 2018 18:32:33 +0000 Subject: [issue34356] Add support for args and kwargs in logging.conf In-Reply-To: <1533715378.01.0.56676864532.issue34356@psf.upfronthosting.co.za> Message-ID: <1534271553.45.0.56676864532.issue34356@psf.upfronthosting.co.za> Vinay Sajip added the comment: There aren't any changes planned to the fileConfig code, other than bug fixes. If you need improved functionality, you can use dictConfig, which already supports improved configuration features when compared to fileConfig. The fileConfig API was present when the logging package was first added to Python, and dictConfig is a later enhancement (PEP 391). ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 15:05:38 2018 From: report at bugs.python.org (Michael Felt) Date: Tue, 14 Aug 2018 19:05:38 +0000 Subject: [issue11192] test_socket error on AIX In-Reply-To: <1297436751.32.0.492226695457.issue11192@psf.upfronthosting.co.za> Message-ID: <1534273538.75.0.56676864532.issue11192@psf.upfronthosting.co.za> Michael Felt added the comment: The original error reported was fixed by AIX - in AIX 6.1. It will remain unresolved in AIX 5.3. There are currently two other errors in test_socket. FAIL: test_getnameinfo_ipv6_scopeid_symbolic (test.test_socket.GeneralModuleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/python/git/python3-3.7/Lib/test/test_socket.py", line 1649, in test_getnameinfo_ipv6_scopeid_symbolic self.assertEqual(nameinfo, ('ff02::1de:c0:face:8d%' + test_interface, '1234')) AssertionError: Tuples differ: ('ff02::1de:c0:face:8d', '1234') != ('ff02::1de:c0:face:8d%en0', '1234') First differing element 0: 'ff02::1de:c0:face:8d' 'ff02::1de:c0:face:8d%en0' - ('ff02::1de:c0:face:8d', '1234') + ('ff02::1de:c0:face:8d%en0', '1234') ? ++++ I assume the capital D in the argument in the test: sockaddr = ('ff02::1de:c0:face:8D', 1234, 0, ifindex) # Note capital letter `D`. is meant to trigger getting the IPv6 zoneinfo based on ifindex. AIX does have a routine to strip zoneinfo off an IPv6 address, but the getnameinfo() and getaddrinfo() do not support this. I can create a new issue specifically for IPv6 zone id issue, or I can add a PR here. Please advise (the PR is merely adding "skipUnless" logic to test_socket.py. ERROR: test_getaddrinfo_ipv6_scopeid_symbolic ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 15:11:41 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 19:11:41 +0000 Subject: [issue34406] Typo in documentation In-Reply-To: <1534259088.23.0.56676864532.issue34406@psf.upfronthosting.co.za> Message-ID: <1534273901.84.0.56676864532.issue34406@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Isn't this saying that LongPathsEnabled is a value on the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 15:12:54 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 19:12:54 +0000 Subject: [issue34406] Typo in documentation In-Reply-To: <1534259088.23.0.56676864532.issue34406@psf.upfronthosting.co.za> Message-ID: <1534273974.98.0.56676864532.issue34406@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I am not sure how people usually refer to the Windows register but this seems that the current line is differentiating from the path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and the value LongPathsEnabled ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 15:21:14 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 19:21:14 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534274474.87.0.56676864532.issue34381@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: You can run all the tests except the ones that require external network (like SSL for sockets) using: ./python -m test -uall,network or you can exclude tests using the -x flag. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 15:21:47 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 19:21:47 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534274507.9.0.56676864532.issue34381@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg323536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 15:21:50 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 19:21:50 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534274510.02.0.56676864532.issue34381@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: You can run all the tests except the ones that require external network (like SSL for sockets) using: ./python -m test -uall,-network or you can exclude tests using the -x flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 16:09:38 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 20:09:38 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c Message-ID: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> New submission from Pablo Galindo Salgado : The problem occurs here: https://github.com/python/cpython/blob/master/Python/pystate.c#L185 If _PyRuntime.interpreters.next_id < 0 then interp is set to NULL and it will be dereferenced later: interp ---------- components: Interpreter Core messages: 323538 nosy: pablogsal priority: normal severity: normal status: open title: possible null pointer dereference in pystate.c type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 16:11:14 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 20:11:14 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1534277474.32.0.56676864532.issue34408@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +8243 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 16:43:28 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 Aug 2018 20:43:28 +0000 Subject: [issue34392] Add sys.isinterned() In-Reply-To: <1534155873.32.0.56676864532.issue34392@psf.upfronthosting.co.za> Message-ID: <1534279408.15.0.56676864532.issue34392@psf.upfronthosting.co.za> Brett Cannon added the comment: I agree with Christian; this is an implementation detail so it should be flagged as private/internal somehow. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 17:27:40 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 14 Aug 2018 21:27:40 +0000 Subject: [issue34397] remove redundant overflow checks in tuple and list implementations In-Reply-To: <1534189134.26.0.56676864532.issue34397@psf.upfronthosting.co.za> Message-ID: <1534282060.97.0.56676864532.issue34397@psf.upfronthosting.co.za> Tim Peters added the comment: I agree there's pointless code now, but don't understand why the patch replaces it with mysterious asserts. For example, what's the point of this? assert(Py_SIZE(a) <= PY_SSIZE_T_MAX / sizeof(PyObject*)); assert(Py_SIZE(b) <= PY_SSIZE_T_MAX / sizeof(PyObject*)); The invariant that needs to be maintained is that the number of elements is no larger than PY_SSIZE_T_MAX, so the _relevant_ thing to assert is: assert(Py_SIZE(a) + Py_SIZE(b) <= PY_SSIZE_T_MAX); That in turn cries out for an explanation of why it must be true. The asserts actually in the patch are part of that explanation, but on their own appear to be coming from Mars. They're missing the conclusion, and rely on further unstated subtleties. Suggest adding a comment where the structs are defined, like: """ Note: Python's memory allocators return at most PY_SSIZE_T_MAX bytes. Therefore a vector of PyObject* can contain no more than PY_SSIZE_T_MAX / sizeof(PyObject*) elements. In particular, a PyObject* consumes at least 2 bytes, so a vector can contain no more than PY_SSIZE_T_MAX / 2 elements. Code freely relies on that. #if SIZEOF_VOID_P < 2 # error "size of pointer less than 2 bytes?!" #endif """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 17:37:03 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 14 Aug 2018 21:37:03 +0000 Subject: [issue34397] remove redundant overflow checks in tuple and list implementations In-Reply-To: <1534189134.26.0.56676864532.issue34397@psf.upfronthosting.co.za> Message-ID: <1534282623.78.0.56676864532.issue34397@psf.upfronthosting.co.za> Tim Peters added the comment: Bah - the relevant thing to assert is really assert((size_t)Py_SIZE(a) + (size_t)Py_SIZE(b) <= (size_t)PY_SSIZE_T_MAX); C sucks ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 18:02:17 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 22:02:17 +0000 Subject: [issue33930] Segfault with deep recursion into object().__dir__ In-Reply-To: <1529580477.24.0.56676864532.issue33930@psf.upfronthosting.co.za> Message-ID: <1534284137.03.0.56676864532.issue33930@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 18:02:37 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 14 Aug 2018 22:02:37 +0000 Subject: [issue32485] Multiprocessing dict sharing between forked processes In-Reply-To: <1514972661.4.0.467229070634.issue32485@psf.upfronthosting.co.za> Message-ID: <1534284157.02.0.56676864532.issue32485@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 19:11:20 2018 From: report at bugs.python.org (mkurnikov) Date: Tue, 14 Aug 2018 23:11:20 +0000 Subject: [issue34409] Add a way to customize iteration over fields in asdict() for the nested dataclasses Message-ID: <1534288280.15.0.56676864532.issue34409@psf.upfronthosting.co.za> New submission from mkurnikov : Suppose I have two dataclasses: @dataclass class NestedDataclass(object): name: str options: Dict[str, Any] = field(default_factory=dict) @dataclass class RootDataclass(object): nested_list: List[NestedDataclass] I want a dict under the key "options" to be merged in the NestedDataclass dict in the dataclasses.asdict(root_dcls_instance). For that, according to docs, I need to specify dict_factory= for dataclasses.asdict() function. The problem is that, according to the implementation, when this function "meets" dataclass, there's no way to customize how result dict will be built. Dataclass itself is never passed to the function. if _is_dataclass_instance(obj): result = [] for f in fields(obj): value = _asdict_inner(getattr(obj, f.name), dict_factory) result.append((f.name, value)) return dict_factory(result) Yes, I can catch "result" obj (what I did in the end): def root_dataclass_dict_factory(obj): if isinstance(obj, list): dataclass_dict = dict(obj) if 'options' in dataclass_dict: dataclass_dict.update(dataclass_dict.pop('options')) return dict(obj) The problem is that type of the dataclass is lost for the list, and if by any chance later I'll have "options" key in the RootDataclass, there's no way for me to distinguish between them cleanly. Other solution is to iterate over the RootDataclass dictionary, follow the path to the NestedDataclass and change dictionary there, but it even uglier. Would be nice to be able to somehow hook into the field traversal of the dataclass instance. ---------- components: Library (Lib) messages: 323542 nosy: mkurnikov priority: normal severity: normal status: open title: Add a way to customize iteration over fields in asdict() for the nested dataclasses type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 19:31:22 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 Aug 2018 23:31:22 +0000 Subject: [issue34409] Add a way to customize iteration over fields in asdict() for the nested dataclasses In-Reply-To: <1534288280.15.0.56676864532.issue34409@psf.upfronthosting.co.za> Message-ID: <1534289482.5.0.56676864532.issue34409@psf.upfronthosting.co.za> Eric V. Smith added the comment: Could you show some example dataclass instances? Also, show the output you get with asdict(), and show what output you'd like to get instead. I'm not sure I understand it correctly from the description you've given. Thanks! ---------- nosy: +eric.smith versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 19:31:34 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 14 Aug 2018 23:31:34 +0000 Subject: [issue34409] Add a way to customize iteration over fields in asdict() for the nested dataclasses In-Reply-To: <1534288280.15.0.56676864532.issue34409@psf.upfronthosting.co.za> Message-ID: <1534289494.98.0.56676864532.issue34409@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 19:53:57 2018 From: report at bugs.python.org (mkurnikov) Date: Tue, 14 Aug 2018 23:53:57 +0000 Subject: [issue34409] Add a way to customize iteration over fields in asdict() for the nested dataclasses In-Reply-To: <1534288280.15.0.56676864532.issue34409@psf.upfronthosting.co.za> Message-ID: <1534290837.91.0.56676864532.issue34409@psf.upfronthosting.co.za> mkurnikov added the comment: from pprint import pprint from typing import List, Any, Dict import dataclasses from dataclasses import field def service_interface_dict_factory(obj: Any) -> Dict[str, Any]: print(type(obj)) # <- type(obj) here is a list, but there's no way to understand whether it's a ServiceInterface or # InputVar except for looking for the presence of certain keys which is not very convenient return dict(obj) @dataclasses.dataclass class InputVar(object): name: str required: bool = False options: Dict[str, Any] = field(default_factory=dict) @dataclasses.dataclass class ServiceInterface(object): input: List[InputVar] = field(default_factory=list) if __name__ == '__main__': inputvar_inst = InputVar(name='myinput', required=False, options={'default': 'mytext'}) interface = ServiceInterface(input=[inputvar_inst]) outdict = dataclasses.asdict(interface, dict_factory=service_interface_dict_factory) print('outdict', end=' ') pprint(outdict) # prints: # outdict {'input': [{'name': 'myinput', # 'options': {'default': 'mytext'}, # 'required': False}]} # desirable output # {'input': [{ # 'name': 'myinput', # 'required': False, # 'default': 'mytext' # }]} # "default" key moved to the root of the dictionary (inside list) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 20:13:57 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 15 Aug 2018 00:13:57 +0000 Subject: [issue34392] Add sys.isinterned() In-Reply-To: <1534155873.32.0.56676864532.issue34392@psf.upfronthosting.co.za> Message-ID: <1534292037.91.0.56676864532.issue34392@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Agreed it should be non-public, but can we please call it sys._is_interned()? ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 22:08:28 2018 From: report at bugs.python.org (Carlo Rosati) Date: Wed, 15 Aug 2018 02:08:28 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered Message-ID: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> New submission from Carlo Rosati : Hello, When I run the attached code, I encounter a segmentation fault. Thanks, Carlo ---------- files: 3.py messages: 323546 nosy: carlorosati priority: normal severity: normal status: open title: Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered type: crash versions: Python 2.7, Python 3.7 Added file: https://bugs.python.org/file47750/3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 22:40:53 2018 From: report at bugs.python.org (Kevin Walzer) Date: Wed, 15 Aug 2018 02:40:53 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1534300853.46.0.56676864532.issue34370@psf.upfronthosting.co.za> Kevin Walzer added the comment: I just committed http://core.tcl.tk/tk/info/26a029b4a88ff97f, which fixes the scrolling issue in Tk. Running the test scripts here indicate the behavior is now correct; clicking several pixels below the bottom part of the scroll button causes the scroll to jump, instead of smoothly scrolling. (One must click the scroll button directly for smooth scrolling, which is the expected behavior.) The fix involved removing support for a small scroll button variant, which was causing the confusion; by sticking with a single variant, the normal size scroller, the behavior is correct and consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:27:29 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Aug 2018 06:27:29 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534314449.11.0.56676864532.issue34400@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 7c4ab2afb17b99eb3f61f9c73cbd548b5e0ad2c0 by Benjamin Peterson (Zackery Spytz) in branch 'master': closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439) https://github.com/python/cpython/commit/7c4ab2afb17b99eb3f61f9c73cbd548b5e0ad2c0 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:27:54 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 06:27:54 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534314474.35.0.56676864532.issue34400@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:28:02 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 06:28:02 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534314482.26.0.56676864532.issue34400@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:28:10 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 06:28:10 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534314490.46.0.56676864532.issue34400@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8246 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:51:15 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 06:51:15 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534315875.62.0.56676864532.issue34400@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2275b773ebfacb94f6a9c81d6a8b9d54771a68e8 by Miss Islington (bot) in branch '3.7': closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439) https://github.com/python/cpython/commit/2275b773ebfacb94f6a9c81d6a8b9d54771a68e8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:57:55 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Aug 2018 06:57:55 +0000 Subject: [issue34406] Typo in documentation In-Reply-To: <1534259088.23.0.56676864532.issue34406@psf.upfronthosting.co.za> Message-ID: <1534316275.35.0.56676864532.issue34406@psf.upfronthosting.co.za> Ammar Askar added the comment: For what its worth, window's reg command also makes a distinction between the registry key and value: C:\Users\ammar>reg.exe QUERY HKLM\Software\Microsoft\.NETFramework\Enable64Bit ERROR: The system was unable to find the specified registry key or value. C:\Users\ammar>reg.exe QUERY HKLM\Software\Microsoft\.NETFramework /V Enable64Bit HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework Enable64Bit REG_DWORD 0x1 Maybe it can just be phrased as something like, "set the registry value LongPathsEnabled in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:59:13 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 06:59:13 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534316353.93.0.56676864532.issue34400@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 00aebabc7139741fadfe877372c733a2160c7dbd by Miss Islington (bot) in branch '2.7': closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439) https://github.com/python/cpython/commit/00aebabc7139741fadfe877372c733a2160c7dbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:07:31 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 Aug 2018 07:07:31 +0000 Subject: [issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes In-Reply-To: <1526648438.42.0.682650639539.issue33570@psf.upfronthosting.co.za> Message-ID: <1534316851.19.0.56676864532.issue33570@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 3e630c541b35c96bfe5619165255e559f577ee71 by Christian Heimes in branch '3.6': bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) (GH-8760) https://github.com/python/cpython/commit/3e630c541b35c96bfe5619165255e559f577ee71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:08:31 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 07:08:31 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534316911.87.0.56676864532.issue34400@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 981aa46dce926ce54ec1a2adbb73d1f405ef66ff by Miss Islington (bot) in branch '3.6': closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439) https://github.com/python/cpython/commit/981aa46dce926ce54ec1a2adbb73d1f405ef66ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:16:31 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Aug 2018 07:16:31 +0000 Subject: [issue34398] Docs search does not index glossary In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534317391.84.0.56676864532.issue34398@psf.upfronthosting.co.za> Ammar Askar added the comment: Hmm, are you sure its not indexed? Look at this search result: https://docs.python.org/3/search.html?q=__slots__ The glossary page shows up in the results for me. Or are you suggesting that if you search for a term defined in the glossary, it be prominently shown at the top of the search page? ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:24:11 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 Aug 2018 07:24:11 +0000 Subject: [issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes In-Reply-To: <1526648438.42.0.682650639539.issue33570@psf.upfronthosting.co.za> Message-ID: <1534317851.61.0.56676864532.issue33570@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +8247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:24:53 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 Aug 2018 07:24:53 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534317893.08.0.56676864532.issue34399@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 5e9551b4090095fa94cc2dd4afa5bd2177aa3d09 by Christian Heimes in branch '3.6': [3.6] bpo-34399: 2048 bits RSA keys and DH params (GH-8762) (GH-8764) https://github.com/python/cpython/commit/5e9551b4090095fa94cc2dd4afa5bd2177aa3d09 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:43:41 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 15 Aug 2018 07:43:41 +0000 Subject: [issue34399] [TLS] Update test keys to >= 2048bit In-Reply-To: <1534236389.74.0.56676864532.issue34399@psf.upfronthosting.co.za> Message-ID: <1534319021.83.0.56676864532.issue34399@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:45:04 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Aug 2018 07:45:04 +0000 Subject: [issue34372] Compiler could output more accurate line numbers In-Reply-To: <1533913344.46.0.56676864532.issue34372@psf.upfronthosting.co.za> Message-ID: <1534319104.98.0.56676864532.issue34372@psf.upfronthosting.co.za> Ammar Askar added the comment: Note that even just adding an extra arithmetic in your first expression breaks the line numbers: >>> code = """( ... [ ... call1(), ... call2() ... ] ... + call3() ... * call4() ... + call5() ... )""" >>> dis.dis(code) 8 0 LOAD_NAME 0 (call1) 2 CALL_FUNCTION 0 4 LOAD_NAME 1 (call2) 6 CALL_FUNCTION 0 8 BUILD_LIST 2 10 LOAD_NAME 2 (call3) 12 CALL_FUNCTION 0 14 LOAD_NAME 3 (call4) 16 CALL_FUNCTION 0 18 BINARY_MULTIPLY 20 BINARY_ADD 22 LOAD_NAME 4 (call5) 24 CALL_FUNCTION 0 26 BINARY_ADD 28 RETURN_VALUE The closest existing bug to this would be issue 12458, specifically with Serhiy's last comment. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:49:02 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Aug 2018 07:49:02 +0000 Subject: [issue34372] Parenthesized expression has incorrect line numbers In-Reply-To: <1533913344.46.0.56676864532.issue34372@psf.upfronthosting.co.za> Message-ID: <1534319342.26.0.56676864532.issue34372@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- title: Compiler could output more accurate line numbers -> Parenthesized expression has incorrect line numbers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:51:48 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Aug 2018 07:51:48 +0000 Subject: [issue34406] Typo in documentation In-Reply-To: <1534259088.23.0.56676864532.issue34406@psf.upfronthosting.co.za> Message-ID: <1534319508.61.0.56676864532.issue34406@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 04:08:48 2018 From: report at bugs.python.org (Jonathan Fine) Date: Wed, 15 Aug 2018 08:08:48 +0000 Subject: [issue34398] Docs search does not index glossary items In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534320528.62.0.56676864532.issue34398@psf.upfronthosting.co.za> Jonathan Fine added the comment: You're right! Thank you. However, there's still a problem. A user searches for a technical term, and the carefully written glossary entry defining it does not appear. For my search term (iterable), there was a single entry with a link to the Glossary page, whose associated text was simply the first few entries in the glossary. === Glossary ...active shell when entering code for an indented code block or within a pair of matching left and right delimiters (parentheses, square brackets or curly braces). 2to3 A tool that tries to convert Python 2.x code to Pyt... === On a related matter. Sphinx provides an anchor, used for internal navigation with the glossary. But it doesn't provide a permalink to that anchor. Compare https://docs.python.org/3.5/glossary.html#term-iterable https://docs.python.org/3.5/reference/compound_stmts.html#with I think there's a real problem, and that my initial diagnosis was wrong. So I've changed the issue title slightly. (I hope you don't mind.) The problem is, perhaps, that it is the glossary page that is indexed, rather than the glossary items. Another fix would be, as you suggest, pop up at top of results page a glossary item. ---------- title: Docs search does not index glossary -> Docs search does not index glossary items _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 04:42:32 2018 From: report at bugs.python.org (Vlad Tudorache) Date: Wed, 15 Aug 2018 08:42:32 +0000 Subject: [issue34370] Tkinter scroll issues on macOS In-Reply-To: <1533895636.89.0.56676864532.issue34370@psf.upfronthosting.co.za> Message-ID: <1534322552.16.0.56676864532.issue34370@psf.upfronthosting.co.za> Vlad Tudorache added the comment: It seems that Kevin's fix solves the issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 05:05:56 2018 From: report at bugs.python.org (Jens Troeger) Date: Wed, 15 Aug 2018 09:05:56 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1431879719.97.0.835565097524.issue24218@psf.upfronthosting.co.za> Message-ID: <1534323956.6.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: @David, any thoughts on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 06:03:52 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Aug 2018 10:03:52 +0000 Subject: [issue34384] os.readlink does not accept pathlib.Path on Windows In-Reply-To: <1534045271.73.0.56676864532.issue34384@psf.upfronthosting.co.za> Message-ID: <1534327432.67.0.56676864532.issue34384@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset e0b5b2096ead4cc094a129ce7602ac5c0e998086 by Berker Peksag in branch 'master': bpo-34384: Fix os.readlink() on Windows (GH-8740) https://github.com/python/cpython/commit/e0b5b2096ead4cc094a129ce7602ac5c0e998086 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 06:45:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Aug 2018 10:45:03 +0000 Subject: [issue34372] Parenthesized expression has incorrect line numbers In-Reply-To: <1533913344.46.0.56676864532.issue34372@psf.upfronthosting.co.za> Message-ID: <1534329903.63.0.56676864532.issue34372@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 07:01:09 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 15 Aug 2018 11:01:09 +0000 Subject: [issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits In-Reply-To: <1360573856.52.0.124531930967.issue17180@psf.upfronthosting.co.za> Message-ID: <1534330869.85.0.56676864532.issue17180@psf.upfronthosting.co.za> Michael Felt added the comment: I am looking at this. Based on the comments from a historical perspective - copyfile() needs to be calling the copy_mode function before any copying actually occurs. As the dest is already open for writing it does not matter (on posix) what mode it has later on. Question: in copystat() there is a block that talks about chown() in the comments but in the code it only seems to be accessing chmod(). Should there (also) be a call to chown "if _SUPER"? _SUPER = _POSIX and os.geteuid() == 0 basically - mode becomes: # remove setuid, setgid and sticky bits if _POSIX and not _SUPER mode = stat.S_IMODE(st.st_mode) & _REMOVE_HARMFUL_MASK if _POSIX and not _SUPER else stat.S_IMODE(st.st_mode) Comments? ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 07:02:01 2018 From: report at bugs.python.org (Michael Felt) Date: Wed, 15 Aug 2018 11:02:01 +0000 Subject: [issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits In-Reply-To: <1360573856.52.0.124531930967.issue17180@psf.upfronthosting.co.za> Message-ID: <1534330921.97.0.56676864532.issue17180@psf.upfronthosting.co.za> Michael Felt added the comment: my bad: forgot the snippet I mentioned in the previous post: try: lookup("chmod")(dst, mode, follow_symlinks=follow) except NotImplementedError: # if we got a NotImplementedError, it's because # * follow_symlinks=False, # * lchown() is unavailable, and # * either # * fchownat() is unavailable or # * fchownat() doesn't implement AT_SYMLINK_NOFOLLOW. # (it returned ENOSUP.) # therefore we're out of options--we simply cannot chown the # symlink. give up, suppress the error. # (which is what shutil always did in this circumstance.) pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 07:03:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Aug 2018 11:03:44 +0000 Subject: [issue2122] mmap.flush does not check for errors on windows In-Reply-To: <1203081603.58.0.172093843344.issue2122@psf.upfronthosting.co.za> Message-ID: <1534331024.09.0.56676864532.issue2122@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If we break compatibility in any case, what if return None instead of 0? The function always returning 0 looks strange. The function always returning None is common. ---------- nosy: +serhiy.storchaka versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 07:53:05 2018 From: report at bugs.python.org (Michael Osipov) Date: Wed, 15 Aug 2018 11:53:05 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534333985.63.0.56676864532.issue34381@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: That looks promising, I figured out that there is "./python -m test -h". make test TESTOPTS="-uall,-network" works flawlessly. I would have expected a link to https://devguide.python.org/runtests/ from https://github.com/python/cpython/blob/master/README.rst#testing. So my request is just to update the rst file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 07:53:27 2018 From: report at bugs.python.org (Michael Osipov) Date: Wed, 15 Aug 2018 11:53:27 +0000 Subject: [issue34401] [SOLUTION] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1534334007.66.0.56676864532.issue34401@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- title: [solution] Make test_gdb work on HP-UX -> [SOLUTION] Make test_gdb work on HP-UX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 09:19:30 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Aug 2018 13:19:30 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1431879719.97.0.835565097524.issue24218@psf.upfronthosting.co.za> Message-ID: <1534339170.68.0.56676864532.issue24218@psf.upfronthosting.co.za> R. David Murray added the comment: Sorry, I haven't had time to look at it yet :( Not sure when I will, things are more than a bit busy for me right now. Ping me again in two weeks if I haven't responded, please. The proposed solution sounds reasonable, though, so you could also propose a PR with tests and that would take me less time to review and I might get to it sooner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 09:31:13 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 Aug 2018 13:31:13 +0000 Subject: [issue34406] Typo in documentation In-Reply-To: <1534259088.23.0.56676864532.issue34406@psf.upfronthosting.co.za> Message-ID: <1534339873.21.0.56676864532.issue34406@psf.upfronthosting.co.za> Steve Dower added the comment: Yeah, it definitely shouldn't be a backslash there. The @ isn't my invention, but last time someone questioned it I couldn't find any public examples, so it may be an internal Microsoft thing? I'm not totally attached to it, but if you want to fix it it'll need to be written out in full that it's "a value named X of type Y". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 09:48:16 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Aug 2018 13:48:16 +0000 Subject: [issue34398] Docs search does not index glossary items In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534340896.57.0.56676864532.issue34398@psf.upfronthosting.co.za> Change by Ammar Askar : ---------- keywords: +patch pull_requests: +8248 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 09:50:41 2018 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Aug 2018 13:50:41 +0000 Subject: [issue34398] Docs search does not index glossary items In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534341041.0.0.56676864532.issue34398@psf.upfronthosting.co.za> Ammar Askar added the comment: I think showing glossary results up top in the search page is a good idea, so I wrote up a quick proof of concept sphinx extension to do so. The diff isn't very big or complicated but it does need a bit of cleanup, especially the javascript and presentation side. There are some screenshots in the pull request. (Adding Berker since they reviewed the change to move the search bar in the header for the docs) ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 09:57:33 2018 From: report at bugs.python.org (Matej Cepl) Date: Wed, 15 Aug 2018 13:57:33 +0000 Subject: [issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8' In-Reply-To: <1523352074.24.0.682650639539.issue33255@psf.upfronthosting.co.za> Message-ID: <1534341453.61.0.56676864532.issue33255@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 10:00:27 2018 From: report at bugs.python.org (Jonathan Fine) Date: Wed, 15 Aug 2018 14:00:27 +0000 Subject: [issue34398] Docs search does not index glossary items In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534341627.15.0.56676864532.issue34398@psf.upfronthosting.co.za> Jonathan Fine added the comment: Thank you for this, Ammar. Proof of concept solution is good progress. I'm well impressed. The screen shots convince me that it's well worth doing. For me, the one thing that's missing is a link just above the glossary item. Something like "Glossary: iterable". You're probably aware of this, and so far it's only proof-of-concept. Oh, and of course that the links in the displayed item work. My be a gotcha here for links to other glossary items. So, well done, and thank you very much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 10:05:52 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Aug 2018 14:05:52 +0000 Subject: [issue34398] Docs search does not index glossary items In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1534341952.36.0.56676864532.issue34398@psf.upfronthosting.co.za> Berker Peksag added the comment: Ammar's pull request looks good to me, but it would be nice to include the item's title in the box. I will add my comments about the design and implementation in the pull request. ---------- resolution: third party -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 11:09:53 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Aug 2018 15:09:53 +0000 Subject: [issue27026] async/await keywords are missing from reference docs In-Reply-To: <1463299580.57.0.0973198258941.issue27026@psf.upfronthosting.co.za> Message-ID: <1534345793.1.0.56676864532.issue27026@psf.upfronthosting.co.za> Berker Peksag added the comment: The list has been updated in https://github.com/python/cpython/commit/bf9d317626eebcf79bd0756b4dd43df82d5cc186 (Issue 31810 Closing this as 'outdated'. Thanks for the report and for the patch. ---------- nosy: +berker.peksag resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 11:40:45 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 Aug 2018 15:40:45 +0000 Subject: [issue2122] mmap.flush does not check for errors on windows In-Reply-To: <1203081603.58.0.172093843344.issue2122@psf.upfronthosting.co.za> Message-ID: <1534347645.81.0.56676864532.issue2122@psf.upfronthosting.co.za> Steve Dower added the comment: I agree. We should definitely document it as a change, but I don't think there's anything useful you can do in the case of a flush failing anyway, so it seems unlikely that anyone could depend on the return value. Returning None for success and exception on error sounds like a good change. Technically this is no longer returning zero, as previously documented, so if anyone wants to get *really* pedantic, we're not returning the "failed" result for success ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 11:56:16 2018 From: report at bugs.python.org (ysangkok+launchpad) Date: Wed, 15 Aug 2018 15:56:16 +0000 Subject: [issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo Message-ID: <1534348576.75.0.56676864532.issue34411@psf.upfronthosting.co.za> New submission from ysangkok+launchpad : Since socket.getaddrinfo and socket.getnameinfo take a lock on Windows, it would be nice to have their corresponding methods in asyncio.ProactorEventLoop use IOCP, so that they wouldn't block the whole event loop. Overlapped I/O flags are available, so I am wondering how hard this would be: https://docs.microsoft.com/en-us/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfoexa ---------- components: asyncio messages: 323572 nosy: asvetlov, ysangkok+launchpad, yselivanov priority: normal severity: normal status: open title: ProactorEventLoop should use implement GetAddrInfo, GetNameInfo type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 12:19:07 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 15 Aug 2018 16:19:07 +0000 Subject: [issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo In-Reply-To: <1534348576.75.0.56676864532.issue34411@psf.upfronthosting.co.za> Message-ID: <1534349947.03.0.56676864532.issue34411@psf.upfronthosting.co.za> Yury Selivanov added the comment: > so that they wouldn't block the whole event loop. The aren't blocking it now as they are executed in a thread pool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:38:52 2018 From: report at bugs.python.org (ysangkok+launchpad) Date: Wed, 15 Aug 2018 17:38:52 +0000 Subject: [issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo In-Reply-To: <1534348576.75.0.56676864532.issue34411@psf.upfronthosting.co.za> Message-ID: <1534354732.89.0.56676864532.issue34411@psf.upfronthosting.co.za> ysangkok+launchpad added the comment: As far as our experiments show, the requests are blocking each other irrespective of thread pool size. Which is expected since the lock is global across threads. Am I correct in assuming that an implementation for the ProactorEventLoop with IOCP would not require a global lock? Here is our code, this takes 12 sec on Ubuntu and ~12*100 secs on Windows (cause a failed DNS request takes 10 sec): import asyncio futs = [] for i in range(100): t = asyncio.get_event_loop().getaddrinfo("aa000000aa"+str(i)+".onion.", 80) futs.append(t) print(asyncio.get_event_loop().run_until_complete(asyncio.gather(*futs, return_exceptions=True))) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:44:37 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 15 Aug 2018 17:44:37 +0000 Subject: [issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo In-Reply-To: <1534348576.75.0.56676864532.issue34411@psf.upfronthosting.co.za> Message-ID: <1534355077.54.0.56676864532.issue34411@psf.upfronthosting.co.za> Yury Selivanov added the comment: > As far as our experiments show, the requests are blocking each other irrespective of thread pool size. Which is expected since the lock is global across threads. It looks like you don't understand how GIL works in Python (sorry if I'm mistaken). The GIL prevents two threads from simultaneously executing *pure Python* code. Whenever Python code does a system call, the GIL is released for that thread, allowing other Python code in other threads to execute. Therefore, getaddrname calls in threadpools can't block each other or the event loop thread in any way. There's a max capacity for the threadpool though, so if you're making 100s of getaddrname calls you'll indeed see some slowdown. Using IOCP for getaddsname can remove this bottleneck. > Am I correct in assuming that an implementation for the ProactorEventLoop with IOCP would not require a global lock? I think so, because we can have as many getaddrcalls as we want all monitored by IOCP for us. But I'm not an expert in IOCP, so if you want to work on the patch I can't really help you with details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:49:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Aug 2018 17:49:21 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1534355361.83.0.56676864532.issue12458@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +8249 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:58:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Aug 2018 17:58:19 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1534355899.25.0.56676864532.issue12458@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems PR 8774 fixes all mentioned examples (as well as examples in issue34372), except that tracebacks show the single line number of the first line of the multiline expression instead of the range of lines as was suggested. Showing the range of lines requires much more significant changes and changing the marshal format. The drawback is minor increasing the size of code objects in memory (due to saving additional line numbers in lnotab), pyc files, and disassembly output for multiline expressions. ---------- versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 14:00:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Aug 2018 18:00:44 +0000 Subject: [issue34372] Parenthesized expression has incorrect line numbers In-Reply-To: <1533913344.46.0.56676864532.issue34372@psf.upfronthosting.co.za> Message-ID: <1534356044.85.0.56676864532.issue34372@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the proposed solution for issue12458 be merged, this issue will be closed as a duplicate. Otherwise I have a simpler solution for this particular case (and few other cases, but not all cases in issue12458). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 14:01:18 2018 From: report at bugs.python.org (ysangkok+launchpad) Date: Wed, 15 Aug 2018 18:01:18 +0000 Subject: [issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo In-Reply-To: <1534348576.75.0.56676864532.issue34411@psf.upfronthosting.co.za> Message-ID: <1534356078.31.0.56676864532.issue34411@psf.upfronthosting.co.za> ysangkok+launchpad added the comment: The lock I was referring to is https://github.com/python/cpython/blob/e0b5b2096ead4cc094a129ce7602ac5c0e998086/Modules/socketmodule.c#L222 Is netdb_lock the GIL? If the thread pooling was effective, the slowdown wouldn't be linear, but it does indeed appear to be. How can this be? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 14:08:23 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 15 Aug 2018 18:08:23 +0000 Subject: [issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo In-Reply-To: <1534348576.75.0.56676864532.issue34411@psf.upfronthosting.co.za> Message-ID: <1534356503.19.0.56676864532.issue34411@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Is netdb_lock the GIL? No, it's a lock used by getaddrinfo specifically on *some* platforms. It doesn't look like it's used on Windows. > If the thread pooling was effective, the slowdown wouldn't be linear, but it does indeed appear to be. How can this be? I don't know, hard to tell without seeing how you test that :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 14:44:12 2018 From: report at bugs.python.org (Ilya Kulakov) Date: Wed, 15 Aug 2018 18:44:12 +0000 Subject: [issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own. In-Reply-To: <1498813368.34.0.349011380575.issue30811@psf.upfronthosting.co.za> Message-ID: <1534358652.22.0.56676864532.issue30811@psf.upfronthosting.co.za> Ilya Kulakov added the comment: Also hit this issue while trying to run venv on Travis. Perhaps venv should detect if it's running under virtualenv (e.g. the VIRTUAL_ENV env is present) and issue a warning? ---------- nosy: +Kentzo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 15:04:01 2018 From: report at bugs.python.org (Tzu-ping Chung) Date: Wed, 15 Aug 2018 19:04:01 +0000 Subject: [issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own. In-Reply-To: <1498813368.34.0.349011380575.issue30811@psf.upfronthosting.co.za> Message-ID: <1534359841.25.0.56676864532.issue30811@psf.upfronthosting.co.za> Tzu-ping Chung added the comment: Unfortunately it is not a viable solution. If you run the virtualenv python without activation, e.g. virtualenv --python=python3.7 foo foo/bin/python -m venv bar The VIRTUAL_ENV environment variable wouldn?t be set in this situation, but the created venv (bar) would still be broken. The only viable cue I find to detect virtualenv existence is it sets sys.real_prefix to point to the prefix of the actual Python isntallation (i.e. the value of sys.prefix without virtualenv), while this variable does not exist by default. This is, however, obviously very hacky and unreliable, and not something venv should do IMO. virtualenv is the problem here, and should be responsible for fixing this situation instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 15:14:32 2018 From: report at bugs.python.org (Erik Janssens) Date: Wed, 15 Aug 2018 19:14:32 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534360472.95.0.56676864532.issue34217@psf.upfronthosting.co.za> Erik Janssens added the comment: Attached a small helper script to detect camelcase windows headers, 2 more occurences found : Modules/socketmodule.c versionhelpers.h 306 #include Tools/msi/bundle/bootstrap/pch.h uxtheme.h 18 #include ---------- status: closed -> open Added file: https://bugs.python.org/file47751/windows_headers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 15:15:14 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 Aug 2018 19:15:14 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p In-Reply-To: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> Message-ID: <1534360514.42.0.56676864532.issue34405@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +8250 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 15:20:25 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 Aug 2018 19:20:25 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p In-Reply-To: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> Message-ID: <1534360825.68.0.56676864532.issue34405@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +8251 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 16:29:28 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 Aug 2018 20:29:28 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p In-Reply-To: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> Message-ID: <1534364968.12.0.56676864532.issue34405@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 864a892af38afefb0a0464af298cf09d2e1195f7 by Steve Dower in branch 'master': bpo-34405: Updated to OpenSSL 1.1.0i for Windows builds. (GH-8775) https://github.com/python/cpython/commit/864a892af38afefb0a0464af298cf09d2e1195f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 16:29:43 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 Aug 2018 20:29:43 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p In-Reply-To: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> Message-ID: <1534364983.31.0.56676864532.issue34405@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset eeca87cf3ce5b866dbb210548e23ee91ec5411f2 by Steve Dower in branch '3.6': bpo-34405: Updated to OpenSSL 1.0.2p for Windows builds. (GH-8776) https://github.com/python/cpython/commit/eeca87cf3ce5b866dbb210548e23ee91ec5411f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 16:29:57 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 20:29:57 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p In-Reply-To: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> Message-ID: <1534364997.62.0.56676864532.issue34405@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8252 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 16:55:14 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 15 Aug 2018 20:55:14 +0000 Subject: [issue34405] Upgrade to OpenSSL 1.1.0i / 1.0.2p In-Reply-To: <1534254767.16.0.56676864532.issue34405@psf.upfronthosting.co.za> Message-ID: <1534366514.07.0.56676864532.issue34405@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 64336dc0a5907b04fe85a911cd1b8be9b663587e by Miss Islington (bot) in branch '3.7': bpo-34405: Updated to OpenSSL 1.1.0i for Windows builds. (GH-8775) https://github.com/python/cpython/commit/64336dc0a5907b04fe85a911cd1b8be9b663587e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 18:03:57 2018 From: report at bugs.python.org (ppperry) Date: Wed, 15 Aug 2018 22:03:57 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE Message-ID: <1534370637.49.0.56676864532.issue1529353@psf.upfronthosting.co.za> Change by ppperry : ---------- title: Squeezer - squeeze large output in the interpreter -> Squeezer - squeeze large output in IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 19:12:00 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 15 Aug 2018 23:12:00 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534374720.76.0.56676864532.issue34217@psf.upfronthosting.co.za> Steve Dower added the comment: Are those bugs? On Windows, they are spelled with that casing (and while NTFS is case-insensitive, it *is* case-preserving). Whatever package you have used for cross-compiling may have renamed them (similarly Shlwapi.h). In which case, perhaps you could request that the package you are using preserve the case of the files it is cloning, rather than changing it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 21:36:44 2018 From: report at bugs.python.org (Carlo Rosati) Date: Thu, 16 Aug 2018 01:36:44 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534383404.22.0.56676864532.issue34410@psf.upfronthosting.co.za> Carlo Rosati added the comment: I figured out that the problem is itertools.tee does not use a multiprocessing.Manager proxied object for shared state. I was able to create a workaround tee as follows. def multiprocessing_tee(iterable, n=2): """Write a multiprocessing safe itertools.tee""" it = iter(iterable) m = multiprocessing.Manager() lists = [m.list() for i in range(n)] def gen(local_list): keep_m_alive = m while True: if not local_list: # when the local list is empty newval = next(it) # fetch a new value and for l in lists: # load it to all the lists l.append(newval) yield local_list.pop(-1) return tuple(gen(l) for l in lists) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 21:50:42 2018 From: report at bugs.python.org (Carlo Rosati) Date: Thu, 16 Aug 2018 01:50:42 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534384242.52.0.56676864532.issue34410@psf.upfronthosting.co.za> Carlo Rosati added the comment: Okay I needed to do .pop(0) instead of .pop(-1) which is probably O(N) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 00:27:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Aug 2018 04:27:52 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534393672.88.0.56676864532.issue34395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 67b9cc8e6072a919d2ed7e7ecc8124c8acfb3733 by Serhiy Storchaka (Sergey Fedoseev) in branch 'master': bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). (GH-8756) https://github.com/python/cpython/commit/67b9cc8e6072a919d2ed7e7ecc8124c8acfb3733 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 00:28:15 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 04:28:15 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534393695.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8253 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 00:28:26 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 04:28:26 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534393706.84.0.56676864532.issue34395@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8254 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 00:53:03 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 04:53:03 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534395183.78.0.56676864532.issue34395@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 962051eeb0ba486b8ffe4082779b4fa432e3dfb2 by Miss Islington (bot) in branch '3.7': bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). (GH-8756) https://github.com/python/cpython/commit/962051eeb0ba486b8ffe4082779b4fa432e3dfb2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 00:57:07 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 04:57:07 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534395427.45.0.56676864532.issue34395@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b14ab447ee3f47d479d899b4001d870569a76c44 by Miss Islington (bot) in branch '3.6': bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). (GH-8756) https://github.com/python/cpython/commit/b14ab447ee3f47d479d899b4001d870569a76c44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 01:38:31 2018 From: report at bugs.python.org (Carlo Rosati) Date: Thu, 16 Aug 2018 05:38:31 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534397911.01.0.56676864532.issue34410@psf.upfronthosting.co.za> Carlo Rosati added the comment: You'll also need to lock when modifying the manager's list. Does anyone know how to do this using the multiprocessing.Queues without deadlocking? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 01:40:12 2018 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 16 Aug 2018 05:40:12 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534398012.93.0.56676864532.issue34410@psf.upfronthosting.co.za> Karthikeyan Singaravelan added the comment: Thanks for the script. I can reproduce this on master and Python 3.6 too. Sometimes the attached script causes timeout error. Running it under gdb gives me below : [New Thread 0x18ab of process 10682] [New Thread 0x1903 of process 10682] [New Thread 0x1a03 of process 10682] Thread 2 received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x18ab of process 10682] 0x000000010033e509 in teedataobject_getitem (tdo=0x1014361c0, i=1) at ./Modules/itertoolsmodule.c:454 454 Py_INCREF(value); Backtrace : #0 0x000000010033e509 in teedataobject_getitem (tdo=0x100645640, i=1) at ./Modules/itertoolsmodule.c:454 #1 0x000000010033e290 in tee_next (to=0x10308a668) at ./Modules/itertoolsmodule.c:637 #2 0x0000000100059844 in enum_next (en=0x10308fc20) at Objects/enumobject.c:156 #3 0x00000001002297e1 in _PyEval_EvalFrameDefault ( f=Frame 0x100646710, for file /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/pool.py, line 292, in _guarded_task_generation (self=, _inqueue=, _writer=, _rlock=, acquire=, release=) at remote 0x101f50050>, _poll=, _wlock=, acquire=, release=) at remote 0x101f54dd0>) at remote 0x101bf5cb0>, _ou...(truncated), throwflag=0) at Python/ceval.c:2905 #4 0x0000000100215277 in PyEval_EvalFrameEx ( f=Frame 0x100646710, for file /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/pool.py, line 292, in _guarded_task_generation (self=, _inqueue=, _writer=, _rlock=, acquire=, release=) at remote 0x101f50050>, _poll=, _wlock=, acquire=, release=) at remote 0x101f54dd0>) at remote 0x101bf5cb0>, _ou...(truncated), throwflag=0) at Python/ceval.c:536 #5 0x000000010006a3e2 in gen_send_ex (gen=0x1030349b0, arg=0x0, exc=0, closing=0) at Objects/genobject.c:221 #6 0x000000010006ba1f in gen_iternext (gen=0x1030349b0) at Objects/genobject.c:542 #7 0x00000001002297e1 in _PyEval_EvalFrameDefault ( f=Frame 0x101909730, for file /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/pool.py, line 426, in _handle_tasks (taskqueue=<_queue.SimpleQueue at remote 0x101f1daa0>, put=, outqueue=, _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=) at remote 0x10306df50>) a...(truncated), throwflag=0) at Python/ceval.c:2905 #8 0x0000000100215277 in PyEval_EvalFrameEx ( f=Frame 0x101909730, for file /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/pool.py, line 426, in _handle_tasks (taskqueue=<_queue.SimpleQueue at remote 0x101f1daa0>, put=, outqueue=, _writer=, _rlock=, ac---Type to continue, or q to quit--- quire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=) at remote 0x10306df50>) a...(truncated), throwflag=0) at Python/ceval.c:536 #9 0x0000000100045d63 in function_code_fastcall (co=0x101de77c0, args=0x1030693a0, nargs=5, globals={'__name__': 'multiprocessing.pool', '__doc__': None, '__package__': 'multiprocessing', '__loader__': , '__spec__': , origin='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/pool.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/__pycache__/pool.cpython-38.pyc', _initializing=False) at remote 0x101c23bf0>, '__file__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/pool.py', '__cached__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/multiprocessing/__pycache__/pool.cpython-38.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis repr...(truncated)) at Objects/call.c:283 #10 0x0000000100043d91 in _PyFunction_FastCallDict (func=, args=0x103069378, nargs=5, kwargs={}) at Objects/call.c:322 #11 0x0000000100045902 in PyObject_Call (callable=, args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=) at remote 0x10306df50>) at remote 0x101f50530>, [, 'semprefix': '/mp', 'daemon': True}, _pa...(truncated), kwargs={}) at Objects/call.c:226 #12 0x00000001002342bc in do_call_core (func=, callargs=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=) at remote 0x10306df50>) at remote 0x101f50530>, [, 'semprefix': '/mp', 'daemon': True}, _pa...(truncated), kwdict={}) at Python/ceval.c:4652 #13 0x000000010022ca2b in _PyEval_EvalFrameDefault ( f=Frame 0x10308d050, for file /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py, line 865, in run (self=, _name='Thread-2', _args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer= to continue, or q to quit--- le=9, _readable=False, _writable=True) at remote 0x10306d9b0>, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=, _name='Thread-2', _args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=, '__spec__': , origin='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/__pycache__/threading.cpython-38.pyc', _initializing=False) at remote 0x101c6a530>, '__file__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py', '__cached__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/__pycache__/threading.cpython-38.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '...(truncated)) at Objects/call.c:283 #16 0x0000000100045069 in _PyFunction_FastCallKeywords (func=, stack=0x10190a8f0, nargs=1, kwnames=0x0) at Objects/call.c:408 #17 0x0000000100233e50 in call_function (pp_stack=0x103b522b8, oparg=1, kwnames=0x0) at Python/ceval.c:4623 #18 0x000000010022bcf9 in _PyEval_EvalFrameDefault ( f=Frame 0x10190a750, for file /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py, line 917, in _bootstrap_inner (self=, _name='Thread-2', _args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release= to continue, or q to quit--- y, line 917, in _bootstrap_inner (self=, _name='Thread-2', _args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=, '__spec__': , origin='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/__pycache__/threading.cpython-38.pyc', _initializing=False) at remote 0x101c6a530>, '__file__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py', '__cached__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/__pycache__/threading.cpython-38.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '...(truncated)) at Objects/call.c:283 #21 0x0000000100045069 in _PyFunction_FastCallKeywords (func=, stack=0x103086b60, nargs=1, kwnames=0x0) at Objects/call.c:408 #22 0x0000000100233e50 in call_function (pp_stack=0x103b54508, oparg=1, kwnames=0x0) at Python/ceval.c:4623 #23 0x000000010022bcf9 in _PyEval_EvalFrameDefault ( f=Frame 0x1030869d8, for file /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py, line 885, in _bootstrap (self=, _name='Thread-2', _args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=, _name='Thread-2', _args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release= to continue, or q to quit--- emLock object at rem...(truncated), throwflag=0) at Python/ceval.c:536 #25 0x0000000100045d63 in function_code_fastcall (co=0x101c7aac0, args=0x103b55d68, nargs=1, globals={'__name__': 'threading', '__doc__': "Thread module emulating a subset of Java's threading model.", '__package__': '', '__loader__': , '__spec__': , origin='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/__pycache__/threading.cpython-38.pyc', _initializing=False) at remote 0x101c6a530>, '__file__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/threading.py', '__cached__': '/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/__pycache__/threading.cpython-38.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__package__': '', '...(truncated)) at Objects/call.c:283 #26 0x0000000100043d91 in _PyFunction_FastCallDict (func=, args=0x103b55d60, nargs=1, kwargs=0x0) at Objects/call.c:322 #27 0x00000001000437e4 in _PyObject_FastCallDict (callable=, args=0x103b55d60, nargs=1, kwargs=0x0) at Objects/call.c:98 #28 0x0000000100047d29 in _PyObject_Call_Prepend (callable=, obj=, _name='Thread-2', _args=(<_queue.SimpleQueue at remote 0x101f1daa0>, , , _writer=, _rlock=, acquire=, release=) at remote 0x10306de90>, _poll=, _wlock=, acquire=, release=) at remote 0x10306df50>) at remote 0x101f50530>, [, args=(), kwargs=0x0) at Objects/classobject.c:306 #30 0x0000000100045a02 in PyObject_Call (callable=, args=(), kwargs=0x0) at Objects/call.c:245 #31 0x0000000100349e16 in t_bootstrap (boot_raw=0x10303dd30) at ./Modules/_threadmodule.c:992 #32 0x00007fff87a53268 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib #33 0x00007fff87a531e5 in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib #34 0x00007fff87a5141d in thread_start () from /usr/lib/system/libsystem_pthread.dylib #35 0x0000000000000000 in ?? () Thanks ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 02:20:33 2018 From: report at bugs.python.org (Tal Einat) Date: Thu, 16 Aug 2018 06:20:33 +0000 Subject: [issue1529353] Squeezer - squeeze large output in IDLE's shell Message-ID: <1534400433.7.0.56676864532.issue1529353@psf.upfronthosting.co.za> Change by Tal Einat : ---------- title: Squeezer - squeeze large output in IDLE -> Squeezer - squeeze large output in IDLE's shell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 02:41:00 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 16 Aug 2018 06:41:00 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534401660.76.0.56676864532.issue34217@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset e6a4755e6793942b950c1595e0c34bd66a0ee13e by INADA Naoki (Erik Janssens) in branch 'master': bpo-34217: Use lowercase for windows headers (GH-8472) https://github.com/python/cpython/commit/e6a4755e6793942b950c1595e0c34bd66a0ee13e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 02:41:27 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 06:41:27 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534401687.97.0.56676864532.issue34217@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8255 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 02:49:43 2018 From: report at bugs.python.org (Erik Janssens) Date: Thu, 16 Aug 2018 06:49:43 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534402183.32.0.56676864532.issue34217@psf.upfronthosting.co.za> Erik Janssens added the comment: @inada.naoki : thank you ! @steve.dower : I would not consider those bugs per se, but they are inconsistencies, for example in the master branch : number of "Windows.h" includes : 2 number of "windows.h" includes : 55 whatever might be the 'right' solution, it's always an advantage to have a consistent codebase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 03:28:30 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 16 Aug 2018 07:28:30 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534404510.87.0.56676864532.issue34217@psf.upfronthosting.co.za> INADA Naoki added the comment: New windows will support case sensitive filesystem too. Stop relying to case insensitive filesystem makes sense to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 03:29:24 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 07:29:24 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534404564.03.0.56676864532.issue34217@psf.upfronthosting.co.za> miss-islington added the comment: New changeset bf8e9d18dd75f58ce3b9761763ae10c0800b43d8 by Miss Islington (bot) in branch '3.7': bpo-34217: Use lowercase for windows headers (GH-8472) https://github.com/python/cpython/commit/bf8e9d18dd75f58ce3b9761763ae10c0800b43d8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 05:07:50 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 16 Aug 2018 09:07:50 +0000 Subject: [issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits In-Reply-To: <1534330869.85.0.56676864532.issue17180@psf.upfronthosting.co.za> Message-ID: <3836f08b-afe3-fa03-a73f-7bdf69f4fdf1@felt.demon.nl> Michael Felt added the comment: I want to believe this can be resolved - without breakage on POSIX. Clarification: while Mac/OS falls under "posix" in python terms - maybe "breakage" will need to be accepted, or, for "back-ports" Mac/OS will be "as if root or super-user" and use an additional (optional) argument in 3.8 and beyond to keep backwards compatibility. Short text: to proceed I think we should start with getting some additional tests into test_shutil.py asap so that we can see how systems respond without any changes. My experience is that cp -r[pP] behaves the same as shutil.copy*() when the EUID==0, aka superuser, but strips special bits from files and cannot copy the UID/GID owner bits of the inode. I would appreciate someone helping me writing more extensive testing. We need to test: * root * not-root, but owner * not-root, not owner, but in group * not-root, "other", other "read" access exists * if the test does not already exist - also check behavior when directories ? have/do not have "search" (x-bit) enabled. I am working on a patch to address these different conditions. Ideally, the "not-owner" and "not-group" tests can be run by creating the "copy.me" area as root, setting perms, etc. and then using su -c to run the shutil.copy*() call and back as root make the verification. ??? Perspective ??? If this is too much discussion, please reply with suggestions - privately - on what I could do better to not waste your time. The issue seems unchanged since original posting. The original report states: hen copying the mode of a file with copy, copy2, copymode, copystat or copytree, all permission bits are copied (including setuid and setgit), but the owner of the file is not. This can be used for privilege escalation. ...snip... The behaviour of copymode/copystat in this case is the same as `chmod --reference', and there can be some expectation of unsafety, but copy/copy2/copytree's behaviour differs from that of `cp -p', and this is a non-obvious difference. For clarity: GNU chmod states: --reference=RFILE ??? use RFILE's mode instead of MODE values Additionally, the chmod man page reminds us the "special bit" masking behavior is different for files and directries. Specifically, SUID, SGID and SVTX should not be cleared unless specifically requested by a chmod "u-s,g-s" specification. "... a directory's unmentioned set user and group ID bits are not affected" Additional comments discuss: short window of opportunity (files are copied first, then mode bits copied) breakage with the past (copytree used as "backup", regardless of version) And the comment/opinion that shutil.copy() should emulate cp (implies emulate "cp -r", so neither -p nor -P) it seems shutil.copy2() is adding the -p (or -P if follow_symlinks=false) There was a modification to test_shutil.py suggested as part of a patch. I added that to verify the issue is still current. ??? diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 7e0a3292e0..7ceefd1ebc 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -1471,6 +1471,24 @@ class TestShutil(unittest.TestCase): ???????? rv = shutil.copytree(src_dir, dst_dir) ???????? self.assertEqual(['foo'], os.listdir(rv)) +??? @unittest.skipUnless((os.name == "posix" and os.geteuid() != 0), "Requires POSIX compatible OS and non-root userid") +??? def test_copy_remove_setuid(self): +??????? src_dir = self.mkdtemp() +??????? src_file = os.path.join(src_dir, 'foo') +??????? write_file(src_file, 'foo') +??????? dst_file = os.path.join(src_dir, 'bar') +??????? harmful_mode = stat.S_IRUSR | stat.S_IXUSR | stat.S_ISUID +??????? harmless_mode = stat.S_IRUSR | stat.S_IXUSR + +??????? # set mode and verify +??????? os.chmod(src_file, harmful_mode) +??????? mode = stat.S_IMODE(os.stat(src_file).st_mode) +??????? self.assertTrue(oct(mode), oct(harmful_mode)) + +??????? # check that copy does not preserve harmful bits +??????? shutil.copy(src_file, dst_file) +??????? mode = stat.S_IMODE(os.stat(dst_file).st_mode) +??????? self.assertEqual(oct(mode), oct(harmless_mode)) ?class TestWhich(unittest.TestCase): ??? The result is: root at x066:[/data/prj/python/python3-3.8]./python -m test -v test_shutil == CPython 3.8.0a0 (heads/master:cca4eec3c0, Aug 13 2018, 04:53:15) [C] == AIX-1-00C291F54C00-powerpc-32bit big-endian == cwd: /data/prj/python/python3-3.8/build/test_python_10944516 == CPU count: 8 == encodings: locale=ISO8859-1, FS=iso8859-1 Run tests sequentially ... test_copy_remove_setuid (test.test_shutil.TestShutil) ... FAIL ... ====================================================================== FAIL: test_copy_remove_setuid (test.test_shutil.TestShutil) ---------------------------------------------------------------------- Traceback (most recent call last): ? File "/data/prj/python/git/python3-3.8/Lib/test/test_shutil.py", line 1491, in test_copy_remove_setuid ??? self.assertEqual(oct(mode), oct(harmless_mode)) AssertionError: '0o4500' != '0o500' - 0o4500 ??? - + 0o500 ---------------------------------------------------------------------- On 8/15/2018 1:01 PM, Michael Felt wrote: > Michael Felt added the comment: > > I am looking at this. ---------- Added file: https://bugs.python.org/file47752/pEpkey.asc _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 1765 bytes Desc: not available URL: From report at bugs.python.org Thu Aug 16 05:20:09 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 16 Aug 2018 09:20:09 +0000 Subject: [issue27435] ctypes library loading and AIX - also for 2.7.X (and later) In-Reply-To: <1467383699.63.0.495142233463.issue27435@psf.upfronthosting.co.za> Message-ID: <1534411209.68.0.56676864532.issue27435@psf.upfronthosting.co.za> Michael Felt added the comment: as this is not (likely) to be backported to Python2 (by python, fyi: I do include full ctypes-load_library() support in my "independent" packaging) and it is "resolved" for Python3-3.7 issue26439 this issue may, imho, be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 05:23:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Aug 2018 09:23:27 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1534411407.21.0.56676864532.issue33216@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 06:25:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Aug 2018 10:25:31 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1534415131.16.0.56676864532.issue33216@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 06:29:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Aug 2018 10:29:29 +0000 Subject: [issue34246] Gentoo Refleaks 3.7: test_smtplib has dangling threads In-Reply-To: <1532685733.19.0.56676864532.issue34246@psf.upfronthosting.co.za> Message-ID: <1534415369.9.0.56676864532.issue34246@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +email nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 08:37:14 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 16 Aug 2018 12:37:14 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534423034.63.0.56676864532.issue34395@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- pull_requests: +8258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 10:46:03 2018 From: report at bugs.python.org (Michael Osipov) Date: Thu, 16 Aug 2018 14:46:03 +0000 Subject: [issue34401] [SOLUTION] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1534430763.82.0.56676864532.issue34401@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: Removed file: https://bugs.python.org/file47749/test_gdb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 10:47:52 2018 From: report at bugs.python.org (Michael Osipov) Date: Thu, 16 Aug 2018 14:47:52 +0000 Subject: [issue34412] strsignal(3) does not exist on HP-UX Message-ID: <1534430872.24.0.56676864532.issue34412@psf.upfronthosting.co.za> New submission from Michael Osipov <1983-01-06 at gmx.net>: HP-UX does not provide any mappings from signals to strings. The proper approach is to map just like for Windows. Alternatively, one could simply return the singal as an int. ---------- components: Library (Lib) messages: 323600 nosy: michael-o priority: normal severity: normal status: open title: strsignal(3) does not exist on HP-UX type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 10:51:54 2018 From: report at bugs.python.org (Michael Osipov) Date: Thu, 16 Aug 2018 14:51:54 +0000 Subject: [issue34412] strsignal(3) does not exist on HP-UX In-Reply-To: <1534430872.24.0.56676864532.issue34412@psf.upfronthosting.co.za> Message-ID: <1534431113.99.0.56676864532.issue34412@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: References: * https://github.com/google/cmockery/issues/11 * https://www.spinics.net/lists/dash/msg00547.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 11:06:29 2018 From: report at bugs.python.org (Michael Osipov) Date: Thu, 16 Aug 2018 15:06:29 +0000 Subject: [issue34412] strsignal(3) does not exist on HP-UX In-Reply-To: <1534430872.24.0.56676864532.issue34412@psf.upfronthosting.co.za> Message-ID: <1534431989.57.0.56676864532.issue34412@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- keywords: +patch pull_requests: +8259 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 11:12:04 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Aug 2018 15:12:04 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534432324.83.0.56676864532.issue34217@psf.upfronthosting.co.za> Steve Dower added the comment: > Stop relying to case insensitive filesystem makes sense to me. If this is the case, then we need to normalise the casing to match the actual files (which are mixed-case, not lowercase). You just broke this with your PR :) So which is it? Do we match the casing of the real files? Or do we change to match someone's unofficial versions of the files? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 11:13:08 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Aug 2018 15:13:08 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534432388.31.0.56676864532.issue34217@psf.upfronthosting.co.za> Steve Dower added the comment: > whatever might be the 'right' solution, it's always an advantage to > have a consistent codebase. Not when you are consistently wrong, it's not. Let's figure out the right answer here before making many changes to the codebase. First, can you tell me where you got your lowercased named files from? Because it wasn't the official SDK... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 11:34:25 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 16 Aug 2018 15:34:25 +0000 Subject: [issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits In-Reply-To: <1360573856.52.0.124531930967.issue17180@psf.upfronthosting.co.za> Message-ID: <1534433665.35.0.56676864532.issue17180@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't understand this clarification: > Clarification: while Mac/OS falls under "posix" in python terms - maybe > "breakage" will need to be accepted, > or, for "back-ports" Mac/OS will be "as if root or super-user" and use > an additional (optional) argument in 3.8 and beyond > to keep backwards compatibility. AFAIK macOS should behave just like other posix-y platforms here. In particular, I've verified that cp(1) behaves the same as on other platforms: the SUID bit is stripped when copying a setuid file. Do you have a reason to assume that macOS is special here? P.S. macOS is spelled macOS, not Mac/OS ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 11:46:13 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 16 Aug 2018 15:46:13 +0000 Subject: [issue34413] Porting section of 3.5 "What's New" doc does not mention bytecode changes. Message-ID: <1534434373.24.0.56676864532.issue34413@psf.upfronthosting.co.za> New submission from Eric Snow : In the 3.5 "What's New" doc, the porting section [1] does not mention the bytecode changes resulting from the PEP 448 implementation. [2][3] It should. I've marked this issue for the versions past 3.5 because each branch has its own "What's New" doc for 3.5. [1] https://docs.python.org/3/whatsnew/3.5.html#porting-to-python-3-5 [2] bpo-33216 [3] https://github.com/python/cpython/pull/8783#discussion_r210642202 ---------- assignee: docs at python components: Documentation messages: 323605 nosy: docs at python, eric.snow, serhiy.storchaka priority: low severity: normal stage: needs patch status: open title: Porting section of 3.5 "What's New" doc does not mention bytecode changes. type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 11:48:42 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 16 Aug 2018 15:48:42 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1534434522.07.0.56676864532.issue33216@psf.upfronthosting.co.za> Eric Snow added the comment: FTR, the change was introduced by the PEP 448 implementation. [1] [1] https://github.com/python/cpython/pull/8338#issuecomment-406256152 ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 11:51:00 2018 From: report at bugs.python.org (Eric Snow) Date: Thu, 16 Aug 2018 15:51:00 +0000 Subject: [issue33216] [3.5] Wrong order of stack for CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW In-Reply-To: <1522784543.83.0.467229070634.issue33216@psf.upfronthosting.co.za> Message-ID: <1534434660.89.0.56676864532.issue33216@psf.upfronthosting.co.za> Eric Snow added the comment: FYI, I opened bpo-34413 to address how the bytecode change is not mentioned in the porting section of the 3.5 "What's New" doc. In retrospect (I didn't notice that this issue was still open), I suppose that doesn't need a separate issue so feel free to close #34413 in favor of this one. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 12:40:02 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Aug 2018 16:40:02 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534437602.58.0.56676864532.issue34391@psf.upfronthosting.co.za> Christian Heimes added the comment: The "OSError: [Errno 0] Error" failures are caused by session ticket handling in two way shutdown. I reported the issue a while ago https://github.com/openssl/openssl/issues/6262 and it's fixed in OpenSSL git master (to be released as 1.1.1-pre9). The error in test_data_connection is actually "[SSL] shutdown while in init". The dummy server code is failing, because the client starts a two way shutdown before the full handshake has been established. A simple recv() call is good enough to finalize the handshake. ---------- assignee: -> christian.heimes components: +SSL stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 12:45:25 2018 From: report at bugs.python.org (Jonathan Hadida) Date: Thu, 16 Aug 2018 16:45:25 +0000 Subject: [issue34414] Absolute imports conflict with local files Message-ID: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> New submission from Jonathan Hadida : This submission follows a post on StackOverflow: https://stackoverflow.com/q/51878397/472610 I have reproduced the unexpected behaviour with multiple python versions, either with a Homebrew install, or using Anaconda/Miniconda. Note that comments to the post on StackOverflow indicate that this behaviour could only be reproduced on Windows and Linux using conda with late versions of Python. THE ISSUE --------- Absolute imports seem to conflict with local files (not in any module). This is at odds with the documented behaviour (https://docs.python.org/3/tutorial/modules.html#the-module-search-path): "When a module named spam is imported, the interpreter first searches for a built-in module with that name." STEPS TO REPRODUCE ------------------ STEP 1: On OSX, use either: - A Homebrew-installed version (e.g. /usr/local/bin/python2 or 3) - A Miniconda2 or 3 installation - An Anaconda3 v5.2.0 installation (not tested with other versions, nor Anaconda2) NOTE: in cases 1 and 2, you need to install numpy manually. STEP 2: Create a directory structure as follows: . ??? foo ??? a.py ??? math.py 1 directory, 2 files where a.py contains "import numpy", and math.py contains "x++" (intentionally invalid). For example, the following bash code sets this up in a temporary folder: D=$(mktemp -d) mkdir "$D/foo" echo "import numpy" >| "$D/foo/a.py" echo "x++" >| "$D/foo/math.py" STEP 3: Go to that directory (the one containing folder "foo"), and run: foo/a.py The previous command causes the following error, for example using /usr/local/bin/python3 (Homebrew): Traceback (most recent call last): File "foo/a.py", line 1, in import numpy File "/usr/local/lib/python3.6/site-packages/numpy/__init__.py", line 142, in from . import add_newdocs File "/usr/local/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "/usr/local/lib/python3.6/site-packages/numpy/lib/__init__.py", line 3, in import math File "/private/var/folders/j7/kd8mc69j25j0yw50q_08wmlm0000gt/T/tmp.FfJzdVuG/foo/math.py", line 1 x++ ^ SyntaxError: invalid syntax PROBLEM: The statement "import math" in numpy/lib/__init__.py should not resolve to foo/math.py, but rather, it should find the standard module "math". ADDITIONAL INFO --------------- Although I do not know what this list should look like, I would expect the list of builtin modules to be larger than this: > python3 -c "import sys; print(sys.builtin_module_names)" ('_ast', '_codecs', '_collections', '_functools', '_imp', '_io', '_locale', '_operator', '_signal', '_sre', '_stat', '_string', '_symtable', '_thread', '_tracemalloc', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'xxsubtype', 'zipimport') > python2 -c "import sys; print sys.builtin_module_names" ('__builtin__', '__main__', '_ast', '_codecs', '_sre', '_symtable', '_warnings', '_weakref', 'errno', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'pwd', 'signal', 'sys', 'thread', 'xxsubtype', 'zipimport') ---------- components: macOS messages: 323609 nosy: jhadida, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Absolute imports conflict with local files type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 12:51:26 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Aug 2018 16:51:26 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534438286.11.0.56676864532.issue34391@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +8261 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 12:55:56 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 16 Aug 2018 16:55:56 +0000 Subject: [issue34414] Absolute imports conflict with local files In-Reply-To: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> Message-ID: <1534438556.59.0.56676864532.issue34414@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is expected behaviour: When your run a script the directory containing the script is added to the start of sys.path. Running "python3.6 a/foo.py" therefore adds "a" to the start of sys.path, and "math.py" then shadows the stdlib module "math". This has nothing to do with absolute imports. That is shown by "python3.6 -m foo.a". This runs the code in foo/a.py as module foo.a, and "math.py" is now only accessible as "foo.math" (it won't shadow the builtin module "math", even if you add "import math" to foo/a.py). ---------- resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 13:02:32 2018 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 16 Aug 2018 17:02:32 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534438952.7.0.56676864532.issue34395@psf.upfronthosting.co.za> Change by Sergey Fedoseev : ---------- pull_requests: +8262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 13:13:11 2018 From: report at bugs.python.org (Jonathan Hadida) Date: Thu, 16 Aug 2018 17:13:11 +0000 Subject: [issue34414] Absolute imports conflict with local files In-Reply-To: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> Message-ID: <1534439591.56.0.56676864532.issue34414@psf.upfronthosting.co.za> Jonathan Hadida added the comment: Thank you for your quick reply. How can this be expected behaviour? Could I please kindly ask you to point to an documented explanation, specifically for why the folder is PREpended to sys.path (put before), instead of being APpended (put after). The fact that local files conflict with absolute imports _within dependent modules_ is nothing short of a hack (think from the point of view of the dependencies themselves), and IMO clearly conflicts with the idea of absolute imports in the first place. This is crazy! ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 13:43:48 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Aug 2018 17:43:48 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534441428.2.0.56676864532.issue34391@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 1590c393360df059160145e7475754427bfc6680 by Christian Heimes in branch 'master': bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) https://github.com/python/cpython/commit/1590c393360df059160145e7475754427bfc6680 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 13:44:13 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 17:44:13 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534441453.9.0.56676864532.issue34391@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 13:44:25 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 16 Aug 2018 17:44:25 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534441465.67.0.56676864532.issue34391@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 13:46:49 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Aug 2018 17:46:49 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534441609.61.0.56676864532.issue34391@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +8265 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 14:27:58 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Aug 2018 18:27:58 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534444078.93.0.56676864532.issue34410@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Davin, is there anything itertools.tee() can do about this or is this a multiprocessing issue? ---------- nosy: +davin, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 14:58:06 2018 From: report at bugs.python.org (Joshua Bronson) Date: Thu, 16 Aug 2018 18:58:06 +0000 Subject: [issue20849] add exist_ok to shutil.copytree In-Reply-To: <1393908922.06.0.91052425832.issue20849@psf.upfronthosting.co.za> Message-ID: <1534445886.96.0.56676864532.issue20849@psf.upfronthosting.co.za> Change by Joshua Bronson : ---------- pull_requests: +8266 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 15:33:06 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 16 Aug 2018 19:33:06 +0000 Subject: [issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits In-Reply-To: <1534433665.35.0.56676864532.issue17180@psf.upfronthosting.co.za> Message-ID: <5cd971b7-1d14-6dab-6890-809fec66ce98@felt.demon.nl> Michael Felt added the comment: On 16/08/2018 17:34, Ronald Oussoren wrote: > Ronald Oussoren added the comment: > > I don't understand this clarification: > >> Clarification: while Mac/OS falls under "posix" in python terms - maybe >> "breakage" will need to be accepted, >> or, for "back-ports" Mac/OS will be "as if root or super-user" and use >> an additional (optional) argument in 3.8 and beyond >> to keep backwards compatibility. > AFAIK macOS should behave just like other posix-y platforms here. In particular, I've verified that cp(1) behaves the same as on other platforms: the SUID bit is stripped when copying a setuid file. Glad to hear! > > Do you have a reason to assume that macOS is special here? No reason to assume that macOS is different. "They" are all called "posix" by python (Linux, macOS, AIX, FreeBSD, and I am sure there is something else I have forgotten). So, I was trying to neither assume that macOS is more "posix" or more "gnu". As the comments refer to gnu coreutils behavior, not "posix" behavior (chmod --reference...) I am looking for responses to be able to come up with better ideas for tests we need - and then define/design code that meets the demands of the tests. I was expecting or hoping macOS would behave as you describe but I was also trying to prepare myself for a discussion of macOS user experience being a discord. > > > P.S. macOS is spelled macOS, not Mac/OS Should be clear I am not a macOS user. Corrected! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 15:37:22 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Aug 2018 19:37:22 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534448242.75.0.56676864532.issue34391@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 870247a57e84ccaa3f6a6ce955f4168632b967a8 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8789) https://github.com/python/cpython/commit/870247a57e84ccaa3f6a6ce955f4168632b967a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 15:38:05 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Aug 2018 19:38:05 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534448285.89.0.56676864532.issue34391@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset cabe916dc694997d4892b58986e73a713d5a2f8d by Christian Heimes (Miss Islington (bot)) in branch '3.6': [3.6] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (#8790) https://github.com/python/cpython/commit/cabe916dc694997d4892b58986e73a713d5a2f8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 15:38:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Aug 2018 19:38:46 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534448326.5.0.56676864532.issue34391@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 2ec530cd5537dfda5ca0af6ac696e45013ed31d2 by Christian Heimes in branch '2.7': [2.7] bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787) (GH-8791) https://github.com/python/cpython/commit/2ec530cd5537dfda5ca0af6ac696e45013ed31d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 15:52:26 2018 From: report at bugs.python.org (Semyon) Date: Thu, 16 Aug 2018 19:52:26 +0000 Subject: [issue34415] Typo in logging.Formatter docstring Message-ID: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> New submission from Semyon : There is a typo in the docstring for logging.Formatter: > default value of "%s(message)\\n" is used. I am sure it should be different (and in sync with the actual value): > default value of "%(message)s\\n" is used. The problem is in py2.7, py3.7 and most likely other versions. ---------- components: Library (Lib) messages: 323618 nosy: MarSoft priority: normal severity: normal status: open title: Typo in logging.Formatter docstring versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 15:53:47 2018 From: report at bugs.python.org (Eryk Sun) Date: Thu, 16 Aug 2018 19:53:47 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534449227.37.0.56676864532.issue34217@psf.upfronthosting.co.za> Eryk Sun added the comment: > New windows will support case sensitive filesystem too. NTFS in Windows 10 supports a flag to mark a directory as case sensitive [*] via NtSetInformationFile: FileCaseSensitiveInformation, which can be set from the command line via fsutil.exe. In recent builds this flag was made inheritable by child directories, so it doesn't have to be set individually on every directory in a tree. This feature was added for inter-operation with (WSL) Linux programs. It's not intended for system directories such as "Windows Kits". > can you tell me where you got your lowercased named files from? IIRC, MinGW lower-cases the filenames in its modified version of the SDK. --- [*] Prior to Windows XP, case-sensitive file access was possible via FILE_FLAG_POSIX_SEMANTICS (CreateFile) and FIND_FIRST_EX_CASE_SENSITIVE (FindFirstFileEx). Windows XP (the first consumer version of NT) broke those flags by adding a (default-enabled) global flag in the kernel object manager that makes all device and file access case-insensitive -- regardless of the system call's OBJ_CASE_INSENSITIVE flag. Now in Windows 10 they're bringing back selective case sensitivity in NTFS, but this time using a per-directory flag that overrides the API. It seems they don't care that this breaks the existing OBJ_CASE_INSENSITIVE flag in the NT API. IMO, this could have been handled more cleanly by combining the per-directory flag with one or two new API flags. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 17:15:03 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 16 Aug 2018 21:15:03 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it Message-ID: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> New submission from Paul Ganssle : I was recently debugging some multithreaded Rust code that was deadlocking, and I tracked it down to what I'm fairly certain is a bug somewhere in PyCapsule_Import, where it seems that PyCapsule_Import releases the GIL without first acquiring it. I've attached a MWE of a multi-threaded application that is able to simultaneously acquire the GIL twice. The relevant portion is here: void *acquire_gil(void *arg) { bool import = ((arg_t *)arg)->import; int n = ((arg_t *)arg)->id; printf("Waiting for GIL (%d)\n", n); int gstate = PyGILState_Ensure(); printf("Gil acquired! (%d)\n", n); usleep(125000); if (import) { PyCapsule_Import(CAPSULE_NAME, 0); } usleep(125000); PyGILState_Release(gstate); printf("Gil released! (%d)\n", n); return NULL; } If you run it with `./gil` such that the PyCapsule_Import call is never reached, you get: Waiting for GIL (0) Gil acquired! (0) Waiting for GIL (1) Gil released! (0) Gil acquired! (1) Gil released! (1) However, if you run with `./gil import` such that PyCapsule_Import is reached, you get (emphasis mine): Waiting for GIL (0) Gil acquired! (0) Waiting for GIL (1) **Gil acquired! (1)** **Gil released! (1)** Gil released! (0) For convenience sake, I have created a small repo with a make file for the PoC: https://github.com/pganssle/capsule-gil-poc I have tested this on version 3.6.6 and 3.7.0. The makefile works in a virtualenv, but you have to manually tweak the PY_MAJOR and PY_MINOR variables in Makefile because I didn't get too fancy with it. ---------- files: main.c messages: 323620 nosy: p-ganssle, pablogsal priority: normal severity: normal status: open title: PyCapsule_Import seems to release the GIL without acquiring it versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file47753/main.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 17:31:56 2018 From: report at bugs.python.org (Erik Janssens) Date: Thu, 16 Aug 2018 21:31:56 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534455116.35.0.56676864532.issue34217@psf.upfronthosting.co.za> Erik Janssens added the comment: The lowercase headers are indeed part of the mingw-w64 SDK, which is the most convenient option to cross compile on a linux host for a windows target. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 17:40:55 2018 From: report at bugs.python.org (Eric N. Vander Weele) Date: Thu, 16 Aug 2018 21:40:55 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534455655.71.0.56676864532.issue34416@psf.upfronthosting.co.za> Change by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 17:48:12 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Aug 2018 21:48:12 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534456092.36.0.56676864532.issue34217@psf.upfronthosting.co.za> Steve Dower added the comment: Have you posted to their mailing list to ask why they use different casing from the official SDK and whether they would consider supporting both (via symlink, presumably)? I think it would be strange for CPython to add a style rule for a non-supported toolset. The supported tooling will default to using the correct case for the header files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 17:51:44 2018 From: report at bugs.python.org (Phillip M. Feldman) Date: Thu, 16 Aug 2018 21:51:44 +0000 Subject: [issue34417] imp.find_module reacts badly to iterator Message-ID: <1534456304.96.0.56676864532.issue34417@psf.upfronthosting.co.za> New submission from Phillip M. Feldman : `imp.find_module` goes down in flames if one tries to pass an iterator rather than a list of folders. Firstly, the message that it produces is somewhat misleading: RuntimeError: sys.path must be a list of directory names Secondly, it would be helpful if one could pass an iterator. I'm thinking in particular of the situation where one wants to import something from a large folder tree, and the module in question is likely to be found early in the search process, so that it is more efficient to explore the folder tree incrementally. ---------- components: Library (Lib) messages: 323623 nosy: Phillip.M.Feldman at gmail.com priority: normal severity: normal status: open title: imp.find_module reacts badly to iterator type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:07:35 2018 From: report at bugs.python.org (Berker Peksag) Date: Thu, 16 Aug 2018 22:07:35 +0000 Subject: [issue8478] tokenize.untokenize first token missing failure case In-Reply-To: <1271816312.19.0.485614247328.issue8478@psf.upfronthosting.co.za> Message-ID: <1534457255.71.0.56676864532.issue8478@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:08:40 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 16 Aug 2018 22:08:40 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534457320.34.0.56676864532.issue34416@psf.upfronthosting.co.za> Paul Ganssle added the comment: Using a modified version of Python 3.7.0 that prints "Releasing GIL" whenever PyGILState_Release, I get this: Waiting for GIL (0) Gil acquired! (0) Waiting for GIL (1) Gil acquired! (1) Releasing GIL Gil released! (0) Releasing GIL Gil released! (1) So whatever is allowing the GIL to be acquired twice is not calling PyGILState_Release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:20:11 2018 From: report at bugs.python.org (Erik Janssens) Date: Thu, 16 Aug 2018 22:20:11 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534458011.67.0.56676864532.issue34217@psf.upfronthosting.co.za> Erik Janssens added the comment: As I understand it, if mingw-w64 would change to camelcase headers, it would break backwards compatibility, since a lot of windows source code uses file names in includes that differ from those on this, which works in MSVC, so it goes unnoticed. There is no good solution. Even if camelcase headers would be available, the CPython source code would break in much more places. I agree that it would be strange to have a style rule for a specific toolset, however mixing different styles is even stranger. The current situation is that 100% of the windows includes are lowercase and allow cross compilation. I would tend to see that as an advantage. If a more comprehensive solution would be available, that would be ideal of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:22:20 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 16 Aug 2018 22:22:20 +0000 Subject: [issue20849] add exist_ok to shutil.copytree In-Reply-To: <1393908922.06.0.91052425832.issue20849@psf.upfronthosting.co.za> Message-ID: <1534458140.39.0.56676864532.issue20849@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I think this feature request is reasonable for 2 reasons: 1) As it stands if dst directory exists copytree() cannot be used. The only possible workaround is using rmtree(dst) first, but that doesn't seem to make much sense. The change may look extremely easy but the fact that copytree() cannot be used in a specific circumstance justifies the cost of introducing a new argument, basically because there is no other way around it. 2) "cp -r" does this by default, which is probably indicative (I don't think the default should be True though). I think the new argument should be called "dirs_exists_ok" instead of "exists_ok" though, so that it's clear that the behavior does not affect files. [ R. David Murray ] > I do not think that *just* making it OK for the destination directory to exist would be a good API. I don't think that refusing (or allowing) to copy existing files is a common enough use case to justify the addition of a new parameter (note: also "cp" does not provide this use case). If such a behavior is desired the user can simply provide its own custom "copy_function". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:33:44 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 Aug 2018 22:33:44 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534458824.26.0.56676864532.issue34416@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Breaking in take_gil and drop_gil I get this trace: Thread 2 "gil" hit Breakpoint 1, 0x000055555559563d in acquire_gil () Thread 3 "gil" hit Breakpoint 1, 0x000055555559563d in acquire_gil () Waiting for GIL (0) Waiting for GIL (1) Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Gil acquired! (0) Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Gil acquired! (1) Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=0x0) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=0x0) at Python/ceval_gil.h:150 Gil released! (0) which seems normal to me. This is tested on current master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:34:36 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 Aug 2018 22:34:36 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534458876.47.0.56676864532.issue34416@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg323627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:35:16 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 Aug 2018 22:35:16 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534458916.59.0.56676864532.issue34416@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Breaking in take_gil and drop_gil I get this trace: Thread 2 "gil" hit Breakpoint 1, 0x000055555559563d in acquire_gil () Thread 3 "gil" hit Breakpoint 1, 0x000055555559563d in acquire_gil () Waiting for GIL (0) Waiting for GIL (1) Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Gil acquired! (0) Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Gil acquired! (1) Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:150 Thread 3 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7fffe8000b30) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 3 "gil" hit Breakpoint 3, drop_gil (tstate=0x0) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Gil released! (1) Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:150 Thread 2 "gil" hit Breakpoint 2, take_gil (tstate=tstate at entry=0x7ffff0000f40) at Python/ceval_gil.h:192 Thread 2 "gil" hit Breakpoint 3, drop_gil (tstate=0x0) at Python/ceval_gil.h:150 Gil released! (0) which seems normal to me. This is tested on current master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:59:09 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 16 Aug 2018 22:59:09 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534460349.8.0.56676864532.issue34217@psf.upfronthosting.co.za> Steve Dower added the comment: > The current situation is that 100% of the windows includes are lowercase and allow cross compilation. Please be precise with what you are saying - the "current situation" is only so because you proposed changes and got them merged without proper discussion, and "allow cross compilation" with only one alternate toolset. Pretending this is the status quo is dishonest, so please don't insult me like that. > if mingw-w64 would change to camelcase headers, it would break backwards compatibility I'm not recommending camel case - I'm recommending matching the casing used for each file in the official SDK (which I agree is a weird mix, but there are certainly compatibility reasons involved in keeping them this way). And yes, it would be a compatibility break for the clones of the SDK, but to a large extent that is their fault for choosing different casing in the first place, so I'm only a little bit sympathetic to that argument. What I'm mostly opposed to is the very weak bug report and the random selection of changes that came with it. Failing to compile on an unsupported toolset is not an immediate "must-fix" issue, and it really ought to go through the affected platform experts so they can confirm acceptable impact on developers who are using the supported tools. There also needs to be this central point so that, assuming we decide to keep them this way, the next person who comes in and complains that the casing doesn't match the actual files is given the correct explanation - otherwise we'll keep switching them back and forth forever. You're also likely to face a maintenance burden for this change, since there is currently no rule or validation that will prevent people from adding properly cased includes in the future (as I hinted, most IDEs on Windows will autocorrect filename casing for headers). If you want one, propose a change to PEP 7 on python-dev, and if it's approved then you can add a build step to validate. Otherwise, you'll have to track changes that are made and fix them as necessary. Without an explicit rule, our default position is "whatever the native target platform/tools prefer". I hope that explains the position a bit better, and why I push back against changes with insufficient justification being provided. At this point, I'm not going to revert these particular changes, as the cases where they will affect native developers are startlingly few these days, but I'm also explicitly saying that this does not mean open-season for all the fixes required for mingw to be happy. Each one will be taken on its merits (primarily compatibility and maintainability), at least until someone has committed to fully support the toolset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:59:53 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 16 Aug 2018 22:59:53 +0000 Subject: [issue34414] Absolute imports conflict with local files In-Reply-To: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> Message-ID: <1534460393.75.0.56676864532.issue34414@psf.upfronthosting.co.za> Eric V. Smith added the comment: See https://docs.python.org/3/tutorial/modules.html#the-module-search-path Calling this a "hack", and "crazy", is not the way to get volunteers to help you with your issue. Please show a little more tolerance, please. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 19:02:21 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 16 Aug 2018 23:02:21 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534460541.73.0.56676864532.issue34416@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Summary of how I see this dump: 1) Thread 2 tries to get the GIL. 2) Thread 3 tries to get the GIL. 3 Gil acquired! (0) 4) Thread 2 drops the GIL, which means that thread 2 managed to get it before. 5) Gil acquired! (1) 6) Thread 2 tries to get the GIL. 7) Thread 3 drops the GIL which means that thread 2 managed to get the GIL. ... thread 2 and 3 battle for the GIL 8) Gil released! (1) ... thread 2 and 3 battle for the GIL 9) Gil released! (0) It does not seem to me that two threads have the GIL at the same time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 22:18:16 2018 From: report at bugs.python.org (Carlo Rosati) Date: Fri, 17 Aug 2018 02:18:16 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534472296.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Carlo Rosati added the comment: I've actually written a few workarounds that should be considered a multiprocessing specific tee function. I need feedback/critique on these. Hopefully we can all agree on one solution that's the best. It is unfortunate that the multiprocessing manager does not provide a dequeue. The first one I wrote uses a managed list. def multiprocessing_tee(iterable, n=2): """Write a multiprocessing safe itertools.tee""" it = iter(iterable) m = multiprocessing.Manager() mylock = m.Lock() lists = [m.list() for i in range(n)] def gen(local_list): for i in itertools.count(): with mylock: if not local_list: # when the local list is empty newval = next(it) # fetch a new value and for l in lists: # load it to all the lists l.append(newval) yield local_list.pop(0) return tuple(gen(l) for l in lists) The second two implementations use queues. def multiprocessing_tee_q(iterable, n=2): """Write a multiprocessing safe itertools.tee""" it = iter(iterable) m = multiprocessing.Manager() lock = m.Lock() queues = [m.Queue(-1) for _ in range(n)] # -1 means infinite maxsize (so puts won't block) def gen(myqueue): while True: with lock: # no one else touches anything try: newval = myqueue.get_nowait() except Queue.Empty: newval = next(it) for q in queues: q.put(newval) newval = myqueue.get() yield newval return tuple(gen(q) for q in queues) class Sentinel(object): """used as Queue Sentinel""" def multiprocessing_tee_q2(iterable, n=2): """Write a multiprocessing safe itertools.tee""" it = iter(iterable) m = multiprocessing.Manager() lock = m.Lock() queues = [m.Queue(-1) for _ in range(n)] # -1 means infinite maxsize (so puts won't block) def gen(myqueue): while True: try: retval = myqueue.get_nowait() except Queue.Empty: # what happens if the other process puts last item in my queue before i get lock? with lock: # no one else touches anything try: newval = next(it) except StopIteration: newval = Sentinel for q in queues: q.put(newval) retval = myqueue.get() if retval is Sentinel: raise StopIteration yield retval return tuple(gen(q) for q in queues) I'm just throwing out my sketches here. I'm hoping the more experienced here can weigh in on these implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 22:21:27 2018 From: report at bugs.python.org (Carlo Rosati) Date: Fri, 17 Aug 2018 02:21:27 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534472487.13.0.56676864532.issue34410@psf.upfronthosting.co.za> Carlo Rosati added the comment: `for i in itertools.count()` in the first implementation I posted should be `while True`. I was using that for debugging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 00:19:47 2018 From: report at bugs.python.org (Jens Troeger) Date: Fri, 17 Aug 2018 04:19:47 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1431879719.97.0.835565097524.issue24218@psf.upfronthosting.co.za> Message-ID: <1534479587.36.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: Thanks David: PR on Github (which is R/O) or where should I submit to? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 00:19:52 2018 From: report at bugs.python.org (Aivar Annamaa) Date: Fri, 17 Aug 2018 04:19:52 +0000 Subject: [issue6700] inspect.getsource() returns incorrect source lines In-Reply-To: <1250223562.74.0.274098839265.issue6700@psf.upfronthosting.co.za> Message-ID: <1534479592.08.0.56676864532.issue6700@psf.upfronthosting.co.za> Change by Aivar Annamaa : ---------- nosy: +Aivar.Annamaa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 00:21:47 2018 From: report at bugs.python.org (Aivar Annamaa) Date: Fri, 17 Aug 2018 04:21:47 +0000 Subject: [issue6700] inspect.getsource() returns incorrect source lines at the module level In-Reply-To: <1250223562.74.0.274098839265.issue6700@psf.upfronthosting.co.za> Message-ID: <1534479707.15.0.56676864532.issue6700@psf.upfronthosting.co.za> Change by Aivar Annamaa : ---------- title: inspect.getsource() returns incorrect source lines -> inspect.getsource() returns incorrect source lines at the module level versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 01:36:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Aug 2018 05:36:27 +0000 Subject: [issue34395] memory leaks in error handling in csv and pickle modules In-Reply-To: <1534179202.53.0.56676864532.issue34395@psf.upfronthosting.co.za> Message-ID: <1534484187.41.0.56676864532.issue34395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ae1f0127298b1193618062fd0c8a3b434656e780 by Serhiy Storchaka (Sergey Fedoseev) in branch '2.7': bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Realloc(). (GH-8785) https://github.com/python/cpython/commit/ae1f0127298b1193618062fd0c8a3b434656e780 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 02:02:40 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 17 Aug 2018 06:02:40 +0000 Subject: [issue34414] Absolute imports conflict with local files In-Reply-To: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> Message-ID: <1534485760.75.0.56676864532.issue34414@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This has nothing to do with absolute imports at all. You have two toplevel modules in an entry on sys.path that is before the stdlib (see the earlier message by Eric V. Smit for documentation on how the path is initialised). The name of one of those modules shadows the name of a stdlib module. Absolute imports are what avoids a similar problem in another situation. Given: foo/ __init__.py a.py math.py When you import "foo.a" the code in "a.py" is executed as a module in package. When that code does "import math" absolute imports ensure that this always references the stdlib version, not the module in the package. Module "foo.a" should use "from . import math" (relative import) or "import foo.math" (absolute import) to access functionality in foo.math. Again, this is not a bug but normal behaviour. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 02:08:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Aug 2018 06:08:18 +0000 Subject: [issue34413] Porting section of 3.5 "What's New" doc does not mention bytecode changes. In-Reply-To: <1534434373.24.0.56676864532.issue34413@psf.upfronthosting.co.za> Message-ID: <1534486098.75.0.56676864532.issue34413@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think this needs to be exposed in What's New. This is a very low level implementation detail and isn't interested for most users. I think it would just distract attention from more significant changes. But it may be worth to document this change in the NEWS file. Changes in BUILD_MAP affected more users and also was not mentioned in the NEWS file. It was documented in the dis module documentation only in issue26213. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 03:45:47 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Fri, 17 Aug 2018 07:45:47 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() Message-ID: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> New submission from Sebastian Rittau : The documentation at https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPErrorProcessor does not list the two arguments "request" and "response" that HTTPErrorProcessor.http_response() and https_response() actually require. (I checked the implementation in Python 3.5 and 3.7.) ---------- assignee: docs at python components: Documentation messages: 323638 nosy: docs at python, srittau priority: normal severity: normal status: open title: Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() versions: Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 03:53:41 2018 From: report at bugs.python.org (Sebastian Rittau) Date: Fri, 17 Aug 2018 07:53:41 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() In-Reply-To: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Message-ID: <1534492421.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Change by Sebastian Rittau : ---------- keywords: +patch pull_requests: +8267 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:11:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Aug 2018 09:11:55 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1534497115.52.0.56676864532.issue20104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Benjamin, Gregory, could you please look at PR 6693? Is it what you want? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:28:09 2018 From: report at bugs.python.org (Michael Osipov) Date: Fri, 17 Aug 2018 09:28:09 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee Message-ID: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> New submission from Michael Osipov <1983-01-06 at gmx.net>: It seems like an oversight of the author, though it is not clear why this happily compiles with clang 3.4.1 on FreeBSD 10.4-STABLE and GCC on RHEL6. The error is (HP-UX 11.31 and HP C/aC++ B3910B A.06.28.03 [Dec 13 2016]): > /opt/aCC/bin/cc -Ae +z -O -I./Include -I. -I/usr/local/include -I/var/osipovmi/cpython/Include -I/var/osipovmi/cpython -c /var/osipovmi/cpython/Modules/selectmodule.c -o build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/selectmodule.o > "/var/osipovmi/cpython/Modules/selectmodule.c", line 412: warning #4232-D: > conversion from "PyObject *" to a more strictly aligned type > "PyDictObject *" may cause misaligned access > self->ufd_len = PyDict_GET_SIZE(self->dict); > ^ > > "/var/osipovmi/cpython/Modules/selectmodule.c", line 849: error #2130: > expected a "{" > static PyObject * > ^ > > "/var/osipovmi/cpython/Modules/selectmodule.c", line 898: error #2101: > "timeout_obj" has already been declared in the current scope > PyObject *result_list = NULL, *timeout_obj = NULL; > ^ > > 2 errors detected in the compilation of "/var/osipovmi/cpython/Modules/selectmodule.c". caused by: > +static PyObject * > +select_devpoll_modify_impl(devpollObject *self, int fd, > + unsigned short eventmask) > +/*[clinic end generated code: output=bc2e6d23aaff98b4 input=f0d7de3889cc55fb]*/ > static PyObject * > devpoll_modify(devpollObject *self, PyObject *args) > { > - return internal_devpoll_register(self, args, 1); > + return internal_devpoll_register(self, fd, eventmask, 1); > } Signature change, but prototype has not been changed. > static PyObject * > -poll_poll(pollObject *self, PyObject *args) > +select_poll_poll_impl(pollObject *self, PyObject *timeout_obj) > +/*[clinic end generated code: output=876e837d193ed7e4 input=7a446ed45189e894]*/ > { > - PyObject *result_list = NULL, *timeout_obj = NULL; > + PyObject *result_list = NULL; > int poll_result, i, j; > PyObject *value = NULL, *num = NULL; > _PyTime_t timeout = -1, ms = -1, deadline = 0; > int async_err = 0; > > - if (!PyArg_ParseTuple(args, "|O:poll", &timeout_obj)) { > - return NULL; > - } > - > - if (timeout_obj != NULL && timeout_obj != Py_None) { > + if (timeout_obj != Py_None) { timeout_obj has been added to the function signature, but the internal NULL assignment has not been removed. ---------- components: Build, Library (Lib) messages: 323640 nosy: michael-o priority: normal severity: normal status: open title: selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:37:54 2018 From: report at bugs.python.org (Michael Osipov) Date: Fri, 17 Aug 2018 09:37:54 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c In-Reply-To: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> Message-ID: <1534498674.01.0.56676864532.issue34419@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- title: selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee -> selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:41:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Aug 2018 09:41:01 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c In-Reply-To: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> Message-ID: <1534498861.08.0.56676864532.issue34419@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +easy (C) nosy: +taleinat stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:47:35 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 09:47:35 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() In-Reply-To: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Message-ID: <1534499255.72.0.56676864532.issue34418@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c53aaec793e018edef4e72a3edbd338b10db10aa by Berker Peksag (Sebastian Rittau) in branch 'master': bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793) https://github.com/python/cpython/commit/c53aaec793e018edef4e72a3edbd338b10db10aa ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:48:23 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 17 Aug 2018 09:48:23 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() In-Reply-To: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Message-ID: <1534499303.5.0.56676864532.issue34418@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:48:34 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 17 Aug 2018 09:48:34 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() In-Reply-To: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Message-ID: <1534499314.45.0.56676864532.issue34418@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:50:50 2018 From: report at bugs.python.org (Michael Osipov) Date: Fri, 17 Aug 2018 09:50:50 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c In-Reply-To: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> Message-ID: <1534499450.65.0.56676864532.issue34419@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: A PR is in preparation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 06:02:14 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 17 Aug 2018 10:02:14 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() In-Reply-To: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Message-ID: <1534500134.31.0.56676864532.issue34418@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 05d89ef785ab3cb6dd28f10f312f68f8e6a163ce by Miss Islington (bot) in branch '3.7': bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793) https://github.com/python/cpython/commit/05d89ef785ab3cb6dd28f10f312f68f8e6a163ce ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 06:05:30 2018 From: report at bugs.python.org (Jonathan Hadida) Date: Fri, 17 Aug 2018 10:05:30 +0000 Subject: [issue34414] Absolute imports conflict with local files In-Reply-To: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> Message-ID: <1534500330.47.0.56676864532.issue34414@psf.upfronthosting.co.za> Jonathan Hadida added the comment: Thanks again for your reply, I really appreciate your time. Every language I know has reserved keywords, and a restricted syntax. Nothing to complain about there. Banning the use of tabs (PEP8) is pretty odd; but restricting file-names is just a whole new level. Is the list of python modules set in stone somewhere, or are we supposed to rename scripts every time a new module with a conflicting name is introduced? Should we start checking for the authenticity of the modules loaded when writing a Python library? Maybe keep a version-specific, platform-specific list of checksums and iterate all builtin modules at the beginning of any script? Not being able to tell whether "import math" will load the standard math module, not only because of the names of local files, **but also because of those surrounding ANY script that will ever load my library**; are we supposed to control for the user's folders too then? I would happily stop complaining and just reverse sys.path at the beginning of my script if I could, but I cannot even trust that "import sys" will work as intended! What a feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 06:35:55 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 10:35:55 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() In-Reply-To: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Message-ID: <1534502155.84.0.56676864532.issue34418@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 02c4d4b6dcd772ec3a7fdca517118f3fa53b0b88 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793) https://github.com/python/cpython/commit/02c4d4b6dcd772ec3a7fdca517118f3fa53b0b88 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 06:37:24 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 10:37:24 +0000 Subject: [issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response() In-Reply-To: <1534491947.25.0.56676864532.issue34418@psf.upfronthosting.co.za> Message-ID: <1534502244.29.0.56676864532.issue34418@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report and for the patch! 3.5 is in security-fix-only mode, so it doesn't get documentation fixes anymore. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.6, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 06:48:58 2018 From: report at bugs.python.org (Michael Osipov) Date: Fri, 17 Aug 2018 10:48:58 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c In-Reply-To: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> Message-ID: <1534502938.67.0.56676864532.issue34419@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- keywords: +patch pull_requests: +8271 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 06:48:58 2018 From: report at bugs.python.org (Michael Osipov) Date: Fri, 17 Aug 2018 10:48:58 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1534502938.76.0.665841612001.issue31938@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- pull_requests: +8272 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 06:54:30 2018 From: report at bugs.python.org (Jonathan Hadida) Date: Fri, 17 Aug 2018 10:54:30 +0000 Subject: [issue34414] Absolute imports conflict with local files In-Reply-To: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> Message-ID: <1534503270.42.0.56676864532.issue34414@psf.upfronthosting.co.za> Jonathan Hadida added the comment: With regards to "This has nothing to do with absolute imports at all.", I would like to point out that the "import math" statement that I am complaining about IS WITHIN THE NUMPY MODULE. So it seems very related to this bug. How can "import math", **written within NumPy**, be an absolute import if I import numpy from within my own module, but not from a script? According to your example, NumPy shouldn't have any issue loading the standard math module instead of my local file. ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 07:00:54 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 17 Aug 2018 11:00:54 +0000 Subject: [issue34414] Absolute imports conflict with local files In-Reply-To: <1534437925.07.0.56676864532.issue34414@psf.upfronthosting.co.za> Message-ID: <1534503654.15.0.56676864532.issue34414@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This behaviour is not a bug, even if it can be confusing at times. Please read . ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 07:18:12 2018 From: report at bugs.python.org (Michael Osipov) Date: Fri, 17 Aug 2018 11:18:12 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534504692.53.0.56676864532.issue34381@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- keywords: +patch pull_requests: +8273 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 07:35:13 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 17 Aug 2018 11:35:13 +0000 Subject: [issue14886] json C vs pure-python implementation difference In-Reply-To: <1337765129.86.0.0917200779683.issue14886@psf.upfronthosting.co.za> Message-ID: <1534505713.64.0.56676864532.issue14886@psf.upfronthosting.co.za> St?phane Wirtel added the comment: We have received a notification about this bug for 3.5 ---------- nosy: +matrixise versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 07:43:06 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 17 Aug 2018 11:43:06 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c In-Reply-To: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> Message-ID: <1534506186.95.0.56676864532.issue34419@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375 by Tal Einat (Michael Osipov) in branch 'master': bpo-34419: selectmodule.c does not compile on HP-UX due to bpo-31938 (GH-8796) https://github.com/python/cpython/commit/0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 07:43:07 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 17 Aug 2018 11:43:07 +0000 Subject: [issue31938] Convert selectmodule.c to Argument Clinic In-Reply-To: <1509744030.41.0.213398074469.issue31938@psf.upfronthosting.co.za> Message-ID: <1534506187.04.0.902498594338.issue31938@psf.upfronthosting.co.za> Tal Einat added the comment: New changeset 0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375 by Tal Einat (Michael Osipov) in branch 'master': bpo-34419: selectmodule.c does not compile on HP-UX due to bpo-31938 (GH-8796) https://github.com/python/cpython/commit/0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 07:45:01 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 17 Aug 2018 11:45:01 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c In-Reply-To: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> Message-ID: <1534506301.74.0.56676864532.issue34419@psf.upfronthosting.co.za> Tal Einat added the comment: Michael, thanks for catching this and supplying a PR! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 08:01:36 2018 From: report at bugs.python.org (Michael Osipov) Date: Fri, 17 Aug 2018 12:01:36 +0000 Subject: [issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c In-Reply-To: <1534498089.92.0.56676864532.issue34419@psf.upfronthosting.co.za> Message-ID: <1534507296.83.0.56676864532.issue34419@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: Bevakasha! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 08:02:57 2018 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 17 Aug 2018 12:02:57 +0000 Subject: [issue14886] json C vs pure-python implementation difference In-Reply-To: <1337765129.86.0.0917200779683.issue14886@psf.upfronthosting.co.za> Message-ID: <1534507377.58.0.56676864532.issue14886@psf.upfronthosting.co.za> Stefan Behnel added the comment: FWIW, the C implementation of the sequence encoder uses PySequence_Fast(), so adding a lower priority instance check that calls the same encoding function would solve this. https://github.com/python/cpython/blob/cfa797c0681b7fef47cf93955fd06b54ddd09a7f/Modules/_json.c#L1730 Probably not something to fix in Py3.5/6 anymore, though. ---------- nosy: +scoder versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 08:10:44 2018 From: report at bugs.python.org (Tal Einat) Date: Fri, 17 Aug 2018 12:10:44 +0000 Subject: [issue19050] [Windows] fflush called on pointer to potentially closed file In-Reply-To: <1379595509.08.0.968867256316.issue19050@psf.upfronthosting.co.za> Message-ID: <1534507844.36.0.56676864532.issue19050@psf.upfronthosting.co.za> Tal Einat added the comment: I agree this should probably be ignored for security-only branches. However, AFAIK 2.7 is still in bugfix status, not security-only. If there's interest, I'm happy to build with AMK's fix on 2.7 on Windows to see if it works, and if so provide a PR. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 08:56:55 2018 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 17 Aug 2018 12:56:55 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534510615.37.0.56676864532.issue34416@psf.upfronthosting.co.za> Paul Ganssle added the comment: > It does not seem to me that two threads have the GIL at the same time. To be clear, this was never my contention. I was under the impression that if you take the GIL with PyGILState_Ensure(), the GIL was held until you called PyGILState_Release(), as with a traditional lock, so I was puzzled as to why Thread 2 was *releasing* the GIL even though I had very much not released it. >From our discussion off the issue tracker, it seems that your contention is that any C API calls can arbitrarily release the GIL, and the calling function can not be said to "hold" the GIL. If this is true than this is not a bug and can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 09:56:19 2018 From: report at bugs.python.org (sai arjun) Date: Fri, 17 Aug 2018 13:56:19 +0000 Subject: [issue34420] Complete your registration to Python tracker -- keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp In-Reply-To: <20180816113813.9CDD8117A17@psf.upfronthosting.co.za> Message-ID: <1534514179.66.0.094306209913.issueNone@psf.upfronthosting.co.za> New submission from sai arjun : I have received the email. Sent from Mail for Windows 10 From: Python tracker Sent: 16 August 2018 17:08 To: venkkarjun at yahoo.com Subject: Complete your registration to Python tracker -- keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp To complete your registration of the user "arjun" with Python tracker, please do one of the following: - send a reply to report at bugs.python.org and maintain the subject line as is (the reply's additional "Re:" is ok), - or visit the following URL: https://bugs.python.org/?@action=confrego&otk=snSwaZe6PtikiEZf4bdIXIiuwFyFZFxp ---------- messages: 323657 nosy: arjun priority: normal severity: normal status: open title: Complete your registration to Python tracker -- keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 10:07:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 14:07:00 +0000 Subject: [issue34420] Complete your registration to Python tracker -- keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp In-Reply-To: <1534514179.66.0.094306209913.issueNone@psf.upfronthosting.co.za> Message-ID: <1534514820.48.0.56676864532.issue34420@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 10:19:24 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 14:19:24 +0000 Subject: [issue28113] Remove Py_CreateSymbolicLinkW In-Reply-To: <1473747548.28.0.648303309588.issue28113@psf.upfronthosting.co.za> Message-ID: <1534515564.33.0.56676864532.issue28113@psf.upfronthosting.co.za> Berker Peksag added the comment: Eryk, would you like to address Steve's comments and convert your patch to a GitHub pull request? Let me know if you don't have time to prepare a new patch. ---------- nosy: +berker.peksag versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 11:13:23 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 Aug 2018 15:13:23 +0000 Subject: [issue28113] Remove Py_CreateSymbolicLinkW In-Reply-To: <1473747548.28.0.648303309588.issue28113@psf.upfronthosting.co.za> Message-ID: <1534518803.66.0.56676864532.issue28113@psf.upfronthosting.co.za> Steve Dower added the comment: One other thing, I have come across some CI configurations recently where TEMP is not the best choice (e.g. when it's a mount point in a VM/container). It seems likely that at some point we'll centralize the "working directory" for the test suite in a way that can be overridden easily, so using one of the test.support members instead of %TEMP% directly will make that easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 11:22:53 2018 From: report at bugs.python.org (Matej Cepl) Date: Fri, 17 Aug 2018 15:22:53 +0000 Subject: [issue23847] Add xml pretty print option to ElementTree In-Reply-To: <1427958110.33.0.788273316254.issue23847@psf.upfronthosting.co.za> Message-ID: <1534519373.06.0.56676864532.issue23847@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 11:23:10 2018 From: report at bugs.python.org (Matej Cepl) Date: Fri, 17 Aug 2018 15:23:10 +0000 Subject: [issue14465] xml.etree.ElementTree: add feature to prettify XML output In-Reply-To: <1333294084.01.0.984287406664.issue14465@psf.upfronthosting.co.za> Message-ID: <1534519390.44.0.56676864532.issue14465@psf.upfronthosting.co.za> Change by Matej Cepl : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 12:05:36 2018 From: report at bugs.python.org (Eric Snow) Date: Fri, 17 Aug 2018 16:05:36 +0000 Subject: [issue34417] imp.find_module reacts badly to iterator In-Reply-To: <1534456304.96.0.56676864532.issue34417@psf.upfronthosting.co.za> Message-ID: <1534521936.01.0.56676864532.issue34417@psf.upfronthosting.co.za> Eric Snow added the comment: There are several issues at hand here, Phillip. I'll enumerate them below. Thanks for taking the time to let us know about this. However, I'm closing this issue since realistically the behavior of imp.find_module() isn't going to change, particularly in Python 2.7. Even though the issue is closed, feel free to reply, particularly about how you are using imp.find_module() (we may be able to point you toward how to use importlib instead). Also, I've changed this issue's type to "enhancement". imp.find_module() is working as designed, so what you are looking for is a feature request. Consequently there's a much higher bar for justifying a change. Here are reasons why the requested change doesn't reach that bar: 1. Python 2.7 is closed to new features. So imp.find_module() is not going to change. 2. Python 2.7 is nearing EOL. We highly recommend that everyone move to Python 3 as soon as possible. Hopefully you are in a position to do so. If you're stuck on Python 2.7 then you miss the advantages of importlib, along with a ton of other benefits. If you are not going to be able to migrate before 2020 then send an email to python-list at python.org asking for recommendations on what to do. 3. Starting in Python 3.4, using the imp module is discouraged/deprecated. "Deprecated since version 3.4: The imp package is pending deprecation in favor of importlib." [1] The importlib package should have everything you need. What are you using imp.find_module() for? We should be able to demonstrate the equivalent using importlib. 4. The import machinery is designed around using a list (the builtin type, not the concept) for the "module search path". * imp.find_module(): "the list of directory names given by sys.path is searched" [2] * imp.find_module(): "Otherwise, path must be a list of directory names" [2] * importlib.find_loader() (deprecated): "optionally within the specified path" (which defaults to sys.path) [3] * importlib.util.find_spec(): doesn't even have a "path" parameter [4] * ModuleSpec.submodule_search_locations: "List of strings for where to find submodules" [5] * sys.path: "A list of strings that specifies the search path for modules. ... Only strings and bytes should be added to sys.path; all other data types are ignored during import." [6] [1] https://docs.python.org/3/library/imp.html#module-imp [2] https://docs.python.org/3/library/imp.html#imp.find_module [3] https://docs.python.org/3/library/importlib.html#importlib.find_loader [4] https://docs.python.org/3/library/importlib.html#importlib.util.find_spec [5] https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.submodule_search_locations [6] https://docs.python.org/3/library/sys.html#sys.path ---------- nosy: +brett.cannon, eric.snow resolution: -> wont fix stage: -> resolved status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 12:55:01 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 17 Aug 2018 16:55:01 +0000 Subject: [issue34416] PyCapsule_Import seems to release the GIL without acquiring it In-Reply-To: <1534454103.63.0.56676864532.issue34416@psf.upfronthosting.co.za> Message-ID: <1534524901.45.0.56676864532.issue34416@psf.upfronthosting.co.za> Brett Cannon added the comment: "From our discussion off the issue tracker, it seems that your contention is that any C API calls can arbitrarily release the GIL, and the calling function can not be said to "hold" the GIL. If this is true than this is not a bug and can be closed." Correct, because the GIL is a global lock for the whole process, anyone can release it and then acquire it, leading to interleaving and no one owning their locking of it. ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:04:57 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 Aug 2018 17:04:57 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1431879719.97.0.835565097524.issue24218@psf.upfronthosting.co.za> Message-ID: <1534525497.24.0.56676864532.issue24218@psf.upfronthosting.co.za> R. David Murray added the comment: check out https://devguide.python.org. (Basically, banch and generate a PR on github). And please open a new issue for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:06:15 2018 From: report at bugs.python.org (Julien Malard) Date: Fri, 17 Aug 2018 17:06:15 +0000 Subject: [issue34421] Cannot install package with unicode module names on Windows Message-ID: <1534525575.04.0.56676864532.issue34421@psf.upfronthosting.co.za> Change by Julien Malard : ---------- components: Distutils nosy: dstufft, eric.araujo, julien.malard priority: normal severity: normal status: open title: Cannot install package with unicode module names on Windows type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:10:09 2018 From: report at bugs.python.org (Julien Malard) Date: Fri, 17 Aug 2018 17:10:09 +0000 Subject: [issue34421] Cannot install package with unicode module names on Windows Message-ID: <1534525809.25.0.56676864532.issue34421@psf.upfronthosting.co.za> Change by Julien Malard : ---------- keywords: +patch pull_requests: +8274 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:21:06 2018 From: report at bugs.python.org (Gabriel Tremblay) Date: Fri, 17 Aug 2018 17:21:06 +0000 Subject: [issue34422] __name__ not available for classes in typing module Message-ID: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> New submission from Gabriel Tremblay : Types under the typing module used to behave like other python classes regarding the __name__ attribute before Python 3.7. The behavior seems to have changed to a non-standard way. Py3.6 >>> from typing import List >>> dir(List) ['__abstractmethods__', '__add__', '__args__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__', '__doc__', '__eq__', '__extra__', '__format__', '__ge__', '__getattribute__', '__getitem__', '_ _gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len_ _', '__lt__', '__module__', '__mul__', '__ne__', '__new__', '__next_in_mro__', '__orig_bases__', '__origin __', '__parameters__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__rmul__', '__setattr__ ', '__setitem__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '__tree_hash__', '_abc_cache', '_abc_negative_cache', '_abc_negative_cache_version', '_abc_registry', 'append', 'clear', 'copy', 'count' , 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'] >>> List.__name__ 'List' Py3.7: >>> from typing import List >>> dir(List) ['__args__', '__call__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__instancecheck__', '__le__', '__lt__', '__module__', '__mro_entries__', '__ne__', '__new__', '__origin__', '__parameters__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasscheck__', '__subclasshook__', '__weakref__', '_inst', '_name', '_special', 'copy_with'] >>> List.__name__ Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/typing.py", line 699, in __getattr__ raise AttributeError(attr) AttributeError: __name__ >>> List._name 'List' ---------- components: Interpreter Core messages: 323663 nosy: Gabriel Tremblay priority: normal severity: normal status: open title: __name__ not available for classes in typing module type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:26:47 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 17 Aug 2018 17:26:47 +0000 Subject: [issue34200] importlib: python -m test test_pkg -m test_7 fails randomly In-Reply-To: <1532349909.53.0.56676864532.issue34200@psf.upfronthosting.co.za> Message-ID: <1534526807.29.0.56676864532.issue34200@psf.upfronthosting.co.za> Brett Cannon added the comment: I can't reproduce with master on macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:41:31 2018 From: report at bugs.python.org (Joshua Bronson) Date: Fri, 17 Aug 2018 17:41:31 +0000 Subject: [issue20849] add exist_ok to shutil.copytree In-Reply-To: <1393908922.06.0.91052425832.issue20849@psf.upfronthosting.co.za> Message-ID: <1534527691.42.0.56676864532.issue20849@psf.upfronthosting.co.za> Change by Joshua Bronson : ---------- nosy: +jab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:45:14 2018 From: report at bugs.python.org (Joshua Bronson) Date: Fri, 17 Aug 2018 17:45:14 +0000 Subject: [issue20849] add exist_ok to shutil.copytree In-Reply-To: <1393908922.06.0.91052425832.issue20849@psf.upfronthosting.co.za> Message-ID: <1534527914.49.0.56676864532.issue20849@psf.upfronthosting.co.za> Joshua Bronson added the comment: I submitted a new PR in https://github.com/python/cpython/pull/8792 that addresses the outstanding concerns in @ofekmeister's original PR. It includes passing tests and passes all the GitHub PR status checks. Does it look ok to merge? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:57:33 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 Aug 2018 17:57:33 +0000 Subject: [issue34408] possible null pointer dereference in pystate.c In-Reply-To: <1534277378.73.0.56676864532.issue34408@psf.upfronthosting.co.za> Message-ID: <1534528653.82.0.56676864532.issue34408@psf.upfronthosting.co.za> Change by Steve Dower : ---------- nosy: +eric.snow, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:58:49 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 Aug 2018 17:58:49 +0000 Subject: [issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" In-Reply-To: <1533791029.87.0.56676864532.issue34365@psf.upfronthosting.co.za> Message-ID: <1534528729.52.0.56676864532.issue34365@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +easy versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 14:42:10 2018 From: report at bugs.python.org (Koos Zevenhoven) Date: Fri, 17 Aug 2018 18:42:10 +0000 Subject: [issue33939] Provide a robust O(1) mechanism to check for infinite iterators In-Reply-To: <1529671694.59.0.56676864532.issue33939@psf.upfronthosting.co.za> Message-ID: <1534531330.59.0.56676864532.issue33939@psf.upfronthosting.co.za> Koos Zevenhoven added the comment: I'd say there are three different problems related to this: (1) The inability of infinite iterators/iterables to say anything about their length (2) The inability to interrupt C-level loops (3) The horrible consequences of things like list(itertools.count()) that fill up the memory The problems overlap only partially. Unfortunately, fixing any single one of these problems does not eliminate the two others. For example, (2) and (3) may happen just as well without the iterator protocol being involved. And (1) may just prevent you from checking if the iterable has enough elements for whatever you're doing. ---------- nosy: +koos.zevenhoven _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 16:35:40 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 20:35:40 +0000 Subject: [issue24012] Add error checks to PyInit_pyexpat() In-Reply-To: <1429471995.2.0.707709004529.issue24012@psf.upfronthosting.co.za> Message-ID: <1534538140.75.0.56676864532.issue24012@psf.upfronthosting.co.za> Berker Peksag added the comment: Some parts of the patch have already been applied into master: * PySys_GetObject(): https://github.com/python/cpython/commit/7a5457b6878db61910c81017d10579edb7c91512 * PyDict_SetItem(): https://github.com/python/cpython/commit/3f9eee6eb4b25fe1926eaa5f00e02344b126f54d#diff-cc8b737f9996c36521d5b9db5ea1a032 The only remaining part is about PyModule_AddObject(), but there are already many usages of PyModule_AddObject() without doing any error checking, so I suggest closing this as 'outdated'. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 16:40:47 2018 From: report at bugs.python.org (Eric Snow) Date: Fri, 17 Aug 2018 20:40:47 +0000 Subject: [issue34413] Porting section of 3.5 "What's New" doc does not mention bytecode changes. In-Reply-To: <1534434373.24.0.56676864532.issue34413@psf.upfronthosting.co.za> Message-ID: <1534538447.32.0.56676864532.issue34413@psf.upfronthosting.co.za> Eric Snow added the comment: Fair enough. Having the note in the 3.5 docs should be fine. :) ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 16:42:31 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 20:42:31 +0000 Subject: [issue24011] Add error checks to PyInit_signal() In-Reply-To: <1429471695.96.0.523863138973.issue24011@psf.upfronthosting.co.za> Message-ID: <1534538551.43.0.56676864532.issue24011@psf.upfronthosting.co.za> Berker Peksag added the comment: All of the PyModule_AddIntMacro() changes have already been applied in https://github.com/python/cpython/commit/6782b14bcba612e4a39e41992c77306217b91e30. The remaining parts are: - x = PyLong_FromLong((long)NSIG); - if (!x || PyDict_SetItemString(d, "NSIG", x) < 0) + if (PyModule_AddIntMacro(m, NSIG)) goto finally; - Py_DECREF(x); --- - PyExc_IOError, NULL); - if (ItimerError != NULL) - PyDict_SetItemString(d, "ItimerError", ItimerError); + PyExc_IOError, NULL); + if (PyModule_AddObject(m, "ItimerError", ItimerError)) + goto finally; ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 16:46:59 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 20:46:59 +0000 Subject: [issue24010] Add error checks to PyInit__locale() In-Reply-To: <1429471599.85.0.679825670624.issue24010@psf.upfronthosting.co.za> Message-ID: <1534538819.38.0.56676864532.issue24010@psf.upfronthosting.co.za> Berker Peksag added the comment: A variant of localemodule.patch without error checking for PyModule_AddIntMacro() has been applied in https://github.com/python/cpython/commit/ff4fddde57d5579dff3a83d99e20cd06366b10d6. Christian, can this be closed or do we still need to add error checking to all PyModule_AddIntMacro() usages? ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:07:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 21:07:06 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534540025.99.0.56676864532.issue34381@psf.upfronthosting.co.za> Terry J. Reedy added the comment: An additional motivation for the change is that the instructions in the Testing section of the README are make based while the devguide section gives the OS- and version-specific 'python' based commands. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:07:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 21:07:37 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534540057.69.0.56676864532.issue34381@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: -> terry.reedy components: +Documentation versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:19:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 21:19:39 +0000 Subject: [issue34382] test_os.test_mode fails when directory base directory has g+s set In-Reply-To: <1533990666.21.0.56676864532.issue34382@psf.upfronthosting.co.za> Message-ID: <1534540779.13.0.56676864532.issue34382@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'Backport' might or might not mean 2.7. You should be able to explicitly select versions in the box above. I have no idea who should review this. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:42:19 2018 From: report at bugs.python.org (Matthijs Kooijman) Date: Fri, 17 Aug 2018 21:42:19 +0000 Subject: [issue34188] Allow dict choices to "transform" values in argpagse In-Reply-To: <1532264030.24.0.56676864532.issue34188@psf.upfronthosting.co.za> Message-ID: <1534542139.35.0.56676864532.issue34188@psf.upfronthosting.co.za> Matthijs Kooijman added the comment: I was today trying to achieve something similar. I also considered the solution using `type` argument, but that does not seem to play well with the `choices` argument. I was going to report that as a bug, but this issue seems similar enough to comment here instead. The solution proposed by Paul works, in the sense that if 'I' is passed on the commandline, the parsed value because `int` (the actual type, not a string, not sure if Paul really intended that). However, when running --help with his example, you get: usage: foo.py [-h] {,} So: - Since the `choices` argument is used to display help text, `choices` should contain the values that should be specified on the commandline (e.g. the *inputs* to the `type` converter. - Since the *type-converted* value is checked against the `choices` argument, `choices` should contain the *outputs* of the `type` converter. AFAICS these two constraints cannot be fulfilled at the same time, except when no type conversion happens (or, when converted values can be stringified back to their unconverted value, which works in simple cases, I suppose). IMHO this looks like a bug: `type` and `choices` do not play well together. Checking specified values against `choices` *before* type conversion happens seems more sensible to me and would fix this, as well fullfil Victor's original usecase (though not with the syntax he suggests). ---------- nosy: +Matthijs Kooijman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:43:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 21:43:42 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534542222.74.0.56676864532.issue34381@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset cae8ff93a696aa7d74562a9eeaf27afac1f181b4 by Terry Jan Reedy (Michael Osipov) in branch 'master': bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797) https://github.com/python/cpython/commit/cae8ff93a696aa7d74562a9eeaf27afac1f181b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:43:53 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 17 Aug 2018 21:43:53 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534542233.05.0.56676864532.issue34381@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8275 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:44:02 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 17 Aug 2018 21:44:02 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534542242.24.0.56676864532.issue34381@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8276 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:51:51 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 17 Aug 2018 21:51:51 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534542711.06.0.56676864532.issue34381@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4d4d23d8317fbc95eec789f349dd1db4c0b24fc3 by Miss Islington (bot) in branch '3.6': bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797) https://github.com/python/cpython/commit/4d4d23d8317fbc95eec789f349dd1db4c0b24fc3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:56:49 2018 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBSYWR3YcWEc2tp?=) Date: Fri, 17 Aug 2018 21:56:49 +0000 Subject: [issue34423] Overflow when casting from double to time_t, and_PyTime_t. Message-ID: <1534543009.21.0.56676864532.issue34423@psf.upfronthosting.co.za> New submission from Micha? Radwa?ski : Code triggering bug: import time time.sleep(2**63 / 10**9) Result: ValueError: sleep length must be non-negative The problem is with the macro that checks the range of provided double: Line 228 of Include/pymath.h: #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) The type here is _PyTime_t, which is a typedef to int64_t. Proposed solution is to change <= into <, since float(2**63-1) == float(2**63), and that means that none double can ever be equal to 2**63-1. ---------- components: Interpreter Core messages: 323676 nosy: belopolsky, enedil, lemburg, vstinner priority: normal severity: normal status: open title: Overflow when casting from double to time_t, and_PyTime_t. type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 17:57:47 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 17 Aug 2018 21:57:47 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534543067.32.0.56676864532.issue34381@psf.upfronthosting.co.za> miss-islington added the comment: New changeset eeece3cd331a1f57fabd55e026f2ea26bc43333c by Miss Islington (bot) in branch '3.7': bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797) https://github.com/python/cpython/commit/eeece3cd331a1f57fabd55e026f2ea26bc43333c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:01:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:01:37 +0000 Subject: [issue34391] test_ftplib is failing with TLS 1.3 In-Reply-To: <1534153835.38.0.56676864532.issue34391@psf.upfronthosting.co.za> Message-ID: <1534543297.09.0.56676864532.issue34391@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is there more to do on this? Tests pass on Windows with 1 skip, but I don't know if the failure condition applies here. test_check_hostname (test.test_ftplib.TestTLS_FTPClass) ... skipped 'FIXME: bpo-32706' ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:12:00 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:12:00 +0000 Subject: [issue34401] [SOLUTION] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1534543920.44.0.56676864532.issue34401@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Why did you put '[SOLUTION]' in the title? We do not use such conventions, and you provide no solution. Why did you mark this as 'crash'? What is the actual failure? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:12:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:12:47 +0000 Subject: [issue34402] [SOLUTION] strftime fails on HP-UX In-Reply-To: <1534250217.83.0.56676864532.issue34402@psf.upfronthosting.co.za> Message-ID: <1534543967.52.0.56676864532.issue34402@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Same comment as for #34401. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:13:52 2018 From: report at bugs.python.org (Matthijs Kooijman) Date: Fri, 17 Aug 2018 22:13:52 +0000 Subject: [issue34188] Allow dict choices to "transform" values in argpagse In-Reply-To: <1532264030.24.0.56676864532.issue34188@psf.upfronthosting.co.za> Message-ID: <1534544032.53.0.56676864532.issue34188@psf.upfronthosting.co.za> Matthijs Kooijman added the comment: One way to make the original example from Victor work, is to use the following action class: class ConvertChoices(argparse.Action): """ Argparse action that interprets the `choices` argument as a dict mapping the user-specified choices values to the resulting option values. """ def __init__(self, *args, choices, **kwargs): super().__init__(*args, choices=choices.keys(), **kwargs) self.mapping = choices def __call__(self, parser, namespace, value, option_string=None): setattr(namespace, self.dest, self.mapping[value]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:16:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:16:57 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1534544217.98.0.56676864532.issue34403@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You might get more information asking questions on python-list. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:21:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:21:11 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534544471.78.0.56676864532.issue34381@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Closing this does not preclude the optional addition and merge of a PR for 2.7. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:30:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:30:09 +0000 Subject: [issue34407] datetime.time.isoformat function has inconsistent behavior with timezone In-Reply-To: <1534270684.14.0.56676864532.issue34407@psf.upfronthosting.co.za> Message-ID: <1534545009.04.0.56676864532.issue34407@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +belopolsky versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:36:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:36:31 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534545391.93.0.56676864532.issue34415@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:44:10 2018 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Aug 2018 22:44:10 +0000 Subject: [issue29386] select.epoll.poll may behave differently if timeout = -1 vs timeout = None In-Reply-To: <1485671321.44.0.0475790676768.issue29386@psf.upfronthosting.co.za> Message-ID: <1534545850.76.0.56676864532.issue29386@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. Looking at the Kernel source code, there doesn't seem to be any difference between -1, -100, or -255: https://github.com/torvalds/linux/blob/9bd553929f68921be0f2014dd06561e0c8249a0d/fs/eventpoll.c#L1747-L1761 Do you know any other OS that implements or mimicks epoll() other than Illumos? Since https://github.com/joyent/illumos-joyent/commit/d21b3b2e1bbefbd2f6158ed5d329cd58f86677ab, Illumos follows Linux's behavior, so I'm not sure whether we should do something similar to https://github.com/python/cpython/commit/6cfa927ceb931ad968b5b03e4a2bffb64a8a0604 for epoll.poll(). ---------- nosy: +berker.peksag versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:47:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2018 22:47:16 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534546036.56.0.56676864532.issue34415@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The default format depends on the style. From 3.8: class Formatter() def __init__(self, fmt=None, datefmt=None, style='%'): ... self._fmt = self._style._fmt It appears that the class docstring was not updated when the style parameter was added, in 3.2. So I think more change is needed. I will try to make a proposal later. ---------- nosy: +terry.reedy, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 19:02:02 2018 From: report at bugs.python.org (Jens Troeger) Date: Fri, 17 Aug 2018 23:02:02 +0000 Subject: [issue34424] Unicode names break email header Message-ID: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> New submission from Jens Troeger : See also this comment and ensuing conversation: https://bugs.python.org/issue24218?#msg322761 Consider an email message with the following: message = EmailMessage() message["From"] = Address(addr_spec="bar at foo.com", display_name="Jens Troeger") message["To"] = Address(addr_spec="foo at bar.com", display_name="Mart?n C?rdoba") It?s important here that the email itself is `ascii` encodable, but the names are not. Flattening the object (https://github.com/python/cpython/blob/master/Lib/smtplib.py#L964) incorrectly inserts multiple linefeeds, thus breaking the email header, thus mangling the entire email: flatmsg: b'From: Jens Troeger \r\nTo: Fernando =?utf-8?q?Mart=C3=ADn_C=C3=B3rdoba?= \r\r\r\r\r\nSubject:\r\n Confirmation: ?\r\n?' After an initial investigation into the BytesGenerator (used to flatten an EmailMessage object), here is what?s happening. Flattening the body and attachments of the EmailMessage object works, and eventually _write_headers() is called to flatten the headers which happens entry by entry (https://github.com/python/cpython/blob/master/Lib/email/generator.py#L417-L418). Flattening a header entry is a recursive process over the parse tree of the entry, which builds the flattened and encoded final string by descending into the parse tree and encoding & concatenating the individual ?parts? (tokens of the header entry). Given the parse tree for a header entry like "Mart?n C?rdoba " eventually results in the correct flattened string: '=?utf-8?q?Mart=C3=ADn_C=C3=B3rdoba?= \r\n' at the bottom of the recursion for this ?Mailbox? part. The recursive callstack is then: _refold_parse_tree _header_value_parser.py:2687 fold [Mailbox] _header_value_parser.py:144 _refold_parse_tree _header_value_parser.py:2630 fold [Address] _header_value_parser.py:144 _refold_parse_tree _header_value_parser.py:2630 fold [AddressList] _header_value_parser.py:144 _refold_parse_tree _header_value_parser.py:2630 fold [Header] _header_value_parser.py:144 fold [_UniqueAddressHeader] headerregistry.py:258 _fold [EmailPolicy] policy.py:205 fold_binary [EmailPolicy] policy.py:199 _write_headers [BytesGenerator] generator.py:418 _write [BytesGenerator] generator.py:195 The problem now arises from the interplay of # https://github.com/python/cpython/blob/master/Lib/email/_header_value_parser.py#L2629 encoded_part = part.fold(policy=policy)[:-1] # strip nl which strips the '\n' from the returned string, and # https://github.com/python/cpython/blob/master/Lib/email/_header_value_parser.py#L2686 return policy.linesep.join(lines) + policy.linesep which adds the policy?s line separation string linesep="\r\n" to the end of the flattened string upon unrolling the recursion. I am not sure about a proper fix here, but considering that the linesep policy can be any string length (in this case len("\r\n") == 2) a fixed truncation of one character [:-1] seems wrong. Instead, using: encoded_part = part.fold(policy=policy)[:-len(policy.linesep)] # strip nl seems to work for entries with and without Unicode characters in their display names. ---------- components: email messages: 323686 nosy: _savage, barry, r.david.murray priority: normal severity: normal status: open title: Unicode names break email header type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 19:03:08 2018 From: report at bugs.python.org (Jens Troeger) Date: Fri, 17 Aug 2018 23:03:08 +0000 Subject: [issue24218] Also support SMTPUTF8 in smtplib's send_message method. In-Reply-To: <1431879719.97.0.835565097524.issue24218@psf.upfronthosting.co.za> Message-ID: <1534546988.46.0.56676864532.issue24218@psf.upfronthosting.co.za> Jens Troeger added the comment: New issue: https://bugs.python.org/issue34424 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 19:45:09 2018 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBSYWR3YcWEc2tp?=) Date: Fri, 17 Aug 2018 23:45:09 +0000 Subject: [issue32367] [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings In-Reply-To: <1513614543.15.0.213398074469.issue32367@psf.upfronthosting.co.za> Message-ID: <1534549509.19.0.56676864532.issue32367@psf.upfronthosting.co.za> Change by Micha? Radwa?ski : ---------- pull_requests: +8277 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 20:18:56 2018 From: report at bugs.python.org (Jason Spencer) Date: Sat, 18 Aug 2018 00:18:56 +0000 Subject: [issue34425] :s formatting broken for objects without __format__ Message-ID: <1534551536.12.0.56676864532.issue34425@psf.upfronthosting.co.za> New submission from Jason Spencer : Objects with __str__ but WITHOUT __format__ are string-convertible and default-to-str formattable. But the explicit use of '{:s}' as a format string fails to format these objects as expected. Either it is no longer the case that '{}' and '{:s}' are equivalent format strings, or formatting for {:s} is broken. Users would not expect the following to be true. (Tested in 3.5.3 and 3.6. Maybe be the same in later releases.) Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class Coord: ... def __init__(self, a, b): ... self.a=a ... self.b=b ... def __str__(self): ... return '{:d}:{:d}'.format(self.a, self.b) ... >>> c = Coord(3,4) >>> str(c) '3:4' >>> '{:s}'.format(c) Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to Coord.__format__ >>> '{}'.format(c) '3:4' >>> '{!s:s}'.format(c) '3:4' >>> ---------- components: Interpreter Core messages: 323688 nosy: Jason Spencer priority: normal severity: normal status: open title: :s formatting broken for objects without __format__ type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 20:35:07 2018 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBSYWR3YcWEc2tp?=) Date: Sat, 18 Aug 2018 00:35:07 +0000 Subject: [issue34423] Overflow when casting from double to time_t, and_PyTime_t. In-Reply-To: <1534543009.21.0.56676864532.issue34423@psf.upfronthosting.co.za> Message-ID: <1534552507.05.0.56676864532.issue34423@psf.upfronthosting.co.za> Change by Micha? Radwa?ski : ---------- keywords: +patch pull_requests: +8278 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 00:56:44 2018 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Aug 2018 04:56:44 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1534568204.92.0.56676864532.issue34424@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8279 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 00:59:44 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 18 Aug 2018 04:59:44 +0000 Subject: [issue34425] :s formatting broken for objects without __format__ In-Reply-To: <1534551536.12.0.56676864532.issue34425@psf.upfronthosting.co.za> Message-ID: <1534568384.08.0.56676864532.issue34425@psf.upfronthosting.co.za> Martin Panter added the comment: It looks like you are describing the result of Issue 7994. Documentation: https://docs.python.org/release/3.5.3/reference/datamodel.html#object.__format__ https://docs.python.org/release/3.5.3/whatsnew/3.4.html#api-and-feature-removals ---------- nosy: +martin.panter resolution: -> not a bug status: open -> pending superseder: -> object.__format__ should reject format strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 01:06:24 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 18 Aug 2018 05:06:24 +0000 Subject: [issue14465] xml.etree.ElementTree: add feature to prettify XML output In-Reply-To: <1333294084.01.0.984287406664.issue14465@psf.upfronthosting.co.za> Message-ID: <1534568784.51.0.56676864532.issue14465@psf.upfronthosting.co.za> Stefan Behnel added the comment: > Serialization of ElementTree in the stdlib is much slower than in lxml (see issue25881). Perhaps it should be implemented in C. But it should be kept simple for this. Should I say it? That's a first class use case for Cython. > Pretty-printing can be implemented as an outher preprocessing operation Agreed. And that would actually be much simpler to implement in C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 01:08:14 2018 From: report at bugs.python.org (Jens Troeger) Date: Sat, 18 Aug 2018 05:08:14 +0000 Subject: [issue34424] Unicode names break email header In-Reply-To: <1534546922.5.0.56676864532.issue34424@psf.upfronthosting.co.za> Message-ID: <1534568894.26.0.56676864532.issue34424@psf.upfronthosting.co.za> Jens Troeger added the comment: Pull request https://github.com/python/cpython/pull/8803/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 01:35:11 2018 From: report at bugs.python.org (Nojima Takahide) Date: Sat, 18 Aug 2018 05:35:11 +0000 Subject: [issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt Message-ID: <1534570511.08.0.56676864532.issue34426@psf.upfronthosting.co.za> New submission from Nojima Takahide : In the Section "LLTRACE" of $(Python3.6-source)/Misc/SpecialBuilds.txt , it describes variable name is "__lltrace__",however it seems to be wrong, "__ltrace__" is correct. Would someone correct this document? ---------- assignee: docs at python components: Documentation messages: 323692 nosy: Nojima Takahide, docs at python priority: normal severity: normal status: open title: "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 01:43:39 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 18 Aug 2018 05:43:39 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534571019.97.0.56676864532.issue34217@psf.upfronthosting.co.za> INADA Naoki added the comment: I googled and checked what MSDN uses before I merged these PRs. For example: https://msdn.microsoft.com/ja-jp/library/bb394814.aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 04:09:28 2018 From: report at bugs.python.org (Bian Jiaping) Date: Sat, 18 Aug 2018 08:09:28 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1534579768.19.0.56676864532.issue30717@psf.upfronthosting.co.za> Change by Bian Jiaping : ---------- nosy: +bianjp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 04:09:56 2018 From: report at bugs.python.org (Bian Jiaping) Date: Sat, 18 Aug 2018 08:09:56 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1534579796.32.0.56676864532.issue12568@psf.upfronthosting.co.za> Change by Bian Jiaping : ---------- nosy: +bianjp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 04:13:19 2018 From: report at bugs.python.org (Ben McGinnes) Date: Sat, 18 Aug 2018 08:13:19 +0000 Subject: [issue1016626] distutils support for swig is under par Message-ID: <1534579999.21.0.56676864532.issue1016626@psf.upfronthosting.co.za> Change by Ben McGinnes : ---------- versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 04:13:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Aug 2018 08:13:23 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534580003.95.0.56676864532.issue34415@psf.upfronthosting.co.za> Terry J. Reedy added the comment: ... the style-dependent default value, "%(message)s", "{message}", or "${message}", is used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 04:53:45 2018 From: report at bugs.python.org (Danish Prakash) Date: Sat, 18 Aug 2018 08:53:45 +0000 Subject: [issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" In-Reply-To: <1533791029.87.0.56676864532.issue34365@psf.upfronthosting.co.za> Message-ID: <1534582425.75.0.56676864532.issue34365@psf.upfronthosting.co.za> Danish Prakash added the comment: > But in 3.x, comparison no longer falls back to comparing object addresses. What is the default fallback in 3.x? ---------- nosy: +prakashdanish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 05:58:31 2018 From: report at bugs.python.org (Naris R) Date: Sat, 18 Aug 2018 09:58:31 +0000 Subject: [issue34427] calling MutableSequence.extend on self produces infinite loop Message-ID: <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za> New submission from Naris R : Example: ``` from typing import MutableSequence, TypeVar CliffordGate = TypeVar('CliffordGate') class QCircuit(MutableSequence[CliffordGate]): def __init__(self, gates): self.gates = list(gates) def __repr__(self): return f'{self.__class__.__name__}({self.gates})' def __getitem__(self, key): return self.gates[key] def __setitem__(self, key, item): self.gates[key] = item def __delitem__(self, key): del self.gates[key] def insert(self, key, item): self.gates.insert(key, item) a = QCircuit(['H0', 'S2']) a += a ``` ---------- components: Library (Lib) messages: 323696 nosy: Naris R priority: normal severity: normal status: open title: calling MutableSequence.extend on self produces infinite loop type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 06:07:27 2018 From: report at bugs.python.org (Naris R) Date: Sat, 18 Aug 2018 10:07:27 +0000 Subject: [issue34427] calling MutableSequence.extend on self produces infinite loop In-Reply-To: <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za> Message-ID: <1534586847.32.0.56676864532.issue34427@psf.upfronthosting.co.za> Naris R added the comment: I forgot to copy over __len__ in the example ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 06:08:26 2018 From: report at bugs.python.org (Naris R) Date: Sat, 18 Aug 2018 10:08:26 +0000 Subject: [issue34427] calling MutableSequence.extend on self produces infinite loop In-Reply-To: <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za> Message-ID: <1534586906.93.0.56676864532.issue34427@psf.upfronthosting.co.za> Change by Naris R : ---------- nosy: +rhettinger, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 06:29:27 2018 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 18 Aug 2018 10:29:27 +0000 Subject: [issue34428] tokenize Message-ID: <1534588167.35.0.56676864532.issue34428@psf.upfronthosting.co.za> New submission from Luke Kenneth Casson Leighton : https://github.com/hhatto/autopep8/issues/414 the following two lines of code are not parseable by tokenize.py: co = re.compile( "\(") the combination of: * being split on two lines * having a backslash inside quotes * having a bracket inside quotes is an edge-case that _tokenize cannot cope with. ---------- components: Library (Lib) messages: 323698 nosy: lkcl priority: normal severity: normal status: open title: tokenize type: crash versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 06:32:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Aug 2018 10:32:21 +0000 Subject: [issue34421] Cannot install package with unicode module names on Windows Message-ID: <1534588341.31.0.56676864532.issue34421@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Please provide more details. How to reproduce your issue? What you got, and what you expect to get? Seems the code just before lines modified by your PR are purposed to solve this issue. Why it doesn't work? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 06:47:06 2018 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 18 Aug 2018 10:47:06 +0000 Subject: [issue34428] tokenize In-Reply-To: <1534588167.35.0.56676864532.issue34428@psf.upfronthosting.co.za> Message-ID: <1534589226.59.0.56676864532.issue34428@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: these two line also pass (do not throw an exception): co = re.compile( r"\(") the code that fails may be further reduced to the following: ( "\(") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 06:59:26 2018 From: report at bugs.python.org (Erik Janssens) Date: Sat, 18 Aug 2018 10:59:26 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534589966.63.0.56676864532.issue34217@psf.upfronthosting.co.za> Erik Janssens added the comment: I'll try to be more precise : - I did an (imperfect) search : before these changes 98% of the windows headers were included in the .c files in lowercase - These changes would bring it to 100% - The advantage of these changes are consistency and the ability to cross compile those .c files on linux for a windows target, using the mingw-w64 sdk, where the sdk is on a case sensitive filesystem, as is the default when installing this sdk in most linux distributions. - I did not consider, nor did I test other toolchains than mingw-w64/mingw-w64-sdk on linux and msvc/windows-sdk on windows. I'm not enough of an expert on the different tools to come up with a comprehensive solution for this issue, but am willing to validate such solution for the use case of cross compiling on linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:00:17 2018 From: report at bugs.python.org (dwich) Date: Sat, 18 Aug 2018 11:00:17 +0000 Subject: [issue34429] On Windows tempfile.TemporaryFile behaves like NamedTemporaryFile Message-ID: <1534590017.91.0.56676864532.issue34429@psf.upfronthosting.co.za> New submission from dwich : On Windows tempfile.TemporaryFile() accepts delete attribute. On Linux TemporaryFile() raises TypeError if delete attribute is used. In tempfile.py source is the code below which means that on Windows TemporaryFile behaves like NamedTemporaryFile. I suppose the code should not be changed but the behaviour should be mentioned in documentation. if _os.name != 'posix' or _os.sys.platform == 'cygwin': # On non-POSIX and Cygwin systems, assume that we cannot unlink a file # while it is open. TemporaryFile = NamedTemporaryFile Steps to reproduce: >>> import tempfile >>> tf = tempfile.TemporaryFile(delete=False) On Linux Python throws TypeError: Traceback (most recent call last): File "", line 1, in TypeError: TemporaryFile() got an unexpected keyword argument 'delete' On Windows Python does not throw TypeError because on Windows TemporaryFile is in fact NamedTemporaryFile which accepts delete attribute. Tested on all these versions: 3.7.0 64 bit, 3.6.5 32 bit, 3.5.4 32 bit, 3.4.4 32 bit, 2.7.15 32 bit Proposed text to tempfile.TemporaryFile documentation: On non POSIX or Cygwin platforms TemporaryFile behaves exacly like NamedTemporaryFile including the fact that TemporaryFile accepts delete attribute and does not raise TypeError: TemporaryFile() got an unexpected keyword argument 'delete'. ---------- assignee: docs at python components: Documentation messages: 323702 nosy: docs at python, dwich priority: normal severity: normal status: open title: On Windows tempfile.TemporaryFile behaves like NamedTemporaryFile versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:02:20 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 11:02:20 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future Message-ID: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> New submission from Alfred Sawaya : asyncio.future.wrap_future is used to wrap a concurrent.future.Future in a asyncio.future.Future. The actual implementation as the following behaviours : 1) When the concurrent.future.Future gets a result, the asyncio.future.Future gets the same result, 2) When the asyncio.future.Future is cancelled, the concurrent.future.Future is cancelled I wonder why the futures synchronisation is not symmetrical ? I propose to add the following behaviours : 3) When the asyncio.future.Future gets a result, the concurrent.future.Future gets the same result, 4) When the concurrent.future.Future is cancelled, the asyncio.future.Future is cancelled I have also posted a request pull that implements the proposed behaviours, in case of acceptation. If there is good reasons to not implement the proposed behaviours, I would be glad to know. Thank you ! ---------- components: asyncio messages: 323703 nosy: asvetlov, huji, yselivanov priority: normal pull_requests: 8280 severity: normal status: open title: Double chaining futures in asyncio.future.wrap_future type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:06:33 2018 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 18 Aug 2018 11:06:33 +0000 Subject: [issue34428] tokenize In-Reply-To: <1534588167.35.0.56676864532.issue34428@psf.upfronthosting.co.za> Message-ID: <1534590393.03.0.56676864532.issue34428@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: python2.7 and 3.5 also has exact same issue. ---------- versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:16:03 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 11:16:03 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534590963.93.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- pull_requests: -8280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:18:13 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 11:18:13 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534591093.43.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- keywords: +patch pull_requests: +8281 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:21:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Aug 2018 11:21:53 +0000 Subject: [issue34428] tokenize In-Reply-To: <1534588167.35.0.56676864532.issue34428@psf.upfronthosting.co.za> Message-ID: <1534591313.88.0.56676864532.issue34428@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can't reproduce. >>> import tokenize >>> list(tokenize.generate_tokens(iter(['(\n', r'"\(")']).__next__)) [TokenInfo(type=53 (OP), string='(', start=(1, 0), end=(1, 1), line='(\n'), TokenInfo(type=56 (NL), string='\n', start=(1, 1), end=(1, 2), line='(\n'), TokenInfo(type=3 (STRING), string='"\\("', start=(2, 0), end=(2, 4), line='"\\(")'), TokenInfo(type=53 (OP), string=')', start=(2, 4), end=(2, 5), line='"\\(")'), TokenInfo(type=4 (NEWLINE), string='', start=(2, 5), end=(2, 6), line=''), TokenInfo(type=0 (ENDMARKER), string='', start=(3, 0), end=(3, 0), line='')] Could you please provide a minimal script that reproduces your issue? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:25:18 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 11:25:18 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534591518.39.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- pull_requests: -8281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:26:58 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 11:26:58 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534591618.06.0.56676864532.issue34430@psf.upfronthosting.co.za> Alfred Sawaya added the comment: Actually the PR does not pass some tests, I will work on this. If the new behaviours are accepted, I will implement them soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:37:04 2018 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 18 Aug 2018 11:37:04 +0000 Subject: [issue34428] tokenize In-Reply-To: <1534588167.35.0.56676864532.issue34428@psf.upfronthosting.co.za> Message-ID: <1534592224.77.0.56676864532.issue34428@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: regular expressions are not something i am familiar or comfortable with (never have been: the patterns are too dense). however REMOVING "Bracket" from the regular expression(s) for PseudoToken "fixes" the problem. some debug print statements dropped in at around line 640 of tokenize.py show that the match on the "working" code with r"\(") as input gives a start/end/spos/epos that is DIFFERENT from when the same code is given just "\(" line 'r"\\(")\n' pos 0 7 r <_sre.SRE_Match object; span=(0, 5), match='r"\\("'> pseudo start/end 0 5 (2, 0) (2, 5) vs line '"\\(")\n' pos 0 6 " <_sre.SRE_Match object; span=(0, 4), match='"\\("'> pseudo start/end 0 4 (5, 0) (5, 4) there *may* be a way to "fix" this by taking out the pattern matching on Bracket and prioritising everything else. while pos < max: pseudomatch = _compile(PseudoToken).match(line, pos) print ("pos", pos, max, line[pos], pseudomatch) if pseudomatch: # scan for tokens start, end = pseudomatch.span(1) spos, epos, pos = (lnum, start), (lnum, end), end print ("pseudo start/end", start, end, spos, epos) if start == end: continue Bracket = '[][(){}]' Special = group(r'\r?\n', r'\.\.\.', r'[:;.,@]') # REMOVE Bracket Funny = group(Operator, Special) PlainToken = group(Number, Funny, String, Name) Token = Ignore + PlainToken # First (or only) line of ' or " string. ContStr = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*" + group("'", r'\\\r?\n'), StringPrefix + r'"[^\n"\\]*(?:\\.[^\n"\\]*)*' + group('"', r'\\\r?\n')) PseudoExtras = group(r'\\\r?\n|\Z', Comment, Triple) PseudoToken = Whitespace + group(PseudoExtras, Number, Funny, ContStr, Name) ---------- nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:43:21 2018 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 18 Aug 2018 11:43:21 +0000 Subject: [issue34428] tokenize In-Reply-To: <1534588167.35.0.56676864532.issue34428@psf.upfronthosting.co.za> Message-ID: <1534592601.14.0.56676864532.issue34428@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: wtf??? neither can i!!!! import io import tokenize text = r'''\ ( r"\(") ( "\(") ''' string_io = io.StringIO(text) tokens = list( tokenize.generate_tokens(string_io.readline) ) print (tokens) works perfectly. ok ahhhh i bet you it's something to do with how string_io.readline works, or something to do with the format of the text. give me a sec to triage it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 07:52:18 2018 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Sat, 18 Aug 2018 11:52:18 +0000 Subject: [issue34428] tokenize In-Reply-To: <1534588167.35.0.56676864532.issue34428@psf.upfronthosting.co.za> Message-ID: <1534593138.47.0.56676864532.issue34428@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: ahh darn-it, autopep8 is passing in tokens line-by-line, to be parsed one at a time.... oh and of course it's losing state information that tokenizer critically relies on. i *think* that's what's going on.... so it's highly unlikely to be a python tokenize bug... can we wait to see what the autopep8 developer says? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 08:42:04 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 18 Aug 2018 12:42:04 +0000 Subject: [issue31370] Remove support for threads-less builds In-Reply-To: <1504732249.83.0.180664230366.issue31370@psf.upfronthosting.co.za> Message-ID: <1534596124.35.0.56676864532.issue31370@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +8282 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 09:15:30 2018 From: report at bugs.python.org (Kevin Norris) Date: Sat, 18 Aug 2018 13:15:30 +0000 Subject: [issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" In-Reply-To: <1533791029.87.0.56676864532.issue34365@psf.upfronthosting.co.za> Message-ID: <1534598130.19.0.56676864532.issue34365@psf.upfronthosting.co.za> Kevin Norris added the comment: There is none. It raises a TypeError. See https://docs.python.org/3/reference/expressions.html#value-comparisons ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 09:15:48 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Aug 2018 13:15:48 +0000 Subject: [issue34427] calling MutableSequence.extend on self produces infinite loop In-Reply-To: <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za> Message-ID: <1534598148.04.0.56676864532.issue34427@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It would be reasonable to add special handling for this case to match what is done in the concrete sequences like list, deque, bytes, ... ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 09:48:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Aug 2018 13:48:05 +0000 Subject: [issue34427] calling MutableSequence.extend on self produces infinite loop In-Reply-To: <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za> Message-ID: <1534600085.44.0.56676864532.issue34427@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: deque and bytearray make an in-memory copy of self if extended with self. deque creates a temporary list, bytearray creates a temporary bytearray. list just iterates itself as a linear array of known size and avoids infinite loop. It could be possible to avoid creaing a temporary copy in case of deque and bytearray too, but I don't think this special case is worth an additional code. But a MutableSequence can represents a sequence that doesn't fit in memory. It can provide an interface to a linear on-disk store. In this case creating an on-memory copy is not possible. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 10:01:48 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 18 Aug 2018 14:01:48 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534600908.72.0.56676864532.issue34217@psf.upfronthosting.co.za> Steve Dower added the comment: As someone who has written MSDN samples, I'll spoil the secret and let you know that there's no consistency there, so you can find examples to prove either direction ;) I wasn't expecting expertise or research. I was only expecting a description of the change that clearly specifies who benefits and who loses, and leaves a chance for the affected experts to confirm impact before being merged. There can be a surprising amount of subtlety around cross-platform issues, which is why we have designated people who are responsible for tracking them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 10:36:05 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 14:36:05 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534602965.02.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- pull_requests: +8283 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 10:44:15 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 14:44:15 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534603455.05.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- pull_requests: +8284 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 10:55:28 2018 From: report at bugs.python.org (Julien Malard) Date: Sat, 18 Aug 2018 14:55:28 +0000 Subject: [issue34421] Cannot install package with unicode module names on Windows In-Reply-To: <1534588341.31.0.56676864532.issue34421@psf.upfronthosting.co.za> Message-ID: Julien Malard added the comment: Hello, Yes, it does seem odd that that code does not work. On my Windows machine (WIndows 7, 64 bits, running 32-bit Python) I checked and it seems that the code in the if block immediately preceding my PR does not run at all, whereby the error. For a reproducible example, my Taqdir package, mostly consisting of unicode packages and modules, runs into this issue (and installs successfully after my proposed fix here combined with a separate PR in pip). Perhaps the most easily accessible example would be the Appveyor build (https://ci.appveyor.com/project/julienmalard/Tinamit) for my TInamit project, which has Taqdir as a dependency. Thanks! -Julien Malard ________________________________ ??????: Serhiy Storchaka ????????: 18 ????? 2018 06:32 ?????: Julien Malard ????: [issue34421] Cannot install package with unicode module names on Windows New submission from Serhiy Storchaka : Please provide more details. How to reproduce your issue? What you got, and what you expect to get? Seems the code just before lines modified by your PR are purposed to solve this issue. Why it doesn't work? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 11:28:25 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 15:28:25 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534606105.51.0.56676864532.issue34430@psf.upfronthosting.co.za> Alfred Sawaya added the comment: The proposed solution (PR) has passed all tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 11:28:42 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 15:28:42 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534606122.3.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 11:28:56 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 15:28:56 +0000 Subject: [issue34430] Double chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534606136.39.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- pull_requests: -8283 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 11:36:17 2018 From: report at bugs.python.org (Alfred Sawaya) Date: Sat, 18 Aug 2018 15:36:17 +0000 Subject: [issue34430] Symmetrical chaining futures in asyncio.future.wrap_future In-Reply-To: <1534590140.17.0.56676864532.issue34430@psf.upfronthosting.co.za> Message-ID: <1534606577.69.0.56676864532.issue34430@psf.upfronthosting.co.za> Change by Alfred Sawaya : ---------- title: Double chaining futures in asyncio.future.wrap_future -> Symmetrical chaining futures in asyncio.future.wrap_future _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 12:03:19 2018 From: report at bugs.python.org (Jonathan Fine) Date: Sat, 18 Aug 2018 16:03:19 +0000 Subject: [issue34431] Docs does not eval allows code object as argument Message-ID: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za> New submission from Jonathan Fine : See https://docs.python.org/3.6/library/functions.html#eval This says the following won't happen. But it does. Python 3.6.2 (default, Jul 29 2017, 00:00:00) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> def fn(): print(3); return 4 ... >>> eval(fn.__code__) 3 4 Compare with https://docs.python.org/3.6/library/functions.html#exec Search for eval in title of open issues bring up related #22057 (The doc say all globals are copied on eval(), but only __builtins__ is copied) #25810 (Python 3 documentation for eval is incorrect) ---------- assignee: docs at python components: Documentation messages: 323716 nosy: docs at python, jfine2358 priority: normal severity: normal status: open title: Docs does not eval allows code object as argument versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 12:49:19 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 18 Aug 2018 16:49:19 +0000 Subject: [issue34431] Docs does not eval allows code object as argument In-Reply-To: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za> Message-ID: <1534610959.82.0.56676864532.issue34431@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for your report. Quoting from https://docs.python.org/3.6/library/functions.html#eval This function can also be used to execute arbitrary code objects (such as those created by compile()). In this case pass a code object instead of a string. So, your example is already documented as a legal way of using the eval() function. I don't see anything wrong here. ---------- nosy: +berker.peksag resolution: -> not a bug status: open -> pending type: -> behavior versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:05:23 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 18 Aug 2018 17:05:23 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales Message-ID: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> New submission from Andr?s Delfino : On str.format method, the note about how locales are dealt with reads: "When formatting a number (int, float, float and subclasses)..." PR removes the second float, and mentions complex and decimal.Decimal. The bug which introduced this note is: #31900 ---------- assignee: docs at python components: Documentation messages: 323718 nosy: adelfino, docs at python priority: normal severity: normal status: open title: doc Mention complex and decimal.Decimal on str.format note about locales type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:06:40 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 18 Aug 2018 17:06:40 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534612000.74.0.56676864532.issue34432@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- keywords: +patch pull_requests: +8285 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:12:08 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 18 Aug 2018 17:12:08 +0000 Subject: [issue34425] :s formatting broken for objects without __format__ In-Reply-To: <1534551536.12.0.56676864532.issue34425@psf.upfronthosting.co.za> Message-ID: <1534612328.33.0.56676864532.issue34425@psf.upfronthosting.co.za> Eric V. Smith added the comment: I agree this is the desired behavior, and not a bug. Because you are not specifying a __format__ in your class, object.__format__ is being called. By design, it does not understand any formatting specifiers, instead reserving them for your class to implement. "!s" is the correct way to convert your type to a string. Either that, or add a __format__ that understands "s". Note that not all types understand "s", for example, datetime. ---------- assignee: -> eric.smith nosy: +eric.smith stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:15:27 2018 From: report at bugs.python.org (Jonathan Fine) Date: Sat, 18 Aug 2018 17:15:27 +0000 Subject: [issue34431] Docs does not eval allows code object as argument In-Reply-To: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za> Message-ID: <1534612527.64.0.56676864532.issue34431@psf.upfronthosting.co.za> Jonathan Fine added the comment: Summary: There's my problem, and others. I'm willing to provide a patch, if supported. There's a gotcha here. I fell into it. The docs for eval state === eval(expression, globals=None, locals=None) The arguments are a string and optional globals and locals. === I read this and concluded, fairly I think, that I'm not allowed to pass in a code object [1]. So I didn't read any further. I'd already got the answer to my question. But I knew that exec would take a code object, so I had doubt, and did my little experiment. I'd prefer something more like exec, which says === This function supports dynamic execution of Python code. object must be either a string or a code object. === There are other problems, such as not agreeing with the help(eval) etc messages (and the still open #22057, #25810): === eval(source, globals=None, locals=None, /) Evaluate the given source in the context of globals and locals. The source may be a string representing a Python expression or a code object as returned by compile(). The globals must be a dictionary and locals can be any mapping, defaulting to the current globals and locals. If only globals is given, locals defaults to it. === exec(source, globals=None, locals=None, /) Execute the given source in the context of globals and locals. The source may be a string representing one or more Python statements or a code object as returned by compile(). The globals must be a dictionary and locals can be any mapping, defaulting to the current globals and locals. If only globals is given, locals defaults to it. === Finally, I'm willing to provide a patch, if supported. (I've not contributed to Python before.) [1] I'd just read the docs for exec, which is up-front about 'string or code'. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:36:27 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 18 Aug 2018 17:36:27 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534613787.29.0.56676864532.issue34432@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 93b5655c040a33f9ba4cdbd303afc8398c8413c7 by Eric V. Smith (Andr?s Delfino) in branch 'master': bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808) https://github.com/python/cpython/commit/93b5655c040a33f9ba4cdbd303afc8398c8413c7 ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:36:40 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 18 Aug 2018 17:36:40 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534613800.78.0.56676864532.issue34432@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8286 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:36:57 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 18 Aug 2018 17:36:57 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534613817.08.0.56676864532.issue34432@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:41:11 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 18 Aug 2018 17:41:11 +0000 Subject: [issue34431] Docs does not eval allows code object as argument In-Reply-To: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za> Message-ID: <1534614071.43.0.56676864532.issue34431@psf.upfronthosting.co.za> Berker Peksag added the comment: Ok, I think it would be a good idea to mention that the function accepts a code object in the first sentence. I'd be happy to review such PR. The eval() documentation is located at https://github.com/python/cpython/blob/master/Doc/library/functions.rst See https://devguide.python.org/ for more details about the contribution process. Note that you need to sign the CLA in order to contribute to Python: https://www.python.org/psf/contrib/contrib-form/ #22057 and #25810 are out of scope for this issue, so let's not discuss them here. ---------- resolution: not a bug -> stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:43:41 2018 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 18 Aug 2018 17:43:41 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534614221.72.0.56676864532.issue34432@psf.upfronthosting.co.za> Change by Andr?s Delfino : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 13:52:27 2018 From: report at bugs.python.org (Jonathan Fine) Date: Sat, 18 Aug 2018 17:52:27 +0000 Subject: [issue34431] Docs does not eval allows code object as argument In-Reply-To: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za> Message-ID: <1534614747.47.0.56676864532.issue34431@psf.upfronthosting.co.za> Jonathan Fine added the comment: OK. I'll do as you say. I've just signed the CLA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 14:16:05 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 18 Aug 2018 18:16:05 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534616165.95.0.56676864532.issue34432@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset fbd0a14cc941e340df0979d94ac55191dd31ad00 by Eric V. Smith (Miss Islington (bot)) in branch '3.6': bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808) (GH-8810) https://github.com/python/cpython/commit/fbd0a14cc941e340df0979d94ac55191dd31ad00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 14:16:39 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 18 Aug 2018 18:16:39 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534616199.12.0.56676864532.issue34432@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 0fd6f832a9c30404bf595a4af36e171d11fab024 by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-34432: doc Mention complex and decimal.Decimal on str.format note about locales (GH-8808) (GH-8809) https://github.com/python/cpython/commit/0fd6f832a9c30404bf595a4af36e171d11fab024 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 14:51:46 2018 From: report at bugs.python.org (Michael Felt) Date: Sat, 18 Aug 2018 18:51:46 +0000 Subject: [issue34382] test_os.test_mode fails when directory base directory has g+s set In-Reply-To: <1534540779.13.0.56676864532.issue34382@psf.upfronthosting.co.za> Message-ID: Michael Felt added the comment: Likewise, I have no idea who should review, or whether python2 should be included or not. The issue is not a bug in python, rather a shortcoming in the test suite. In short, since I do my builds in an environment where the mode includes SGID on the directory i see this ?false? fail. Sent from my iPhone > On 17 Aug 2018, at 23:19, Terry J. Reedy wrote: > > > Terry J. Reedy added the comment: > > 'Backport' might or might not mean 2.7. You should be able to explicitly select versions in the box above. I have no idea who should review this. > > ---------- > nosy: +terry.reedy > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 14:51:53 2018 From: report at bugs.python.org (Michael Osipov) Date: Sat, 18 Aug 2018 18:51:53 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1534618313.76.0.56676864532.issue34401@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: My bad, I initially had attached a patch as you can see, but will turn that into a PR on GitHub on Monday. That's why I had that label, but removed the patch. It doesn't crash, it is rather a behavior/regex issue in the test. Thanks for pointing out. Will get to you with a solution on Monday. ---------- title: [SOLUTION] Make test_gdb work on HP-UX -> Make test_gdb work on HP-UX type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 14:55:23 2018 From: report at bugs.python.org (Michael Osipov) Date: Sat, 18 Aug 2018 18:55:23 +0000 Subject: [issue34402] strftime fails on HP-UX In-Reply-To: <1534250217.83.0.56676864532.issue34402@psf.upfronthosting.co.za> Message-ID: <1534618523.57.0.56676864532.issue34402@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: Thanks changed appropriately. I here also have a PR idea I will try on Monday. It won't be idiotproof, but someone will likely comment on it and provide more input. I am willing to provide even more patches, but am currently stuck with https://github.com/python/cpython/pull/8786 and juggle with "git stash" to make Python actually compile on HP-UX. This is cumbersome. ---------- title: [SOLUTION] strftime fails on HP-UX -> strftime fails on HP-UX type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 14:58:14 2018 From: report at bugs.python.org (Michael Osipov) Date: Sat, 18 Aug 2018 18:58:14 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1534618694.43.0.56676864532.issue34403@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: Thanks, I'll do that. Hopefully I can provide a patch for. Though, I am convinced that I have to write a custom codec for roman8 to make all at stuff work flawlessly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 15:09:52 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 18 Aug 2018 19:09:52 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534619392.11.0.56676864532.issue34415@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +8288 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 15:09:54 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 18 Aug 2018 19:09:54 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534619394.26.0.56676864532.issue34415@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- keywords: +patch, patch pull_requests: +8288, 8289 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 16:09:47 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 18 Aug 2018 20:09:47 +0000 Subject: [issue34432] doc Mention complex and decimal.Decimal on str.format note about locales In-Reply-To: <1534611923.59.0.56676864532.issue34432@psf.upfronthosting.co.za> Message-ID: <1534622987.47.0.56676864532.issue34432@psf.upfronthosting.co.za> Eric V. Smith added the comment: Thanks, Andr?s! ---------- assignee: docs at python -> eric.smith resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 16:46:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Aug 2018 20:46:02 +0000 Subject: [issue12568] Add functions to get the width in columns of a character In-Reply-To: <1310683436.9.0.375403702242.issue12568@psf.upfronthosting.co.za> Message-ID: <1534625162.59.0.56676864532.issue12568@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suggest reclosing this issue, for the same reason I suggested closure of #24665 in msg321291: abstract unicode 'characters' (graphemes) do not, in general, have fixed physical widths of 0, 1, or 2 n-pixel columns (or spaces). I based that fairly long message on IDLE's multiscript font sample as displayed on Windows 10. In that context, for instance, the width of (fixed-pitch) East Asian characters is about 1.6, not 2.0, times the width of fixed-pitch Ascii characters. Variable-width Tamil characters average about the same. The exact ratio depends on the Latin font used. I did more experiments with Python started from Command Prompt with code page 437 or 65001 and characters 20 pixels high. The Windows console only allows 'fixed pitch' fonts. East Asian characters, if displayed, are expanded to double width. However, European characters are not reliably displayed in one column. The width depends on the both the font selected when a character is entered and the current font. The 20 latin1 characters in '????????????????????' usually display in 20 columns. But if they are entered with the font set to MSGothic, the '?' and '?' are each displayed in the middle of 2 columns, for 22 total. If the font is changed to MSGothic after entry, the '?' and '?' are shifted 1/2 column right to overlap the following '?' or '?' without changing the total width. Greek and Cyrillic characters also sometimes take two columns. I did not test whether the font size (pixel height) affects horizontal column spacing. ---------- stage: -> test needed versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 16:55:45 2018 From: report at bugs.python.org (paul j3) Date: Sat, 18 Aug 2018 20:55:45 +0000 Subject: [issue34188] Allow dict choices to "transform" values in argpagse In-Reply-To: <1532264030.24.0.56676864532.issue34188@psf.upfronthosting.co.za> Message-ID: <1534625745.17.0.56676864532.issue34188@psf.upfronthosting.co.za> paul j3 added the comment: The 'choices' mechanism is quite simple. As noted for testing it simply uses an 'in' test. For help formating it uses choice_strs = [str(choice) for choice in action.choices] result = '{%s}' % ','.join(choice_strs) In other words, it's treated as a iterable. But it is easy to produce unmanageable displays, such as with 'range(100)'. This has been raised in other bug/issues. The best way around that is with the 'metavar', which lets you customize the 'usage' and 'help'. One thing that 'metavar' does not help with is the error display. I'm not privy to the original author's thinking, but I don't think 'choices' was ever meant to be a high power tool. With a custom Action you can do almost anything that you could do after parsing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 16:59:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Aug 2018 20:59:18 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1534625958.34.0.56676864532.issue24665@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My msg323731 for #12568 refers to my msg321291 above. I did some new experiments with column spacing for European characters in Windows console (as opposed to tk Text) and discovered that some, including some Latin1 characters used in English text, may also become double-width in certain fonts. The problem of calculating physical line lengths is even harder than I thought before, and does not require non-English text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 17:23:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Aug 2018 21:23:35 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1534627415.5.0.56676864532.issue2382@psf.upfronthosting.co.za> Terry J. Reedy added the comment: IDLE avoids the problem of calculating a location for a '^' below the bad line by instead asking tk to give the marked character (and maybe more) a 'ERROR' tag, which shows as a red background. So it marks the '$' of 'A_I_U_E_O$' and the 'alid' slice of 'inv\u200balid' (from duplicate #10384). When the marked character is '\n', the space following the line is tagged. Is it possible to do something similar with any of the major system consoles? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 17:30:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Aug 2018 21:30:39 +0000 Subject: [issue10384] SyntaxError should contain exact location of the invalid character in identifier In-Reply-To: <1289439285.11.0.506002899946.issue10384@psf.upfronthosting.co.za> Message-ID: <1534627839.8.0.56676864532.issue10384@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When testing how IDLE handles the examples (which it does well, see #2382 msg323734), I discovered that while the single invisible char for msg120936 *is* present in the posted text, the multiple invisible chars for msg228023 are not. The following has them before and after the 'a': inv?a?lid ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 17:33:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Aug 2018 21:33:43 +0000 Subject: [issue34381] Make tests with outbound connection optional In-Reply-To: <1533980593.8.0.56676864532.issue34381@psf.upfronthosting.co.za> Message-ID: <1534628023.45.0.56676864532.issue34381@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 18:18:08 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 18 Aug 2018 22:18:08 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534630688.37.0.56676864532.issue22057@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +8290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 18:19:40 2018 From: report at bugs.python.org (Berker Peksag) Date: Sat, 18 Aug 2018 22:19:40 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534630780.73.0.56676864532.issue22057@psf.upfronthosting.co.za> Berker Peksag added the comment: I like Martin's suggestion in msg282262 and I've just created PR 8812 to implement it. ---------- nosy: +berker.peksag type: -> behavior versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 18:25:04 2018 From: report at bugs.python.org (Michael Osipov) Date: Sat, 18 Aug 2018 22:25:04 +0000 Subject: [issue1648923] HP-UX: -lcurses missing for readline.so Message-ID: <1534631104.67.0.56676864532.issue1648923@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: I cannot reproduce this with master and 3.7 on HP-UX. readline is linked and works with interactive python(1). curses module isn't buld because I don't have curses installed. I opt to close this one. ---------- nosy: +michael-o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 18:28:07 2018 From: report at bugs.python.org (Michael Osipov) Date: Sat, 18 Aug 2018 22:28:07 +0000 Subject: [issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type In-Reply-To: <1242077074.29.0.376465629361.issue5999@psf.upfronthosting.co.za> Message-ID: <1534631287.91.0.56676864532.issue5999@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: I cannot reproduce this with HP-UX 11.31 and master + 3.7. I opt to close this one. ---------- nosy: +michael-o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 19:52:35 2018 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 18 Aug 2018 23:52:35 +0000 Subject: [issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type In-Reply-To: <1242077074.29.0.376465629361.issue5999@psf.upfronthosting.co.za> Message-ID: <1534636355.17.0.56676864532.issue5999@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 20:07:47 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 Aug 2018 00:07:47 +0000 Subject: [issue26363] __builtins__ propagation is misleading described in exec and eval documentation In-Reply-To: <1455532935.35.0.388834921119.issue26363@psf.upfronthosting.co.za> Message-ID: <1534637267.76.0.56676864532.issue26363@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for the report, Xavier. This is a duplicate of issue 22057. PR 8812 clarifies the behavior when a dictionary without a "__builtins__" key is passed as *globals* to eval(). I think that makes the opposite case much easier to understand. >>> eval("print(spam)", {'__builtins__': {'spam': 'eggs'}}) Traceback (most recent call last): File "", line 1, in File "", line 1, in NameError: name 'print' is not defined >>> eval("print(spam)", {'__builtins__': {'spam': 'eggs', 'print': print}}) eggs Also, I never needed to pass a dictionary with a "__builtins__" key to eval() before, so I don't think it's an important detail to document. ---------- nosy: +berker.peksag resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> The doc say all globals are copied on eval(), but only __builtins__ is copied type: -> behavior versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 20:34:16 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 Aug 2018 00:34:16 +0000 Subject: [issue1648923] HP-UX: -lcurses missing for readline.so Message-ID: <1534638856.56.0.56676864532.issue1648923@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 22:04:01 2018 From: report at bugs.python.org (Naris R) Date: Sun, 19 Aug 2018 02:04:01 +0000 Subject: [issue34427] calling MutableSequence.extend on self produces infinite loop In-Reply-To: <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za> Message-ID: <1534644241.48.0.56676864532.issue34427@psf.upfronthosting.co.za> Change by Naris R : ---------- keywords: +patch pull_requests: +8291 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 22:38:36 2018 From: report at bugs.python.org (Danish Prakash) Date: Sun, 19 Aug 2018 02:38:36 +0000 Subject: [issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" In-Reply-To: <1533791029.87.0.56676864532.issue34365@psf.upfronthosting.co.za> Message-ID: <1534646316.24.0.56676864532.issue34365@psf.upfronthosting.co.za> Change by Danish Prakash : ---------- keywords: +patch pull_requests: +8292 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 22:46:39 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 19 Aug 2018 02:46:39 +0000 Subject: [issue34062] Python launcher on Windows does not work with --list or --list-paths In-Reply-To: <1530900810.19.0.56676864532.issue34062@psf.upfronthosting.co.za> Message-ID: <1534646799.38.0.56676864532.issue34062@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +8293 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 22:52:43 2018 From: report at bugs.python.org (Danish Prakash) Date: Sun, 19 Aug 2018 02:52:43 +0000 Subject: [issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt In-Reply-To: <1534570511.08.0.56676864532.issue34426@psf.upfronthosting.co.za> Message-ID: <1534647163.77.0.56676864532.issue34426@psf.upfronthosting.co.za> Danish Prakash added the comment: > however it seems to be wrong, "__ltrace__" is correct just curious how did you figure it out? ---------- nosy: +prakashdanish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 00:14:24 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 19 Aug 2018 04:14:24 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534652064.59.0.56676864532.issue34415@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset d3d3171da895d8cb880f23fae6be778f0ac23be7 by Vinay Sajip in branch 'master': bpo-34415: Updated logging.Formatter docstring. (GH-8811) https://github.com/python/cpython/commit/d3d3171da895d8cb880f23fae6be778f0ac23be7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 00:15:27 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 04:15:27 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534652127.92.0.56676864532.issue34415@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 00:15:34 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 04:15:34 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534652134.57.0.56676864532.issue34415@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8295 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 00:43:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 04:43:41 +0000 Subject: [issue22602] UTF-7 codec decodes ill-formed sequences starting with "+" In-Reply-To: <1412945083.94.0.341902119278.issue22602@psf.upfronthosting.co.za> Message-ID: <1534653821.56.0.56676864532.issue22602@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e349bf23584eef20e0d1e1b2989d9b1430f15507 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-22602: Raise an exception in the UTF-7 decoder for ill-formed sequences starting with "+". (GH-8741) https://github.com/python/cpython/commit/e349bf23584eef20e0d1e1b2989d9b1430f15507 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 00:44:28 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 04:44:28 +0000 Subject: [issue22602] UTF-7 codec decodes ill-formed sequences starting with "+" In-Reply-To: <1412945083.94.0.341902119278.issue22602@psf.upfronthosting.co.za> Message-ID: <1534653868.31.0.56676864532.issue22602@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your PR Zackery. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 02:55:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 06:55:15 +0000 Subject: [issue34392] Add sys.isinterned() In-Reply-To: <1534155873.32.0.56676864532.issue34392@psf.upfronthosting.co.za> Message-ID: <1534661715.29.0.56676864532.issue34392@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you all for the feedback. The function is renamed to sys._is_interned() and documented as optional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 03:00:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 07:00:15 +0000 Subject: [issue34318] Convert deprecated behavior of assertRaises() etc into errors In-Reply-To: <1533209994.63.0.56676864532.issue34318@psf.upfronthosting.co.za> Message-ID: <1534662015.45.0.56676864532.issue34318@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 77d5781835b6e0a132694ebadc22b1cbdb9913f8 by Serhiy Storchaka in branch 'master': bpo-34318: Convert deprecation warnings to errors in assertRaises() etc. (GH-8623) https://github.com/python/cpython/commit/77d5781835b6e0a132694ebadc22b1cbdb9913f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 03:19:35 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 19 Aug 2018 07:19:35 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534663175.35.0.56676864532.issue34415@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset fed871835ee54f50cabcec6239271739ed4839f5 by Vinay Sajip (Miss Islington (bot)) in branch '3.6': bpo-34415: Updated logging.Formatter docstring. (GH-8811) (GH-8816) https://github.com/python/cpython/commit/fed871835ee54f50cabcec6239271739ed4839f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 03:20:16 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 19 Aug 2018 07:20:16 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534663216.36.0.56676864532.issue34415@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 2e4ae8f1b3147d7f0a461b4ffdde9bcc9e6a2083 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-34415: Updated logging.Formatter docstring. (GH-8811) (GH-8817) https://github.com/python/cpython/commit/2e4ae8f1b3147d7f0a461b4ffdde9bcc9e6a2083 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 03:27:41 2018 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 19 Aug 2018 07:27:41 +0000 Subject: [issue34415] Typo in logging.Formatter docstring In-Reply-To: <1534449146.03.0.56676864532.issue34415@psf.upfronthosting.co.za> Message-ID: <1534663661.14.0.56676864532.issue34415@psf.upfronthosting.co.za> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 03:49:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 07:49:21 +0000 Subject: [issue34318] Convert deprecated behavior of assertRaises() etc into errors In-Reply-To: <1533209994.63.0.56676864532.issue34318@psf.upfronthosting.co.za> Message-ID: <1534664961.72.0.56676864532.issue34318@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 06:25:40 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 Aug 2018 10:25:40 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534674340.49.0.56676864532.issue22057@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 225b05548027d55aafb11b65f6a4a2bef2f5196f by Berker Peksag in branch 'master': bpo-22057: Clarify eval() documentation (GH-8812) https://github.com/python/cpython/commit/225b05548027d55aafb11b65f6a4a2bef2f5196f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 06:25:45 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 10:25:45 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534674345.96.0.56676864532.issue22057@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 06:25:54 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 10:25:54 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534674354.18.0.56676864532.issue22057@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8297 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 06:29:53 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 10:29:53 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534674593.11.0.56676864532.issue22057@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0e1e8dbb0b99ec78f4567382428fdd46e2244d40 by Miss Islington (bot) in branch '3.7': bpo-22057: Clarify eval() documentation (GH-8812) https://github.com/python/cpython/commit/0e1e8dbb0b99ec78f4567382428fdd46e2244d40 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 06:30:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 10:30:44 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1448296120.48.0.872112518039.issue25711@psf.upfronthosting.co.za> Message-ID: <1534674644.23.0.56676864532.issue25711@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed issues on Windows. ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 06:32:15 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 10:32:15 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534674735.59.0.56676864532.issue22057@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f19579b8f1fcd2dd8ffaf3e443b09930057c01d1 by Miss Islington (bot) in branch '3.6': bpo-22057: Clarify eval() documentation (GH-8812) https://github.com/python/cpython/commit/f19579b8f1fcd2dd8ffaf3e443b09930057c01d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 06:53:32 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 Aug 2018 10:53:32 +0000 Subject: [issue22057] The doc say all globals are copied on eval(), but only __builtins__ is copied In-Reply-To: <1406210389.95.0.0796853252426.issue22057@psf.upfronthosting.co.za> Message-ID: <1534676012.06.0.56676864532.issue22057@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the review, Martin, and thanks for the report, Alon! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 07:20:42 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 Aug 2018 11:20:42 +0000 Subject: [issue25810] Python 3 documentation for eval is incorrect In-Reply-To: <1449346403.16.0.483198527619.issue25810@psf.upfronthosting.co.za> Message-ID: <1534677642.12.0.56676864532.issue25810@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 08:08:26 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 Aug 2018 12:08:26 +0000 Subject: [issue27088] doc: select: epoll.poll: incorrect timeout units, missing maxevents In-Reply-To: <1463960371.93.0.0941923922389.issue27088@psf.upfronthosting.co.za> Message-ID: <1534680506.29.0.56676864532.issue27088@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. In the title, you mentioned epoll.poll(), but you gave the link to the poll.poll() documentation. Also, the part you quoted If timeout is given, it specifies the length of time in milliseconds which the system will wait for events before returning. is from the poll.poll() documentation. Currently, the documentation for epoll.poll() is pretty minimal: epoll.poll(timeout=-1, maxevents=-1) Wait for events. timeout in seconds (float) There is an open issue to improve epoll.poll() documentation: Issue 29247. Also, there is a review comment about explaining the *maxevent* parameter (https://github.com/python/cpython/pull/4798/files#r174309761), so I'm going to address the issues you've mentioned in msg266118 as part of issue 29247. In the meantime, I'm closing this as a duplicate of issue 29247. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Document return value of epoll.poll type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 08:16:23 2018 From: report at bugs.python.org (Berker Peksag) Date: Sun, 19 Aug 2018 12:16:23 +0000 Subject: [issue18925] select.poll.modify is not documented In-Reply-To: <1378328037.99.0.424927131422.issue18925@psf.upfronthosting.co.za> Message-ID: <1534680983.21.0.56676864532.issue18925@psf.upfronthosting.co.za> Berker Peksag added the comment: poll.modify() is documented in both Python 2 and Python 3 docs: * https://docs.python.org/2/library/select.html#select.poll.modify * https://docs.python.org/3/library/select.html#select.poll.modify > I believe that should be "Modify a registered file descriptor"... This has already been fixed in https://github.com/python/cpython/commit/632c812942d662b764ade56ef492850e00d92877. Closing this as 'out of date'. ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 09:13:40 2018 From: report at bugs.python.org (tzongw) Date: Sun, 19 Aug 2018 13:13:40 +0000 Subject: [issue34433] cancel all other pending child futures Message-ID: <1534684420.56.0.56676864532.issue34433@psf.upfronthosting.co.za> New submission from tzongw : In `tasks.gather`, when a child future throws an exception and `return_exceptions` is False, outer future will call `set_exception` while other child futures is still running. In this case, outer future call `_GatheringFuture.cancel' first to cancel all other pending child futures for efficiency. ---------- components: asyncio messages: 323755 nosy: asvetlov, tzongw, yselivanov priority: normal severity: normal status: open title: cancel all other pending child futures type: performance versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 09:26:25 2018 From: report at bugs.python.org (tzongw) Date: Sun, 19 Aug 2018 13:26:25 +0000 Subject: [issue34433] cancel all other pending child futures In-Reply-To: <1534684420.56.0.56676864532.issue34433@psf.upfronthosting.co.za> Message-ID: <1534685184.99.0.56676864532.issue34433@psf.upfronthosting.co.za> Change by tzongw : ---------- keywords: +patch pull_requests: +8298 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 09:37:10 2018 From: report at bugs.python.org (Andy Maier) Date: Sun, 19 Aug 2018 13:37:10 +0000 Subject: [issue34434] Removal of kwargs for int() etc not described as change Message-ID: <1534685830.81.0.56676864532.issue34434@psf.upfronthosting.co.za> New submission from Andy Maier : Python 3.7 removed support for passing the argument to the built-in functions int(), bool(), float(), list() and tuple() as a keyword argument. This change is described in the "What's New" for 3.7 (https://docs.python.org/3/whatsnew/3.7.html) in section "API and Feature Removals": Functions bool(), float(), list() and tuple() no longer take keyword arguments. The first argument of int() can now be passed only as positional argument. The issue is that this change is not described in the documentation of these built-in functions. ---------- messages: 323756 nosy: andymaier priority: normal severity: normal status: open title: Removal of kwargs for int() etc not described as change type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 11:15:32 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 19 Aug 2018 15:15:32 +0000 Subject: [issue18049] Re-enable threading test on OSX In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1534691732.79.0.56676864532.issue18049@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I have a patch for making the stack sizes the same in Issue34264. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 12:12:22 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 19 Aug 2018 16:12:22 +0000 Subject: [issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt In-Reply-To: <1534570511.08.0.56676864532.issue34426@psf.upfronthosting.co.za> Message-ID: <1534695142.05.0.56676864532.issue34426@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Hi @Nojima and thank you for the report. Do you mind doing a PR? If not, I can do it myself. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 12:12:44 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 19 Aug 2018 16:12:44 +0000 Subject: [issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt In-Reply-To: <1534570511.08.0.56676864532.issue34426@psf.upfronthosting.co.za> Message-ID: <1534695164.1.0.56676864532.issue34426@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg323758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 12:12:49 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 19 Aug 2018 16:12:49 +0000 Subject: [issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt In-Reply-To: <1534570511.08.0.56676864532.issue34426@psf.upfronthosting.co.za> Message-ID: <1534695169.94.0.56676864532.issue34426@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Content Hi @Nojima and thank you for the report. Do you mind doing a PR? If not, I can do it myself if you prefer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 12:29:44 2018 From: report at bugs.python.org (Mark Harfouche) Date: Sun, 19 Aug 2018 16:29:44 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1534696184.78.0.56676864532.issue13501@psf.upfronthosting.co.za> Mark Harfouche added the comment: Is there still interest in this? ---------- nosy: +Mark Harfouche _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 12:35:50 2018 From: report at bugs.python.org (Danish Prakash) Date: Sun, 19 Aug 2018 16:35:50 +0000 Subject: [issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt In-Reply-To: <1534570511.08.0.56676864532.issue34426@psf.upfronthosting.co.za> Message-ID: <1534696550.76.0.56676864532.issue34426@psf.upfronthosting.co.za> Danish Prakash added the comment: @pablogsal I would love to fix this up ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 12:52:20 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 19 Aug 2018 16:52:20 +0000 Subject: [issue26901] Argument Clinic test is broken In-Reply-To: <1462108807.42.0.528462387786.issue26901@psf.upfronthosting.co.za> Message-ID: <1534697540.36.0.56676864532.issue26901@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +8300 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 13:08:21 2018 From: report at bugs.python.org (Danish Prakash) Date: Sun, 19 Aug 2018 17:08:21 +0000 Subject: [issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt In-Reply-To: <1534570511.08.0.56676864532.issue34426@psf.upfronthosting.co.za> Message-ID: <1534698501.56.0.56676864532.issue34426@psf.upfronthosting.co.za> Change by Danish Prakash : ---------- keywords: +patch pull_requests: +8301 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 13:42:35 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 19 Aug 2018 17:42:35 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() Message-ID: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : A possible NULL return on out-of-memory condition at Objects/unicodeobject.c:6835 is not handled. Reported by Svace static analyzer. ---------- components: Interpreter Core messages: 323762 nosy: inada.naoki, izbyshev, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Missing NULL check in unicode_encode_ucs1() versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 13:47:36 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 19 Aug 2018 17:47:36 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534700856.28.0.56676864532.issue34435@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +8302 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 14:51:43 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 19 Aug 2018 18:51:43 +0000 Subject: [issue34436] Overallocation is never disabled in _PyBytes_FormatEx() Message-ID: <1534704703.42.0.56676864532.issue34436@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : The condition for disabling overallocation at 225b055/Objects/bytesobject.c:822 is always false. Reported by Svace static analyzer. ---------- components: Interpreter Core messages: 323763 nosy: inada.naoki, izbyshev, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Overallocation is never disabled in _PyBytes_FormatEx() type: performance versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 14:52:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 18:52:06 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534704726.6.0.56676864532.issue34435@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 74a307d48ef8b278c4629ca0ef2139be1c9a34e6 by Serhiy Storchaka (Alexey Izbyshev) in branch 'master': bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823) https://github.com/python/cpython/commit/74a307d48ef8b278c4629ca0ef2139be1c9a34e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 14:52:21 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 18:52:21 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534704741.6.0.56676864532.issue34435@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 14:52:32 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 18:52:32 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534704752.02.0.56676864532.issue34435@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 14:53:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 18:53:08 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534704788.71.0.56676864532.issue34435@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your PR Alexey. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 14:53:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 18:53:20 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534704800.18.0.56676864532.issue34435@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 14:58:51 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 19 Aug 2018 18:58:51 +0000 Subject: [issue34436] Overallocation is never disabled in _PyBytes_FormatEx() In-Reply-To: <1534704703.42.0.56676864532.issue34436@psf.upfronthosting.co.za> Message-ID: <1534705131.13.0.56676864532.issue34436@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +8305 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 15:09:12 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 19 Aug 2018 19:09:12 +0000 Subject: [issue34422] __name__ not available for classes in typing module In-Reply-To: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> Message-ID: <1534705752.72.0.56676864532.issue34422@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: Bisecting this issue revealed that this happened on commit d911e40e788fb679723d78b6ea11cabf46caed5a is the first bad commit commit d911e40e788fb679723d78b6ea11cabf46caed5a Author: Ivan Levkivskyi Date: Sat Jan 20 11:23:59 2018 +0000 bpo-32226: PEP 560: improve typing module (#4906) This PR re-designs the internal typing API using the new PEP 560 features. However, there are only few minor changes in the public API. The reason seems that now all of the types are created using `_GenericAlias` that does not copy the `__name__` attribute. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:17:57 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 20:17:57 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534709877.28.0.56676864532.issue34435@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1e596d3a20a1a9d1ef15218ef33795bc9e651b7a by Miss Islington (bot) in branch '3.7': bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823) https://github.com/python/cpython/commit/1e596d3a20a1a9d1ef15218ef33795bc9e651b7a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:19:21 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 19 Aug 2018 20:19:21 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534709961.19.0.56676864532.issue34435@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e77cdae0f84fc390fed5555ea1f53bbc8746d634 by Miss Islington (bot) in branch '3.6': bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823) https://github.com/python/cpython/commit/e77cdae0f84fc390fed5555ea1f53bbc8746d634 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:26:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 20:26:22 +0000 Subject: [issue34422] __name__ not available for classes in typing module In-Reply-To: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> Message-ID: <1534710382.23.0.56676864532.issue34422@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Library (Lib) -Interpreter Core nosy: +gvanrossum, levkivskyi versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:26:31 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 19 Aug 2018 20:26:31 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534710391.38.0.56676864532.issue34435@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Thank you for merging! ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:28:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Aug 2018 20:28:13 +0000 Subject: [issue34435] Missing NULL check in unicode_encode_ucs1() In-Reply-To: <1534700555.39.0.56676864532.issue34435@psf.upfronthosting.co.za> Message-ID: <1534710493.31.0.56676864532.issue34435@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:45:24 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 Aug 2018 20:45:24 +0000 Subject: [issue34422] __name__ not available for classes in typing module In-Reply-To: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> Message-ID: <1534711524.84.0.56676864532.issue34422@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: This is an intentional change. It would be a bad idea to use `_name` instead of `__name__`, because semantics is subtly different. Also the fact that type in typing object used to be actual class object was an implementation detail (also typing is still provisional). The problematic part here is that special types and generic type aliases are still documented as _classes_ in https://docs.python.org/3.7/library/typing.html, I think this needs to be updated. (Plus we should add an explicit note somewhere in the docs that static types and runtime classes should not be confused.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:48:04 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 Aug 2018 20:48:04 +0000 Subject: [issue34422] __name__ not available for classes in typing module In-Reply-To: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> Message-ID: <1534711684.76.0.56676864532.issue34422@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Oh I just re-read my comment and there are so many typos that I will write a new one, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:49:34 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 Aug 2018 20:49:34 +0000 Subject: [issue34422] __name__ not available for classes in typing module In-Reply-To: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> Message-ID: <1534711774.73.0.56676864532.issue34422@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: This is an intentional change. It would be a bad idea to use `__name__` instead of what is currently `_name`, because semantics is subtly different. Also the fact that types in typing module used to be actual class objects was an implementation detail (also typing module is still provisional). The problematic part here is that special types and generic type aliases are still documented as _classes_ in https://docs.python.org/3.7/library/typing.html, I think this needs to be updated. (Plus we should add an explicit note somewhere in the docs that static types and runtime classes should not be confused.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 16:49:45 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 Aug 2018 20:49:45 +0000 Subject: [issue34422] __name__ not available for classes in typing module In-Reply-To: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> Message-ID: <1534711785.42.0.56676864532.issue34422@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- Removed message: https://bugs.python.org/msg323770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 18:20:39 2018 From: report at bugs.python.org (Brendan Gerrity) Date: Sun, 19 Aug 2018 22:20:39 +0000 Subject: [issue34062] Python launcher on Windows does not work with --list or --list-paths In-Reply-To: <1530900810.19.0.56676864532.issue34062@psf.upfronthosting.co.za> Message-ID: <1534717239.77.0.56676864532.issue34062@psf.upfronthosting.co.za> Change by Brendan Gerrity : ---------- pull_requests: +8306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 19:24:40 2018 From: report at bugs.python.org (Nathan Benson) Date: Sun, 19 Aug 2018 23:24:40 +0000 Subject: [issue34437] print statement using \x results in improper and extra bytes Message-ID: <1534721080.82.0.56676864532.issue34437@psf.upfronthosting.co.za> New submission from Nathan Benson : While writing some shellcode I uncovered an unusual bug where Python 3 seems to print out incorrect (and extra) hex bytes using the print statement with \x. Needless to say I was pulling my hair out trying to figure out why my shellcode wasn?t working. Python 2 behaves as expected. I haven't tested the latest version of Python 3, but all the versions prior to that seem to have the bug. I?ve been able to reproduce the bug in Ubuntu Linux and on my Mac. An example printing "\xfd\x84\x04\x08" I expect to get back "fd 84 04 08", but Python 3 seems to add bytes beginning with c2 and c3 and tosses in random bytes. For the purpose of these demonstrations: Akame:~ jfa$ python2 --version Python 2.7.15 Akame:~ jfa$ python3 --version Python 3.7.0 Here is Python 2 operating as expected: Akame:~ jfa$ python2 -c 'print("\xfd\x84\x04\x08")' | hexdump -C 00000000 fd 84 04 08 0a |.....| 00000005 Here is Python 3 with the exact same print statement: Akame:~ jfa$ python3 -c 'print("\xfd\x84\x04\x08")' | hexdump -C 00000000 c3 bd c2 84 04 08 0a |.......| 00000007 There are 6 bytes not 4 and where did the c3, bd, and c2 come from? Playing around with it a little bit more it seems like the problem arises when you are printing bytes that start with a-f or 8 or 9: Here is a-f: Akame:~ jfa$ for b in {a..f}; do echo "\x${b}0"; python3 -c "print(\"\x${b}0\")" | hexdump -C; done \xa0 00000000 c2 a0 0a |...| 00000003 \xb0 00000000 c2 b0 0a |...| 00000003 \xc0 00000000 c3 80 0a |...| 00000003 \xd0 00000000 c3 90 0a |...| 00000003 \xe0 00000000 c3 a0 0a |...| 00000003 \xf0 00000000 c3 b0 0a |...| 00000003 Here is 0-9 (notice everything is fine until 8): Akame:~ jfa$ for b in {0..9}; do echo "\x${b}0"; python3 -c "print(\"\x${b}0\")" | hexdump -C; done \x00 00000000 00 0a |..| 00000002 \x10 00000000 10 0a |..| 00000002 \x20 00000000 20 0a | .| 00000002 \x30 00000000 30 0a |0.| 00000002 \x40 00000000 40 0a |@.| 00000002 \x50 00000000 50 0a |P.| 00000002 \x60 00000000 60 0a |`.| 00000002 \x70 00000000 70 0a |p.| 00000002 \x80 00000000 c2 80 0a |...| 00000003 \x90 00000000 c2 90 0a |...| 00000003 Here are the same tests with Python 2: Akame:~ jfa$ for b in {a..f}; do echo "\x${b}0"; python2 -c "print(\"\x${b}0\")" | hexdump -C; done \xa0 00000000 a0 0a |..| 00000002 \xb0 00000000 b0 0a |..| 00000002 \xc0 00000000 c0 0a |..| 00000002 \xd0 00000000 d0 0a |..| 00000002 \xe0 00000000 e0 0a |..| 00000002 \xf0 00000000 f0 0a |..| 00000002 Akame:~ jfa$ for b in {0..9}; do echo "\x${b}0"; python2 -c "print(\"\x${b}0\")" | hexdump -C; done \x00 00000000 00 0a |..| 00000002 \x10 00000000 10 0a |..| 00000002 \x20 00000000 20 0a | .| 00000002 \x30 00000000 30 0a |0.| 00000002 \x40 00000000 40 0a |@.| 00000002 \x50 00000000 50 0a |P.| 00000002 \x60 00000000 60 0a |`.| 00000002 \x70 00000000 70 0a |p.| 00000002 \x80 00000000 80 0a |..| 00000002 \x90 00000000 90 0a |..| 00000002 As you can see Python 2 works as expected and Python 3, when printing using \x[a-f08], seem to cause the byte to be replaced with a c2 or c3 and another byte of data. ---------- messages: 323773 nosy: Nathan Benson priority: normal severity: normal status: open title: print statement using \x results in improper and extra bytes type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 20:20:07 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 20 Aug 2018 00:20:07 +0000 Subject: [issue34437] print statement using \x results in improper and extra bytes In-Reply-To: <1534721080.82.0.56676864532.issue34437@psf.upfronthosting.co.za> Message-ID: <1534724407.27.0.56676864532.issue34437@psf.upfronthosting.co.za> Steven D'Aprano added the comment: You wrote: > There are 6 bytes not 4 and where did the c3, bd, and c2 come from? In Python 2, strings are byte strings, in Python 3, strings by default are Unicode text strings. You are seeing the UTF-8 representation of the text string. py> "\xfd\x84\x04\x08".encode('utf-8') b'\xc3\xbd\xc2\x84\x04\x08' So the behaviour in Python 3 is correct and not a bug, it has just changed (intentionally) from Python 2. Googling may help you find more about this: https://duckduckgo.com/?q=python3+write+bytes+to+stdout ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 23:25:35 2018 From: report at bugs.python.org (David) Date: Mon, 20 Aug 2018 03:25:35 +0000 Subject: [issue34438] do_handshake stuck in ssl.py Message-ID: <1534735535.4.0.56676864532.issue34438@psf.upfronthosting.co.za> New submission from David : Sometimes, rarely, API calls will get stuck indefinitely on ssl.py. Stack trace: response = json.loads(urllib.request.urlopen(req).read()) File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data) File "/usr/lib/python3.6/urllib/request.py", line 544, in _open '_open', req) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/usr/lib/python3.6/urllib/request.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File "/usr/lib/python3.6/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/usr/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/lib/python3.6/http/client.py", line 964, in send self.connect() File "/usr/lib/python3.6/http/client.py", line 1400, in connect server_hostname=server_hostname) File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket _context=self, _session=session) File "/usr/lib/python3.6/ssl.py", line 814, in __init__ self.do_handshake() File "/usr/lib/python3.6/ssl.py", line 1068, in do_handshake self._sslobj.do_handshake() File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake self._sslobj.do_handshake() Almost identical issue as https://stackoverflow.com/questions/19938593/web-app-hangs-for-several-hours-in-ssl-py-at-self-sslobj-do-handshake But using python 3.6 ---------- assignee: christian.heimes components: SSL messages: 323775 nosy: christian.heimes, david987 priority: normal severity: normal status: open title: do_handshake stuck in ssl.py versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 23:51:21 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 20 Aug 2018 03:51:21 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1534737081.67.0.56676864532.issue30717@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 01:51:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 05:51:58 +0000 Subject: [issue34423] Overflow when casting from double to time_t, and_PyTime_t. In-Reply-To: <1534543009.21.0.56676864532.issue34423@psf.upfronthosting.co.za> Message-ID: <1534744318.85.0.56676864532.issue34423@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 02:08:53 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 20 Aug 2018 06:08:53 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534745333.24.0.56676864532.issue34410@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 03:40:35 2018 From: report at bugs.python.org (Michael Osipov) Date: Mon, 20 Aug 2018 07:40:35 +0000 Subject: [issue34401] Make test_gdb work on HP-UX In-Reply-To: <1534247656.08.0.56676864532.issue34401@psf.upfronthosting.co.za> Message-ID: <1534750835.56.0.56676864532.issue34401@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- pull_requests: +8307 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 04:00:09 2018 From: report at bugs.python.org (Michael Osipov) Date: Mon, 20 Aug 2018 08:00:09 +0000 Subject: [issue12991] Python 64-bit build on HP Itanium - Executable built successfully but modules failed with HP Compiler In-Reply-To: <1316173380.25.0.744886006815.issue12991@psf.upfronthosting.co.za> Message-ID: <1534752009.91.0.56676864532.issue12991@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: Cannot reproduced on master: export LDFLAGS="-L/usr/local/lib/hpux64 +DD64" export CFLAGS=+DD64 Python build finished successfully! The necessary bits to build these optional modules were not found: _bz2 _curses_panel _gdbm _lzma _sqlite3 _tkinter _uuid ossaudiodev readline spwd zlib To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time Failed to build these modules: _ctypes _dbm _elementtree cmath math pyexpat Following modules built successfully but were removed because they could not be imported: _asyncio running build_scripts copying and adjusting /var/osipovmi/cpython/Tools/scripts/pydoc3 -> build/scripts-3.8 copying and adjusting /var/osipovmi/cpython/Tools/scripts/idle3 -> build/scripts-3.8 copying and adjusting /var/osipovmi/cpython/Tools/scripts/2to3 -> build/scripts-3.8 changing mode of build/scripts-3.8/pydoc3 from 640 to 755 changing mode of build/scripts-3.8/idle3 from 640 to 755 changing mode of build/scripts-3.8/2to3 from 640 to 755 renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8 renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8 renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8 $ file ./python ./python: ELF-64 executable object file - IA64 $ ./python Python 3.8.0a0 (heads/bpo-34412:f1331c0e83, Aug 20 2018, 09:53:38) [C] on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. >>> The necessary bits are libraries in 64 bit which I have only in 32 bit. This issue can be closed. ---------- nosy: +michael-o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 04:12:37 2018 From: report at bugs.python.org (Michael Osipov) Date: Mon, 20 Aug 2018 08:12:37 +0000 Subject: [issue1648957] HP-UX: _ctypes/libffi/src/ia64/ffi/__attribute__/native cc Message-ID: <1534752757.88.0.56676864532.issue1648957@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: Cannot verify: $ file ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so: ELF-32 shared object file - IA64 $ ldd ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so ./build/lib.hp-ux-B.11.31-ia64-3.8-pydebug/_ctypes.so: libffi.so => /usr/local/lib/hpux32/libffi.so libdl.so.1 => /usr/lib/hpux32/libdl.so.1 libc.so.1 => /usr/lib/hpux32/libc.so.1 This issue can be closed. ---------- nosy: +michael-o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 04:15:27 2018 From: report at bugs.python.org (Michael Osipov) Date: Mon, 20 Aug 2018 08:15:27 +0000 Subject: [issue16533] HPUX: Unable to fork() in thread In-Reply-To: <1353622712.14.0.676507060266.issue16533@psf.upfronthosting.co.za> Message-ID: <1534752927.27.0.56676864532.issue16533@psf.upfronthosting.co.za> Michael Osipov <1983-01-06 at gmx.net> added the comment: Runs perfectly: == CPython 3.8.0a0 (heads/bpo-34412:f1331c0e83, Aug 20 2018, 10:14:16) [C] == HP-UX-B.11.31-ia64-32bit-ELF big-endian == cwd: /var/osipovmi/cpython/build/test_python_22868 == CPU count: 4 == encodings: locale=utf8, FS=utf-8 Using random seed 4813536 Run tests in parallel using 6 child processes 0:00:02 [1/1] test_thread passed test_barrier (test.test_thread.BarrierTest) ... waiting for tasks to end task 0 will run for 0us task 0 entering 0 task 1 will run for 12us task 2 will run for 61us task 3 will run for 31us task 4 will run for 17us task 7 will run for 9us task 6 will run for 77us task 8 will run for 95us task 9 will run for 43us task 5 will run for 48us task 1 entering 0 task 2 entering 0 task 3 entering 0 task 4 entering 0 task 5 entering 0 task 7 entering 0 task 6 entering 0 task 8 entering 0 task 9 entering 0 task 9 leaving barrier task 9 will run for 86us task 0 leaving barrier task 0 will run for 0us task 0 entering 1 task 1 leaving barrier task 1 will run for 25us task 2 leaving barrier task 2 will run for 59us task 3 leaving barrier task 3 will run for 67us task 4 leaving barrier task 4 will run for 91us task 5 leaving barrier task 5 will run for 84us task 7 leaving barrier task 7 will run for 22us task 6 leaving barrier task 6 will run for 31us task 8 leaving barrier task 8 will run for 12us task 9 entering 1 task 1 entering 1 task 2 entering 1 task 3 entering 1 task 4 entering 1 task 5 entering 1 task 7 entering 1 task 6 entering 1 task 8 entering 1 task 8 leaving barrier task 8 will run for 28us task 0 leaving barrier task 0 will run for 0us task 0 entering 2 task 9 leaving barrier task 9 will run for 87us task 1 leaving barrier task 1 will run for 59us task 2 leaving barrier task 2 will run for 82us task 3 leaving barrier task 3 will run for 73us task 4 leaving barrier task 4 will run for 11us task 5 leaving barrier task 5 will run for 17us task 7 leaving barrier task 7 will run for 98us task 6 leaving barrier task 6 will run for 63us task 8 entering 2 task 9 entering 2 task 1 entering 2 task 2 entering 2 task 3 entering 2 task 4 entering 2 task 5 entering 2 task 7 entering 2 task 6 entering 2 task 6 leaving barrier task 0 leaving barrier task 8 leaving barrier task 9 leaving barrier task 1 leaving barrier task 2 leaving barrier task 3 leaving barrier task 4 leaving barrier task 5 leaving barrier task 7 leaving barrier tasks done ok test_acquire_contended (test.test_thread.LockTests) ... ok test_acquire_destroy (test.test_thread.LockTests) ... ok test_acquire_release (test.test_thread.LockTests) ... ok test_constructor (test.test_thread.LockTests) ... ok test_different_thread (test.test_thread.LockTests) ... ok test_locked_repr (test.test_thread.LockTests) ... ok test_reacquire (test.test_thread.LockTests) ... ok test_repr (test.test_thread.LockTests) ... ok test_state_after_timeout (test.test_thread.LockTests) ... ok test_thread_leak (test.test_thread.LockTests) ... ok test_timeout (test.test_thread.LockTests) ... ok test_try_acquire (test.test_thread.LockTests) ... ok test_try_acquire_contended (test.test_thread.LockTests) ... ok test_weakref_deleted (test.test_thread.LockTests) ... ok test_weakref_exists (test.test_thread.LockTests) ... ok test_with (test.test_thread.LockTests) ... ok test_forkinthread (test.test_thread.TestForkInThread) ... ok test__count (test.test_thread.ThreadRunningTests) ... ok test_nt_and_posix_stack_size (test.test_thread.ThreadRunningTests) ... caught expected ValueError setting stack_size(4096) successfully set stack_size(262144) successfully set stack_size(1048576) successfully set stack_size(0) trying stack_size = (262144) creating task 1 creating task 2 creating task 3 creating task 4 creating task 5 creating task 6 creating task 7 creating task 8 creating task 9 creating task 10 waiting for all tasks to complete task 1 will run for 86us task 2 will run for 62us task 3 will run for 67us task 4 will run for 61us task 5 will run for 52us task 6 will run for 2us task 7 will run for 1us task 8 will run for 31us task 9 will run for 12us task 10 will run for 22us task 1 done task 2 done task 3 done task 4 done task 5 done task 6 done task 7 done task 8 done task 9 done task 10 done all tasks done trying stack_size = (1048576) creating task 1 creating task 2 creating task 3 creating task 4 creating task 5 creating task 6 creating task 7 creating task 8 creating task 9 creating task 10 waiting for all tasks to complete task 1 will run for 15us task 2 will run for 37us task 3 will run for 12us task 4 will run for 93us task 5 will run for 15us task 6 will run for 45us task 7 will run for 67us task 8 will run for 19us task 9 will run for 89us task 10 will run for 58us task 1 done task 2 done task 3 done task 4 done task 5 done task 6 done task 7 done task 8 done task 9 done task 10 done all tasks done ok test_save_exception_state_on_error (test.test_thread.ThreadRunningTests) ... ok test_stack_size (test.test_thread.ThreadRunningTests) ... ok test_starting_threads (test.test_thread.ThreadRunningTests) ... creating task 1 creating task 2 creating task 3 creating task 4 creating task 5 creating task 6 creating task 7 creating task 8 creating task 9 creating task 10 waiting for tasks to complete... task 1 will run for 32us task 2 will run for 56us task 3 will run for 63us task 4 will run for 27us task 5 will run for 64us task 6 will run for 41us task 7 will run for 93us task 8 will run for 34us task 9 will run for 63us task 10 will run for 83us task 3 done task 4 done task 8 done task 6 done task 7 done task 9 done task 10 done task 5 done task 2 done task 1 done all tasks done ok ---------------------------------------------------------------------- Ran 23 tests in 0.949s OK == Tests result: SUCCESS == 1 test OK. Total duration: 2 sec 94 ms Tests result: SUCCESS This issue can be closed. ---------- nosy: +michael-o _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 04:26:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 08:26:51 +0000 Subject: [issue32657] Mutable Objects in SMTP send_message Signature In-Reply-To: <1516833897.61.0.467229070634.issue32657@psf.upfronthosting.co.za> Message-ID: <1534753611.05.0.56676864532.issue32657@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue34246. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 04:27:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 08:27:10 +0000 Subject: [issue34246] Gentoo Refleaks 3.7: test_smtplib has dangling threads In-Reply-To: <1532685733.19.0.56676864532.issue34246@psf.upfronthosting.co.za> Message-ID: <1534753630.46.0.56676864532.issue34246@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue32657. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 05:01:03 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 20 Aug 2018 09:01:03 +0000 Subject: [issue34217] windows: cross compilation fails due to headers with uppercase In-Reply-To: <1532475729.27.0.56676864532.issue34217@psf.upfronthosting.co.za> Message-ID: <1534755663.67.0.56676864532.issue34217@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm sorry about that. I won't merge PR like that next time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 05:25:03 2018 From: report at bugs.python.org (Michael Osipov) Date: Mon, 20 Aug 2018 09:25:03 +0000 Subject: [issue14568] HP-UX local libraries not included In-Reply-To: <1334265845.44.0.154291439069.issue14568@psf.upfronthosting.co.za> Message-ID: <1534757103.53.0.56676864532.issue14568@psf.upfronthosting.co.za> Change by Michael Osipov <1983-01-06 at gmx.net>: ---------- pull_requests: +8308 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 06:20:50 2018 From: report at bugs.python.org (Tomer Keren) Date: Mon, 20 Aug 2018 10:20:50 +0000 Subject: [issue34439] Expose venv --prompt value to an environment value Message-ID: <1534760450.03.0.56676864532.issue34439@psf.upfronthosting.co.za> New submission from Tomer Keren : In the same way the $VIRTUAL_ENV variable tells the virtual environment directory, A variable such as $VENV_NAME or $VENV_PROMPT should tell the value given to the venv `--prompt` option (Introduced in Issue22829). An individual could override the EnvBuilder class like the docs say, but that wouldn't insure any user will have the variable set. This is crucial for usage in custom libraries that want to display the given prompt. ---------- components: Library (Lib) messages: 323782 nosy: Tomer priority: normal severity: normal status: open title: Expose venv --prompt value to an environment value type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 07:22:01 2018 From: report at bugs.python.org (Lennart Grahl) Date: Mon, 20 Aug 2018 11:22:01 +0000 Subject: [issue34440] Certificate verify failed (works fine in 3.6) Message-ID: <1534764121.45.0.56676864532.issue34440@psf.upfronthosting.co.za> New submission from Lennart Grahl : When running the attached script with the attached cert, Python 3.7 raises an exception (see https://paste.pound-python.org/show/VLr84Yn2Fnz6RSKEq3ui/). In Python 3.6, the certificate is being accepted. I don't see anything wrong with the self-signed certificate. You can (hopefully) reproduce this by running minimal_server.py ---------- assignee: christian.heimes components: SSL files: minimal_server.zip messages: 323783 nosy: Lennart Grahl, christian.heimes priority: normal severity: normal status: open title: Certificate verify failed (works fine in 3.6) versions: Python 3.7 Added file: https://bugs.python.org/file47754/minimal_server.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 07:43:12 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 20 Aug 2018 11:43:12 +0000 Subject: [issue34440] Certificate verify failed (works fine in 3.6) In-Reply-To: <1534764121.45.0.56676864532.issue34440@psf.upfronthosting.co.za> Message-ID: <1534765392.59.0.56676864532.issue34440@psf.upfronthosting.co.za> Christian Heimes added the comment: The exception message is: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: IP address mismatch, certificate is not valid for '127.0.0.1'. (_ssl.c:1045) The certificate is not valid for the URL. You are connection to a server by IP address, but the certificate is not valid for that IP address. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 08:00:29 2018 From: report at bugs.python.org (Lennart Grahl) Date: Mon, 20 Aug 2018 12:00:29 +0000 Subject: [issue34440] Certificate verify failed (works fine in 3.6) In-Reply-To: <1534764121.45.0.56676864532.issue34440@psf.upfronthosting.co.za> Message-ID: <1534766429.25.0.56676864532.issue34440@psf.upfronthosting.co.za> Lennart Grahl added the comment: Hi. I don't see why the certificate would not be valid for that address. Python 3.6 also accepts it without any modifications to the script. Output of openssl x509 -in cert.pem -noout -text Certificate: Data: Version: 3 (0x2) Serial Number: bc:28:67:9a:b0:fe:d6:b8 Signature Algorithm: ecdsa-with-SHA256 Issuer: CN = 127.0.0.1 Validity Not Before: Mar 23 16:52:01 2017 GMT Not After : Mar 21 16:52:01 2027 GMT Subject: CN = 127.0.0.1 Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:9d:e3:f2:f6:e2:8c:f3:25:82:3e:9e:bc:c5:69: 27:34:be:45:89:4a:51:ce:67:4e:b8:a0:b1:a2:bd: fa:39:f9:38:85:a3:9c:a6:c4:c9:78:24:c7:17:5c: 2b:00:af:7f:73:e2:49:68:9c:37:29:ae:69:bf:b5: 49:06:a8:b8:1d ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Subject Key Identifier: 17:66:86:40:B1:C4:BF:77:09:C7:DC:9F:4D:78:4A:BF:07:19:AD:8C X509v3 Authority Key Identifier: keyid:17:66:86:40:B1:C4:BF:77:09:C7:DC:9F:4D:78:4A:BF:07:19:AD:8C X509v3 Basic Constraints: CA:TRUE Signature Algorithm: ecdsa-with-SHA256 30:44:02:20:09:d2:c1:85:f9:c5:7f:78:3e:cc:90:78:25:dc: 9e:76:ef:62:7a:e5:38:0a:a1:6c:c6:27:af:ed:ec:1d:12:06: 02:20:5d:d0:de:8e:46:ee:e3:67:35:66:fe:11:6e:56:b5:70: 72:16:33:92:66:0f:6c:da:51:0c:74:d8:c1:b8:8f:b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 08:07:23 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 20 Aug 2018 12:07:23 +0000 Subject: [issue34440] Certificate verify failed (works fine in 3.6) In-Reply-To: <1534764121.45.0.56676864532.issue34440@psf.upfronthosting.co.za> Message-ID: <1534766843.43.0.56676864532.issue34440@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.6 is a little more forgiving than Python 3.7. Python 3.7 uses OpenSSL's hostname verification algorithms, which interpret the RFCs more strictly. You have to include a SAN field of type IP address. Matching against CN has been deprecated for more than 15 years, see https://bugs.chromium.org/p/chromium/issues/detail?id=308330 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 08:10:54 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 20 Aug 2018 12:10:54 +0000 Subject: [issue34438] do_handshake stuck in ssl.py In-Reply-To: <1534735535.4.0.56676864532.issue34438@psf.upfronthosting.co.za> Message-ID: <1534767054.41.0.56676864532.issue34438@psf.upfronthosting.co.za> Christian Heimes added the comment: It's hard to say what the culprit is. A blocked handshake often indicates a network or a server problem. Either something went wrong between the client and the server or the server refuses to finalize the handshake. I suggest that you add a timeout and handle the timeout from our application. There is nothing I can do from Python's ssl module. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 08:17:00 2018 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 20 Aug 2018 12:17:00 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534767420.34.0.56676864532.issue34400@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- pull_requests: +8309 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 09:11:09 2018 From: report at bugs.python.org (Lennart Grahl) Date: Mon, 20 Aug 2018 13:11:09 +0000 Subject: [issue34440] Certificate verify failed (works fine in 3.6) In-Reply-To: <1534764121.45.0.56676864532.issue34440@psf.upfronthosting.co.za> Message-ID: <1534770669.18.0.56676864532.issue34440@psf.upfronthosting.co.za> Lennart Grahl added the comment: Cheers! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 09:41:11 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 20 Aug 2018 13:41:11 +0000 Subject: [issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__ Message-ID: <1534772471.92.0.56676864532.issue34441@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : >>> from abc import ABCMeta >>> class S(metaclass=ABCMeta): ... __subclasses__ = None ... >>> issubclass(int, S) Segmentation fault (core dumped) This is the result of missing NULL check for 'subclasses' in _abc__abc_subclasscheck_impl (Modules/_abc.c): /* 6. Check if it's a subclass of a subclass (recursive). */ subclasses = PyObject_CallMethod(self, "__subclasses__", NULL); if (!PyList_Check(subclasses)) { PyErr_SetString(PyExc_TypeError, "__subclasses__() must return a list"); goto end; } Reported by Svace static analyzer. ---------- components: Extension Modules messages: 323789 nosy: inada.naoki, izbyshev, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: NULL dereference when issubclass() is called on a class with bogus __subclasses__ type: crash versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:05:21 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 20 Aug 2018 14:05:21 +0000 Subject: [issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__ In-Reply-To: <1534772471.92.0.56676864532.issue34441@psf.upfronthosting.co.za> Message-ID: <1534773921.62.0.56676864532.issue34441@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +8310 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:36:25 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 20 Aug 2018 14:36:25 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534775785.41.0.56676864532.issue30411@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 4c8555773a801f957297132a92c0acb382d640e4 by Xiang Zhang in branch 'master': bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) https://github.com/python/cpython/commit/4c8555773a801f957297132a92c0acb382d640e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:36:40 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 20 Aug 2018 14:36:40 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534775800.41.0.56676864532.issue30411@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8311 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:36:50 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 20 Aug 2018 14:36:50 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534775810.13.0.56676864532.issue30411@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:40:14 2018 From: report at bugs.python.org (Stephen Kelly) Date: Mon, 20 Aug 2018 14:40:14 +0000 Subject: [issue34442] zlib module not built on windows Message-ID: <1534776014.27.0.56676864532.issue34442@psf.upfronthosting.co.za> New submission from Stephen Kelly : I tried to build python 3.7.0 from source. I ran the PCBuild/build.bat script. That downloaded zlib to the external/ directory. However, it does not seem to be built. When running I get: python\3.7.0\lib\zipfile.py", line 646, in _check_compression "Compression requires the (missing) zlib module") RuntimeError: Compression requires the (missing) zlib module I examined PCBuild/pcbuild.proj. It makes no mention of zlib, though it mentions other externals. I notice that Python 3.6.1 contained zlib in Modules/zlib instead of coming from external/. Presumably that source was moved, but the Windows-related scripts were not updated. ---------- components: Extension Modules messages: 323791 nosy: steveire priority: normal severity: normal status: open title: zlib module not built on windows type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:47:57 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 20 Aug 2018 14:47:57 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534776477.95.0.56676864532.issue30411@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- pull_requests: +8313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:48:34 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 20 Aug 2018 14:48:34 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534776514.97.0.56676864532.issue30411@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2011dd77b6bd6f02f54ceef9a80a22bd373b66e2 by Miss Islington (bot) in branch '3.7': bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) https://github.com/python/cpython/commit/2011dd77b6bd6f02f54ceef9a80a22bd373b66e2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 11:08:57 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 20 Aug 2018 15:08:57 +0000 Subject: [issue34442] zlib module not built on windows In-Reply-To: <1534776014.27.0.56676864532.issue34442@psf.upfronthosting.co.za> Message-ID: <1534777736.99.0.56676864532.issue34442@psf.upfronthosting.co.za> Zachary Ware added the comment: Hi Stephen, zlib is built into the core binary (pythonXY.dll) when you build with `IncludeExternals`; see PCbuild/pythoncore.vcxproj. Using PCbuild/build.bat should do that automatically (unless you tell it not to), but if it's not we may need to fix something. ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 11:15:18 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 20 Aug 2018 15:15:18 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534778118.44.0.56676864532.issue30411@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 95f9e14e33b713f35f5368acf7be56750bbdb5a8 by Xiang Zhang in branch '2.7': [2.7] bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) (GH-8838) https://github.com/python/cpython/commit/95f9e14e33b713f35f5368acf7be56750bbdb5a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 11:19:30 2018 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 20 Aug 2018 15:19:30 +0000 Subject: [issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac In-Reply-To: <1495272562.29.0.0547762381804.issue30411@psf.upfronthosting.co.za> Message-ID: <1534778370.55.0.56676864532.issue30411@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 11:33:06 2018 From: report at bugs.python.org (Matthias Klose) Date: Mon, 20 Aug 2018 15:33:06 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1534779186.88.0.56676864532.issue26544@psf.upfronthosting.co.za> Matthias Klose added the comment: no, it's not fixed at all. Setting as a release blocker for 3.6 and 3.7. ---------- keywords: +3.6regression, 3.7regression nosy: +benjamin.peterson, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:00:30 2018 From: report at bugs.python.org (Matthias Klose) Date: Mon, 20 Aug 2018 16:00:30 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1534780830.84.0.56676864532.issue26544@psf.upfronthosting.co.za> Change by Matthias Klose : Added file: https://bugs.python.org/file47755/platform-no-distutils.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:00:56 2018 From: report at bugs.python.org (Matthias Klose) Date: Mon, 20 Aug 2018 16:00:56 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1534780856.54.0.56676864532.issue26544@psf.upfronthosting.co.za> Matthias Klose added the comment: proposed patch attached ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:11:07 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 20 Aug 2018 16:11:07 +0000 Subject: [issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions In-Reply-To: <1534251432.68.0.56676864532.issue34403@psf.upfronthosting.co.za> Message-ID: <1534781467.35.0.56676864532.issue34403@psf.upfronthosting.co.za> Michael Felt added the comment: Although the default is different (i.e., roman8 versus latin1 (iso8859-1)) both HP-UX and AIX (like Windows, cp1252) this issue and issue 33347 are related. As I mentioned in https://bugs.python.org/issue34347#msg323319 the string seen by self.get_output() is not the same string as "expected". If I recall, there may be a way to almost get the two be the same - excect "expected" is a bytes object and the value returned as CLI output is a regular string. I am thinking, maybe the "easy" way will be to add AIX, HP-UX, and others to skip this test. Rather than hard-code, do a query to see what the default is, and it it is not UTF-8 - skip the test. In any case, it seems to be broken for any system that does not have UTF-8 as default. ---------- nosy: +Michael.Felt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:26:18 2018 From: report at bugs.python.org (Jason Spencer) Date: Mon, 20 Aug 2018 16:26:18 +0000 Subject: [issue34425] :s formatting broken for objects without __format__ In-Reply-To: <1534612328.33.0.56676864532.issue34425@psf.upfronthosting.co.za> Message-ID: Jason Spencer added the comment: Then I would argue that it is at least a documentation bug. The 3.6 format spec mini language still claims that {} is equivalent to {:s}, which now is only conditionally true. I would also argue that having different behavior for {} and {:s}, which are semantically the same in the client's eye, forces the client code to understand more about the object they are stringifying than should be necessary. If one works, so should the other by all descriptions of the format spec. If the format spec is *just* ':s', the library should call the target's __str__ if __format__ is not defined. The library seems willing to do this for the empty format string, but not when the client code specifically asks for a string.... On Sat, Aug 18, 2018 at 10:12 AM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > I agree this is the desired behavior, and not a bug. > > Because you are not specifying a __format__ in your class, > object.__format__ is being called. By design, it does not understand any > formatting specifiers, instead reserving them for your class to implement. > "!s" is the correct way to convert your type to a string. Either that, or > add a __format__ that understands "s". > > Note that not all types understand "s", for example, datetime. > > ---------- > assignee: -> eric.smith > nosy: +eric.smith > stage: -> resolved > status: pending -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:34:28 2018 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 20 Aug 2018 16:34:28 +0000 Subject: [issue34443] enum repr should use __qualname__ Message-ID: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> New submission from Walter D?rwald : The __repr__ output of an enum class should use __qualname__ instead of __name__. The following example shows the problem: import enum class X: class I: pass class Y: class I(enum.Enum): pass print(X.I) print(Y.I) This prints: I would have expected it to print or even for maximum consistency ---------- components: Library (Lib) messages: 323799 nosy: doerwalter priority: normal severity: normal status: open title: enum repr should use __qualname__ type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:35:45 2018 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 20 Aug 2018 16:35:45 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1534782945.59.0.56676864532.issue34443@psf.upfronthosting.co.za> Change by Walter D?rwald : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:55:24 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Aug 2018 16:55:24 +0000 Subject: [issue31715] Add mimetype for extension .mjs In-Reply-To: <1507302393.84.0.213398074469.issue31715@psf.upfronthosting.co.za> Message-ID: <1534784124.9.0.56676864532.issue31715@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 12:57:16 2018 From: report at bugs.python.org (daniel hahler) Date: Mon, 20 Aug 2018 16:57:16 +0000 Subject: [issue34444] Module's __file__ should be absolute always ("." in sys.path) Message-ID: <1534784236.56.0.56676864532.issue34444@psf.upfronthosting.co.za> New submission from daniel hahler : With "." in sys.path the "__file__" attribute will be a relative path, and therefore cannot be used after "chdir". This likely affects relative paths in general, but have not tested it. ``` import os import sys sys.path.insert(0, '.') # Importing it before chdir already causes failure. import imported os.chdir('/') print(imported.__file__) # ./imported.py assert imported.__file__ == os.path.abspath(imported.__file__) ``` It works for "" in sys.path (https://bugs.python.org/issue18416). ---------- components: Interpreter Core messages: 323800 nosy: blueyed priority: normal severity: normal status: open title: Module's __file__ should be absolute always ("." in sys.path) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 13:15:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 17:15:59 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1534785359.48.0.56676864532.issue34443@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: __qualname__ should be used only together with __module__. I agree that the repr of enum should be more consistent with the repr of class. ---------- nosy: +barry, eli.bendersky, ethan.furman, serhiy.storchaka versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 13:22:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 17:22:27 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1534785747.66.0.56676864532.issue26544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: platform-no-distutils.diff restores the original bug: "2.9" > "2.10". PR 8356 removes the dependency from distutils and use a sophisticated function for parsing versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 13:30:39 2018 From: report at bugs.python.org (Stefan Tjarks) Date: Mon, 20 Aug 2018 17:30:39 +0000 Subject: [issue34445] asyncio support in doctests Message-ID: <1534786239.59.0.56676864532.issue34445@psf.upfronthosting.co.za> New submission from Stefan Tjarks : When writing a docstring for an async function I wrote a doctest for it. ``` async def hello_world(): """ Will great the world with a friendly hello. >>> await hello_world() "hello world" """ return "hello world" ``` I kind of expected an error that no event loop is running but actually get a SyntaxError. ``` ********************************************************************** File "asyncdoctest.py", line 5, in __main__.hello_world Failed example: await hello_world() Exception raised: Traceback (most recent call last): File "/usr/lib/python3.6/doctest.py", line 1330, in __run compileflags, 1), test.globs) File "", line 1 await hello_world() ^ SyntaxError: invalid syntax ********************************************************************** 1 items had failures: 1 of 1 in __main__.hello_world ***Test Failed*** 1 failures. ``` Is the SyntaxError intentional or does doctest simply not support asyncio syntax? ---------- components: Library (Lib), asyncio files: asyncdoctest.py messages: 323803 nosy: Stefan Tjarks, asvetlov, yselivanov priority: normal severity: normal status: open title: asyncio support in doctests type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file47756/asyncdoctest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 13:39:51 2018 From: report at bugs.python.org (Ethan Furman) Date: Mon, 20 Aug 2018 17:39:51 +0000 Subject: [issue34443] enum repr should use __qualname__ In-Reply-To: <1534782868.03.0.56676864532.issue34443@psf.upfronthosting.co.za> Message-ID: <1534786791.02.0.56676864532.issue34443@psf.upfronthosting.co.za> Change by Ethan Furman : ---------- assignee: -> ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 13:54:47 2018 From: report at bugs.python.org (Augusto Hack) Date: Mon, 20 Aug 2018 17:54:47 +0000 Subject: [issue33569] dataclasses InitVar does not maintain any type info In-Reply-To: <1526647195.4.0.682650639539.issue33569@psf.upfronthosting.co.za> Message-ID: <1534787687.18.0.56676864532.issue33569@psf.upfronthosting.co.za> Augusto Hack added the comment: I have made some changes to expose the InitVar type, they are available here: https://github.com/hackaugusto/dataclasses/tree/initvar_type Are these changes sufficient? ---------- nosy: +hack.augusto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 13:57:12 2018 From: report at bugs.python.org (Matthias Klose) Date: Mon, 20 Aug 2018 17:57:12 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1534787832.29.0.56676864532.issue26544@psf.upfronthosting.co.za> Matthias Klose added the comment: fine! what prevents merging and backporting this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 15:29:12 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 20 Aug 2018 19:29:12 +0000 Subject: [issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation In-Reply-To: <1534685830.81.0.56676864532.issue34434@psf.upfronthosting.co.za> Message-ID: <1534793352.36.0.56676864532.issue34434@psf.upfronthosting.co.za> Brett Cannon added the comment: Any interest in submitting a pull request to update the documentation? ---------- assignee: -> docs at python components: +Documentation nosy: +brett.cannon, docs at python title: Removal of kwargs for int() etc not described as change -> Removal of kwargs for built-in types not covered with "changed in Python" note in documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 15:35:53 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 20 Aug 2018 19:35:53 +0000 Subject: [issue34407] datetime.time.isoformat function has inconsistent behavior with timezone In-Reply-To: <1534270684.14.0.56676864532.issue34407@psf.upfronthosting.co.za> Message-ID: <1534793753.71.0.56676864532.issue34407@psf.upfronthosting.co.za> Paul Ganssle added the comment: For one thing, this is not how pytz is supposed to be used. You have fallen prey to one of the most common errors when using pytz. See my blog post: https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html The issue at hand is also more about what `pytz`'s time zones do than anything to do with `datetime.time`. If you use the correct `pytz` interface, you get: >>> pytz.timezone('Asia/Seoul').localize(time(**t)) pytz/tzinfo.py in localize(self, dt, is_dst) 321 possible_loc_dt = set() 322 for delta in [timedelta(days=-1), timedelta(days=1)]: --> 323 loc_dt = dt + delta 324 idx = max(0, bisect_right( 325 self._utc_transition_times, loc_dt) - 1) TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta' Though this could rightly be called a bug in `pytz`. However, even using `dateutil`, you will find that this doesn't work: >time(**t, tzinfo=tz.gettz('Asia/Seoul')).isoformat() '12:31:21.213456' The reason is that attaching a `tzinfo` to `datetime.time` barely makes sense, and doesn't work if the time zone depends on the day (e.g. anything with DST), because you don't *know* what day it is, so you can't get an offset. As a result, when `isoformat` attempts to query the datetime for `utcoffset()` it gets `None`, and thus has nothing to print. It works for some of the ones you mentioned because those ones are fixed offsets that never change, and so there *is* a valid value for it, even if no date component is present. See: >>> time(**t, tzinfo=tz.tzoffset("EST", -18000)) datetime.time(12, 31, 21, 213456, tzinfo=tzoffset('EST', -18000)) >>> time(**t, tzinfo=tz.tzoffset("EST", -18000)).isoformat() '12:31:21.213456-05:00' I believe this issue can be closed. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 15:43:36 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 20 Aug 2018 19:43:36 +0000 Subject: [issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses" In-Reply-To: <1533791029.87.0.56676864532.issue34365@psf.upfronthosting.co.za> Message-ID: <1534794216.66.0.56676864532.issue34365@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 15:46:06 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 20 Aug 2018 19:46:06 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1534794366.28.0.56676864532.issue1100942@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 15:46:20 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 20 Aug 2018 19:46:20 +0000 Subject: [issue34007] test_gdb fails in s390x SLES buildbots In-Reply-To: <1530318299.83.0.56676864532.issue34007@psf.upfronthosting.co.za> Message-ID: <1534794380.15.0.56676864532.issue34007@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: This failure seems related to the issue: https://buildbot.python.org/all/#/builders/139/builds/74 ===================================================================== FAIL: test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that are waiting for the GIL ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_gdb.py", line 808, in test_threads self.assertIn('Waiting for the GIL', gdb_output) test test_gdb failed -- Traceback (most recent call last): File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_gdb.py", line 808, in test_threads self.assertIn('Waiting for the GIL', gdb_output) AssertionError: 'Waiting for the GIL' not found in 'Breakpoint 1 (PyObject_Print) pending.\n..... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 15:46:27 2018 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 20 Aug 2018 19:46:27 +0000 Subject: [issue34404] test_time incorrectly defined In-Reply-To: <1534253809.16.0.56676864532.issue34404@psf.upfronthosting.co.za> Message-ID: <1534794387.16.0.56676864532.issue34404@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 15:47:35 2018 From: report at bugs.python.org (jcc2220) Date: Mon, 20 Aug 2018 19:47:35 +0000 Subject: [issue34446] ambiguous _max_size parameter in SpooledTemporaryFile Message-ID: <1534794455.51.0.56676864532.issue34446@psf.upfronthosting.co.za> New submission from jcc2220 : When _max_size is set to 0, the _check method will never call rollover, as the conditional for a rollover is never satisfied. However, in the truncate method, the _max_size is not checked against 0, and so a rollover could be called when it is 0. This is more of an issue of consistency - should 0 mean that it will never rollover? If so, truncate should be modified. Should 0 be interpreted as 'always rollover'? If so, the _check should be modified. Personally, I'd rather have something like -1 mean never, 0 mean always, and >0 mean only when greater than specified size. John ---------- components: Library (Lib) messages: 323809 nosy: jcc2220 priority: normal severity: normal status: open title: ambiguous _max_size parameter in SpooledTemporaryFile type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 16:04:23 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 20 Aug 2018 20:04:23 +0000 Subject: [issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__ In-Reply-To: <1534772471.92.0.56676864532.issue34441@psf.upfronthosting.co.za> Message-ID: <1534795463.88.0.56676864532.issue34441@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset cdbf50cba1664f72ae6621a89c324a32fea70377 by Berker Peksag (Alexey Izbyshev) in branch 'master': bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid __subclasses__ (GH-8835) https://github.com/python/cpython/commit/cdbf50cba1664f72ae6621a89c324a32fea70377 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 16:04:40 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 20 Aug 2018 20:04:40 +0000 Subject: [issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__ In-Reply-To: <1534772471.92.0.56676864532.issue34441@psf.upfronthosting.co.za> Message-ID: <1534795480.21.0.56676864532.issue34441@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 16:42:23 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 20 Aug 2018 20:42:23 +0000 Subject: [issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__ In-Reply-To: <1534772471.92.0.56676864532.issue34441@psf.upfronthosting.co.za> Message-ID: <1534797743.73.0.56676864532.issue34441@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d1f0ccc7e65ef7abeab779f5d0aca2f18eb9b2a4 by Miss Islington (bot) in branch '3.7': bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid __subclasses__ (GH-8835) https://github.com/python/cpython/commit/d1f0ccc7e65ef7abeab779f5d0aca2f18eb9b2a4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 16:47:06 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 20 Aug 2018 20:47:06 +0000 Subject: [issue34441] NULL dereference when issubclass() is called on a class with bogus __subclasses__ In-Reply-To: <1534772471.92.0.56676864532.issue34441@psf.upfronthosting.co.za> Message-ID: <1534798026.96.0.56676864532.issue34441@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 17:46:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 21:46:00 +0000 Subject: [issue34171] Lib/trace.cover not removed by the clean target In-Reply-To: <1532102937.62.0.56676864532.issue34171@psf.upfronthosting.co.za> Message-ID: <1534801560.6.0.56676864532.issue34171@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +8315 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 17:48:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 21:48:27 +0000 Subject: [issue34171] Lib/trace.cover not removed by the clean target In-Reply-To: <1532102937.62.0.56676864532.issue34171@psf.upfronthosting.co.za> Message-ID: <1534801707.9.0.56676864532.issue34171@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 8841 prevents creating Lib/trace.cover when run the trace module. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 17:48:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Aug 2018 21:48:51 +0000 Subject: [issue34171] Lib/trace.cover not removed by the clean target In-Reply-To: <1532102937.62.0.56676864532.issue34171@psf.upfronthosting.co.za> Message-ID: <1534801731.02.0.56676864532.issue34171@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:11:45 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Aug 2018 03:11:45 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534821105.13.0.56676864532.issue34400@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 3e26e42c905852394fa136f1cc564dac98b56166 by Benjamin Peterson (Zackery Spytz) in branch 'master': bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833) https://github.com/python/cpython/commit/3e26e42c905852394fa136f1cc564dac98b56166 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:12:07 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 21 Aug 2018 03:12:07 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534821127.31.0.56676864532.issue34400@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8316 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:12:17 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 21 Aug 2018 03:12:17 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534821137.67.0.56676864532.issue34400@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +8317 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:23:19 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 21 Aug 2018 03:23:19 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534821799.34.0.56676864532.issue34400@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 985dcd49cab44bba63ffebe413a9ef17b3da5fa7 by Miss Islington (bot) in branch '3.7': bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833) https://github.com/python/cpython/commit/985dcd49cab44bba63ffebe413a9ef17b3da5fa7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:35:50 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 21 Aug 2018 03:35:50 +0000 Subject: [issue34400] Undefined behavior in Parser/parsetok.c In-Reply-To: <1534240015.53.0.56676864532.issue34400@psf.upfronthosting.co.za> Message-ID: <1534822549.99.0.56676864532.issue34400@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e496b2b57a7b6e2633b741b1d5a934a7004ea3da by Miss Islington (bot) in branch '3.6': bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833) https://github.com/python/cpython/commit/e496b2b57a7b6e2633b741b1d5a934a7004ea3da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:38:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Aug 2018 03:38:31 +0000 Subject: [issue26544] platform.libc_ver() returns incorrect version number In-Reply-To: <1457742963.17.0.0403505576154.issue26544@psf.upfronthosting.co.za> Message-ID: <1534822711.14.0.56676864532.issue26544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'll merge it if it looks good to you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:48:35 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 21 Aug 2018 03:48:35 +0000 Subject: [issue34410] Segfault/TimeoutError: itertools.tee of multiprocessing.pool.imap_unordered In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1534823315.85.0.56676864532.issue34410@psf.upfronthosting.co.za> Xiang Zhang added the comment: It seems to me the problem is tee objects might encounter race conditions while `PyIter_Next` in `teedataobject_getitem` releases GIL. Other threads then might get into the same branch since `tdo->numread` haven't been updated yet. NULL slots are generated then, 2 objects are read from the underlying iterator and `tdo->numread` is updated twice while only one slot is set. As for multiprocessing.pool, there is a background task handling thread consuming one tee object and main thread consuming another one. The underlying iterator is `IMapIterator` which `next` method would block on a condition. While trying, I find the following snippet would also crash: import threading import itertools class C: def __iter__(self): return self def __next__(self): return 1 def test(i): print(list(i)) i1, i2 = itertools.tee(C()) threading.Thread(target=test, args=(i1,)).start() print(list(i2)) GDB shows it crashs in `teedataobject_dealloc` -> `teedataobject_clear`. I haven't understood what happened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 21 00:42:32 2018 From: report at bugs.python.org (underscore_asterisk) Date: Tue, 21 Aug 2018 04:42:32 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1534826552.69.0.56676864532.issue33187@psf.upfronthosting.co.za> underscore_asterisk added the comment: Hello, Can I take this up? I will create a PR either later today or tomorrow. ---------- nosy: +underscore_asterisk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 21 00:49:03 2018 From: report at bugs.python.org (Andrew Barnert) Date: Tue, 21 Aug 2018 04:49:03 +0000 Subject: [issue34447] ttk.TreeView (and maybe other functions) is overzealous in converting item values to ints Message-ID: <1534826943.57.0.56676864532.issue34447@psf.upfronthosting.co.za> New submission from Andrew Barnert : See this StackOverflow question for a repro case: https://stackoverflow.com/questions/51941260/ If you store a string that looks like an int in a TreeView's values, then call widget.item(row), the dict's 'values' value has that string converted to an int. This seems reasonable, because it's legal to store an int in a TreeView, and if tkinter didn't convert the values, you'd store 123 and get back '123'. However, I think it should only be converting strings that could be a valid Tcl int. If you store the int 123_456, Tcl of course gives you back '123456', not '123_456', so there's no reason for tkinter to convert '123_456' to an int. But it does, because ttk._tclobj_to_py just does a try: return int(s). --- Maeanwhile, if you instead call widget.item(row, options='values'), the string is left alone. At first glance, that made sense. But looking into what tkinter is getting back from Tcl, there's really no difference here. The tuple ('180518-23', '23/06/18') is no more or less conversion-worthy than the same tuple inside the list (